daemon/core/broker.py
def addlinkendpoints(self, msg, serverset1, serverset2):
        ''' For a link message that is not handled locally, inform the remote
            servers of the IP addresses used as tunnel endpoints by adding
            opaque data to the link message.
        '''
        ip1 = ""
        for server in serverset1:
            (host, port, sock) = self.getserver(server)
            if host is not None:
                ip1 = host
        ip2 = ""
        for server in serverset2:
            (host, port, sock) = self.getserver(server)
            if host is not None:
                ip2 = host
        tlvdata = msg.rawmsg[coreapi.CoreMessage.hdrsiz:] 
        tlvdata += coreapi.CoreLinkTlv.pack(coreapi.CORE_TLV_LINK_OPAQUE,
                                    "%s:%s" % (ip1, ip2))
        newraw = coreapi.CoreLinkMessage.pack(msg.flags, tlvdata)
        msghdr = newraw[:coreapi.CoreMessage.hdrsiz] 
        return coreapi.CoreLinkMessage(msg.flags, msghdr, tlvdata)
 For a link message that is not handled locally, inform the remote
            servers of the IP addresses used as tunnel endpoints by adding
            opaque data to the link message.
        
For a link message that is not handled locally, inform the remote
servers of the IP addresses used as tunnel endpoints by adding
opaque data to the link message.
For a link message that is not handled locally inform the remote servers of the IP addresses used as tunnel endpoints by adding opaque data to the link message .
def addlinkendpoints(self, msg, serverset1, serverset2):
        ip1 = ""
        for server in serverset1:
            (host, port, sock) = self.getserver(server)
            if host is not None:
                ip1 = host
        ip2 = ""
        for server in serverset2:
            (host, port, sock) = self.getserver(server)
            if host is not None:
                ip2 = host
        tlvdata = msg.rawmsg[coreapi.CoreMessage.hdrsiz:] 
        tlvdata += coreapi.CoreLinkTlv.pack(coreapi.CORE_TLV_LINK_OPAQUE,
                                    "%s:%s" % (ip1, ip2))
        newraw = coreapi.CoreLinkMessage.pack(msg.flags, tlvdata)
        msghdr = newraw[:coreapi.CoreMessage.hdrsiz] 
        return coreapi.CoreLinkMessage(msg.flags, msghdr, tlvdata)
def addlinkendpoints ( self , msg , serverset1 , serverset2 ) : ip1 = "" for server in serverset1 : ( host , port , sock ) = self . getserver ( server ) if host is not None : ip1 = host ip2 = "" for server in serverset2 : ( host , port , sock ) = self . getserver ( server ) if host is not None : ip2 = host tlvdata = msg . rawmsg [ coreapi . CoreMessage . hdrsiz : ] tlvdata += coreapi . CoreLinkTlv . pack ( coreapi . CORE_TLV_LINK_OPAQUE , "%s:%s" % ( ip1 , ip2 ) ) newraw = coreapi . CoreLinkMessage . pack ( msg . flags , tlvdata ) msghdr = newraw [ : coreapi . CoreMessage . hdrsiz ] return coreapi . CoreLinkMessage ( msg . flags , msghdr , tlvdata )
For a link message that is not handled locally, inform the remote
servers of the IP addresses used as tunnel endpoints by adding
opaque data to the link message.
For a link message that is not handled locally inform the remote servers of the IP addresses used as tunnel endpoints by adding opaque data to the link message .
''' For a link message that is not handled locally, inform the remote
            servers of the IP addresses used as tunnel endpoints by adding
            opaque data to the link message.
        '''
self
msg
serverset1
serverset2