Nut/OS  5.0.5
API Reference
ether_addr.c File Reference

MAC address conversion functions. More...

#include <string.h>
#include <netinet/if_ether.h>
Include dependency graph for ether_addr.c:

Functions

uint8_tether_aton (const char *str)
 Convert an ASCII string to a binary Ethernet address.
char * ether_ntoa (const uint8_t *mac)
 Convert a binary Ethernet address to an ASCII string.

Detailed Description

MAC address conversion functions.

 * $Id: ether_addr.c 4473 2012-08-20 15:12:45Z haraldkipp $
 * 

Function Documentation

uint8_t* ether_aton ( const char *  str)

Convert an ASCII string to a binary Ethernet address.

Note:
This function returns a pointer to internal static storage space that will be overwritten by subsequent calls.
Parameters:
strString to convert.
Returns:
Pointer to a static string that contains the converted binary address.

References memset(), and NULL.

Referenced by main().

Here is the call graph for this function:

char* ether_ntoa ( const uint8_t mac)

Convert a binary Ethernet address to an ASCII string.

Note:
This function returns a pointer to internal static storage space that will be overwritten by subsequent calls.
Parameters:
macAddress to convert.
Returns:
Pointer to a static string that contains the converted ASCII string.

Referenced by main().