]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Remove the protoid_string() unused function
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 21 Nov 2017 07:21:40 +0000 (08:21 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 21 Nov 2017 07:21:40 +0000 (08:21 +0100)
addrtoname.c
addrtoname.h

index b26047c4e10a7555f6a18b3c6bb8d234a6c75a57..9ea438d3fdaea21ce527321d04bef91bffcf1cbf 100644 (file)
@@ -652,35 +652,6 @@ etherproto_string(netdissect_options *ndo, u_short port)
        return (tp->name);
 }
 
-const char *
-protoid_string(netdissect_options *ndo, register const u_char *pi)
-{
-       register u_int i, j;
-       register char *cp;
-       register struct protoidmem *tp;
-       char buf[sizeof("00:00:00:00:00")];
-
-       tp = lookup_protoid(ndo, pi);
-       if (tp->p_name)
-               return tp->p_name;
-
-       cp = buf;
-       if ((j = *pi >> 4) != 0)
-               *cp++ = hex[j];
-       *cp++ = hex[*pi++ & 0xf];
-       for (i = 4; (int)--i >= 0;) {
-               *cp++ = ':';
-               if ((j = *pi >> 4) != 0)
-                       *cp++ = hex[j];
-               *cp++ = hex[*pi++ & 0xf];
-       }
-       *cp = '\0';
-       tp->p_name = strdup(buf);
-       if (tp->p_name == NULL)
-               (*ndo->ndo_error)(ndo, "protoid_string: strdup(buf)");
-       return (tp->p_name);
-}
-
 #define ISONSAP_MAX_LENGTH 20
 const char *
 isonsap_string(netdissect_options *ndo, const u_char *nsap,
index fe8b6bbe54510316c129fc340a0e1fb9a05a6872..c3019194e041c3df204d7409f9562c167b7828f5 100644 (file)
@@ -47,7 +47,6 @@ 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 *, register u_int);
 extern const char *dnaddr_string(netdissect_options *, u_short);
-extern const char *protoid_string(netdissect_options *, const u_char *);
 extern const char *ipxsap_string(netdissect_options *, u_short);
 extern const char *getname(netdissect_options *, const u_char *);
 extern const char *getname6(netdissect_options *, const u_char *);