Start Dhcp Listener
Starts dhcp listener.
Arguments Description
**channel_name (str): The name of dhcp channel
- filter (dict, optional): dict of filter to be applied on received dhcp frames, only frames which match
this filter will be stored in the queue.
Example {“type”:0x03, “xid”:0x10e1}
*for syntax you can check the andi sdk documentation *
- dhcp_layer_filter (dict, optional): filter to be applied on received frames, only frames which match this
filter will be stored in the queue.
- Example {‘udp_header’: {‘port_source’: 10},
‘ipv4_header’: {‘ip_address_source’: ip_add}, ‘ipv4_header’: {‘mac_address_source’: mac_add}}
for syntax you can check the andi sdk documentation
silent_mode (boolean, optional): Flag to choose the listening mode. (Default to True)
When silent_mode = False, both the MTF-Pyapi and MTF-Core callbacks will work. Else When silent_mode = True, only the MTF-Core callback will be activated.**
Returns
bool: True if the dhcp listener is started; otherwise, False.
Example
${dhcp_filter}= Create Dictionary type=${0x5} xid=${0x10e1}${layer0}= Create Dictionary mac_address_source=${mac_add}${layer1}= Create Dictionary ip_address_source=${ip_add}${layer2}= Create Dictionary port_source=${10}${dhcp_layer_filter}= Create Dictionary udp_header=${layer2} ipv4_header=${layer1} ethernet_header=${layer0}${res}= Start Dhcp Listener ${channel_name} ${dhcp_filter} ${dhcp_layer_filter}
Note
It is highly recommended to set the silent mode to True with high-network traffic.