fix for the timeval/bpf_timeval conflict
This commit is contained in:
parent
a8721d2216
commit
1ae9d41fb6
@ -1,6 +1,4 @@
|
|||||||
# $OpenBSD: Makefile,v 1.10 2002/04/01 22:16:53 naddy Exp $
|
# $OpenBSD: Makefile,v 1.11 2002/04/01 23:41:24 pvalchev Exp $
|
||||||
|
|
||||||
BROKEN= "confuses struct timeval and bpf_timeval"
|
|
||||||
|
|
||||||
COMMENT= "TCP dump file analysis tool"
|
COMMENT= "TCP dump file analysis tool"
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
--- Makefile.in.orig Thu Nov 4 13:15:54 1999
|
$OpenBSD: patch-Makefile_in,v 1.1 2002/04/01 23:41:24 pvalchev Exp $
|
||||||
+++ Makefile.in Thu Nov 4 13:37:50 1999
|
--- Makefile.in.orig Tue Sep 7 19:31:58 1999
|
||||||
@@ -12,7 +12,7 @@
|
+++ Makefile.in Mon Apr 1 16:31:57 2002
|
||||||
|
@@ -12,7 +12,7 @@ DEFINES += -DGUNZIP="\"gunzip\""
|
||||||
# 2) Otherwise, if your system supports standard Unix "uncompress",
|
# 2) Otherwise, if your system supports standard Unix "uncompress",
|
||||||
# then uncomment the following line to support on-the-fly
|
# then uncomment the following line to support on-the-fly
|
||||||
# decompression of ".Z" files...
|
# decompression of ".Z" files...
|
||||||
@ -9,7 +10,7 @@
|
|||||||
# - we'll do path search on the string you specify. If the program
|
# - we'll do path search on the string you specify. If the program
|
||||||
# isn't in your path, you'll need to give the absolute path name.
|
# isn't in your path, you'll need to give the absolute path name.
|
||||||
# - if you want other formats, see the "compress.h" file.
|
# - if you want other formats, see the "compress.h" file.
|
||||||
@@ -30,8 +30,8 @@
|
@@ -30,8 +30,8 @@ DEFINES += -DGUNZIP="\"gunzip\""
|
||||||
#
|
#
|
||||||
##################################################################
|
##################################################################
|
||||||
PCAP_LDLIBS = -lpcap
|
PCAP_LDLIBS = -lpcap
|
||||||
@ -20,7 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@
|
@@ -125,7 +125,7 @@ INCLS = -I. @V_INCLS@ ${PCAP_INCS}
|
||||||
# Probably want full optimization
|
# Probably want full optimization
|
||||||
# FreeBSD needs -Ae
|
# FreeBSD needs -Ae
|
||||||
# HP needs -Ae
|
# HP needs -Ae
|
||||||
@ -29,7 +30,7 @@
|
|||||||
|
|
||||||
# Standard LIBS
|
# Standard LIBS
|
||||||
LDLIBS = @LIBS@ ${PCAP_LDLIBS}
|
LDLIBS = @LIBS@ ${PCAP_LDLIBS}
|
||||||
@@ -170,21 +170,13 @@
|
@@ -170,21 +170,13 @@ version.o: ${CFILES} Makefile
|
||||||
${CC} ${CFLAGS} -o version.o -c version.c \
|
${CC} ${CFLAGS} -o version.o -c version.c \
|
||||||
-DBUILT_USER="\"`whoami`\"" -DBUILT_HOST="\"`hostname`\"" -DBUILT_DATE="\"`date`\""
|
-DBUILT_USER="\"`whoami`\"" -DBUILT_HOST="\"`hostname`\"" -DBUILT_DATE="\"`date`\""
|
||||||
|
|
23
net/tcptrace/patches/patch-tcpdump_c
Normal file
23
net/tcptrace/patches/patch-tcpdump_c
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
$OpenBSD: patch-tcpdump_c,v 1.1 2002/04/01 23:41:24 pvalchev Exp $
|
||||||
|
--- tcpdump.c.orig Mon Aug 30 09:52:51 1999
|
||||||
|
+++ tcpdump.c Mon Apr 1 16:33:34 2002
|
||||||
|
@@ -176,7 +176,8 @@ pread_tcpdump(
|
||||||
|
*pphystype = PHYS_ETHER; /* everything assumed to be ethernet */
|
||||||
|
*ppip = (struct ip *) ip_buf;
|
||||||
|
*pplast = callback_plast; /* last byte in IP packet */
|
||||||
|
- *ptime = callback_phdr->ts;
|
||||||
|
+ ptime->tv_sec = callback_phdr->ts.tv_sec;
|
||||||
|
+ ptime->tv_usec = callback_phdr->ts.tv_usec;
|
||||||
|
*plen = callback_phdr->len;
|
||||||
|
*ptlen = callback_phdr->caplen;
|
||||||
|
|
||||||
|
@@ -311,7 +312,8 @@ PcapSavePacket(
|
||||||
|
}
|
||||||
|
|
||||||
|
/* create the packet header */
|
||||||
|
- phdr.ts = current_time;
|
||||||
|
+ phdr.ts.tv_sec = current_time.tv_sec;
|
||||||
|
+ phdr.ts.tv_usec = current_time.tv_usec;
|
||||||
|
phdr.caplen = (unsigned)plast - (unsigned)pip + 1;
|
||||||
|
phdr.caplen += EH_SIZE; /* add in the ether header */
|
||||||
|
phdr.len = EH_SIZE + ntohs(PIP_LEN(pip)); /* probably this */
|
Loading…
Reference in New Issue
Block a user