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

Public Member Functions

dict parse (self, bool is_backward=False, str initiator="src")
 
- Public Member Functions inherited from protocols.Custom.Custom
None add_field (self, str field, dict template_rules, bool is_backward=False, func=lambda x:x, backward_func=lambda x:x)
 
- 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)
 

Static Public Attributes

int layer = 7
 
string protocol_name = "dhcp"
 
list supported_keys
 
- Static Public Attributes inherited from protocols.Custom.Custom
bool custom_parser = True
 

Additional Inherited Members

- Static Public Member Functions inherited from protocols.Custom.Custom
dict build_nfq_list_match (list l, dict template_rules, bool is_backward=False, func=lambda x:x, backward_func=lambda x:x)
 
- 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.dhcp.dhcp.parse (   self,
bool   is_backward = False,
str   initiator = "src" 
)
Parse the DHCP 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.dhcp.dhcp.supported_keys
static
Initial value:
= [
"type",
"client-mac"
]

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