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
)
| 2093 | |
| 2094 | @conf.commands.register |
| 2095 | def 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 | |
| 2119 | def split_bottom_up(lower, # type: Type[Packet] |
no test coverage detected