Vent pipes must be installed so they stay dry. This means that they should emerge from the top of the drainpipe, either straight vertically or at no less than a 45-degree angle from horizontal, so that water cannot back up into them.