MCPcopy Index your code
hub / github.com/secdev/scapy / _append_route6

Function _append_route6

scapy/arch/windows/__init__.py:918–938  ·  view source on GitHub ↗
(routes,  # type: List[Tuple[str, int, str, str, List[str], int]]
                   dpref,  # type: str
                   dp,  # type: int
                   nh,  # type: str
                   iface,  # type: str
                   lifaddr,  # type: List[Tuple[str, int, str]]
                   metric,  # type: int
                   )

Source from the content-addressed store, hash-verified

916
917
918def _append_route6(routes, # type: List[Tuple[str, int, str, str, List[str], int]]
919 dpref, # type: str
920 dp, # type: int
921 nh, # type: str
922 iface, # type: str
923 lifaddr, # type: List[Tuple[str, int, str]]
924 metric, # type: int
925 ):
926 # type: (...) -> None
927 cset = [] # candidate set (possible source addresses)
928 if iface == conf.loopback_name:
929 if dpref == '::':
930 return
931 cset = ['::1']
932 else:
933 devaddrs = (x for x in lifaddr if x[2] == iface)
934 cset = construct_source_candidate_set(dpref, dp, devaddrs)
935 if not cset:
936 return
937 # APPEND (DESTINATION, NETMASK, NEXT HOP, IFACE, CANDIDATES, METRIC)
938 routes.append((dpref, dp, nh, iface, cset, metric))
939
940
941def read_routes6():

Callers 1

_read_routes_cFunction · 0.85

Calls 2

appendMethod · 0.45

Tested by

no test coverage detected