aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-03-22 09:36:02 +0800
committerobrien <obrien@FreeBSD.org>2000-03-22 09:36:02 +0800
commitae37a44ddd9a81789a2317077498c5dc20ce9858 (patch)
treea567bb458164bd096a7c7b54aa25e56fb7af86d0
parent722761fb9db54c2c9526282cbcac4dd29b15651b (diff)
downloadfreebsd-ports-gnome-ae37a44ddd9a81789a2317077498c5dc20ce9858.tar.gz
freebsd-ports-gnome-ae37a44ddd9a81789a2317077498c5dc20ce9858.tar.zst
freebsd-ports-gnome-ae37a44ddd9a81789a2317077498c5dc20ce9858.zip
Mike writes: I needed to be able to see the encapsulated packets in IP
proto 94 (IPIP). I've been using this patch for a few weeks now for tracking down various "things" involving some IP tunnels between some Cisco 1720/2610 routers and several FreeBSD machines. Submitted by: Mike Nowlin <mike@argos.org>
-rw-r--r--net/tcpshow/files/patch-0251
1 files changed, 46 insertions, 5 deletions
diff --git a/net/tcpshow/files/patch-02 b/net/tcpshow/files/patch-02
index 23e9084aa91e..cf0357b65f95 100644
--- a/net/tcpshow/files/patch-02
+++ b/net/tcpshow/files/patch-02
@@ -1,5 +1,5 @@
---- tcpshow.c.orig Tue Nov 30 01:49:43 1999
-+++ tcpshow.c Tue Nov 30 01:56:10 1999
+--- tcpshow.c.orig Tue Mar 21 17:25:25 2000
++++ tcpshow.c Tue Mar 21 17:28:04 2000
@@ -367,7 +367,7 @@
#endif
@@ -87,7 +87,48 @@
return getPkt();
-@@ -1826,7 +1831,7 @@
+@@ -1778,7 +1783,7 @@
+ static void showPkt (reg char *p) {
+
+ char *warnMsg = "<*** No decode support for encapsulated protocol ***>";
+-
++ char *warnMsg2 = "<*** No decode support for encap protocol in IPIP packet ***>";
+
+ prSep();
+ printf("Packet %d\n", ++nPktsShown);
+@@ -1807,6 +1812,31 @@
+ p = showIcmp(p);
+ p = showData(p);
+ break;
++
++ // IPIP decode support by M. Nowlin (mike@argos.org) 20000321
++ case IPIP:
++ p = showIp(p);
++ switch(proto) {
++ case TCP:
++ p = showTcp(p);
++ p = showData(p);
++ break;
++ case UDP:
++ p = showUdp(p);
++ p = showData(p);
++ break;
++ case ICMP:
++ p = showIcmp(p);
++ p = showData(p);
++ break;
++ default:
++ printf("\t%s\n", warnMsg2);
++ nextPkt();
++ break;
++ }
++
++ break;
++
+ default:
+ printf("\t%s\n", warnMsg);
+ nextPkt(); /* Doesn't return */
+@@ -1826,7 +1856,7 @@
}
/* Note that if getPkt() returns here, then the line read isn't the */
/* start of a new packet, i.e. there's spurious data. */
@@ -96,7 +137,7 @@
if (sFlag) printf("\t<*** Spurious data at end: \"%s\" ***>\n", p);
nextPkt();
}
-@@ -1996,10 +2001,10 @@
+@@ -1996,10 +2026,10 @@
if (terseFlag) {
printf(
@@ -110,7 +151,7 @@
printf(
"\thlen=%d (data=%u) UAPRSF=%s%s%s%s%s%s",
hLen, dataLen,
-@@ -2016,9 +2021,9 @@
+@@ -2016,9 +2046,9 @@
if (!noPortNames) printf(" (%s)", portName(sPort, "tcp", FALSE));
printf("\n\tDestination Port:\t\t%d", dPort);
if (!noPortNames) printf(" (%s)", portName(dPort, "tcp", FALSE));