Ejemplo n.º 1
0
 def _send_pkt(self, spkt, next_=None):
     if not next_:
         try:
             fh_info = lib_sciond.get_overlay_dest(
                 spkt, connector=self._connector)
         except lib_sciond.SCIONDLibError as e:
             logging.error("Error getting first hop: %s" % e)
             kill_self()
         next_hop = fh_info.ipv4() or fh_info.ipv6()
         port = fh_info.p.port
     else:
         next_hop, port = next_
     assert next_hop is not None
     logging.debug("Sending (via %s:%s):\n%s", next_hop, port, spkt)
     self.sock.send(spkt.pack(), (next_hop, port))
Ejemplo n.º 2
0
 def _get_next_hop(self, spkt):
     fh_info = lib_sciond.get_overlay_dest(spkt, connector=self._connector)
     return fh_info.ipv4() or fh_info.ipv6(), fh_info.p.port