#include <netdissect-stdinc.h>
-#include "ether.h"
#include "netdissect.h"
#include "addrtoname.h"
typedef struct ether_addr {
- unsigned char octet[ETHER_ADDR_LEN];
+ unsigned char octet[MAC_ADDR_LEN];
} ether_address;
typedef struct ether_entry {
else
fmt = "%02x-%02x-%02x-%02x-%02x-%02x";
- if (sscanf(str, fmt, ð[0], ð[1], ð[2], ð[3], ð[4], ð[5]) != ETHER_ADDR_LEN)
+ if (sscanf(str, fmt, ð[0], ð[1], ð[2], ð[3], ð[4], ð[5]) != MAC_ADDR_LEN)
return (0);
str = strtok (str, " \t");
*result = name;
- for (i = 0; i < ETHER_ADDR_LEN; i++)
+ for (i = 0; i < MAC_ADDR_LEN; i++)
e->octet[i] = eth[i];
return (1);
if (!e)
break;
- memcpy(&e->eth_addr, ð, ETHER_ADDR_LEN);
+ memcpy(&e->eth_addr, ð, MAC_ADDR_LEN);
e->name = strdup(name);
if (!e->name) {
free(e);
}
for (cache = eth0; cache; cache = cache->next)
- if (!memcmp(&e->octet, &cache->eth_addr, ETHER_ADDR_LEN)) {
+ if (!memcmp(&e->octet, &cache->eth_addr, MAC_ADDR_LEN)) {
strcpy (name,cache->name);
return (0);
}