Smart Home firewall
Profile-based Smart Home firewall
Public Member Functions | Static Public Attributes | List of all members
protocols.Transport.Transport Class Reference
Inheritance diagram for protocols.Transport.Transport:
Inheritance graph
[legend]
Collaboration diagram for protocols.Transport.Transport:
Collaboration graph
[legend]

Public Member Functions

dict parse (self, bool is_backward=False, str initiator="")
 
- Public Member Functions inherited from protocols.Protocol.Protocol
None __init__ (self, dict protocol_data, dict device)
 
Protocol init_protocol (c, str protocol_name, dict protocol_data, dict device)
 
str format_list (self, list l, func=lambda x:x)
 
None add_field (self, str field, dict template_rules, bool is_backward=False, func=lambda x:x, backward_func=lambda x:x)
 

Static Public Attributes

int layer = 4
 
bool custom_parser = False
 
list supported_keys
 

Additional Inherited Members

- Static Public Member Functions inherited from protocols.Protocol.Protocol
Union[str, int] convert_value (str value)
 
- Public Attributes inherited from protocols.Protocol.Protocol
 protocol_data
 
 device
 
 rules
 

Member Function Documentation

◆ parse()

dict protocols.Transport.Transport.parse (   self,
bool   is_backward = False,
str   initiator = "" 
)
Parse a layer 4 protocol.

:param is_backward (optional): Whether the protocol must be parsed for a backward rule.
                               Optional, default is `False`.
:param initiator (optional): Connection initiator (src or dst).
                             Optional, default is "src".
:return: Dictionary containing the (forward and backward) nftables and nfqueue rules for this policy.

Reimplemented from protocols.Protocol.Protocol.

Member Data Documentation

◆ supported_keys

list protocols.Transport.Transport.supported_keys
static
Initial value:
= [
"src-port",
"dst-port"
]

The documentation for this class was generated from the following file: