diff options
-rw-r--r-- | addrtoname.c | 29 | ||||
-rw-r--r-- | addrtoname.h | 1 |
2 files changed, 0 insertions, 30 deletions
diff --git a/addrtoname.c b/addrtoname.c index d43daac8..808ea57b 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -676,35 +676,6 @@ linkaddr_string(netdissect_options *ndo, const u_char *ep, return (tp->bs_name); } -const char * -etherproto_string(netdissect_options *ndo, u_short port) -{ - char *cp; - struct hnamemem *tp; - uint32_t i = port; - char buf[sizeof("0000")]; - - for (tp = &eprototable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt) - if (tp->addr == i) - return (tp->name); - - tp->addr = i; - tp->nxt = newhnamemem(ndo); - - cp = buf; - NTOHS(port); - *cp++ = hex[port >> 12 & 0xf]; - *cp++ = hex[port >> 8 & 0xf]; - *cp++ = hex[port >> 4 & 0xf]; - *cp++ = hex[port & 0xf]; - *cp++ = '\0'; - tp->name = strdup(buf); - if (tp->name == NULL) - (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC, - "etherproto_string: strdup(buf)"); - return (tp->name); -} - #define ISONSAP_MAX_LENGTH 20 const char * isonsap_string(netdissect_options *ndo, const u_char *nsap, diff --git a/addrtoname.h b/addrtoname.h index dc22458f..a127b4e8 100644 --- a/addrtoname.h +++ b/addrtoname.h @@ -42,7 +42,6 @@ enum { extern const char *linkaddr_string(netdissect_options *, const u_char *, const unsigned int, const unsigned int); extern const char *etheraddr_string(netdissect_options *, const u_char *); extern const char *le64addr_string(netdissect_options *, const u_char *); -extern const char *etherproto_string(netdissect_options *, u_short); extern const char *tcpport_string(netdissect_options *, u_short); extern const char *udpport_string(netdissect_options *, u_short); extern const char *isonsap_string(netdissect_options *, const u_char *, u_int); |