# software/wrsw_rtud/mac.h File Reference

`#include <stdint.h>`
`#include <string.h>`
`#include <linux/if_ether.h>`

Go to the source code of this file.

## Functions

static int | mac_equal (uint8_t a[ETH_ALEN], uint8_t b[ETH_ALEN])
| Check whether two mac addresses are equal.
static uint8_t * | mac_copy (uint8_t dst[ETH_ALEN], uint8_t src[ETH_ALEN])
| copies src mac address into dst mac address.
static uint8_t * | mac_clean (uint8_t mac[ETH_ALEN])
| Set MAC address to 00:00:00:00:00:00.
char * | mac_to_string (uint8_t mac[ETH_ALEN])
| Helper function to convert mac address into a string.

## Function Documentation

static uint8_t* mac_clean | ( | uint8_t | mac[ETH_ALEN] ) | `[inline, static]`

Set MAC address to 00:00:00:00:00:00.

Returns:
  pointer to mac address

static uint8_t* mac_copy | ( | uint8_t | dst[ETH_ALEN],
|  | uint8_t | src[ETH_ALEN]
| ) |  | `[inline, static]`

copies src mac address into dst mac address.

Returns:
  pointer to dst mac address

static int mac_equal | ( | uint8_t | a[ETH_ALEN],
|  | uint8_t | b[ETH_ALEN]
| ) |  | `[inline, static]`

Check whether two mac addresses are equal.

Returns:
  1 if both addresses are equal. 0 otherwise.

char* mac_to_string | ( | uint8_t | mac[ETH_ALEN] ) |

Helper function to convert mac address into a string.

All Data Structures Files Functions Variables Defines