diff --git a/net/tcpview/files/patch-DOC_INSTALL.binaries b/net/tcpview/files/patch-DOC_INSTALL.binaries new file mode 100644 index 0000000000000..3a5e319aaffc3 --- /dev/null +++ b/net/tcpview/files/patch-DOC_INSTALL.binaries @@ -0,0 +1,23 @@ +--- DOC/INSTALL.binaries.orig 1993-04-22 21:58:49 UTC ++++ DOC/INSTALL.binaries +@@ -2,9 +2,9 @@ Installing Tcpview + Installing Tcpview + + 1. Create a directory for the tcpview support files. I use +-/usr/local/tcpview. Create /usr/local/tcpview/filters for the filters. ++/usr/local/lib/tcpview. Create /usr/local/lib/tcpview/filters for the filters. + Copy BGP, generic, and telnet from bin to the filters directory. Copy +-manuf and hosts to /usr/local/tcpview. Edit the last two files as ++manuf and hosts to /usr/local/lib/tcpview. Edit the last two files as + needed. + + 2. Edit a copy of the tcpview resource file, which is DOC/Tcpview. Change +@@ -21,7 +21,7 @@ using the first one found: the environmental variable + a copy of MOSY, download the UW-CMU SNMP package on ftp.cac.washington.edu. + Tcpdump and tcpview will search for the mib file in the following locations, + using the first one found: the environmental variable "MIBFILE", ./mib.txt, +-and /usr/local/mib/mib.txt. ++and /usr/local/lib/tcpview/mib/mib.txt. + + 5. If you are running on an Ultrix system, you will have to run pfconfig + before you can capture any data. On a Sun system, you should make diff --git a/net/tcpview/files/patch-DOC_Tcpview b/net/tcpview/files/patch-DOC_Tcpview new file mode 100644 index 0000000000000..5c7c5286014a8 --- /dev/null +++ b/net/tcpview/files/patch-DOC_Tcpview @@ -0,0 +1,57 @@ +--- DOC/Tcpview.orig 1993-03-29 23:26:25 UTC ++++ DOC/Tcpview +@@ -1,18 +1,22 @@ ++*.foreground: brown ++*.background: ivory2 ++ ++ + ! These are the fonts used in the summary window. For best results, choose + ! fixed fonts where the second font is exactly the same size as the first, only + ! BOLD +-*FontList: courier12=chset1, courB12=chset2 ++!*FontList: courier12=chset1, courB12=chset2 + ! + ! This is the directory that contains the external protocol filters +-! default is /usr/local/tcpview/filters +-!Tcpview.filters: /usr/staff/martinh/tcp/filters ++! default is /usr/local/lib/tcpview/filters ++Tcpview.filters: /usr/local/lib/tcpview/filters + ! + ! Print Command. Default is "lpr" +-Tcpview.printcommand: enscript -2r ++Tcpview.printcommand: lpr + ! + ! set the height and width of the initial window + ! There are no defaults +-Tcpview.height: 800 ++Tcpview.height: 465 + Tcpview.width: 600 + ! + ! this sets the number of visible items in each pane +@@ -23,11 +27,11 @@ Tcpview.pane*visibleItemCount: 10 + ! + ! Full pathnames for files containing manufacturer id's, ethernet numbers, + ! and tcp/udp service mappings. See sample files for format. +-! Defaults are /usr/local/tcpview/manuf, /usr/local/tcpview/hosts, ++! Defaults are /usr/local/lib/tcpview/manuf, /usr/local/lib/tcpview/hosts, + ! and /etc/services +-!Tcpview.manuf: /usr/local/sniffer/manuf +-!Tcpview.hostnames: /usr/local/sniffer/ethers +-!Tcpview.services: /usr/local/sniffer/services ++Tcpview.manuf: /usr/local/lib/tcpview/manuf ++Tcpview.hostnames: /usr/local/lib/tcpview/hosts ++Tcpview.services: /etc/services + + ! Lookup (using DNS) names of hosts not on your local subnet + ! default is true. If 'false', IP numbers will be used on foreign hosts. +@@ -85,10 +89,3 @@ Tcpview.maxbytes: 1520 + ! 4 - Print Relative times + ! + !Tcpview.time: 4 +- +- +- +- +- +- +- diff --git a/net/tcpview/files/patch-DOC_tcpview.1 b/net/tcpview/files/patch-DOC_tcpview.1 new file mode 100644 index 0000000000000..81a28cc824597 --- /dev/null +++ b/net/tcpview/files/patch-DOC_tcpview.1 @@ -0,0 +1,17 @@ +--- DOC/tcpview.1.orig 1993-03-25 20:41:02 UTC ++++ DOC/tcpview.1 +@@ -234,11 +234,11 @@ configuration variables. The configuration files are + .RS + \fIResource name\fP \fIDefault\fP + .PP +-Tcpview.hostnames: /usr/local/tcpview/ethers ++Tcpview.hostnames: /usr/local/lib/tcpview/ethers + .PP +-Tcpview.manuf: /usr/local/tcpview/manuf ++Tcpview.manuf: /usr/local/lib/tcpview/manuf + .PP +-Tcpview.services: /etc/services ++Tcpview.services: /etc/services + .PP + The hostnames file contains DLC-to-name mappings. It is in the same format + as \fISniffer\fP name files. diff --git a/net/tcpview/files/patch-Makefile b/net/tcpview/files/patch-Makefile index c8fa4c56f6fc7..9e1882d100589 100644 --- a/net/tcpview/files/patch-Makefile +++ b/net/tcpview/files/patch-Makefile @@ -1,5 +1,5 @@ ---- Makefile.orig 1993-04-22 14:40:24.000000000 -0700 -+++ Makefile 2014-05-29 22:43:08.670436162 -0700 +--- Makefile.orig 1993-04-22 21:40:24 UTC ++++ Makefile @@ -21,17 +21,16 @@ # @(#) $Header: /usr/staff/martinh/tcpview/RCS/Makefile,v 1.3 1992/11/17 21:59:47 martinh Exp martinh $ (UW) @@ -22,7 +22,7 @@ # These are for the Sun4 version #CCOPT = -O2 -Bstatic -@@ -41,20 +40,20 @@ +@@ -41,20 +40,20 @@ XLIB= -lXm -lXt -lX11 XLIB= -lXm -lXt -lX11 # The installed binary is owned by this group. @@ -51,7 +51,7 @@ # Standard CFLAGS STANDARD_CFLAGS = $(CCOPT) $(DEFINES) $(INCLUDES) -@@ -70,7 +69,7 @@ +@@ -70,7 +69,7 @@ STANDARD_CFLAGS = $(CCOPT) $(DEFINES) $(INCLUDES) #tahoe-bsd#CFLAGS = $(STANDARD_CFLAGS) #vax-bsd#CFLAGS = $(STANDARD_CFLAGS) #vax-ultrix# @@ -60,7 +60,7 @@ #mips-irix#CFLAGS = $(STANDARD_CFLAGS) -D_BSD_COMPAT SUBDIRS = hp300-bsd mips-ultrix sun?-sunos? sun4-bsd tahoe-bsd vax-bsd \ -@@ -92,7 +91,8 @@ +@@ -92,7 +91,8 @@ OS=`./ostype` # Also, gcc does not remove the .o before forking 'as', which can be a # problem if you don't own the file but can write to the directory. .c.o: @@ -70,7 +70,7 @@ # List all C source files here -@@ -189,7 +189,7 @@ +@@ -189,7 +189,7 @@ tcpview: $(TCPVIEW_OBJ) $(CC) $(CFLAGS) -o $@ $(TCPDUMP_OBJ) $(LIB) tcpview: $(TCPVIEW_OBJ) @@ -79,7 +79,7 @@ tcpslice: $(TCPSLICE_OBJ) $(CC) $(CFLAGS) -o $@ $(TCPSLICE_OBJ) -@@ -209,12 +209,12 @@ +@@ -209,12 +209,12 @@ submake: force -@dir=$(MD)-$(OS)-tcpdump; \ if [ ! -d $$dir ]; then ${MAKE} ${MFLAGS} config1; fi; \ set -x; \ @@ -95,7 +95,7 @@ # N.B.- symbolic links are used in the subdirectory rather than VPATH # because at least one Sun cc compiler puts the .o in the wrong place -@@ -239,7 +239,7 @@ +@@ -239,7 +239,7 @@ config1: ln -s ../net $$dir/net; \ sed -e "/^all:/d" -e "s/^#$$dir#//" Makefile >$$dir/Makefile; \ chmod ug+w $$dir/Makefile; \ @@ -104,7 +104,7 @@ config2: -@md=$(MD); os=$(OS); dir=$$md-$$os-tcpview; list=; \ -@@ -258,23 +258,24 @@ +@@ -258,23 +258,24 @@ config2: ln -s ../TCPVIEW_VERSION $$dir/TCPVIEW_VERSION; \ sed -e "/^all:/d" -e "s/^#$$dir#//" Makefile >$$dir/Makefile; \ chmod ug+w $$dir/Makefile; \ @@ -133,7 +133,7 @@ sed 's/.*/char tcpview_version[] = "&";/' TCPVIEW_VERSION >> version.c set `sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \2/' VERSION` ; \ { echo '#define VERSION_MAJOR' $$1 ; \ -@@ -287,22 +288,20 @@ +@@ -287,22 +288,20 @@ install: force install: force -mkdir -p $(TCPVIEW_DIR) -mkdir -p $(FILTER_DIR) @@ -169,7 +169,7 @@ lint: force lint -hbxn $(CSRC) | \ -@@ -367,8 +366,3 @@ +@@ -367,8 +366,3 @@ depend2: force -../mkdep $(DEFINES) $(INCLUDES) $(TCPVIEW_CSRC) \ tcpgram.c tcplex.c rm -f $(GEN) diff --git a/net/tcpview/files/patch-binary-streams b/net/tcpview/files/patch-binary-streams deleted file mode 100644 index e2c09be5872a8..0000000000000 --- a/net/tcpview/files/patch-binary-streams +++ /dev/null @@ -1,224 +0,0 @@ ---- detail-domain.c Fri Apr 23 04:39:51 1993 -+++ detail-domain.c Mon Mar 8 23:30:02 1999 -@@ -199,6 +199,7 @@ - case T_ANY: /* matches any type */ - strcpy(type_buf, "ANY"); - break; -+#ifdef T_UNSPEC - case T_UINFO: - strcpy(type_buf, "UINFO"); - break; -@@ -211,6 +212,7 @@ - case T_UNSPEC: - strcpy(type_buf, "UNSPEC"); - break; -+#endif - default: - sprintf(type_buf, "%d", type); - break; -@@ -633,6 +635,7 @@ - printf("; errors = %s\n", str); - MARK_WINDOW(); - -+#ifdef T_UNSPEC - case T_UINFO: - printf(" UINFO: "); - printf("%s\n", cp); -@@ -654,6 +657,12 @@ - MARK_WINDOW(); - break; - -+ case T_UNSPEC: -+ printf(" \n"); -+ INCR_PTRS(rdlength); -+ MARK_WINDOW(); -+ break; -+#endif - case T_WKS: - if (rdlength < (int)(sizeof(u_long) + 1)) - break; -@@ -730,11 +739,6 @@ - break; - - -- case T_UNSPEC: -- printf(" \n"); -- INCR_PTRS(rdlength); -- MARK_WINDOW(); -- break; - - - default: ---- detail-tcp.c Fri Apr 23 04:39:55 1993 -+++ detail-tcp.c Mon Mar 8 23:27:08 1999 -@@ -37,6 +37,7 @@ - #endif - - #include -+#include - #include - #include - #include ---- md-386.c Thu Jan 1 08:00:00 1970 -+++ md-386.c Thu Aug 17 19:15:37 2000 -@@ -0,0 +1,6 @@ -+int -+clock_sigfigs() -+{ -+ return 3; -+} -+ ---- md-386.h Thu Jan 1 08:00:00 1970 -+++ md-386.h Thu Aug 17 19:15:33 2000 -@@ -0,0 +1,16 @@ -+#define TCPDUMP_ALIGN -+ -+#include -+ -+/* 32-bit data types */ -+/* N.B.: this doesn't address printf()'s %d vs. %ld formats */ -+/* -+typedef long int32; -+*/ -+/* signed 32-bit integer */ -+#ifndef AUTH_UNIX -+/* -+typedef u_long u_int32; -+*/ -+/* unsigned 32-bit integer */ -+#endif ---- mdtype.orig Mon Feb 17 13:29:48 1992 -+++ mdtype Fri Mar 14 23:06:11 2003 -@@ -5,12 +5,15 @@ - # - set mach="UNKNOWN" - if ( -f /bin/arch ) set mach=`/bin/arch` --if ($mach == "UNKNOWN") then -- set temp=`machine` -- if ($temp != "") set mach=$temp --endif - # Hack, hack... - if ($mach == "sparc") set mach=sun4 -+ -+# Hack for FreeBSD -+if ($mach == "UNKNOWN") then -+ set temp=`uname|grep FreeBSD` -+ if ($temp != "") set mach=386 -+endif -+ - echo $mach - if ($mach == "UNKNOWN") exit 1 - exit 0 ---- ostype.awk Tue Jan 28 04:37:30 1992 -+++ ostype.awk Tue Feb 25 21:16:42 1997 -@@ -12,7 +12,7 @@ - os = "sunos4" - } - --$0 ~ /^4.[1-9]\ ?BSD / { -+$0 ~ /BSD / { - os = "bsd" - } - ---- print-domain.c Fri Apr 23 04:40:15 1993 -+++ print-domain.c Mon Mar 8 23:20:34 1999 -@@ -137,10 +137,10 @@ - case T_HINFO: printf(" HINFO"); break; - case T_MINFO: printf(" MINFO"); break; - case T_MX: printf(" MX"); break; -+#ifdef T_UNSPEC - case T_UINFO: printf(" UINFO"); break; - case T_UID: printf(" UID"); break; - case T_GID: printf(" GID"); break; --#ifdef T_UNSPEC - case T_UNSPEC: printf(" UNSPEC"); break; - #endif - case T_AXFR: printf(" AXFR"); break; -@@ -213,10 +213,10 @@ - } - #endif - break; -+#ifdef T_UNSPEC - case T_UINFO: printf(" UINFO"); break; - case T_UID: printf(" UID"); break; - case T_GID: printf(" GID"); break; --#ifdef T_UNSPEC - case T_UNSPEC: printf(" UNSPEC"); break; - #endif - case T_AXFR: printf(" AXFR"); break; ---- print-fddi.c Fri Apr 23 04:40:16 1993 -+++ print-fddi.c Tue Feb 25 22:21:53 1997 -@@ -54,6 +54,10 @@ - #include "interface.h" - #include "addrtoname.h" - -+ -+int fddipad = 0; /* for proper alignment of header */ -+ -+ - /* - * NOTE: This is a very preliminary hack for FDDI support. - * There are all sorts of wired in constants & nothing (yet) ---- print-snmp.c Fri Apr 23 04:40:27 1993 -+++ print-snmp.c Wed Feb 26 00:13:29 1997 -@@ -1045,7 +1045,7 @@ - if (!Mib) - Mib = read_mib("mib.txt"); - if (!Mib) -- Mib = read_mib("/usr/local/mib/mib.txt"); -+ Mib = read_mib("/usr/local/lib/tcpview/mib/mib.txt"); - if (!Mib){ - err_print("Couldn't find mib file\n"); - exit(2); ---- print-sunrpc.c Fri Apr 23 04:40:27 1993 -+++ print-sunrpc.c Tue Feb 25 21:33:36 1997 -@@ -38,10 +38,10 @@ - #include - #include - #include -+#include - #include - #include - #include --#include - #include - - #include ---- tcpview.c Fri Apr 23 04:40:33 1993 -+++ tcpview.c Tue Feb 25 23:48:35 1997 -@@ -33,7 +33,7 @@ - - #include - #include --#include -+#include - #include - #include - #include -@@ -155,13 +155,13 @@ - - static XtResource resources[] = { - { "hostnames", "Hostnames", XtRString, sizeof(String), -- XtOffset(params_ptr, hostnames), XtRString, "/usr/local/tcpview/hosts" }, -+ XtOffset(params_ptr, hostnames), XtRString, "/usr/local/lib/tcpview/hosts" }, - { "manuf", "Manuf", XtRString, sizeof(String), -- XtOffset(params_ptr, manuf), XtRString, "/usr/local/tcpview/manuf" }, -+ XtOffset(params_ptr, manuf), XtRString, "/usr/local/lib/tcpview/manuf" }, - { "services", "Services", XtRString, sizeof(String), - XtOffset(params_ptr, services), XtRString, "/etc/services" }, - { "filters", "Filters", XtRString, sizeof(String), -- XtOffset(params_ptr, filters), XtRString, "/usr/local/tcpview/filters" }, -+ XtOffset(params_ptr, filters), XtRString, "/usr/local/lib/tcpview/filters" }, - { "viewer", "Viewer", XtRString, sizeof(String), - XtOffset(params_ptr, viewer), XtRString, "*" }, - { "printcommand", "Printcommand", XtRString, sizeof(String), ---- tv_addrtoname.c Fri Apr 23 04:40:35 1993 -+++ tv_addrtoname.c Tue Feb 25 22:05:49 1997 -@@ -110,6 +110,7 @@ - u_short p; - }; - -+#define IPPROTO_HELLO 63 /* "hello" routing protocol */ - struct ipproto ipproto_db[] = { - { "IP", IPPROTO_IP }, - { "ICMP", IPPROTO_ICMP }, diff --git a/net/tcpview/files/patch-callbacks.c b/net/tcpview/files/patch-callbacks.c index 399befcd085a9..b61bd56e87a55 100644 --- a/net/tcpview/files/patch-callbacks.c +++ b/net/tcpview/files/patch-callbacks.c @@ -1,6 +1,6 @@ ---- callbacks.c.orig Fri Apr 23 05:22:59 1993 -+++ callbacks.c Tue Oct 28 02:03:28 2003 -@@ -42,7 +42,7 @@ +--- callbacks.c.orig 1993-04-22 21:22:59 UTC ++++ callbacks.c +@@ -42,7 +42,7 @@ static char rcsid[] = #include #endif @@ -9,7 +9,7 @@ #include #include #include -@@ -66,7 +66,7 @@ +@@ -66,7 +66,7 @@ extern Widget packet_label; extern Widget hex_text_widget; /* hex (bottom) window */ extern Widget packet_label; @@ -18,14 +18,14 @@ #ifdef __STDC__ void redisplay_current_list(void); -@@ -726,32 +726,35 @@ +@@ -726,32 +726,35 @@ void xperror(str) } -void eprint(va_alist) - va_dcl +void eprintv(char *fmt, va_list ap) -+{ + { + char str[128]; + + (void)vsprintf(str, fmt, ap); @@ -34,7 +34,7 @@ + + +void eprint(char *fmt, ...) - { ++{ va_list args; - char *fmt, str[128]; diff --git a/net/tcpview/files/patch-capture.c b/net/tcpview/files/patch-capture.c index c9f0e9ed734cc..77bf7fa2d0ea5 100644 --- a/net/tcpview/files/patch-capture.c +++ b/net/tcpview/files/patch-capture.c @@ -1,6 +1,6 @@ ---- capture.c.orig Tue Oct 28 02:13:49 2003 -+++ capture.c Tue Oct 28 02:15:57 2003 -@@ -37,7 +37,6 @@ +--- capture.c.orig 1993-04-22 20:39:50 UTC ++++ capture.c +@@ -37,7 +37,6 @@ static char rcsid[] = #endif #include diff --git a/net/tcpview/files/patch-detail-domain.c b/net/tcpview/files/patch-detail-domain.c new file mode 100644 index 0000000000000..24cf1399489c1 --- /dev/null +++ b/net/tcpview/files/patch-detail-domain.c @@ -0,0 +1,51 @@ +--- detail-domain.c.orig 1993-04-22 20:39:51 UTC ++++ detail-domain.c +@@ -199,6 +199,7 @@ p_type(type) + case T_ANY: /* matches any type */ + strcpy(type_buf, "ANY"); + break; ++#ifdef T_UNSPEC + case T_UINFO: + strcpy(type_buf, "UINFO"); + break; +@@ -211,6 +212,7 @@ p_type(type) + case T_UNSPEC: + strcpy(type_buf, "UNSPEC"); + break; ++#endif + default: + sprintf(type_buf, "%d", type); + break; +@@ -633,6 +635,7 @@ p_ans(msg, eom) + printf("; errors = %s\n", str); + MARK_WINDOW(); + ++#ifdef T_UNSPEC + case T_UINFO: + printf(" UINFO: "); + printf("%s\n", cp); +@@ -654,6 +657,12 @@ p_ans(msg, eom) + MARK_WINDOW(); + break; + ++ case T_UNSPEC: ++ printf(" \n"); ++ INCR_PTRS(rdlength); ++ MARK_WINDOW(); ++ break; ++#endif + case T_WKS: + if (rdlength < (int)(sizeof(u_long) + 1)) + break; +@@ -730,11 +739,6 @@ p_ans(msg, eom) + break; + + +- case T_UNSPEC: +- printf(" \n"); +- INCR_PTRS(rdlength); +- MARK_WINDOW(); +- break; + + + default: diff --git a/net/tcpview/files/patch-detail-tcp.c b/net/tcpview/files/patch-detail-tcp.c new file mode 100644 index 0000000000000..205e0ee32a517 --- /dev/null +++ b/net/tcpview/files/patch-detail-tcp.c @@ -0,0 +1,28 @@ +--- detail-tcp.c.orig 1993-04-22 20:39:55 UTC ++++ detail-tcp.c +@@ -37,6 +37,7 @@ static char rcsid[] = + #endif + + #include ++#include + #include + #include + #include +@@ -82,7 +83,7 @@ u_short length; + hex( 2, 3 ); + + bcopy(&tp->th_seq,&seq,4); +- NTOHL(seq); ++ ntohl(seq); + printf("Sequence number = %lu\n",seq); + hex( 4, 7 ); + +@@ -90,7 +91,7 @@ u_short length; + + if( flags & TH_ACK ) { + bcopy(&tp->th_ack,&ack,4); +- NTOHL(ack); ++ ntohl(ack); + printf("Acknowledgement number = %lu\n",ack); + hex( 8, 11); + } diff --git a/net/tcpview/files/patch-detail_udp.c b/net/tcpview/files/patch-detail-udp.c similarity index 82% rename from net/tcpview/files/patch-detail_udp.c rename to net/tcpview/files/patch-detail-udp.c index 324c1110be046..afc6cf00f2976 100644 --- a/net/tcpview/files/patch-detail_udp.c +++ b/net/tcpview/files/patch-detail-udp.c @@ -1,6 +1,6 @@ ---- detail-udp.c.orig 1993-04-22 13:39:55.000000000 -0700 -+++ detail-udp.c 2010-06-13 08:09:33.000000000 -0700 -@@ -37,6 +37,7 @@ +--- detail-udp.c.orig 1993-04-22 20:39:55 UTC ++++ detail-udp.c +@@ -37,6 +37,7 @@ static char rcsid[] = #endif #include @@ -8,7 +8,7 @@ #include #include #include -@@ -50,12 +51,21 @@ +@@ -50,12 +51,21 @@ static char rcsid[] = #include #include #include diff --git a/net/tcpview/files/patch-gencode.c b/net/tcpview/files/patch-gencode.c index 46d985fe5039a..a027cd61128d2 100644 --- a/net/tcpview/files/patch-gencode.c +++ b/net/tcpview/files/patch-gencode.c @@ -1,6 +1,6 @@ ---- gencode.c.orig Fri Apr 23 04:40:01 1993 -+++ gencode.c Tue Oct 28 02:03:44 2003 -@@ -36,7 +36,7 @@ +--- gencode.c.orig 1993-04-22 20:40:01 UTC ++++ gencode.c +@@ -36,7 +36,7 @@ static char rcsid[] = #include #ifdef TCPVIEW @@ -9,7 +9,7 @@ #include static jmp_buf env; #define error parse_error -@@ -97,10 +97,15 @@ +@@ -97,10 +97,15 @@ static int cur_chunk; static int cur_chunk; #ifdef TCPVIEW diff --git a/net/tcpview/files/patch-hex.c b/net/tcpview/files/patch-hex.c index fd8d11ee97bae..39bec83cfd61d 100644 --- a/net/tcpview/files/patch-hex.c +++ b/net/tcpview/files/patch-hex.c @@ -1,6 +1,6 @@ ---- hex.c.orig 1993-04-22 13:40:04.000000000 -0700 -+++ hex.c 2017-10-06 07:25:01.182767000 -0700 -@@ -85,6 +85,7 @@ +--- hex.c.orig 1993-04-22 20:40:04 UTC ++++ hex.c +@@ -85,6 +85,7 @@ char *readline(buf) char *s; do { diff --git a/net/tcpview/files/patch-interface.h b/net/tcpview/files/patch-interface.h index 37cbedf843c00..5a7fd72c60a46 100644 --- a/net/tcpview/files/patch-interface.h +++ b/net/tcpview/files/patch-interface.h @@ -1,6 +1,6 @@ ---- interface.h.orig Tue Oct 28 01:36:19 2003 -+++ interface.h Tue Oct 28 01:36:30 2003 -@@ -59,8 +59,8 @@ +--- interface.h.orig 1993-04-22 20:47:58 UTC ++++ interface.h +@@ -59,8 +59,8 @@ extern char *lookup_device(); extern char *lookup_device(); diff --git a/net/tcpview/files/patch-md-386.c b/net/tcpview/files/patch-md-386.c new file mode 100644 index 0000000000000..8559109f40bca --- /dev/null +++ b/net/tcpview/files/patch-md-386.c @@ -0,0 +1,9 @@ +--- md-386.c.orig 2023-02-15 05:01:08 UTC ++++ md-386.c +@@ -0,0 +1,6 @@ ++int ++clock_sigfigs() ++{ ++ return 3; ++} ++ diff --git a/net/tcpview/files/patch-md-386.h b/net/tcpview/files/patch-md-386.h new file mode 100644 index 0000000000000..4301ccd8d1f46 --- /dev/null +++ b/net/tcpview/files/patch-md-386.h @@ -0,0 +1,19 @@ +--- md-386.h.orig 2023-02-15 05:01:08 UTC ++++ md-386.h +@@ -0,0 +1,16 @@ ++#define TCPDUMP_ALIGN ++ ++#include ++ ++/* 32-bit data types */ ++/* N.B.: this doesn't address printf()'s %d vs. %ld formats */ ++/* ++typedef long int32; ++*/ ++/* signed 32-bit integer */ ++#ifndef AUTH_UNIX ++/* ++typedef u_long u_int32; ++*/ ++/* unsigned 32-bit integer */ ++#endif diff --git a/net/tcpview/files/patch-mdtype b/net/tcpview/files/patch-mdtype new file mode 100644 index 0000000000000..fbb95a5790beb --- /dev/null +++ b/net/tcpview/files/patch-mdtype @@ -0,0 +1,22 @@ +--- mdtype.orig 1992-02-17 05:29:48 UTC ++++ mdtype +@@ -5,12 +5,15 @@ if ( -f /bin/arch ) set mach=`/bin/arch` + # + set mach="UNKNOWN" + if ( -f /bin/arch ) set mach=`/bin/arch` +-if ($mach == "UNKNOWN") then +- set temp=`machine` +- if ($temp != "") set mach=$temp +-endif + # Hack, hack... + if ($mach == "sparc") set mach=sun4 ++ ++# Hack for FreeBSD ++if ($mach == "UNKNOWN") then ++ set temp=`uname|grep FreeBSD` ++ if ($temp != "") set mach=386 ++endif ++ + echo $mach + if ($mach == "UNKNOWN") exit 1 + exit 0 diff --git a/net/tcpview/files/patch-ostype b/net/tcpview/files/patch-ostype index 99ad72bdd0535..8568b913f461a 100644 --- a/net/tcpview/files/patch-ostype +++ b/net/tcpview/files/patch-ostype @@ -1,8 +1,6 @@ -Workaround if /etc/motd is missing - ---- ostype.orig 1993-04-19 19:18:37.000000000 +0300 +--- ostype.orig 1993-04-19 16:18:37 UTC +++ ostype -@@ -6,6 +6,8 @@ +@@ -6,6 +6,8 @@ if ( -f /etc/motd ) then set os="UNKNOWN" if ( -f /etc/motd ) then set os=`awk -f ostype.awk /etc/motd` diff --git a/net/tcpview/files/patch-ostype.awk b/net/tcpview/files/patch-ostype.awk new file mode 100644 index 0000000000000..58e32eed1fafa --- /dev/null +++ b/net/tcpview/files/patch-ostype.awk @@ -0,0 +1,11 @@ +--- ostype.awk.orig 1992-01-27 20:37:30 UTC ++++ ostype.awk +@@ -12,7 +12,7 @@ $0 ~ /^SunOS.* Release 4\./ { + os = "sunos4" + } + +-$0 ~ /^4.[1-9]\ ?BSD / { ++$0 ~ /BSD / { + os = "bsd" + } + diff --git a/net/tcpview/files/patch-pathfix b/net/tcpview/files/patch-pathfix deleted file mode 100644 index 3d79c28a4e242..0000000000000 --- a/net/tcpview/files/patch-pathfix +++ /dev/null @@ -1,97 +0,0 @@ ---- DOC/INSTALL.binaries Fri Apr 23 05:58:49 1993 -+++ DOC/INSTALL.binaries Wed Feb 26 00:12:18 1997 -@@ -2,9 +2,9 @@ - Installing Tcpview - - 1. Create a directory for the tcpview support files. I use --/usr/local/tcpview. Create /usr/local/tcpview/filters for the filters. -+/usr/local/lib/tcpview. Create /usr/local/lib/tcpview/filters for the filters. - Copy BGP, generic, and telnet from bin to the filters directory. Copy --manuf and hosts to /usr/local/tcpview. Edit the last two files as -+manuf and hosts to /usr/local/lib/tcpview. Edit the last two files as - needed. - - 2. Edit a copy of the tcpview resource file, which is DOC/Tcpview. Change -@@ -21,7 +21,7 @@ - a copy of MOSY, download the UW-CMU SNMP package on ftp.cac.washington.edu. - Tcpdump and tcpview will search for the mib file in the following locations, - using the first one found: the environmental variable "MIBFILE", ./mib.txt, --and /usr/local/mib/mib.txt. -+and /usr/local/lib/tcpview/mib/mib.txt. - - 5. If you are running on an Ultrix system, you will have to run pfconfig - before you can capture any data. On a Sun system, you should make ---- DOC/Tcpview Tue Mar 30 07:26:25 1993 -+++ DOC/Tcpview Wed Feb 26 00:30:33 1997 -@@ -1,18 +1,22 @@ -+*.foreground: brown -+*.background: ivory2 -+ -+ - ! These are the fonts used in the summary window. For best results, choose - ! fixed fonts where the second font is exactly the same size as the first, only - ! BOLD --*FontList: courier12=chset1, courB12=chset2 -+!*FontList: courier12=chset1, courB12=chset2 - ! - ! This is the directory that contains the external protocol filters --! default is /usr/local/tcpview/filters --!Tcpview.filters: /usr/staff/martinh/tcp/filters -+! default is /usr/local/lib/tcpview/filters -+Tcpview.filters: /usr/local/lib/tcpview/filters - ! - ! Print Command. Default is "lpr" --Tcpview.printcommand: enscript -2r -+Tcpview.printcommand: lpr - ! - ! set the height and width of the initial window - ! There are no defaults --Tcpview.height: 800 -+Tcpview.height: 465 - Tcpview.width: 600 - ! - ! this sets the number of visible items in each pane -@@ -23,11 +27,11 @@ - ! - ! Full pathnames for files containing manufacturer id's, ethernet numbers, - ! and tcp/udp service mappings. See sample files for format. --! Defaults are /usr/local/tcpview/manuf, /usr/local/tcpview/hosts, -+! Defaults are /usr/local/lib/tcpview/manuf, /usr/local/lib/tcpview/hosts, - ! and /etc/services --!Tcpview.manuf: /usr/local/sniffer/manuf --!Tcpview.hostnames: /usr/local/sniffer/ethers --!Tcpview.services: /usr/local/sniffer/services -+Tcpview.manuf: /usr/local/lib/tcpview/manuf -+Tcpview.hostnames: /usr/local/lib/tcpview/hosts -+Tcpview.services: /etc/services - - ! Lookup (using DNS) names of hosts not on your local subnet - ! default is true. If 'false', IP numbers will be used on foreign hosts. -@@ -85,10 +89,3 @@ - ! 4 - Print Relative times - ! - !Tcpview.time: 4 -- -- -- -- -- -- -- ---- DOC/tcpview.1 Fri Mar 26 04:41:02 1993 -+++ DOC/tcpview.1 Wed Feb 26 00:16:53 1997 -@@ -234,11 +234,11 @@ - .RS - \fIResource name\fP \fIDefault\fP - .PP --Tcpview.hostnames: /usr/local/tcpview/ethers -+Tcpview.hostnames: /usr/local/lib/tcpview/ethers - .PP --Tcpview.manuf: /usr/local/tcpview/manuf -+Tcpview.manuf: /usr/local/lib/tcpview/manuf - .PP --Tcpview.services: /etc/services -+Tcpview.services: /etc/services - .PP - The hostnames file contains DLC-to-name mappings. It is in the same format - as \fISniffer\fP name files. diff --git a/net/tcpview/files/patch-print-domain.c b/net/tcpview/files/patch-print-domain.c new file mode 100644 index 0000000000000..6296184447068 --- /dev/null +++ b/net/tcpview/files/patch-print-domain.c @@ -0,0 +1,26 @@ +--- print-domain.c.orig 1993-04-22 20:40:15 UTC ++++ print-domain.c +@@ -137,10 +137,10 @@ ns_qprint(cp, bp, ep) + case T_HINFO: printf(" HINFO"); break; + case T_MINFO: printf(" MINFO"); break; + case T_MX: printf(" MX"); break; ++#ifdef T_UNSPEC + case T_UINFO: printf(" UINFO"); break; + case T_UID: printf(" UID"); break; + case T_GID: printf(" GID"); break; +-#ifdef T_UNSPEC + case T_UNSPEC: printf(" UNSPEC"); break; + #endif + case T_AXFR: printf(" AXFR"); break; +@@ -213,10 +213,10 @@ ns_rprint(cp, bp, ep) + } + #endif + break; ++#ifdef T_UNSPEC + case T_UINFO: printf(" UINFO"); break; + case T_UID: printf(" UID"); break; + case T_GID: printf(" GID"); break; +-#ifdef T_UNSPEC + case T_UNSPEC: printf(" UNSPEC"); break; + #endif + case T_AXFR: printf(" AXFR"); break; diff --git a/net/tcpview/files/patch-print-fddi.c b/net/tcpview/files/patch-print-fddi.c new file mode 100644 index 0000000000000..d15bc7c93004c --- /dev/null +++ b/net/tcpview/files/patch-print-fddi.c @@ -0,0 +1,13 @@ +--- print-fddi.c.orig 1993-04-22 20:40:16 UTC ++++ print-fddi.c +@@ -54,6 +54,10 @@ static char rcsid[] = + #include "interface.h" + #include "addrtoname.h" + ++ ++int fddipad = 0; /* for proper alignment of header */ ++ ++ + /* + * NOTE: This is a very preliminary hack for FDDI support. + * There are all sorts of wired in constants & nothing (yet) diff --git a/net/tcpview/files/patch-print_nfs.c b/net/tcpview/files/patch-print-nfs.c similarity index 81% rename from net/tcpview/files/patch-print_nfs.c rename to net/tcpview/files/patch-print-nfs.c index 045edcf9adf14..7b0f2a5cd987d 100644 --- a/net/tcpview/files/patch-print_nfs.c +++ b/net/tcpview/files/patch-print-nfs.c @@ -1,6 +1,6 @@ ---- print-nfs.c.orig 1993-04-22 13:40:18.000000000 -0700 -+++ print-nfs.c 2010-06-13 08:09:51.000000000 -0700 -@@ -38,10 +38,10 @@ +--- print-nfs.c.orig 1993-04-22 20:40:18 UTC ++++ print-nfs.c +@@ -38,10 +38,10 @@ static char rcsid[] = #include #include #include @@ -12,7 +12,7 @@ #include #include -@@ -54,9 +54,21 @@ +@@ -54,9 +54,21 @@ static char rcsid[] = /* These must come after interface.h for BSD. */ #if BSD >= 199006 #include @@ -30,13 +30,13 @@ +#else +#include +#include -+#endif #endif -#include ++#endif #include "addrtoname.h" #include "extract.h" -@@ -170,7 +182,7 @@ +@@ -170,7 +182,7 @@ parsefn(dp) /* Fetch string length; convert to host order */ len = *dp++; @@ -45,7 +45,7 @@ cp = (u_char *)dp; /* Update long pointer (NFS filenames are padded to long) */ -@@ -250,11 +262,13 @@ +@@ -250,11 +262,13 @@ nfsreq_print(rp, length, ip) return; break; @@ -59,7 +59,7 @@ case RFS_LOOKUP: printf(" lookup"); if ((dp = parsereq(rp, length)) != 0 && parsefhn(dp) != 0) -@@ -277,7 +291,7 @@ +@@ -277,7 +291,7 @@ nfsreq_print(rp, length, ip) return; } break; @@ -68,7 +68,7 @@ #if RFS_WRITECACHE != NFSPROC_NOOP case RFS_WRITECACHE: printf(" writecache"); -@@ -291,6 +305,7 @@ +@@ -291,6 +305,7 @@ nfsreq_print(rp, length, ip) } break; #endif diff --git a/net/tcpview/files/patch-print_null.c b/net/tcpview/files/patch-print-null.c similarity index 72% rename from net/tcpview/files/patch-print_null.c rename to net/tcpview/files/patch-print-null.c index e9d2943a37508..0c0a4879c409e 100644 --- a/net/tcpview/files/patch-print_null.c +++ b/net/tcpview/files/patch-print-null.c @@ -1,6 +1,6 @@ ---- print-null.c.orig Mon May 12 17:35:00 2003 -+++ print-null.c Mon May 12 17:36:30 2003 -@@ -76,9 +76,17 @@ +--- print-null.c.orig 1993-04-22 20:40:19 UTC ++++ print-null.c +@@ -76,9 +76,17 @@ null_print(p, ip, length) printf("ip: "); break; diff --git a/net/tcpview/files/patch-print-snmp.c b/net/tcpview/files/patch-print-snmp.c new file mode 100644 index 0000000000000..7832d168c5621 --- /dev/null +++ b/net/tcpview/files/patch-print-snmp.c @@ -0,0 +1,11 @@ +--- print-snmp.c.orig 1993-04-22 20:40:27 UTC ++++ print-snmp.c +@@ -1045,7 +1045,7 @@ static void init_mib() + if (!Mib) + Mib = read_mib("mib.txt"); + if (!Mib) +- Mib = read_mib("/usr/local/mib/mib.txt"); ++ Mib = read_mib("/usr/local/lib/tcpview/mib/mib.txt"); + if (!Mib){ + err_print("Couldn't find mib file\n"); + exit(2); diff --git a/net/tcpview/files/patch-print-sunrpc.c b/net/tcpview/files/patch-print-sunrpc.c new file mode 100644 index 0000000000000..3f7dd0534594d --- /dev/null +++ b/net/tcpview/files/patch-print-sunrpc.c @@ -0,0 +1,14 @@ +--- print-sunrpc.c.orig 1993-04-22 20:40:27 UTC ++++ print-sunrpc.c +@@ -38,10 +38,10 @@ static char rcsid[] = + #include + #include + #include ++#include + #include + #include + #include +-#include + #include + + #include diff --git a/net/tcpview/files/patch-print_tcp.c b/net/tcpview/files/patch-print-tcp.c similarity index 71% rename from net/tcpview/files/patch-print_tcp.c rename to net/tcpview/files/patch-print-tcp.c index 5460ad46c4038..cf957aac22ec0 100644 --- a/net/tcpview/files/patch-print_tcp.c +++ b/net/tcpview/files/patch-print-tcp.c @@ -1,6 +1,6 @@ ---- print-tcp.c.orig Wed Jun 13 22:18:16 2007 -+++ print-tcp.c Wed Jun 13 22:18:32 2007 -@@ -410,6 +410,8 @@ +--- print-tcp.c.orig 1993-04-22 20:40:28 UTC ++++ print-tcp.c +@@ -410,6 +410,8 @@ static u_long src[2] = { 0, 0 }; /* assemble a single bidirectional stream */ @@ -9,7 +9,7 @@ static void assemble( seq, len, data, syn, srcx ) u_long seq, len, srcx; u_char *data; -@@ -418,7 +420,6 @@ +@@ -418,7 +420,6 @@ int syn; int i,j,first=0; u_long newptr; struct tcp_frag *t; diff --git a/net/tcpview/files/patch-print_udp.c b/net/tcpview/files/patch-print-udp.c similarity index 81% rename from net/tcpview/files/patch-print_udp.c rename to net/tcpview/files/patch-print-udp.c index f2ee79bb6c35b..4a951f93b91c0 100644 --- a/net/tcpview/files/patch-print_udp.c +++ b/net/tcpview/files/patch-print-udp.c @@ -1,6 +1,6 @@ ---- print-udp.c.orig 1993-04-22 13:40:29.000000000 -0700 -+++ print-udp.c 2010-06-13 08:09:39.000000000 -0700 -@@ -39,10 +39,10 @@ +--- print-udp.c.orig 1993-04-22 20:40:29 UTC ++++ print-udp.c +@@ -39,10 +39,10 @@ static char rcsid[] = #include #include #include @@ -12,7 +12,7 @@ #include #ifdef TCPVIEW -@@ -53,9 +53,16 @@ +@@ -53,9 +53,16 @@ static char rcsid[] = /* These must come after interface.h for BSD. */ #if BSD >= 199006 #include @@ -25,9 +25,9 @@ +#else +#include +#include -+#endif #endif -#include ++#endif #include "addrtoname.h" #include "appletalk.h" diff --git a/net/tcpview/files/patch-print.c b/net/tcpview/files/patch-print.c index 19119ad7165cd..420a48d5a21c5 100644 --- a/net/tcpview/files/patch-print.c +++ b/net/tcpview/files/patch-print.c @@ -1,6 +1,6 @@ ---- print.c.orig Tue Oct 28 01:43:36 2003 -+++ print.c Tue Oct 28 01:44:37 2003 -@@ -36,21 +36,18 @@ +--- print.c.orig 1993-04-22 20:40:29 UTC ++++ print.c +@@ -36,21 +36,18 @@ static char rcsid[] = "@(#) $Header: /usr/staff/martinh/tcpview/RCS/print.c,v 1.1 1993/04/22 20:33:56 martinh Exp $ (UW)"; #endif diff --git a/net/tcpview/files/patch-tcpslice.c b/net/tcpview/files/patch-tcpslice.c index 6b47c118a367e..7135af6c2c105 100644 --- a/net/tcpview/files/patch-tcpslice.c +++ b/net/tcpview/files/patch-tcpslice.c @@ -1,6 +1,6 @@ ---- tcpslice.c.orig Tue Oct 28 02:14:35 2003 -+++ tcpslice.c Tue Oct 28 02:16:29 2003 -@@ -36,7 +36,6 @@ +--- tcpslice.c.orig 1993-04-22 20:40:32 UTC ++++ tcpslice.c +@@ -36,7 +36,6 @@ static char rcsid[] = #include #include #include diff --git a/net/tcpview/files/patch-tcpview.c b/net/tcpview/files/patch-tcpview.c new file mode 100644 index 0000000000000..c645851241937 --- /dev/null +++ b/net/tcpview/files/patch-tcpview.c @@ -0,0 +1,28 @@ +--- tcpview.c.orig 1993-04-22 20:40:33 UTC ++++ tcpview.c +@@ -33,7 +33,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +@@ -155,13 +155,13 @@ static XtResource resources[] = { + + static XtResource resources[] = { + { "hostnames", "Hostnames", XtRString, sizeof(String), +- XtOffset(params_ptr, hostnames), XtRString, "/usr/local/tcpview/hosts" }, ++ XtOffset(params_ptr, hostnames), XtRString, "/usr/local/lib/tcpview/hosts" }, + { "manuf", "Manuf", XtRString, sizeof(String), +- XtOffset(params_ptr, manuf), XtRString, "/usr/local/tcpview/manuf" }, ++ XtOffset(params_ptr, manuf), XtRString, "/usr/local/lib/tcpview/manuf" }, + { "services", "Services", XtRString, sizeof(String), + XtOffset(params_ptr, services), XtRString, "/etc/services" }, + { "filters", "Filters", XtRString, sizeof(String), +- XtOffset(params_ptr, filters), XtRString, "/usr/local/tcpview/filters" }, ++ XtOffset(params_ptr, filters), XtRString, "/usr/local/lib/tcpview/filters" }, + { "viewer", "Viewer", XtRString, sizeof(String), + XtOffset(params_ptr, viewer), XtRString, "*" }, + { "printcommand", "Printcommand", XtRString, sizeof(String), diff --git a/net/tcpview/files/patch-tcpview.h b/net/tcpview/files/patch-tcpview.h index fd2e5445cbdd8..657bf0f013c01 100644 --- a/net/tcpview/files/patch-tcpview.h +++ b/net/tcpview/files/patch-tcpview.h @@ -1,6 +1,6 @@ ---- tcpview.h.orig Fri Apr 23 04:48:09 1993 -+++ tcpview.h Tue Oct 28 02:02:49 2003 -@@ -97,8 +97,8 @@ +--- tcpview.h.orig 1993-04-22 20:48:09 UTC ++++ tcpview.h +@@ -97,8 +97,8 @@ void perror(); void perror(); #endif diff --git a/net/tcpview/files/patch-tv__addrtoname.c b/net/tcpview/files/patch-tv__addrtoname.c new file mode 100644 index 0000000000000..0e90afb30d6dd --- /dev/null +++ b/net/tcpview/files/patch-tv__addrtoname.c @@ -0,0 +1,46 @@ +--- tv_addrtoname.c.orig 1993-04-22 20:40:35 UTC ++++ tv_addrtoname.c +@@ -110,6 +110,7 @@ struct ipproto { + u_short p; + }; + ++#define IPPROTO_HELLO 63 /* "hello" routing protocol */ + struct ipproto ipproto_db[] = { + { "IP", IPPROTO_IP }, + { "ICMP", IPPROTO_ICMP }, +@@ -307,7 +308,7 @@ intoa(addr) + register int n; + static char buf[sizeof(".xxx.xxx.xxx.xxx")]; + +- NTOHL(addr); ++ ntohl(addr); + cp = &buf[sizeof buf]; + *--cp = '\0'; + +@@ -643,7 +644,7 @@ int flag; + static char buffer[8]; + char *cp; + +- NTOHS(port); ++ ntohs(port); + + if (!(flag&ADDR_NUMERICAL)) { + for(i=0;eproto_db[i].s;i++) { +@@ -668,7 +669,7 @@ u_short pro; + { + int i; + +-/* NTOHS(pro); */ ++/* ntohs(pro); */ + + for(i=0;ipproto_db[i].s;i++) { + if (ipproto_db[i].p == pro) +@@ -750,7 +751,7 @@ init_servarray() + register struct hnamemem *table; + + while (sv = GetServent()) { +- NTOHS(sv->s_port); ++ ntohs(sv->s_port); + if (strcmp(sv->s_proto, "tcp") == 0) { + table = lookup_port(sv->s_port,LOOKUP_TCP); + } else if (strcmp(sv->s_proto, "udp") == 0) { diff --git a/net/tcpview/files/patch-util.c b/net/tcpview/files/patch-util.c index a42a462b54e12..368173a332cc5 100644 --- a/net/tcpview/files/patch-util.c +++ b/net/tcpview/files/patch-util.c @@ -1,6 +1,6 @@ ---- util.c.orig Fri Apr 23 04:40:36 1993 -+++ util.c Tue Oct 28 01:59:11 2003 -@@ -64,7 +64,7 @@ +--- util.c.orig 1993-04-22 20:40:36 UTC ++++ util.c +@@ -64,7 +64,7 @@ static char rcsid[] = #include #include #include @@ -9,7 +9,7 @@ #include #include -@@ -277,16 +277,13 @@ +@@ -277,16 +277,13 @@ void } void @@ -28,7 +28,7 @@ (void)vfprintf(stderr, cp, ap); va_end(ap); if (*cp) { -@@ -301,16 +298,13 @@ +@@ -301,16 +298,13 @@ void /* VARARGS */ void