Ejemplo n.º 1
0
    def _create_extensions(self):
        # Determine number of border routers on path in single direction
        routers_no = (self.path.get_as_hops() - 1) * 2
        # Number of router for round-trip (return path is symmetric)
        routers_no *= 2

        # Extensions
        exts = []
        # Create empty Traceroute extensions with allocated space
        exts.append(TracerouteExt.from_values(routers_no))
        # Create PathTransportExtension
        # One with data-plane path.
        of_path = PathTransOFPath.from_values(self.addr, self.dst, self.path)
        exts.append(
            PathTransportExt.from_values(PathTransType.OF_PATH, of_path))
        return exts
Ejemplo n.º 2
0
 def _create_extensions(self):
     return [TracerouteExt.from_values(5)]
Ejemplo n.º 3
0
 def _create_extensions(self):
     exts = []
     exts.append(TracerouteExt.from_values(5))
     exts.append(SCMPExt.from_values(error=False))
     return exts
Ejemplo n.º 4
0
 def _create_extensions(self):
     exts = []
     for i in range(MAX_HOPBYHOP_EXT + 1):
         exts.append(TracerouteExt.from_values(5))
     return exts