'Construct an ethernet frame containing an ip datagram containing a udp
datagram containing the given application-level payload.
@param source: The source port for the UDP datagram being encapsulated.
@type source: L{int}
@param destination: The destination port for the UDP datagram being
encapsulated.
@type destination: L{int}
@param payload: The application data to include in the udp datagram.
@type payload: L{bytes}
@return: An ethernet frame.
@rtype: L{bytes}'

def encapsulate(self, source, destination, payload):

    tun = TunHelper(self.tunnelRemote, self.tunnelLocal)
    ip = tun.encapsulate(source, destination, payload)
    frame = _ethernet(src='\x00\x00\x00\x00\x00\x00', dst='\xff\xff\xff\xff\xff\xff', protocol=_IPv4, payload=ip)
    if self.pi:
        protocol = _IPv4
        flags = 0
        frame = ((_H(flags) + _H(protocol)) + frame)
    return frame
