Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/sshuttle/sshuttle
/ _maskbits
Function
_maskbits
sshuttle/server.py:49–56 ·
view source on GitHub ↗
(netmask)
Source
from the content-addressed store, hash-verified
47
48
49
def
_maskbits(netmask):
50
# FIXME: IPv4 only
51
if
not netmask:
52
return
32
53
for
i in range(32):
54
if
netmask[0] & _shl(1, i):
55
return
32 - i
56
return
0
57
58
59
def
_shl(n, bits):
Callers
2
_route_netstat
Function · 0.85
_route_windows
Function · 0.85
Calls
1
_shl
Function · 0.85
Tested by
no test coverage detected