MCPcopy Create free account
hub / github.com/sshuttle/sshuttle / _route_windows

Function _route_windows

sshuttle/server.py:82–93  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

80
81
82def _route_windows(line):
83 if " On-link " not in line:
84 return None, None
85 dest, net_mask = re.split(r'\s+', line.strip())[:2]
86 if net_mask == "255.255.255.255":
87 return None, None
88 for p in ('127.', '0.', '224.', '169.254.'):
89 if dest.startswith(p):
90 return None, None
91 ipw = _ipmatch(dest)
92 mask = _maskbits(_ipmatch(net_mask))
93 return ipw, mask
94
95
96def _list_routes(argv, extract_route):

Callers

nothing calls this directly

Calls 2

_ipmatchFunction · 0.85
_maskbitsFunction · 0.85

Tested by

no test coverage detected