]> 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:46:45 +0000 (07:46 +0000)
committerhannes <hannes>
Thu, 29 Sep 2005 07:46:45 +0000 (07:46 +0000)
addrtoname.c
interface.h
netdissect.h

index e32a18b39116b8f4cb601e4c0a1d37cff8710c2b..ad2f6e285380dfd0378f575b84f72e9200d4d7cd 100644 (file)
@@ -23,7 +23,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.108.2.6 2005-07-26 17:34:54 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.108.2.7 2005-09-29 07:46:45 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 3dc5a39c8c64167ce3b968466473fea3c4d0bd05..cef47df94a20c15f159b5d242796c3a294646862 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.244.2.17 2005-09-20 06:05:36 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.244.2.18 2005-09-29 07:46:45 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 b5e805b236f97776752ded2870f6f98011f5e4d3..d4628c9e2e2dac9c741266245140dfd8470bf1af 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.16.2.2 2005-07-07 01:24:32 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.16.2.3 2005-09-29 07:46:46 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);