tc_static module¶
This module is part of the nmeta suite running on top of Ryu SDN controller to provide network identity and flow (traffic classification) metadata
-
class
tc_static.StaticInspect(config)¶ Bases:
baseclass.BaseClassThis class is instantiated by tc_policy.py (class: TrafficClassificationPolicy) and provides methods to query static traffic classification matches
-
check_static(condition, pkt)¶ Passed condition and flows packet objects Update the condition match with boolean of result of match checks
-
is_match_ethertype(value_to_check1, value_to_check2)¶ Passed a two prospective EtherTypes and check to see if they are the same. Return 1 for both the same EtherType and 0 for different Values can be hex or decimal and are 2 bytes in length
-
is_match_ip_space(ip_addr, ip_space)¶ Passed an IP address and an IP address space and check if the IP address belongs to the IP address space. If it does return 1 otherwise return 0
-
is_match_macaddress(value_to_check1, value_to_check2)¶ Passed a two prospective MAC addresses and check to see if they are the same address. Return 1 for both the same MAC address and 0 for different
-
is_valid_ethertype(value_to_check)¶ Passed a prospective EtherType and check that it is valid. Can be hex (0x*) or decimal Return 1 for is valid IP address and 0 for not valid
-
is_valid_ip_space(value_to_check)¶ Passed a prospective IP address and check that it is valid. Can be IPv4 or IPv6 and can be range or have CIDR mask Return 1 for is valid IP address and 0 for not valid
-
is_valid_macaddress(value_to_check)¶ Passed a prospective MAC address and check that it is valid. Return 1 for is valid IP address and 0 for not valid
-
is_valid_transport_port(value_to_check)¶ Passed a prospective TCP or UDP port number and check that it is an integer in the correct range. Return 1 for is valid port number and 0 for not valid port number
-