Andi To Mtf Eth Mapping Module

mtf.utils.eth_filters.andi_to_mtf_eth_mapping.create_mtf_address(address: str)

Converts the str ip/mac address into a list of int

=== Arguments’ Description ===
address (str): the ip/mac address as follows:

ip “192.168.0.1” => separated by “.” mac “90:1B:0E:D9:06:D7” => separated by “:”

=== Returns ===

list(int): the IP address the form a list of integers

mtf.utils.eth_filters.andi_to_mtf_eth_mapping.someip_header_converter(someip_filter)

converts the someip_header dict into an mtf someip filter

=== Arguments’ Description ===

someip_filter (dict): the someip header filter using ANDI

=== Returns ===

dict: the corresponding mtf filter

mtf.utils.eth_filters.andi_to_mtf_eth_mapping.create_ipv4_filter(ipv4_filter)

converts the ips and macs into mtf filter

=== Arguments’ Description ===

ipv4_filter (dict): the andi ipv4_header filter

=== Returns ===

dict: the mtf ipv4 + data_link_layer

mtf.utils.eth_filters.andi_to_mtf_eth_mapping.create_ipv4_header(ipv4_header)

converts the ANDI ipv4_filter into a mtf ipv4 + datalink_layer (mac)

=== Arguments’ Description ===

ipv4_header (dict): ipv4_header dict filter

=== Returns ===

dict: corresponding mtf filter

mtf.utils.eth_filters.andi_to_mtf_eth_mapping.someip_filter_converter(someip_filter)

converts the someip filter combined with ipv4 filter to mtf filter

=== Arguments’ Description ===

someip_filter (dict): the someip filter dict

=== Returns ===

dict: the corresponding mtf filter for someip

mtf.utils.eth_filters.andi_to_mtf_eth_mapping.udp_header_converter(udp_header)

Converts the udp_header into a mtf filter

=== Arguments’ Description ===

udp_header (dict): the udp filter

=== Returns ===

dict: the corresponding mtf filter

mtf.utils.eth_filters.andi_to_mtf_eth_mapping.arp_converter(arp_filter)

Converts the arp filter into mtf filter

=== Note ===

operation attribute still not exposed

=== Arguments’ Description ===

arp_filter (dict): the arp filter

=== Returns ===

dict: the corresponding mtf filter

mtf.utils.eth_filters.andi_to_mtf_eth_mapping.someip_sd_converter(someip_sd: dict, sd_header: dict)

convert someip_sd entry into a mtf filter

=== Arguments’ Description ===

someip_sd (dict): someip_sd sd_header (dict): sd_header

mtf.utils.eth_filters.andi_to_mtf_eth_mapping.convert_udp_header(udp_filter)

convert udp_header into mtf filter

=== Returns ===

dict: the corresponding mtf filter

mtf.utils.eth_filters.andi_to_mtf_eth_mapping.dhcp_filter(dhcp)

create a mtf filter from dhcp filter

=== Arguments’ Description ===

dhcp (dict): dhcp filter

=== Returns ===

dict: the corresponding mtf filter

mtf.utils.eth_filters.andi_to_mtf_eth_mapping.convert_andi_to_mtf_mapping(protocol: EthProtocolType, andi_struct: dict, sd_header: dict | None = None)