예제 #1
0
    def __repr__(self):
        rtlst = []

        for net, msk, gw, iface, addr in self.routes:
            rtlst.append(
                (ltoa(net), ltoa(msk), gw,
                 (iface.name if not isinstance(iface, basestring) else iface),
                 addr))

        return pretty_routes(
            rtlst, [("Network", "Netmask", "Gateway", "Iface", "Output IP")])
예제 #2
0
    def __repr__(self):
        rtlst = []
        for net, msk, gw, iface, addr, metric in self.routes:
            rtlst.append((ltoa(net),
                      ltoa(msk),
                      gw,
                      (iface.name if not isinstance(iface, six.string_types) else iface),
                      addr,
                      str(metric)))

        return pretty_routes(rtlst,
                             [("Network", "Netmask", "Gateway", "Iface", "Output IP", "Metric")])
예제 #3
0
파일: route.py 프로젝트: mcpat/scapy
    def __repr__(self):
        rtlst = []
        
        for net,msk,gw,iface,addr in self.routes:
	    rtlst.append((ltoa(net),
                      ltoa(msk),
                      gw,
                      (iface.name if not isinstance(iface, six.string_types) else iface),
                      addr))

        return pretty_routes(rtlst,
                             [("Network", "Netmask", "Gateway", "Iface", "Output IP")])