MCPcopy Index your code
hub / github.com/sshuttle/sshuttle / ipt

Function ipt

sshuttle/linux.py:30–40  ·  view source on GitHub ↗
(family, table, *args)

Source from the content-addressed store, hash-verified

28
29
30def ipt(family, table, *args):
31 if family == socket.AF_INET6:
32 argv = ['ip6tables', '-w', '-t', table] + list(args)
33 elif family == socket.AF_INET:
34 argv = ['iptables', '-w', '-t', table] + list(args)
35 else:
36 raise Exception('Unsupported family "%s"' % family_to_string(family))
37 debug1('%s' % ' '.join(argv))
38 rv = ssubprocess.call(argv, env=get_env())
39 if rv:
40 raise Fatal('%r returned %d' % (argv, rv))
41
42
43def nft(family, table, action, *args):

Callers 3

_iptMethod · 0.90
_ipmMethod · 0.90
_iptMethod · 0.90

Calls 4

family_to_stringFunction · 0.90
debug1Function · 0.90
get_envFunction · 0.90
FatalClass · 0.90

Tested by

no test coverage detected