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,
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);