MCPcopy
hub / github.com/secdev/scapy / bind_layers

Function bind_layers

scapy/packet.py:2095–2116  ·  view source on GitHub ↗

Bind 2 layers on some specific fields' values. It makes the packet being built and dissected when the arguments are present. This function calls both bind_bottom_up and bind_top_down, with all passed arguments. Please have a look at their docs: - help(bind_bottom_up)

(lower,  # type: Type[Packet]
                upper,  # type: Type[Packet]
                __fval=None,  # type: Optional[Dict[str, int]]
                **fval  # type: Any
                )

Source from the content-addressed store, hash-verified

2093
2094@conf.commands.register
2095def bind_layers(lower, # type: Type[Packet]
2096 upper, # type: Type[Packet]
2097 __fval=None, # type: Optional[Dict[str, int]]
2098 **fval # type: Any
2099 ):
2100 # type: (...) -> None
2101 """Bind 2 layers on some specific fields' values.
2102
2103 It makes the packet being built and dissected when the arguments
2104 are present.
2105
2106 This function calls both bind_bottom_up and bind_top_down, with
2107 all passed arguments.
2108
2109 Please have a look at their docs:
2110 - help(bind_bottom_up)
2111 - help(bind_top_down)
2112 """
2113 if __fval is not None:
2114 fval.update(__fval)
2115 bind_top_down(lower, upper, **fval)
2116 bind_bottom_up(lower, upper, **fval)
2117
2118
2119def split_bottom_up(lower, # type: Type[Packet]

Callers 15

rtnetlink.pyFile · 0.90
pfroute.pyFile · 0.90
ethercat.pyFile · 0.90
ife.pyFile · 0.90
coap.pyFile · 0.90
geneve.pyFile · 0.90
vqp.pyFile · 0.90
hicp.pyFile · 0.90
mqttsn.pyFile · 0.90
homeplugsg.pyFile · 0.90
macsec.pyFile · 0.90
slowprot.pyFile · 0.90

Calls 3

bind_top_downFunction · 0.85
bind_bottom_upFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected