]> git.pld-linux.org Git - packages/tcpdump.git/commitdiff
- orphaned, outdated
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 21 Apr 2006 23:41:32 +0000 (23:41 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    tcpdump-4.x.patch -> 1.2
    tcpdump-giop.patch -> 1.3
    tcpdump-glibc2.1.patch -> 1.2
    tcpdump-iphl.patch -> 1.2
    tcpdump-libsmi.patch -> 1.2
    tcpdump-make.patch -> 1.3
    tcpdump-no-libsmi.patch -> 1.2
    tcpdump-sparc64.patch -> 1.2

tcpdump-4.x.patch [deleted file]
tcpdump-giop.patch [deleted file]
tcpdump-glibc2.1.patch [deleted file]
tcpdump-iphl.patch [deleted file]
tcpdump-libsmi.patch [deleted file]
tcpdump-make.patch [deleted file]
tcpdump-no-libsmi.patch [deleted file]
tcpdump-sparc64.patch [deleted file]

diff --git a/tcpdump-4.x.patch b/tcpdump-4.x.patch
deleted file mode 100644 (file)
index 76f1c45..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-Index: addrtoname.c
-===================================================================
-RCS file: /mnt/ncvs/src/contrib/tcpdump/addrtoname.c,v
-retrieving revision 1.5
-diff -u -r1.5 addrtoname.c
---- addrtoname.c       1998/09/15 19:46:59     1.5
-+++ addrtoname.c       2000/10/30 10:28:54
-@@ -525,7 +525,7 @@
-       tp->addr = i;
-       tp->nxt = newhnamemem();
--      (void)sprintf(buf, "%u", i);
-+      (void)snprintf(buf, sizeof(buf), "%u", i);
-       tp->name = savestr(buf);
-       return (tp->name);
- }
-@@ -551,7 +551,7 @@
-               while (table->name)
-                       table = table->nxt;
-               if (nflag) {
--                      (void)sprintf(buf, "%d", port);
-+                      (void)snprintf(buf, sizeof(buf), "%d", port);
-                       table->name = savestr(buf);
-               } else
-                       table->name = savestr(sv->s_name);
-Index: print-atalk.c
-===================================================================
-RCS file: /mnt/ncvs/src/contrib/tcpdump/print-atalk.c,v
-retrieving revision 1.6
-diff -u -r1.6 print-atalk.c
---- print-atalk.c      1998/09/15 19:46:59     1.6
-+++ print-atalk.c      2000/10/30 10:28:54
-@@ -495,7 +495,7 @@
- {
-       register struct hnamemem *tp, *tp2;
-       register int i = (atnet << 8) | athost;
--      char nambuf[256];
-+      char nambuf[MAXHOSTNAMELEN + 20];
-       static int first = 1;
-       FILE *fp;
-@@ -540,7 +540,7 @@
-               if (tp2->addr == i) {
-                       tp->addr = (atnet << 8) | athost;
-                       tp->nxt = newhnamemem();
--                      (void)sprintf(nambuf, "%s.%d", tp2->name, athost);
-+                      (void)snprintf(nambuf, sizeof(nambuf), "%s.%d", tp2->name, athost);
-                       tp->name = savestr(nambuf);
-                       return (tp->name);
-               }
-;Index: print-fr.c
-;===================================================================
-;RCS file: /mnt/ncvs/src/contrib/tcpdump/print-fr.c,v
-;retrieving revision 1.2
-;diff -u -r1.2 print-fr.c
-;--- print-fr.c        1998/01/01 04:13:43     1.2
-;+++ print-fr.c        2000/10/30 10:28:58
-;@@ -395,12 +395,12 @@
-;                  break;
-;              case LINK_VERIFY_IE_91:
-;              case LINK_VERIFY_IE_94:
-;-                 sprintf(temp_str,"TX Seq: %3d, RX Seq: %3d",
-;+                 snprintf(temp_str, sizeof(temp_str), "TX Seq: %3d, RX Seq: %3d",
-;                          ptemp[2], ptemp[3]);
-;                  decode_str = temp_str;
-;                  break;
-;              case PVC_STATUS_IE:
-;-                 sprintf(temp_str,"DLCI %d: status %s %s",
-;+                 snprintf(temp_str,sizeof(temp_str), "DLCI %d: status %s %s",
-;                          ((ptemp[2]&0x3f)<<4)+ ((ptemp[3]&0x78)>>3), 
-;                          ptemp[4] & 0x8 ?"new,":" ",
-;                          ptemp[4] & 0x2 ?"Active":"Inactive");
-Index: print-icmp.c
-===================================================================
-RCS file: /mnt/ncvs/src/contrib/tcpdump/print-icmp.c,v
-retrieving revision 1.3
-diff -u -r1.3 print-icmp.c
---- print-icmp.c       1997/05/27 02:17:32     1.3
-+++ print-icmp.c       2000/10/30 10:28:58
-@@ -172,7 +172,7 @@
-       register const struct ip *oip;
-       register const struct udphdr *ouh;
-       register u_int hlen, dport, mtu;
--      char buf[256];
-+      char buf[MAXHOSTNAMELEN + 100];
-       dp = (struct icmp *)bp;
-       ip = (struct ip *)bp2;
-@@ -191,7 +191,7 @@
-               case ICMP_UNREACH_PROTOCOL:
-                       TCHECK(dp->icmp_ip.ip_p);
--                      (void)sprintf(buf, "%s protocol %d unreachable",
-+                      (void)snprintf(buf, sizeof(buf), "%s protocol %d unreachable",
-                                      ipaddr_string(&dp->icmp_ip.ip_dst),
-                                      dp->icmp_ip.ip_p);
-                       break;
-@@ -205,21 +205,21 @@
-                       switch (oip->ip_p) {
-                       case IPPROTO_TCP:
--                              (void)sprintf(buf,
-+                              (void)snprintf(buf, sizeof(buf),
-                                       "%s tcp port %s unreachable",
-                                       ipaddr_string(&oip->ip_dst),
-                                       tcpport_string(dport));
-                               break;
-                       case IPPROTO_UDP:
--                              (void)sprintf(buf,
-+                              (void)snprintf(buf, sizeof(buf),
-                                       "%s udp port %s unreachable",
-                                       ipaddr_string(&oip->ip_dst),
-                                       udpport_string(dport));
-                               break;
-                       default:
--                              (void)sprintf(buf,
-+                              (void)snprintf(buf, sizeof(buf),
-                                       "%s protocol %d port %d unreachable",
-                                       ipaddr_string(&oip->ip_dst),
-                                       oip->ip_p, dport);
-@@ -234,11 +234,11 @@
-                       mp = (struct mtu_discovery *)&dp->icmp_void;
-                         mtu = EXTRACT_16BITS(&mp->nexthopmtu);
-                         if (mtu)
--                          (void)sprintf(buf,
-+                          (void)snprintf(buf, sizeof(buf),
-                               "%s unreachable - need to frag (mtu %d)",
-                               ipaddr_string(&dp->icmp_ip.ip_dst), mtu);
-                         else
--                          (void)sprintf(buf,
-+                          (void)snprintf(buf, sizeof(buf),
-                               "%s unreachable - need to frag",
-                               ipaddr_string(&dp->icmp_ip.ip_dst));
-                       }
-@@ -247,7 +247,7 @@
-               default:
-                       fmt = tok2str(unreach2str, "#%d %%s unreachable",
-                           dp->icmp_code);
--                      (void)sprintf(buf, fmt,
-+                      (void)snprintf(buf, sizeof(buf), fmt,
-                           ipaddr_string(&dp->icmp_ip.ip_dst));
-                       break;
-               }
-@@ -257,7 +257,7 @@
-               TCHECK(dp->icmp_ip.ip_dst);
-               fmt = tok2str(type2str, "redirect-#%d %%s to net %%s",
-                   dp->icmp_code);
--              (void)sprintf(buf, fmt,
-+              (void)snprintf(buf, sizeof(buf), fmt,
-                   ipaddr_string(&dp->icmp_ip.ip_dst),
-                   ipaddr_string(&dp->icmp_gwaddr));
-               break;
-@@ -277,30 +277,30 @@
-               cp = buf + strlen(buf);
-               lifetime = EXTRACT_16BITS(&ihp->ird_lifetime);
-               if (lifetime < 60)
--                      (void)sprintf(cp, "%u", lifetime);
-+                      (void)snprintf(cp, sizeof(buf) - strlen(buf), "%u", lifetime);
-               else if (lifetime < 60 * 60)
--                      (void)sprintf(cp, "%u:%02u",
-+                      (void)snprintf(cp, sizeof(buf) - strlen(buf), "%u:%02u",
-                           lifetime / 60, lifetime % 60);
-               else
--                      (void)sprintf(cp, "%u:%02u:%02u",
-+                      (void)snprintf(cp, sizeof(buf) - strlen(buf), "%u:%02u:%02u",
-                           lifetime / 3600,
-                           (lifetime % 3600) / 60,
-                           lifetime % 60);
-               cp = buf + strlen(buf);
-               num = ihp->ird_addrnum;
--              (void)sprintf(cp, " %d:", num);
-+              (void)snprintf(cp, sizeof(buf) - strlen(buf), " %d:", num);
-               cp = buf + strlen(buf);
-               size = ihp->ird_addrsiz;
-               if (size != 2) {
--                      (void)sprintf(cp, " [size %d]", size);
-+                      (void)snprintf(cp, sizeof(buf) - strlen(buf), " [size %d]", size);
-                       break;
-               }
-               idp = (struct id_rdiscovery *)&dp->icmp_data;
-               while (num-- > 0) {
-                       TCHECK(*idp);
--                      (void)sprintf(cp, " {%s %u}",
-+                      (void)snprintf(cp, sizeof(buf) - strlen(buf), " {%s %u}",
-                           ipaddr_string(&idp->ird_addr),
-                           EXTRACT_32BITS(&idp->ird_pref));
-                       cp = buf + strlen(buf);
-@@ -321,25 +321,25 @@
-                       break;
-               default:
--                      (void)sprintf(buf, "time exceeded-#%d", dp->icmp_code);
-+                      (void)snprintf(buf, sizeof(buf), "time exceeded-#%d", dp->icmp_code);
-                       break;
-               }
-               break;
-       case ICMP_PARAMPROB:
-               if (dp->icmp_code)
--                      (void)sprintf(buf, "parameter problem - code %d",
-+                      (void)snprintf(buf, sizeof(buf), "parameter problem - code %d",
-                                       dp->icmp_code);
-               else {
-                       TCHECK(dp->icmp_pptr);
--                      (void)sprintf(buf, "parameter problem - octet %d",
-+                      (void)snprintf(buf, sizeof(buf), "parameter problem - octet %d",
-                                       dp->icmp_pptr);
-               }
-               break;
-       case ICMP_MASKREPLY:
-               TCHECK(dp->icmp_mask);
--              (void)sprintf(buf, "address mask is 0x%08x",
-+              (void)snprintf(buf, sizeof(buf), "address mask is 0x%08x",
-                   (u_int32_t)ntohl(dp->icmp_mask));
-               break;
-Index: print-sunrpc.c
-===================================================================
-RCS file: /mnt/ncvs/src/contrib/tcpdump/print-sunrpc.c,v
-retrieving revision 1.4
-diff -u -r1.4 print-sunrpc.c
---- print-sunrpc.c     1998/09/15 19:46:59     1.4
-+++ print-sunrpc.c     2000/10/30 10:28:59
-@@ -126,7 +126,9 @@
-       rp = getrpcbynumber(prog);
-       if (rp == NULL)
-               (void) sprintf(buf, "#%u", prog);
--      else
--              strcpy(buf, rp->r_name);
-+      else {
-+              strncpy(buf, rp->r_name, sizeof(buf)-1);
-+              buf[sizeof(buf)-1] = '\0';
-+      }
-       return (buf);
- }
-Index: util.c
-===================================================================
-RCS file: /mnt/ncvs/src/contrib/tcpdump/util.c,v
-retrieving revision 1.1.1.3
-diff -u -r1.1.1.3 util.c
---- util.c     1998/09/15 19:36:31     1.1.1.3
-+++ util.c     2000/10/30 10:29:01
-@@ -154,7 +154,7 @@
-       }
-       if (fmt == NULL)
-               fmt = "#%d";
--      (void)sprintf(buf, fmt, v);
-+      (void)snprintf(buf, sizeof(buf), fmt, v);
-       return (buf);
- }
diff --git a/tcpdump-giop.patch b/tcpdump-giop.patch
deleted file mode 100644 (file)
index d4b9962..0000000
+++ /dev/null
@@ -1,570 +0,0 @@
-diff -ruN tcpdump_3_5rel2.old/Makefile.in tcpdump_3_5rel2/Makefile.in
---- tcpdump_3_5rel2.old/Makefile.in    Fri Jul 14 14:13:34 2000
-+++ tcpdump_3_5rel2/Makefile.in        Fri Jul 14 14:23:20 2000
-@@ -66,7 +66,7 @@
- CSRC =        tcpdump.c \
-       print-arp.c print-atalk.c print-atm.c print-bootp.c \
-       print-decnet.c print-domain.c print-dvmrp.c print-egp.c \
--      print-ether.c print-fddi.c print-gre.c print-icmp.c \
-+      print-ether.c print-fddi.c print-giop.c print-gre.c print-icmp.c \
-       print-igrp.c print-ip.c print-ipx.c print-isoclns.c print-krb.c \
-       print-llc.c print-nfs.c print-ntp.c print-null.c print-ospf.c \
-       print-pim.c print-ppp.c print-raw.c print-rip.c print-sl.c \
-diff -ruN tcpdump_3_5rel2.old/interface.h tcpdump_3_5rel2/interface.h
---- tcpdump_3_5rel2.old/interface.h    Wed Dec 22 16:44:09 1999
-+++ tcpdump_3_5rel2/interface.h        Fri Jul 14 14:28:18 2000
-@@ -38,6 +38,7 @@
- extern int dflag;             /* print filter code */
- extern int eflag;             /* print ethernet header */
- extern int fflag;             /* don't translate "foreign" IP address */
-+extern int gflag;             /* decode GIOP */
- extern int nflag;             /* leave addresses as numbers */
- extern int Nflag;             /* remove domains from printed host names */
- extern int qflag;             /* quick (shorter) output */
-@@ -261,3 +262,4 @@
- extern void dhcp6_print(const u_char *, u_int, u_short, u_short);
- #endif /*INET6*/
- extern u_short in_cksum(const u_short *addr, register int len, u_short csum);
-+extern void giop_print(const u_char *, u_int);
-diff -ruN tcpdump_3_5rel2.old/print-giop.c tcpdump_3_5rel2/print-giop.c
---- tcpdump_3_5rel2.old/print-giop.c   Thu Jan  1 01:00:00 1970
-+++ tcpdump_3_5rel2/print-giop.c       Fri Jul 14 14:23:20 2000
-@@ -0,0 +1,477 @@
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+#include <netinet/in.h>
-+#include "interface.h"
-+
-+enum {
-+      GIOP_REQUEST,
-+      GIOP_REPLY,
-+      GIOP_CANCEL_REQUEST,
-+      GIOP_LOCATE_REQUEST,
-+      GIOP_LOCATE_REPLY,
-+      GIOP_CLOSE_CONNECTION,
-+      GIOP_MESSAGE_ERROR,
-+      GIOP_FRAGMENT
-+};
-+
-+static struct tok type2str[] = {
-+      {GIOP_REQUEST, "Request"},
-+      {GIOP_REPLY, "Reply"},
-+      {GIOP_CANCEL_REQUEST, "Cancel Request"},
-+      {GIOP_LOCATE_REQUEST, "Locate Request"},
-+      {GIOP_LOCATE_REPLY, "Locate Reply"},
-+      {GIOP_CLOSE_CONNECTION, "Close Connection"},
-+      {GIOP_MESSAGE_ERROR, "Message Error"},
-+      {GIOP_FRAGMENT, "Fragment"},
-+      {0, NULL}
-+};
-+
-+static const u_char *
-+giop_get(const u_char *bp, void *val, int octets, int convert)
-+{
-+      u_char *align;
-+      int i=octets;
-+
-+      if(bp>snapend || bp==NULL)
-+              return(NULL);
-+
-+      align=(u_char *)(((long)bp+(octets-1))&~(octets-1));
-+
-+      while(i--)
-+              if(convert)
-+                      ((u_char *)val)[i]=(u_char)align[(octets-1)-i];
-+              else
-+                      ((u_char *)val)[i]=(u_char)align[i];
-+      
-+      return(align+octets);
-+}
-+
-+static const u_char *
-+giop_get_string(const u_char *bp, u_char *buf, int maxlen, int convert)
-+{
-+      u_int32_t len;
-+
-+      if(bp>snapend || bp==NULL)
-+              return(NULL);
-+
-+      bp=giop_get(bp, &len, 4, convert);
-+
-+      if(buf==NULL)
-+              return(bp+len);
-+
-+      if(len>maxlen)
-+              memcpy(buf, bp, maxlen);
-+      else
-+              memcpy(buf, bp, len);
-+
-+      return(bp+len);
-+}
-+
-+static void
-+giop_print_request(const u_char *bp, u_int length, int version, int convert)
-+{
-+      u_char buf[256];
-+      u_int32_t seqlen, request_id;
-+      u_int8_t response;
-+
-+      /* IOP_ServiceContextList service context */
-+      /* sequence<IOP_ServiceContext> */
-+      bp=giop_get(bp, &seqlen, 4, convert);
-+      if(bp==NULL) {
-+              printf(" [|request]");
-+              return;
-+      }
-+
-+      if(seqlen)
-+              printf(" context items: %d", seqlen);
-+
-+      /* unsigned long context id */
-+      /* sequence<octet> data */
-+      while(seqlen>0) {
-+              u_int32_t context_id, datalen;
-+
-+              bp=giop_get(bp, &context_id, 4, convert);
-+              if(bp==NULL) {
-+                      printf(" [|request]");
-+                      return;
-+              }
-+
-+              printf(" ID: %d", context_id);
-+
-+              bp=giop_get_string(bp, buf, 255, convert);
-+              if(bp==NULL) {
-+                      printf(" [|request]");
-+                      return;
-+              }
-+              printf(" data {%s}", buf);
-+
-+              seqlen--;
-+      }
-+      /* unsigned long request ID */
-+
-+      bp=giop_get(bp, &request_id, 4, convert);
-+      if(bp==NULL) {
-+              printf(" [|request]");
-+              return;
-+      }
-+      printf(" request ID: %d", request_id);
-+
-+      /* boolean response expected */
-+
-+      bp=giop_get(bp, &response, 1, convert);
-+      if(bp==NULL) {
-+              printf(" [|request]");
-+              return;
-+      }
-+      printf("%sresponse expected", response?" ":" no ");
-+
-+      /* in GIOP 1.1 there is an array "octet reserved[3]" here now. */
-+      /* Alignment checks will skip it automatically */
-+
-+      /* sequence<octet> object key */
-+      bp=giop_get_string(bp, buf, 255, convert);
-+      if(bp==NULL) {
-+              printf(" [|request]");
-+              return;
-+      }
-+      printf(" %s", buf);
-+
-+      /* char * operation */
-+      bp=giop_get_string(bp, buf, 255, convert);
-+      if(bp==NULL) {
-+              printf(" [|request]");
-+              return;
-+      }
-+      printf("/%s", buf);
-+
-+      /* principal requesting principal */
-+      /* is there anything interesting to print here? skip for now */
-+      bp=giop_get_string(bp, NULL, 0, convert);
-+      if(bp==NULL) {
-+              printf(" [|request]");
-+              return;
-+      }
-+
-+      /* Now come the parameters, but we need to IDL (or IR) to know how to
-+         decode them :-( */
-+}
-+
-+enum {
-+      GIOP_REPLY_NO_EXCEPTION,
-+      GIOP_REPLY_USER_EXCEPTION,
-+      GIOP_REPLY_SYSTEM_EXCEPTION,
-+      GIOP_REPLY_LOCATION_FORWARD
-+};
-+
-+static struct tok reply2str[] = {
-+      {GIOP_REPLY_NO_EXCEPTION, "No Exception"},
-+      {GIOP_REPLY_USER_EXCEPTION, "User Exception"},
-+      {GIOP_REPLY_SYSTEM_EXCEPTION, "System Exception"},
-+      {GIOP_REPLY_LOCATION_FORWARD, "Location Forward"},
-+      {0, NULL}
-+};
-+
-+enum {
-+      GIOP_COMPLETION_YES,
-+      GIOP_COMPLETION_NO,
-+      GIOP_COMPLETION_MAYBE
-+};
-+
-+static struct tok completion2str[] = {
-+      {GIOP_COMPLETION_YES, "Yes"},
-+      {GIOP_COMPLETION_NO, "No"},
-+      {GIOP_COMPLETION_MAYBE, "Maybe"},
-+      {0, NULL}
-+};
-+
-+static void
-+giop_print_reply(const u_char *bp, u_int length, int version, int convert)
-+{
-+      u_char buf[256];
-+      u_int32_t seqlen, request_id, type;
-+
-+      /* IOP_ServiceContextList service context */
-+      /* sequence<IOP_ServiceContext> */
-+      bp=giop_get(bp, &seqlen, 4, convert);
-+      if(bp==NULL) {
-+              printf(" [|reply]");
-+              return;
-+      }
-+
-+      if(seqlen)
-+              printf(" context items: %d", seqlen);
-+
-+      /* unsigned long context id */
-+      /* sequence<octet> data */
-+      while(seqlen>0) {
-+              u_int32_t context_id, datalen;
-+
-+              bp=giop_get(bp, &context_id, 4, convert);
-+              if(bp==NULL) {
-+                      printf(" [|reply]");
-+                      return;
-+              }
-+
-+              printf(" ID: %d", context_id);
-+
-+              bp=giop_get_string(bp, buf, 255, convert);
-+              if(bp==NULL) {
-+                      printf(" [|reply]");
-+                      return;
-+              }
-+              printf(" data {%s}", buf);
-+
-+              seqlen--;
-+      }
-+
-+      /* unsigned long request id */
-+
-+      bp=giop_get(bp, &request_id, 4, convert);
-+      if(bp==NULL) {
-+              printf(" [|reply]");
-+              return;
-+      }
-+      printf(" request ID: %d", request_id);
-+
-+      /* reply type */
-+
-+      bp=giop_get(bp, &type, 4, convert);
-+      if(bp==NULL) {
-+              printf(" [|reply]");
-+              return;
-+      }
-+      printf(" status: %s", tok2str(reply2str, NULL, type));
-+
-+      /* for "no exception" returns, the encoded parameters come next */
-+      /* for "user exception" and "system exception", the exception code
-+         comes next */
-+      if(type==GIOP_REPLY_SYSTEM_EXCEPTION) {
-+              u_int32_t completion, minor;
-+
-+              bp=giop_get_string(bp, buf, 255, convert);
-+              if(bp==NULL) {
-+                      printf(" [|reply]");
-+                      return;
-+              }
-+              printf(" System Exception {%s}", buf);
-+              
-+              bp=giop_get(bp, &minor, 4, convert);
-+              bp=giop_get(bp, &completion, 4, convert);
-+              if(bp==NULL) {
-+                      printf(" [|reply]");
-+                      return;
-+              }
-+
-+              printf(" minor code %d", minor);
-+              printf(" Completion: %s", tok2str(completion2str, NULL, completion));
-+      } else if(type==GIOP_REPLY_LOCATION_FORWARD) {
-+              bp=giop_get_string(bp, buf, 255, convert);
-+              if(bp==NULL) {
-+                      printf(" [|reply]");
-+                      return;
-+              }
-+              printf(" Location: %s", buf);
-+      }
-+}
-+
-+static void
-+giop_print_cancel_request(const u_char *bp, u_int length, int version, int convert)
-+{
-+      u_int32_t request_id;
-+
-+      /* unsigned long request id */
-+
-+      bp=giop_get(bp, &request_id, 4, convert);
-+      if(bp==NULL) {
-+              printf(" [|cancel request]");
-+              return;
-+      }
-+      printf(" request ID: %d", request_id);
-+}
-+
-+static void
-+giop_print_locate_request(const u_char *bp, u_int length, int version, int convert)
-+{
-+      u_char buf[256];
-+      u_int32_t request_id;
-+
-+      /* unsigned long request id */
-+
-+      bp=giop_get(bp, &request_id, 4, convert);
-+      if(bp==NULL) {
-+              printf(" [|locate request]");
-+              return;
-+      }
-+      printf(" request ID: %d", request_id);
-+
-+      /* sequence<octet> object key */
-+
-+      bp=giop_get_string(bp, buf, 255, convert);
-+      if(bp==NULL) {
-+              printf(" [|locate request]");
-+              return;
-+      }
-+      printf(" %s", buf);
-+}
-+
-+enum {
-+      GIOP_LOCATE_UNKNOWN_OBJECT,
-+      GIOP_LOCATE_OBJECT_HERE,
-+      GIOP_LOCATE_OBJECT_FORWARD
-+};
-+
-+static struct tok locate2str[] = {
-+      {GIOP_LOCATE_UNKNOWN_OBJECT, "Unknown Object"},
-+      {GIOP_LOCATE_OBJECT_HERE, "Object Here"},
-+      {GIOP_LOCATE_OBJECT_FORWARD, "Object Forward"},
-+      {0, NULL}
-+};
-+
-+static void
-+giop_print_locate_reply(const u_char *bp, u_int length, int version, int convert)
-+{
-+      u_char buf[256];
-+      u_int32_t request_id, status;
-+
-+      /* unsigned long request id */
-+
-+      bp=giop_get(bp, &request_id, 4, convert);
-+      if(bp==NULL) {
-+              printf(" [|locate reply]");
-+              return;
-+      }
-+      printf(" request ID: %d", request_id);
-+
-+      /* locate status */
-+
-+      bp=giop_get(bp, &status, 4, convert);
-+      if(bp==NULL) {
-+              printf(" [|locate reply]");
-+              return;
-+      }
-+      printf(" status: %s", tok2str(locate2str, NULL, status));
-+
-+      /* if status is "object forward", a objref follows here */
-+      if(status==GIOP_LOCATE_OBJECT_FORWARD) {
-+              bp=giop_get_string(bp, buf, 255, convert);
-+              if(bp==NULL) {
-+                      printf(" [|locate reply]");
-+                      return;
-+              }
-+              printf(" Location: %s", buf);
-+      }
-+}
-+
-+static void
-+giop_print_close_connection(const u_char *bp, u_int length, int version, int convert)
-+{
-+      /* emtpy */
-+}
-+
-+static void
-+giop_print_message_error(const u_char *bp, u_int length, int version, int convert)
-+{
-+      /* emtpy */
-+}
-+
-+static void
-+giop_print_fragment(const u_char *bp, u_int length, int version, int convert)
-+{
-+      /* not implemented yet */
-+}
-+
-+struct _GIOP_header {
-+      u_int8_t magic[4];
-+      u_int8_t version[2];
-+      u_int8_t flags;
-+      u_int8_t type;
-+      u_int32_t size;
-+};
-+
-+void
-+giop_print(const u_char *bp, u_int length)
-+{
-+      struct _GIOP_header *gp;
-+      int version, byteorder, fragments;
-+#ifdef WORDS_BIGENDIAN
-+      int hostbyteorder=0;
-+#else
-+      int hostbyteorder=1;
-+#endif
-+
-+      if(bp + sizeof(struct _GIOP_header) > snapend) {
-+              printf(" [|GIOP]");
-+              return;
-+      }
-+      printf(" [GIOP]");
-+
-+      gp=(struct _GIOP_header *)bp;
-+      version=gp->version[0]*100 + gp->version[1];
-+
-+      printf(" v%d.%d", gp->version[0], gp->version[1]);
-+      if(version!=100 && version!=101)
-+              printf("!");
-+
-+      printf(" %s", tok2str(type2str, "Type %d", gp->type));
-+
-+      if(version==100 && gp->type==GIOP_FRAGMENT)
-+              printf("!");
-+      
-+      if(version==100) {
-+              byteorder=gp->flags;
-+              fragments=0;
-+      } else if(version==101) {
-+              byteorder=gp->flags&0x1;
-+              fragments=gp->flags&0x2;
-+      }
-+
-+      if(byteorder) {
-+              if(!hostbyteorder)
-+                      printf(" (LE)");
-+      } else {
-+              if(hostbyteorder)
-+                      printf(" (BE)");
-+      }
-+
-+      if(fragments) {
-+              printf(" +");
-+      }
-+
-+      switch(gp->type) {
-+      case GIOP_REQUEST:
-+              giop_print_request((u_char *)(bp+sizeof(struct _GIOP_header)), gp->size, version, byteorder!=hostbyteorder);
-+              break;
-+
-+      case GIOP_REPLY:
-+              giop_print_reply((u_char *)(bp+sizeof(struct _GIOP_header)), gp->size, version, byteorder!=hostbyteorder);
-+              break;
-+
-+      case GIOP_CANCEL_REQUEST:
-+              giop_print_cancel_request((u_char *)(bp+sizeof(struct _GIOP_header)), gp->size, version, byteorder!=hostbyteorder);
-+              break;
-+
-+      case GIOP_LOCATE_REQUEST:
-+              giop_print_locate_request((u_char *)(bp+sizeof(struct _GIOP_header)), gp->size, version, byteorder!=hostbyteorder);
-+              break;
-+
-+      case GIOP_LOCATE_REPLY:
-+              giop_print_locate_reply((u_char *)(bp+sizeof(struct _GIOP_header)), gp->size, version, byteorder!=hostbyteorder);
-+              break;
-+
-+      case GIOP_CLOSE_CONNECTION:
-+              giop_print_close_connection((u_char *)(bp+sizeof(struct _GIOP_header)), gp->size, version, byteorder!=hostbyteorder);
-+              break;
-+
-+      case GIOP_MESSAGE_ERROR:
-+              giop_print_message_error((u_char *)(bp+sizeof(struct _GIOP_header)), gp->size, version, byteorder!=hostbyteorder);
-+              break;
-+
-+      case GIOP_FRAGMENT:
-+              giop_print_fragment((u_char *)(bp+sizeof(struct _GIOP_header)), gp->size, version, byteorder!=hostbyteorder);
-+              break;
-+
-+      default:
-+              break;
-+      }
-+}
-diff -ruN tcpdump_3_5rel2.old/print-tcp.c tcpdump_3_5rel2/print-tcp.c
---- tcpdump_3_5rel2.old/print-tcp.c    Wed Dec 22 16:44:10 1999
-+++ tcpdump_3_5rel2/print-tcp.c        Fri Jul 14 14:32:18 2000
-@@ -501,6 +501,13 @@
-               bgp_print(bp, length);
-       else if (sport == NETBIOS_SSN_PORT || dport == NETBIOS_SSN_PORT)
-               nbt_tcp_print(bp, length);
-+      if(!gflag)
-+                      return;
-+      hlen = tp->th_off * 4;
-+      if(length > 4 && !strncmp((u_char *)(bp + hlen), "GIOP", 4)) {
-+               giop_print((u_char *)(bp + hlen), length);
-+      }
-+
-       return;
- bad:
-       fputs("[bad opt]", stdout);
-diff -ruN tcpdump_3_5rel2.old/tcpdump.1 tcpdump_3_5rel2/tcpdump.1
---- tcpdump_3_5rel2.old/tcpdump.1      Thu Jul 13 07:53:47 2000
-+++ tcpdump_3_5rel2/tcpdump.1  Fri Jul 14 14:28:47 2000
-@@ -27,7 +27,7 @@
- .na
- .B tcpdump
- [
--.B \-adeflnNOpqRStvxX
-+.B \-adefglnNOpqRStvxX
- ] [
- .B \-c
- .I count
-@@ -131,6 +131,9 @@
- .B \-F
- Use \fIfile\fP as input for the filter expression.
- An additional expression given on the command line is ignored.
-+.TP
-+.B \-g
-+Decode CORBA GIOP.
- .TP
- .B \-i
- Listen on \fIinterface\fP.
-diff -ruN tcpdump_3_5rel2.old/tcpdump.c tcpdump_3_5rel2/tcpdump.c
---- tcpdump_3_5rel2.old/tcpdump.c      Tue Jan 11 08:34:00 2000
-+++ tcpdump_3_5rel2/tcpdump.c  Fri Jul 14 14:23:20 2000
-@@ -65,6 +65,7 @@
- int dflag;                    /* print filter code */
- int eflag;                    /* print ethernet header */
- int fflag;                    /* don't translate "foreign" IP address */
-+int gflag;                    /* decode GIOP */
- int nflag;                    /* leave addresses as numbers */
- int Nflag;                    /* remove domains from printed host names */
- int Oflag = 1;                        /* run filter code optimizer */
-@@ -219,6 +220,10 @@
-               case 'F':
-                       infile = optarg;
-+                      break;
-+
-+              case 'g':
-+                      ++gflag;
-                       break;
-               case 'i':
diff --git a/tcpdump-glibc2.1.patch b/tcpdump-glibc2.1.patch
deleted file mode 100644 (file)
index a04ed02..0000000
+++ /dev/null
@@ -1,1153 +0,0 @@
-diff -urN tcpdump-3.4.orig/Makefile.in tcpdump-3.4/Makefile.in
---- tcpdump-3.4.orig/Makefile.in       Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/Makefile.in    Sat Jul  3 19:03:02 1999
-@@ -41,8 +41,8 @@
- CC = @CC@
- PROG = tcpdump
--CCOPT = @V_CCOPT@
--INCLS = -I. @V_INCLS@
-+CCOPT = @V_CCOPT@ -DINET6=1
-+INCLS = -I/usr/include/pcap @V_INCLS@
- DEFS = @DEFS@ -DHAVE_FDDI
- # Standard CFLAGS
-@@ -73,7 +73,7 @@
-       print-snmp.c print-sunrpc.c print-tcp.c print-tftp.c print-tr.c \
-       print-udp.c print-wb.c addrtoname.c bpf_dump.c gmt2local.c \
-       machdep.c parsenfsfh.c util.c savestr.c setsignal.c \
--      print-smb.c smbutil.c 
-+      print-smb.c smbutil.c print-ipv6.c print-icmpv6.c
- LOCALSRC =
- GENSRC = version.c
-diff -urN tcpdump-3.4.orig/addrtoname.c tcpdump-3.4/addrtoname.c
---- tcpdump-3.4.orig/addrtoname.c      Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/addrtoname.c   Sat Jul  3 17:58:06 1999
-@@ -62,7 +62,7 @@
- #include <stdlib.h>
- #include <unistd.h>
--#ifdef INET6
-+#if defined(INET6) && __GLIBC__ < 2
- #include <netinet6/in6.h>
- #endif /* INET6 */
-diff -urN tcpdump-3.4.orig/linux-include/netinet/ip_icmp.h tcpdump-3.4/linux-include/netinet/ip_icmp.h
---- tcpdump-3.4.orig/linux-include/netinet/ip_icmp.h   Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/linux-include/netinet/ip_icmp.h        Sat Jul  3 19:12:53 1999
-@@ -33,6 +33,7 @@
-  *    @(#)ip_icmp.h   8.1 (Berkeley) 6/10/93
-  */
-+#ifndef _NO_INCLUDE_LOCAL
- /*
-  * Interface Control Message Protocol Definitions.
-  * Per RFC 792, September 1981.
-@@ -157,4 +158,5 @@
- void  icmp_reflect __P((struct mbuf *));
- void  icmp_send __P((struct mbuf *, struct mbuf *));
- int   icmp_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
-+#endif
- #endif
-diff -urN tcpdump-3.4.orig/print-atalk.c tcpdump-3.4/print-atalk.c
---- tcpdump-3.4.orig/print-atalk.c     Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-atalk.c  Sat Jul  3 17:58:06 1999
-@@ -39,12 +39,15 @@
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/if_ether.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <stdio.h>
- #include <stdlib.h>
-diff -urN tcpdump-3.4.orig/print-atm.c tcpdump-3.4/print-atm.c
---- tcpdump-3.4.orig/print-atm.c       Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-atm.c    Sat Jul  3 17:58:06 1999
-@@ -37,11 +37,14 @@
- #include <netinet/if_ether.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <stdio.h>
- #include <pcap.h>
-diff -urN tcpdump-3.4.orig/print-ax25.c tcpdump-3.4/print-ax25.c
---- tcpdump-3.4.orig/print-ax25.c      Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-ax25.c   Sat Jul  3 17:58:06 1999
-@@ -26,7 +26,10 @@
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+#endif
- #include <stdio.h>
-diff -urN tcpdump-3.4.orig/print-domain.c tcpdump-3.4/print-domain.c
---- tcpdump-3.4.orig/print-domain.c    Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-domain.c Sat Jul  3 17:58:06 1999
-@@ -38,11 +38,14 @@
- #include <netinet/if_ether.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #ifdef NOERROR
- #undef NOERROR                                        /* Solaris sucks */
-diff -urN tcpdump-3.4.orig/print-dvmrp.c tcpdump-3.4/print-dvmrp.c
---- tcpdump-3.4.orig/print-dvmrp.c     Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-dvmrp.c  Sat Jul  3 17:58:06 1999
-@@ -31,11 +31,14 @@
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <stdio.h>
- #include <string.h>
-diff -urN tcpdump-3.4.orig/print-ether.c tcpdump-3.4/print-ether.c
---- tcpdump-3.4.orig/print-ether.c     Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-ether.c  Sat Jul  3 17:58:06 1999
-@@ -42,11 +42,14 @@
- #include <netinet/if_ether.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #if defined(__GLIBC__) && __GLIBC__ >= 2
- #include <linux/sockios.h>
-diff -urN tcpdump-3.4.orig/print-icmp.c tcpdump-3.4/print-icmp.c
---- tcpdump-3.4.orig/print-icmp.c      Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-icmp.c   Sat Jul  3 17:58:06 1999
-@@ -34,16 +34,21 @@
- #endif
- #include <net/if.h>
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#else
-+# define __FAVOR_BSD
-+#endif
-+
- #include <netinet/in.h>
- #include <netinet/if_ether.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
- #include <netinet/ip_icmp.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
- #include <stdio.h>
- #include <string.h>
-diff -urN tcpdump-3.4.orig/print-icmpv6.c tcpdump-3.4/print-icmpv6.c
---- tcpdump-3.4.orig/print-icmpv6.c    Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-icmpv6.c Sat Jul  3 19:31:02 1999
-@@ -107,30 +107,42 @@
- #include <sys/types.h>
- #include <sys/socket.h>
--#include <net/if.h>
--
- #include <netinet/in.h>
--#include <netinet/if_ether.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_icmp.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
--
--#include <netinet6/ipv6.h>
--#include <netinet6/in6.h>
--#include <netinet6/ipv6_var.h>
--#include <netinet6/ipv6_icmp.h>
--#include <stdio.h>
--#include <string.h>
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
-+
-+#include <netdb.h>
-+
-+#if __GLIBC__ >= 2
-+# include <netinet/ip6.h>
-+# include <netinet/icmp6.h>
-+# include <netinet/ip_icmp.h>
-+#else
-+# include <netinet6/in6.h>
-+# include <netinet6/ipv6.h>
-+#endif
-+#include <stdio.h>
-+#ifdef __STDC__
-+#include <stdlib.h>
-+#endif
-+#include <unistd.h>
-+    
- #include "interface.h"
- #include "addrtoname.h"
-+#define __u8 u_int8_t
-+#define __u16 u_int16_t
-+#define __u32 u_int32_t
-+
- char *ipv6addr_string(struct in6_addr *);
- struct na_hdr
-@@ -360,7 +372,11 @@
- void
- icmpv6_print(register const u_char *bp, int length)
- {
-+#if __GLIBC__ >= 2
-+      register const struct icmp6_hdr *dp;
-+#else
-       register const struct ipv6_icmp *dp;
-+#endif
-       register char *str;
-       register const struct ipv6 *oip;
-       register const struct udphdr *ouh;
-@@ -376,6 +392,47 @@
-       str = buf;
-       *str = '\0';
-+
-+/* Translation from NRL to Glibc defines */
-+#if __GLIBC__ >= 2
-+# define ICMPV6_MINLEN        ICMP_MINLEN
-+# define ICMPV6_ECHOREPLY     ICMP6_ECHO_REPLY
-+# define ICMPV6_ECHO          ICMP6_ECHO_REQUEST
-+# define ICMPV6_TOOBIG                ICMP6_PACKET_TOO_BIG
-+/* Destination unreachable */
-+# define ICMPV6_UNREACH               ICMP6_DST_UNREACH
-+# define ICMPV6_UNREACH_NOROUTE       ICMP6_DST_UNREACH_NOROUTE
-+# define ICMPV6_UNREACH_ADMIN ICMP6_DST_UNREACH_ADMIN
-+# define ICMPV6_UNREACH_NOTNEIGHBOR   ICMP6_DST_UNREACH_NOTNEIGHBOR
-+# define ICMPV6_UNREACH_ADDRESS               ICMP6_DST_UNREACH_ADDR
-+# define ICMPV6_UNREACH_PORT          ICMP6_DST_UNREACH_NOPORT
-+/* Membership */
-+# define ICMPV6_GRPQUERY      ICMP6_MEMBERSHIP_QUERY
-+# define ICMPV6_GRPREPORT     ICMP6_MEMBERSHIP_REPORT
-+# define ICMPV6_GRPTERM               ICMP6_MEMBERSHIP_REDUCTION
-+/* Time exceeded */
-+# define ICMPV6_TIMXCEED      ICMP6_TIME_EXCEEDED
-+# define ICMPV6_TIMXCEED_INTRANS      ICMP6_TIME_EXCEED_TRANSIT
-+# define ICMPV6_TIMXCEED_REASS        ICMP6_TIME_EXCEED_REASSEMBLY
-+/* Parameter problems */
-+# define ICMPV6_PARAMPROB     ICMP6_PARAM_PROB
-+# define ICMPV6_PARAMPROB_PROB        ICMP6_PARAMPROB_HEADER
-+# define ICMPV6_PARAMPROB_NEXTHDR     ICMP6_PARAMPROB_NEXTHEADER
-+# define ICMPV6_PARAMPROB_BADOPT      ICMP6_PARAMPROB_OPTION
-+/* Neighbor discovery */
-+# define ICMPV6_ROUTERSOL     ND_ROUTER_SOLICIT
-+# define ICMPV6_ROUTERADV     ND_ROUTER_ADVERT
-+# define ICMPV6_NEIGHBORSOL   ND_NEIGHBOR_SOLICIT
-+# define ICMPV6_NEIGHBORADV   ND_NEIGHBOR_ADVERT
-+# define ICMPV6_REDIRECT      ND_REDIRECT
-+
-+# define icmp_type    icmp6_type
-+# define icmp_code    icmp6_code
-+# define icmp_nexthopmtu      icmp6_mtu
-+# define icmp_grpdelay        icmp6_maxdelay
-+# define icmp_paramptr        icmp6_pptr
-+#endif
-+
-       if (left < ICMPV6_MINLEN)
-               goto trunc;
-diff -urN tcpdump-3.4.orig/print-igrp.c tcpdump-3.4/print-igrp.c
---- tcpdump-3.4.orig/print-igrp.c      Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-igrp.c   Sat Jul  3 17:58:06 1999
-@@ -33,9 +33,13 @@
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <errno.h>
- #include <stdio.h>
-diff -urN tcpdump-3.4.orig/print-ip.c tcpdump-3.4/print-ip.c
---- tcpdump-3.4.orig/print-ip.c        Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-ip.c     Sat Jul  3 17:58:06 1999
-@@ -36,11 +36,14 @@
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #ifdef HAVE_MALLOC_H
- #include <malloc.h>
-diff -urN tcpdump-3.4.orig/print-ipv6.c tcpdump-3.4/print-ipv6.c
---- tcpdump-3.4.orig/print-ipv6.c      Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-ipv6.c   Sat Jul  3 19:02:24 1999
-@@ -111,16 +111,23 @@
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <netdb.h>
--#include <netinet6/in6.h>
--#include <netinet6/ipv6.h>
-+#if __GLIBC__ >= 2
-+# include <netinet/ip6.h>
-+#else
-+# include <netinet6/in6.h>
-+# include <netinet6/ipv6.h>
-+#endif
- #include <stdio.h>
- #ifdef __STDC__
-@@ -162,7 +169,7 @@
-                       printf(" Pad%d", optlen);
-                       break;
-               case 194:       
--                      printf(" Jumbo %d", ntohl(*(__u32*)optptr));
-+                      printf(" Jumbo %d", ntohl(*(u_int32_t*)optptr));
-                       if (optlen != 6)
-                               printf(" <len %d is wrong>", optlen);
-                       break;
-@@ -193,7 +200,14 @@
-       printf(" } ");
- }
-+#if __GLIBC__ >= 2
-+static void frag_print(struct ip6_frag *ip)
-+# define frag_reserved        ip6f_reserved
-+# define frag_id              ip6f_ident
-+# define frag_bitsoffset      ip6f_offlg
-+#else
- static void frag_print(struct ipv6_fraghdr *ip)
-+#endif
- {
-       u_int16_t bitoffset;
-       printf(" frag[");
-@@ -206,7 +220,15 @@
-       printf(" id=%u] ", ntohl(ip->frag_id));
- }
-+#if __GLIBC__ >= 2
-+static void route_print(struct ip6_rthdr0 *ip)
-+#define i6sr_type     ip6r0_type
-+#define i6sr_numaddrs ip6r0_len
-+#define i6sr_left     ip6r0_segleft
-+#define i6sr_reserved ip6r0_reserved
-+#else
- static void route_print(struct ipv6_srcroute0 *ip)
-+#endif
- {
-       printf("rthdr%d ", ip->i6sr_type);
-       if (ip->i6sr_type == 0)  {
-@@ -216,7 +238,7 @@
-               while (n > 0) {
-                       if (n == ip->i6sr_left)
-                               printf ("|> ");
--                      if (htonl(1<<i)&*(__u32*)&ip->i6sr_reserved)
-+                      if (htonl(1<<i)&*(u_int32_t*)&ip->i6sr_reserved)
-                               printf("!");
-                       printf("%s ", ipv6addr_string(a));
-                       a++;
-@@ -224,7 +246,7 @@
-                       n--;
-               }
-               if (i>0) {
--                      if (htonl(1<<i)&*(__u32*)&ip->i6sr_reserved)
-+                      if (htonl(1<<i)&*(u_int32_t*)&ip->i6sr_reserved)
-                               printf("! ");
-               }
-       }
-@@ -264,7 +286,11 @@
- void ipv6_print (register const u_char *bp, register int length)
- {
-       char buf[80];
-+#if __GLIBC__ >= 2
-+      register const struct ip6_hdr *ip;
-+#else
-       register const struct ipv6 *ip;
-+#endif
-       u_int8_t nhdr;
-       int first = 1, len=0;
-       char *cp;
-@@ -272,12 +298,21 @@
-       struct hostent *name;
-       int is_fragment = 0;
--      ip= (const struct ipv6 *) bp;
-+#if __GLIBC__ >= 2
-+      ip= (const struct ip6_hdr *) bp;
-+      if (bp + sizeof(struct ip6_hdr) > snapend) {
-+#else
-+      ip= (const struct ipv6_hdr *) bp;
-       if (bp + sizeof(struct ipv6) > snapend) {
-+#endif
-               printf("[|ipv6]");
-               return;
-       }
-+#if __GLIBC__ >= 2
-+      if (length < sizeof(struct ip6_hdr)){
-+#else
-       if (length < sizeof(struct ipv6)){
-+#endif
-               if (partial_frame)
-                       (void)printf("truncated-ipv6 %d", length);
-               else
-@@ -285,7 +320,11 @@
-               return;
-       }
-       
-+#if __GLIBC__ >= 2
-+      len = sizeof(struct ip6_hdr) + ntohs(ip->ip6_plen);
-+#else
-       len = sizeof(struct ipv6) + ntohs(ip->ipv6_length);
-+#endif
-       if (length < len) {
-               if (!partial_frame) {
-@@ -295,13 +334,24 @@
-       }
-       length = len;
-+#if __GLIBC__ >= 2
-+      len = sizeof(struct ip6_hdr);
-+
-+      printf(" %s > %s ", ipv6addr_string(&(ip->ip6_src)),
-+               ipv6addr_string(&(ip->ip6_dst)));
-+#else
-       len = sizeof(struct ipv6);
-         printf("%s > %s ", ipv6addr_string(&(ip->ipv6_src)), 
-              ipv6addr_string(&(ip->ipv6_dst)));
-+#endif
-       if (vflag) {
-+#if __GLIBC__ >= 2
-+          p = ntohl(ip->ip6_flow);
-+#else
-         p = ntohl(ip->ipv6_versfl);
-+#endif
-         printf(" (");
-         if ((p>>28) != 6)
-                 printf("v%d, ", p>>28);                     /* version */
-@@ -318,20 +368,40 @@
-         }
-         if (p&0x00fffff)
-                 printf("fl 0x%05x, ", p&0x00fffff);          /* flow label */
-+#if __GLIBC__ >= 2
-+          printf("len %d, ", ntohs(ip->ip6_plen));  /* payload length */
-+          printf("hop %d) ", ip->ip6_hlim);
-+#else
-         printf("len %d, ", ntohs(ip->ipv6_length));  /* payload length */
-         printf("hop %d) ", ip->ipv6_hoplimit);
-+#endif
-       }
--      
-+
-+#if __GLIBC__ >= 2
-+        nhdr = ip->ip6_nxt;
-+#else
-       nhdr = ip->ipv6_nexthdr;
-+#endif
-       cp = (char *)(ip + 1);
-+#if __GLIBC__ >= 2
-+        while (( nhdr != IPPROTO_NONE) && (nhdr != IPPROTO_TCP) &&
-+                        (nhdr != IPPROTO_UDP) && (nhdr != IPPROTO_ICMPV6) &&
-+                        (nhdr != IPPROTO_IPIP) && (nhdr != IPPROTO_IPV6) &&
-+                        (nhdr != IPPROTO_RSVP)) {
-+#else
-       while ((nhdr!=NEXTHDR_NONE)&&(nhdr!=NEXTHDR_TCP)&&(nhdr!=NEXTHDR_UDP)
-              &&(nhdr!=NEXTHDR_ICMPV6)&&(nhdr!=NEXTHDR_IPV4)&&
-              (nhdr!=NEXTHDR_IPV6) && (nhdr!=IPPROTO_RSVP) &&
-              (nhdr!=IPPROTO_PIM)) {
-+#endif
-               switch (nhdr) {
-+#if __GLIBC__ >= 2
-+                case IPPROTO_HOPOPTS:
-+#else
-               case NEXTHDR_HOP:       /* hop by hop (0)*/
-+#endif
-                       len += (cp[1]+1)<<3;
-                       if (bp+len <= snapend)
-                               hop_print(cp);
-@@ -340,66 +410,140 @@
-                       nhdr = cp[0];
-                       cp += (cp[1]+1)<<3;
-                       break;
--
-+#if __GLIBC__ >= 2
-+                case IPPROTO_ROUTING:
-+                        len += sizeof (struct ip6_rthdr0 );
-+#else
-               case NEXTHDR_ROUTING:   /* routing header (43)*/
-                       len += sizeof (struct ipv6_srcroute0 );
-+#endif
-                       if (bp+len<=snapend && vflag)
-+#if __GLIBC__ >= 2
-+                                route_print((struct ipv6_rthdr0 *)cp);
-+#else
-                               route_print((struct ipv6_srcroute0 *)cp);
-+#endif
-                       else
-                               printf(" route-hdr");
-                       nhdr = cp[0];
-                       cp += (cp[1]+1)<<3;
-                       break;
--
-+#if __GLIBC__ >= 2
-+                case IPPROTO_FRAGMENT:
-+                      len += sizeof (struct ip6_frag);
-+#else
-               case NEXTHDR_FRAGMENT:  /* fragment header (44)*/
-                       len += sizeof (struct ipv6_fraghdr);
-+#endif
-                       if (bp+len <= snapend && vflag)
-+#if __GLIBC__ >= 2
-+                                frag_print((struct ipv6_frag *)cp);
-+#else
-                               frag_print((struct ipv6_fraghdr *)cp);
-+#endif
-                       else
-                               printf(" frag ");
--                      if (!((((struct ipv6_fraghdr *)cp)->frag_bitsoffset) & htons(0xfff8))) {
-+#if __GLIBC__ >= 2
-+                       if (!((((struct ip6_frag *)cp)->ip6f_offlg) & htons(IP6F_OFF_MASK))) {
-+#else
-+                       /* IP6_OFFMASK as defined in netinet/ipv6.h doesn't
-+                          care about endianess */
-+                       if (!((((struct ipv6_fraghdr *)cp)->frag_bitsoffset) & htons(IP6_OFFMASK))) {
-+#endif
-                               nhdr = cp[0];
-                               cp += 8;
-                               is_fragment = 1;
-                               break;
-                       }
-+#if __GLIBC__ >= 2
-+                        nhdr = ((struct ip6_frag *) cp)->ip6f_nxt;
-+#else
-                       nhdr = ((struct ipv6_fraghdr *) cp)->frag_nexthdr;
-+#endif
-                       printf("nhdr=");
-                       switch (nhdr)  {
-+#if __GLIBC__ >= 2
-+                        case IPPROTO_HOPOPTS:
-+#else
-                       case NEXTHDR_HOP:
-+#endif
-                               printf("hop");
-                               break;
-+#if __GLIBC__ >= 2
-+                        case IPPROTO_IGMP:
-+#else
-                       case NEXTHDR_IGMP:
-+#endif
-                               printf("igmp");
-                               break;
-+#if __GLIBC__ >= 2
-+                        case IPPROTO_TCP:
-+#else
-                       case NEXTHDR_TCP:
-+#endif
-                               printf("tcp");
-                               break;
-+#if __GLIBC__ >= 2
-+                        case IPPROTO_UDP:
-+#else
-                       case NEXTHDR_UDP:
-+#endif
-                               printf("udp");
-                               break;
-+#if __GLIBC__ >= 2
-+                      case IPPROTO_IPV6:
-+#else
-                       case NEXTHDR_IPV6:
-+#endif
-                               printf("ipv6");
-                               break;
-+#if __GLIBC__ >= 2
-+                        case IPPROTO_ROUTING:
-+#else
-                       case NEXTHDR_ROUTING:
-+#endif
-                               printf("routing");
-                               break;
-+#if __GLIBC__ >= 2
-+                      case IPPROTO_FRAGMENT:
-+#else
-                       case NEXTHDR_FRAGMENT:
-+#endif
-                               printf("frag");
-                               break;
-+#if __GLIBC__ >= 2
-+                      case IPPROTO_ESP:
-+#else
-                       case NEXTHDR_ESP:
-+#endif
-                               printf("esp");
-                               break;
-+#if __GLIBC__ >= 2
-+                        case IPPROTO_AH:
-+#else
-                       case NEXTHDR_AH:
-+#endif
-                               printf("auth");
-                               break;
-+#if __GLIBC__ >= 2
-+                        case IPPROTO_ICMPV6:
-+#else
-                       case NEXTHDR_ICMPV6:
-+#endif
-                               printf("icmpv6");
-                               break;
-+#if __GLIBC__ >= 2
-+                        case IPPROTO_NONE:
-+#else
-                       case NEXTHDR_NONE: 
-+#endif
-                               printf("no next");
-                               break;
-+#if __GLIBC__ >= 2
-+                        case IPPROTO_DSTOPTS:
-+#else
-                       case NEXTHDR_DEST:
-+#endif
-                               printf("dest");
-                               break;
-                       default:
-@@ -407,7 +551,11 @@
-                       }
-                       return;
-+#if __GLIBC__ >= 2
-+              case IPPROTO_ESP:
-+#else
-               case NEXTHDR_ESP:       /* encapsulation header (50)*/
-+#endif
-                       len += sizeof(u_int32_t);
- #ifdef IPSEC
-                       if (bp + len <= snapend && vflag) {
-@@ -415,10 +563,14 @@
-                               printf(" ");
-                       } else
- #endif
--                              printf(" esp spi=%08x", *(__u32*)cp);
-+                              printf(" esp spi=%08x", *(u_int32_t*)cp);
-                       return;
-+#if __GLIBC__ >= 2
-+              case IPPROTO_AH:
-+#else
-               case NEXTHDR_AH:        /* authentication header (51)*/
-+#endif
- #ifdef IPSEC
-                       len += sizeof(struct ipsec_ah) + sizeof(u_int32_t) * ((struct ipsec_ah *)cp)->ah_datalen;
-                       if (bp+len <= snapend && vflag) {
-@@ -430,13 +582,17 @@
-                       cp += ((struct ipsec_ah *)cp)->ah_datalen * sizeof (u_int32_t)+ sizeof(struct ipsec_ah);
- #else
-                       len += (cp[1] + 2)<<2;
--                      printf(" ah spi=%08x", *(__u32*)(cp+4));
-+                      printf(" ah spi=%08x", *(u_int32_t*)(cp+4));
-                       nhdr = cp[0];
-                       cp += (cp[1]+2)<<2;
- #endif
-                       break;
-+#if __GLIBC__ >= 2
-+              case IPPROTO_DSTOPTS:
-+#else
-               case NEXTHDR_DEST:      /* destination options header (60)*/
-+#endif
-                       len += (cp[1]+1)<<3;
-                       if (bp + len <= snapend && vflag)
-                               dest_print(cp);
-@@ -457,27 +613,53 @@
-       if (is_fragment)
-               partial_frame++;
-       switch (nhdr) {
-+#if __GLIBC__ >= 2
-+                case IPPROTO_TCP:
-+#else
-               case NEXTHDR_TCP:
-+#endif
-                       tcp_print(cp, len, (const u_char *)ip);
-                         break; 
-+#if __GLIBC__ >= 2
-+                case IPPROTO_UDP:
-+#else
-               case NEXTHDR_UDP:
-+#endif
-                       udp_print(cp, len, (const u_char *)ip);
-                         break; 
-+#if __GLIBC__ >= 2
-+                case IPPROTO_ICMPV6:
-+#else
-               case NEXTHDR_ICMPV6:
-+#endif
-                       icmpv6_print(cp, len);
-                         break;
-+#if __GLIBC__ >= 2
-+                case IPPROTO_IPIP:
-+#else
-               case NEXTHDR_IPV4:
-+#endif
-                       printf(": v4-in-v6");
-                       ip_print(cp, len);
-                       break;
-+#if __GLIBC__ >= 2
-+                case IPPROTO_IPV6:
-+#else
-               case NEXTHDR_IPV6:
-+#endif
-                       printf(": v6-in-v6");
-                       ipv6_print(cp, len);
-                       break;
-+#if __GLIBC__ >= 2
-+                case IPPROTO_RSVP:
-+#else
-               case IPPROTO_RSVP:
-+#endif
-                       printf(" RSVP ");
-+#ifdef RSVP_TCPDUMP
-                       ntoh_rsvp_packet(cp, len);
-                       rsvp_print_pkt(cp, len);
-+#endif
-                       break;
-               case IPPROTO_PIM:
-                       printf(" PIMv2 ");
-diff -urN tcpdump-3.4.orig/print-ipx.c tcpdump-3.4/print-ipx.c
---- tcpdump-3.4.orig/print-ipx.c       Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-ipx.c    Sat Jul  3 17:58:06 1999
-@@ -34,11 +34,14 @@
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #ifdef __STDC__
- #include <stdlib.h>
-diff -urN tcpdump-3.4.orig/print-krb.c tcpdump-3.4/print-krb.c
---- tcpdump-3.4.orig/print-krb.c       Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-krb.c    Sat Jul  3 17:58:06 1999
-@@ -33,9 +33,13 @@
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <ctype.h>
- #include <errno.h>
-diff -urN tcpdump-3.4.orig/print-nfs.c tcpdump-3.4/print-nfs.c
---- tcpdump-3.4.orig/print-nfs.c       Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-nfs.c    Sat Jul  3 17:58:06 1999
-@@ -38,7 +38,12 @@
- #include <netinet/if_ether.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <rpc/rpc.h>
-diff -urN tcpdump-3.4.orig/print-null.c tcpdump-3.4/print-null.c
---- tcpdump-3.4.orig/print-null.c      Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-null.c   Sat Jul  3 17:58:06 1999
-@@ -45,11 +45,14 @@
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
- #include <netinet/if_ether.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <pcap.h>
- #include <stdio.h>
-diff -urN tcpdump-3.4.orig/print-ospf.c tcpdump-3.4/print-ospf.c
---- tcpdump-3.4.orig/print-ospf.c      Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-ospf.c   Sat Jul  3 17:58:06 1999
-@@ -33,7 +33,12 @@
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <ctype.h>
- #include <stdio.h>
-diff -urN tcpdump-3.4.orig/print-pim.c tcpdump-3.4/print-pim.c
---- tcpdump-3.4.orig/print-pim.c       Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-pim.c    Sat Jul  3 18:49:27 1999
-@@ -31,11 +31,14 @@
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <stdio.h>
- #include <stdlib.h>
-@@ -43,6 +46,10 @@
- #include "interface.h"
- #include "addrtoname.h"
-+
-+#define __u32 u_int32_t
-+#define __u16 u_int16_t
-+#define __u8   u_int8_t
- void
- pim_print(register const u_char *bp, register u_int len)
-diff -urN tcpdump-3.4.orig/print-raw.c tcpdump-3.4/print-raw.c
---- tcpdump-3.4.orig/print-raw.c       Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-raw.c    Sat Jul  3 17:58:06 1999
-@@ -40,11 +40,14 @@
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
- #include <netinet/if_ether.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <pcap.h>
- #include <stdio.h>
-diff -urN tcpdump-3.4.orig/print-rip.c tcpdump-3.4/print-rip.c
---- tcpdump-3.4.orig/print-rip.c       Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-rip.c    Sat Jul  3 17:58:06 1999
-@@ -31,9 +31,13 @@
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <stdio.h>
-diff -urN tcpdump-3.4.orig/print-sl.c tcpdump-3.4/print-sl.c
---- tcpdump-3.4.orig/print-sl.c        Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-sl.c     Sat Jul  3 17:58:06 1999
-@@ -35,7 +35,7 @@
- #include <sys/timeb.h>
- #include <sys/file.h>
- #include <sys/ioctl.h>
--#include <sys/mbuf.h>
-+#include "./sys/mbuf.h"
- #include <sys/socket.h>
- #if __STDC__
-@@ -47,14 +47,17 @@
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
- #include <netinet/if_ether.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
--#include <net/slcompress.h>
--#include <net/slip.h>
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
-+
-+#include "./net/slcompress.h"
-+#include "./net/slip.h"
- #include <ctype.h>
- #include <netdb.h>
-diff -urN tcpdump-3.4.orig/print-sunrpc.c tcpdump-3.4/print-sunrpc.c
---- tcpdump-3.4.orig/print-sunrpc.c    Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-sunrpc.c Sat Jul  3 17:58:06 1999
-@@ -43,7 +43,12 @@
- #include <netinet/if_ether.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <rpc/rpc.h>
- #ifdef HAVE_RPC_RPCENT_H
-diff -urN tcpdump-3.4.orig/print-tcp.c tcpdump-3.4/print-tcp.c
---- tcpdump-3.4.orig/print-tcp.c       Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-tcp.c    Sat Jul  3 17:58:06 1999
-@@ -32,20 +32,31 @@
- #include <sys/param.h>
- #include <sys/time.h>
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#else
-+# define __FAVOR_BSD
-+#endif
-+
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
- #ifdef HAVE_MEMORY_H
- #include <memory.h>
- #endif
- #include <stdio.h>
-+
- #ifdef INET6
--#include <netinet6/in6.h>
--#include <netinet6/ipv6.h>
-+# if __GLIBC__ >= 2
-+#  include <netinet/ip6.h>
-+# else
-+#  include <netinet6/in6.h>
-+#  include <netinet6/ipv6.h>
-+# endif
- #endif /* INET6 */
- #include <stdlib.h>
-diff -urN tcpdump-3.4.orig/print-tr.c tcpdump-3.4/print-tr.c
---- tcpdump-3.4.orig/print-tr.c        Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-tr.c     Sat Jul  3 17:58:06 1999
-@@ -33,16 +33,20 @@
- #endif
- #include <net/if.h>
-+#include <asm/types.h>
- #include <netinet/in.h>
- #include <netinet/if_tr.h>
- #include <netinet/if_ether.h> /* just to get ETHERMTU */
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
- #include <netinet/tcp.h>
--#include <netinet/tcpip.h>
-+
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
- #include <stdio.h>
- #include <pcap.h>
-diff -urN tcpdump-3.4.orig/print-udp.c tcpdump-3.4/print-udp.c
---- tcpdump-3.4.orig/print-udp.c       Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/print-udp.c    Sat Jul  3 17:58:06 1999
-@@ -33,15 +33,26 @@
- #include <sys/time.h>
- #include <sys/socket.h>
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#else
-+# define __FAVOR_BSD
-+#endif
-+
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>
--#include <netinet/ip_var.h>
- #include <netinet/udp.h>
--#include <netinet/udp_var.h>
-+
- #ifdef INET6
--#include <netinet6/in6.h>
--#include <netinet6/ipv6.h>
-+# if __GLIBC__ >= 2
-+#  include <netinet/ip6.h>
-+# else
-+#  include <netinet6/in6.h>
-+#  include <netinet6/ipv6.h>
-+# endif
- #endif
- #ifdef NOERROR
-diff -urN tcpdump-3.4.orig/tcpdump.c tcpdump-3.4/tcpdump.c
---- tcpdump-3.4.orig/tcpdump.c Sat Jul  3 17:50:45 1999
-+++ tcpdump-3.4/tcpdump.c      Sat Jul  3 17:58:06 1999
-@@ -104,8 +104,8 @@
- static struct printer printers[] = {
-       { ether_if_print,       DLT_EN10MB },
-       { tr_if_print,          DLT_IEEE802 },
--      { sl_if_print,          DLT_SLIP },
--      { sl_bsdos_if_print,    DLT_SLIP_BSDOS },
-+/*    { sl_if_print,          DLT_SLIP }, */
-+/*    { sl_bsdos_if_print,    DLT_SLIP_BSDOS }, */
-       { ppp_if_print,         DLT_PPP },
-       { ppp_bsdos_if_print,   DLT_PPP_BSDOS },
-       { fddi_if_print,        DLT_FDDI },
-diff -urN tcpdump-3.4.orig/xxx tcpdump-3.4/xxx
---- tcpdump-3.4.orig/xxx       Thu Jan  1 01:00:00 1970
-+++ tcpdump-3.4/xxx    Sat Jul  3 17:58:06 1999
-@@ -0,0 +1,6 @@
-+#if ! __GLIBC__ >= 2
-+# include <netinet/ip_var.h>
-+# include <netinet/udp_var.h>
-+# include <netinet/tcpip.h>
-+#endif
-+
diff --git a/tcpdump-iphl.patch b/tcpdump-iphl.patch
deleted file mode 100644 (file)
index 52790d6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- tcpdump-3.4/print-ip.c.iphl        Fri Aug 20 17:37:59 1999
-+++ tcpdump-3.4/print-ip.c     Fri Aug 20 17:39:05 1999
-@@ -463,6 +463,10 @@
-                       (void)printf("truncated-ip %d", length);
-               return;
-       }
-+      if (ip->ip_hl < 5) {
-+              (void)printf("ip_hl < 5 (%d)", ip->ip_hl);
-+              return;
-+      }
-       hlen = ip->ip_hl * 4;
-       len = ntohs(ip->ip_len);
diff --git a/tcpdump-libsmi.patch b/tcpdump-libsmi.patch
deleted file mode 100644 (file)
index 79fd221..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-; From: Bill Fenner <fenner@research.att.com>
-; Subject: Re: libsmi 0.2.6 && tcpdump from cvs
-;
-;Care to try these diffs?  I didn't see any documentation on the API
-;change so I mostly just looked around for similar-looking functions.
-;It at least compiles now.  (Juergen, can you look these over?)
-;
-;  Bill
-;
-Index: print-snmp.c
-===================================================================
-RCS file: /tcpdump/master/tcpdump/print-snmp.c,v
-retrieving revision 1.42
-diff -u -r1.42 print-snmp.c
---- print-snmp.c       2000/10/06 05:54:51     1.42
-+++ print-snmp.c       2000/11/04 20:43:09
-@@ -947,25 +947,18 @@
-         SmiRange *smiRange;
-       int ok = 1;
--      for (smiRange = smiGetFirstRange(smiType->module, smiType->name);
-+      for (smiRange = smiGetFirstRange(smiType);
-            smiRange;
-            smiRange = smiGetNextRange(smiRange)) {
-           ok = smi_check_a_range(smiType, smiRange, elem);
--          
--          if (ok) {
--              smiFreeRange(smiRange);
--              break;
--          }
-       }
--      if (ok && smiType->parentmodule && smiType->parentname) {
-+      if (ok) {
-           SmiType *parentType;
--          parentType = smiGetType(smiType->parentmodule,
--                                  smiType->parentname);
-+          parentType = smiGetParentType(smiType);
-           if (parentType) {
-               ok = smi_check_range(parentType, elem);
--              smiFreeType(parentType);
-           }
-       }
-@@ -985,7 +978,7 @@
-               return NULL;
-       }
-       if (vflag) {
--              fputs(smiNode->module, stdout);
-+              fputs(smiGetNodeModule(smiNode)->name, stdout);
-               fputs("::", stdout);
-       }
-       fputs(smiNode->name, stdout);
-@@ -1026,17 +1019,17 @@
-           && smiNode->access == SMI_ACCESS_NOT_ACCESSIBLE) {
-           fputs("[noAccess]", stdout);
-       }
--
--      if (! smi_check_type(smiNode->basetype, elem->type)) {
--          fputs("[wrongType]", stdout);
--      }
--      smiType = smiGetType(smiNode->typemodule, smiNode->typename);
-+      smiType = smiGetNodeType(smiNode);
-       if (! smiType) {
-           asn1_print(elem);
-           return;
-       }
-+      if (! smi_check_type(smiType->basetype, elem->type)) {
-+          fputs("[wrongType]", stdout);
-+      }
-+
-       if (! smi_check_range(smiType, elem)) {
-           fputs("[wrongLength]", stdout);
-       }
-@@ -1051,15 +1044,14 @@
-       
-       switch (elem->type) {
-       case BE_OID:
--              if (smiNode->basetype == SMI_BASETYPE_BITS
--                  && smiNode->typemodule && smiNode->typename) {
-+              if (smiType->basetype == SMI_BASETYPE_BITS) {
-                       /* print bit labels */
-               } else {
-                       smi_decode_oid(elem, oid, &oidlen);
-                       smiNode = smiGetNodeByOID(oidlen, oid);
-                       if (smiNode) {
-                               if (vflag) {
--                                      fputs(smiNode->module, stdout);
-+                                      fputs(smiGetNodeModule(smiNode)->name, stdout);
-                                       fputs("::", stdout);
-                               }
-                               fputs(smiNode->name, stdout);
-@@ -1075,10 +1067,8 @@
-               break;
-       case BE_INT:
--              if (smiNode->basetype == SMI_BASETYPE_ENUM
--                  && smiNode->typemodule && smiNode->typename) {
--                      for (nn = smiGetFirstNamedNumber(smiNode->typemodule,
--                                                       smiNode->typename);
-+              if (smiType->basetype == SMI_BASETYPE_ENUM) {
-+                      for (nn = smiGetFirstNamedNumber(smiType);
-                            nn;
-                            nn = smiGetNextNamedNumber(nn)) {
-                                if (nn->value.value.integer32
-@@ -1096,10 +1086,6 @@
-       if (! done) {
-               asn1_print(elem);
-       }
--
--      if (smiType) {
--              smiFreeType(smiType);
--      }
- }
- #endif
-@@ -1215,7 +1201,6 @@
-                       if (elem.type != BE_NULL) {
- #ifdef LIBSMI
-                               smi_print_value(smiNode, pduid, &elem);
--                              smiFreeNode(smiNode);
- #else
-                               asn1_print(&elem);
- #endif
-
diff --git a/tcpdump-make.patch b/tcpdump-make.patch
deleted file mode 100644 (file)
index deb0c27..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---- tcpdump_3_5rel2/Makefile.in.wiget  Fri Jul 14 14:06:19 2000
-+++ tcpdump_3_5rel2/Makefile.in        Fri Jul 14 14:08:35 2000
-@@ -134,12 +134,12 @@
- install: force
-       [ -d $(DESTDIR)$(BINDEST) ] || mkdir -p $(DESTDIR)$(BINDEST)
--      $(INSTALL) -m 550 -o bin -g @V_GROUP@ $(PROG) \
-+      $(INSTALL) -m 550 $(PROG) \
-           $(DESTDIR)$(BINDEST)/$(PROG)
- install-man: force
-       [ -d $(DESTDIR)$(MANDEST)/man1 ] || mkdir -p $(DESTDIR)$(MANDEST)/man1
--      $(INSTALL) -m 444 -o bin -g bin $(srcdir)/$(PROG).1 \
-+      $(INSTALL) -m 444 $(srcdir)/$(PROG).1 \
-           $(DESTDIR)$(MANDEST)/man1/$(PROG).1
- lint: $(GENSRC) force
diff --git a/tcpdump-no-libsmi.patch b/tcpdump-no-libsmi.patch
deleted file mode 100644 (file)
index 4f3c2ca..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
---- tcpdump-cvs20001217/configure.in~  Wed Dec 27 17:56:21 2000
-+++ tcpdump-cvs20001217/configure.in   Wed Dec 27 17:56:47 2000
-@@ -44,38 +44,6 @@
-       ;;
- esac
--
--AC_CHECK_HEADERS(smi.h)
--AC_CHECK_LIB(smi, smiInit)
--AC_MSG_CHECKING([whether to enable libsmi])
--        AC_TRY_RUN([ /* libsmi available check */
--#include <smi.h>
--main()
--{
--  int current, revision, age, n;
--  const int required = 2;
--  if (smiInit("")) 
--    exit(1);
--  if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
--    exit(2);
--  n = sscanf(smi_library_version, "%d:%d:%d", &current, &revision, &age);
--  if (n != 3)
--    exit(3);
--  if (required < current - age || required > current)
--    exit(4);
--  exit(0);
--}
--],
--[ AC_MSG_RESULT(yes)
--  AC_DEFINE(LIBSMI)
--  libsmi=yes],
--[ AC_MSG_RESULT(no)
--  libsmi=no],
--[ AC_MSG_RESULT(not when cross-compiling)
--  libsmi=no]
--)
--
--
- CFLAGS="$CFLAGS -Dss_family=__ss_family -Dss_len=__ss_len"
- AC_MSG_CHECKING([whether to enable ipv6])
- AC_ARG_ENABLE(ipv6,
diff --git a/tcpdump-sparc64.patch b/tcpdump-sparc64.patch
deleted file mode 100644 (file)
index 3f592e6..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
---- tcpdump-3.4/print-ether.c.jbj      Tue Aug  3 19:45:06 1999
-+++ tcpdump-3.4/print-ether.c  Wed Aug  4 09:08:36 1999
-@@ -54,6 +54,7 @@
- #include <linux/if_packet.h>
- #include <stdio.h>
-+#include <ctype.h>
- #include <pcap.h>
- #include "interface.h"
-@@ -103,20 +104,23 @@
-               static char ifnames[16][16];
-               if (h->ifindex>0 && h->ifindex <= 16) {
-                       if (ifnames[h->ifindex-1][0] == 0) {
--                              int tmp_fd;
-+                              int tmp_fd, err;
-                               struct ifreq ifr;
-                               ifr.ifr_ifindex = h->ifindex;
-                               tmp_fd = socket(AF_INET, SOCK_DGRAM, 0);
--                              if (ioctl(tmp_fd, SIOCGIFNAME, (char*)&ifr) == 0) {
-+                              err = ioctl(tmp_fd, SIOCGIFNAME, (char*)&ifr);
-+                      /* XXX SIOCGIFNAME fubar on sparc64 2.2.10-3 */
-+                              if (err == 0 &&
-+                                  (isprint(ifr.ifr_name[0]) && isprint(ifr.ifr_name[1]))) {
-                                       memcpy(ifnames[h->ifindex-1], ifr.ifr_name, 16);
-                               } else {
--                                      sprintf(ifnames[h->ifindex-1], "if%2d ", h->ifindex);
-+                                      sprintf(ifnames[h->ifindex-1], "if%02d ", h->ifindex);
-                               }
-                               close(tmp_fd);
-                       }
-                       printf("%4s ", ifnames[h->ifindex-1]);
-               } else
--                      printf("if%2d ", h->ifindex);
-+                      printf("if%02d ", h->ifindex);
-       }
-       switch (h->pkt_type) {
This page took 0.160428 seconds and 4 git commands to generate.