esptest.network.mac module

esptest.network.mac.mac_offset(mac_address, offset)[source]
Parameters:
  • mac_address (str)

  • offset (int)

Return type:

str

esptest.network.mac.normalize_mac(mac)[source]

Normalize a MAC address. Input: any common MAC format Output: XX:XX:XX:XX:XX:XX (uppercase)

Parameters:

mac (str)

Return type:

str

esptest.network.mac.format_mac_to_h3c(mac)[source]

Convert a MAC address to H3C format. Input formats: xx:xx:xx:xx:xx:xx or XX-XX-XX-XX-XX-XX (or with dots) Output format: xxxx-xxxx-xxxx (lowercase)

Parameters:

mac (str)

Return type:

str