]> The Tcpdump Group git mirrors - tcpdump/commitdiff
depreciate llcsap_string() as LLC SAP name resolution is now done via a single tokent...
authorhannes <hannes>
Thu, 29 Sep 2005 07:45:21 +0000 (07:45 +0000)
committerhannes <hannes>
Thu, 29 Sep 2005 07:45:21 +0000 (07:45 +0000)
addrtoname.c
interface.h
netdissect.h

index 64ec7ab7e056add30ba604f723bb41657133d942..06e44e1b3ab012e46d629088c79b33cda6a1cad1 100644 (file)
@@ -23,7 +23,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.114 2005-07-26 17:33:56 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.115 2005-09-29 07:45:22 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -88,7 +88,6 @@ struct hnamemem tporttable[HASHNAMESIZE];
 struct hnamemem uporttable[HASHNAMESIZE];
 struct hnamemem eprototable[HASHNAMESIZE];
 struct hnamemem dnaddrtable[HASHNAMESIZE];
-struct hnamemem llcsaptable[HASHNAMESIZE];
 struct hnamemem ipxsaptable[HASHNAMESIZE];
 
 #if defined(INET6) && defined(WIN32)
@@ -586,25 +585,6 @@ protoid_string(register const u_char *pi)
        return (tp->p_name);
 }
 
-const char *
-llcsap_string(u_char sap)
-{
-       register struct hnamemem *tp;
-       register u_int32_t i = sap;
-       char buf[sizeof("sap 00")];
-
-       for (tp = &llcsaptable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
-               if (tp->addr == i)
-                       return (tp->name);
-
-       tp->addr = i;
-       tp->nxt = newhnamemem();
-
-       snprintf(buf, sizeof(buf), "sap %02x", sap & 0xff);
-       tp->name = strdup(buf);
-       return (tp->name);
-}
-
 #define ISONSAP_MAX_LENGTH 20
 const char *
 isonsap_string(const u_char *nsap, register u_int nsap_length)
@@ -873,40 +853,6 @@ init_etherarray(void)
        }
 }
 
-static struct tok llcsap_db[] = {
-       { LLCSAP_NULL,          "null" },
-       { LLCSAP_8021B_I,       "802.1b-gsap" },
-       { LLCSAP_8021B_G,       "802.1b-isap" },
-       { LLCSAP_IP,            "ip-sap" },
-       { LLCSAP_PROWAYNM,      "proway-nm" },
-       { LLCSAP_8021D,         "802.1d" },
-       { LLCSAP_RS511,         "eia-rs511" },
-       { LLCSAP_ISO8208,       "x.25/llc2" },
-       { LLCSAP_PROWAY,        "proway" },
-       { LLCSAP_SNAP,          "snap" },
-       { LLCSAP_IPX,           "IPX" },
-       { LLCSAP_NETBEUI,       "netbeui" },
-       { LLCSAP_ISONS,         "iso-clns" },
-       { LLCSAP_GLOBAL,        "global" },
-       { 0,                    NULL }
-};
-
-static void
-init_llcsaparray(void)
-{
-       register int i;
-       register struct hnamemem *table;
-
-       for (i = 0; llcsap_db[i].s != NULL; i++) {
-               table = &llcsaptable[llcsap_db[i].v];
-               while (table->name)
-                       table = table->nxt;
-               table->name = llcsap_db[i].s;
-               table->addr = llcsap_db[i].v;
-               table->nxt = newhnamemem();
-       }
-}
-
 static struct tok ipxsap_db[] = {
        { 0x0000, "Unknown" },
        { 0x0001, "User" },
@@ -1163,7 +1109,6 @@ init_addrtoname(u_int32_t localnet, u_int32_t mask)
        init_etherarray();
        init_servarray();
        init_eprotoarray();
-       init_llcsaparray();
        init_protoidarray();
        init_ipxsaparray();
 }
index 8a1b87885b18676c2d3b20bbd39408903630ae89..55172679ab19dda035a54aaf8f2b402e0fa1979e 100644 (file)
@@ -18,7 +18,7 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.261 2005-09-20 06:01:21 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.262 2005-09-29 07:45:21 hannes Exp $ (LBL)
  */
 
 #ifndef tcpdump_interface_h
@@ -155,7 +155,6 @@ extern void safeputchar(int);
 extern void safeputs(const char *);
 
 extern const char *isonsap_string(const u_char *, register u_int);
-extern const char *llcsap_string(u_char);
 extern const char *protoid_string(const u_char *);
 extern const char *ipxsap_string(u_short);
 extern const char *dnname_string(u_short);
index cca820e46487b9a14a78e4f813b558bb6187e556..a25d8538e8d6be342c79a07cb05ed9be0e383edf 100644 (file)
@@ -21,7 +21,7 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.18 2005-07-07 01:22:16 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.19 2005-09-29 07:45:22 hannes Exp $ (LBL)
  */
 
 #ifndef netdissect_h
@@ -235,7 +235,6 @@ extern void safeputs(const char *);
 
 #if 0
 extern const char *isonsap_string(netdissect_options *, const u_char *);
-extern const char *llcsap_string(netdissect_options *, u_char);
 extern const char *protoid_string(netdissect_options *, const u_char *);
 extern const char *dnname_string(netdissect_options *, u_short);
 extern const char *dnnum_string(netdissect_options *, u_short);