2 /* This file was part of the etherlib package. */
10 #include <net/gen/ether.h>
11 #include <net/gen/if_ether.h>
13 #define ETHERSTRLEN 18 /* max length of "xx:xx:xx:xx:xx:xx" */
14 #define ether_addr ether_addr_t
16 char *ether_e2a
_ARGS(( ether_addr_t
*a
, char *e
));
22 ether_e2a (addr
, estring
)
30 estring
= (char *) malloc (ETHERSTRLEN
);
33 (void) sprintf (estring
, "%x:%x:%x:%x:%x:%x",
34 addr
->bytes
[0], addr
->bytes
[1], addr
->bytes
[2],
35 addr
->bytes
[3], addr
->bytes
[4], addr
->bytes
[5]);
45 static char estring
[ETHERSTRLEN
];
47 return (ether_e2a (addr
, estring
));