update to tcpslice 1.2a3
from new maintainer Rui Reis <rui@rui.cx> old maintainer timeout
This commit is contained in:
parent
8be57c61e4
commit
ab1f3ef61a
@ -1,15 +1,15 @@
|
||||
# $OpenBSD: Makefile,v 1.5 2004/12/16 00:31:26 alek Exp $
|
||||
# $OpenBSD: Makefile,v 1.6 2006/04/02 14:45:10 sturm Exp $
|
||||
|
||||
COMMENT= "tool for extracting and gluing pcap (tcpdump) files"
|
||||
|
||||
DISTNAME= tcpslice-1.1a3
|
||||
DISTNAME= tcpslice-1.2a3
|
||||
CATEGORIES= net
|
||||
|
||||
MASTER_SITES= ftp://ftp.ee.lbl.gov/
|
||||
EXTRACT_SUFX= .tar.Z
|
||||
|
||||
MAINTAINER= Brian Caswell <bmc@openbsd.org>
|
||||
MAINTAINER= Rui Reis <rui@rui.cx>
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
|
@ -1,4 +1,4 @@
|
||||
MD5 (tcpslice-1.1a3.tar.Z) = f7275a21af915b00c7a5e527d09e038c
|
||||
RMD160 (tcpslice-1.1a3.tar.Z) = 05c81107d03b8ffb954fe4f268e03404ee84dfb0
|
||||
SHA1 (tcpslice-1.1a3.tar.Z) = 96bf0f068296ca6ec009e81ab4af35ab923a1324
|
||||
SIZE (tcpslice-1.1a3.tar.Z) = 96447
|
||||
MD5 (tcpslice-1.2a3.tar.gz) = e329cbeb7e589f132d92c3447c477190
|
||||
RMD160 (tcpslice-1.2a3.tar.gz) = 97f8ebcbbb9298c0e2ad4670d442a87c1a2a4738
|
||||
SHA1 (tcpslice-1.2a3.tar.gz) = 98790301cb1bf4399a95153bc62d49b3f5808994
|
||||
SIZE (tcpslice-1.2a3.tar.gz) = 76879
|
||||
|
@ -1,36 +1,36 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.1 2001/01/08 09:04:30 danh Exp $
|
||||
--- Makefile.in.orig Fri Jan 24 01:25:22 1997
|
||||
+++ Makefile.in Mon Jan 8 03:51:00 2001
|
||||
@@ -40,8 +40,8 @@ VPATH = @srcdir@
|
||||
#
|
||||
$OpenBSD: patch-Makefile_in,v 1.2 2006/04/02 14:45:10 sturm Exp $
|
||||
--- Makefile.in.orig Sun Sep 10 10:54:27 2000
|
||||
+++ Makefile.in Sun Apr 2 13:24:32 2006
|
||||
@@ -41,8 +41,8 @@ VPATH = @srcdir@
|
||||
|
||||
CC = @CC@
|
||||
PROG = tcpslice
|
||||
-CCOPT = @V_CCOPT@
|
||||
-INCLS = -I. @V_INCLS@
|
||||
+CCOPT = @CFLAGS@
|
||||
+INCLS = -I. -I$(srcdir) -I$(srcdir)/lbl
|
||||
+INCLS = -I. -I$(srcdir) -I$(srcdir)/lbl
|
||||
DEFS = @DEFS@
|
||||
|
||||
# Standard CFLAGS
|
||||
@@ -55,9 +55,9 @@ INSTALL = @INSTALL@
|
||||
@@ -59,9 +59,9 @@ INSTALL = @INSTALL@
|
||||
# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
|
||||
# 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:
|
||||
- @rm -f $@
|
||||
- $(CC) $(CFLAGS) -c $(srcdir)/$*.c
|
||||
+# .c.o:
|
||||
+# @rm -f $@
|
||||
+# $(CC) $(CFLAGS) -c $*.c
|
||||
+#.c.o:
|
||||
+# @rm -f $@
|
||||
+# $(CC) $(CFLAGS) -c $(srcdir)/$*.c
|
||||
|
||||
CSRC = tcpslice.c gmt2local.c gwtm2secs.c machdep.c search.c util.c
|
||||
GENSRC = version.c
|
||||
@@ -94,7 +94,7 @@ version.c: $(srcdir)/VERSION
|
||||
|
||||
@@ -97,7 +97,7 @@ version.c: $(srcdir)/VERSION
|
||||
sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
|
||||
|
||||
install: force
|
||||
- $(INSTALL) -m 555 -o bin -g bin tcpslice $(DESTDIR)$(BINDEST)
|
||||
+ $(INSTALL) -s -m 555 -o root -g bin tcpslice $(DESTDIR)$(BINDEST)
|
||||
|
||||
install-man: force
|
||||
$(INSTALL) -m 444 -o bin -g bin $(srcdir)/tcpslice.1 \
|
||||
$(INSTALL) -m 444 -o bin -g bin $(srcdir)/$(PROG).1 \
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-search_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
--- search.c.orig Fri Oct 12 18:21:37 2001
|
||||
+++ search.c Fri Oct 12 18:22:45 2001
|
||||
$OpenBSD: patch-search_c,v 1.2 2006/04/02 14:45:10 sturm Exp $
|
||||
--- search.c.orig Sun Sep 10 10:52:40 2000
|
||||
+++ search.c Sun Apr 2 13:24:33 2006
|
||||
@@ -279,8 +279,8 @@ find_header( pcap_t *p, u_char *buf, int
|
||||
* present in the dump file.
|
||||
*/
|
||||
@ -10,9 +10,9 @@ $OpenBSD: patch-search_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
+sf_find_end( pcap_t *p, struct bpf_timeval *first_timestamp,
|
||||
+ struct bpf_timeval *last_timestamp )
|
||||
{
|
||||
u_int32_t first_time = first_timestamp->tv_sec;
|
||||
int num_bytes;
|
||||
@@ -373,7 +373,7 @@ sf_find_end( pcap_t *p, struct timeval *
|
||||
time_t first_time = first_timestamp->tv_sec;
|
||||
off_t len_file;
|
||||
@@ -383,7 +383,7 @@ sf_find_end( pcap_t *p, struct timeval *
|
||||
/* Takes two timeval's and returns the difference, tv2 - tv1, as a double. */
|
||||
|
||||
static double
|
||||
@ -21,7 +21,7 @@ $OpenBSD: patch-search_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
{
|
||||
double result = (tv2->tv_sec - tv1->tv_sec);
|
||||
result += (tv2->tv_usec - tv1->tv_usec) / 1000000.0;
|
||||
@@ -385,7 +385,7 @@ timeval_diff( struct timeval *tv1, struc
|
||||
@@ -395,7 +395,7 @@ timeval_diff( struct timeval *tv1, struc
|
||||
/* Returns true if timestamp t1 is chronologically less than timestamp t2. */
|
||||
|
||||
int
|
||||
@ -30,7 +30,7 @@ $OpenBSD: patch-search_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
{
|
||||
return t1->tv_sec < t2->tv_sec ||
|
||||
(t1->tv_sec == t2->tv_sec &&
|
||||
@@ -399,9 +399,9 @@ sf_timestamp_less_than( struct timeval *
|
||||
@@ -409,9 +409,9 @@ sf_timestamp_less_than( struct timeval *
|
||||
*/
|
||||
|
||||
static off_t
|
||||
@ -43,7 +43,7 @@ $OpenBSD: patch-search_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
{
|
||||
double full_span = timeval_diff( max_time, min_time );
|
||||
double desired_span = timeval_diff( desired_time, min_time );
|
||||
@@ -422,7 +422,7 @@ interpolated_position( struct timeval *m
|
||||
@@ -432,7 +432,7 @@ interpolated_position( struct timeval *m
|
||||
*/
|
||||
|
||||
static int
|
||||
@ -52,16 +52,16 @@ $OpenBSD: patch-search_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
{
|
||||
struct pcap_pkthdr hdr;
|
||||
const u_char *buf;
|
||||
@@ -431,7 +431,7 @@ read_up_to( pcap_t *p, struct timeval *d
|
||||
@@ -441,7 +441,7 @@ read_up_to( pcap_t *p, struct timeval *d
|
||||
|
||||
for ( ; ; )
|
||||
{
|
||||
- struct timeval *timestamp;
|
||||
+ struct bpf_timeval *timestamp;
|
||||
|
||||
pos = ftell( pcap_file( p ) );
|
||||
pos = FTELL( pcap_file( p ) );
|
||||
buf = pcap_next( p, &hdr );
|
||||
@@ -480,12 +480,12 @@ read_up_to( pcap_t *p, struct timeval *d
|
||||
@@ -490,12 +490,12 @@ read_up_to( pcap_t *p, struct timeval *d
|
||||
|
||||
int
|
||||
sf_find_packet( pcap_t *p,
|
||||
|
@ -1,7 +1,16 @@
|
||||
$OpenBSD: patch-tcpslice_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
--- tcpslice.c.orig Fri Oct 12 18:24:23 2001
|
||||
+++ tcpslice.c Fri Oct 12 18:28:45 2001
|
||||
@@ -71,14 +71,14 @@ enum stamp_styles timestamp_style = TIME
|
||||
$OpenBSD: patch-tcpslice_c,v 1.2 2006/04/02 14:45:10 sturm Exp $
|
||||
--- tcpslice.c.orig Tue Oct 25 00:06:26 2005
|
||||
+++ tcpslice.c Sun Apr 2 13:24:33 2006
|
||||
@@ -84,7 +84,7 @@ static const char rcsid[] =
|
||||
struct state {
|
||||
off_t start_pos, /* seek position corresponding to start time */
|
||||
stop_pos; /* seek position corresponding to stop time */
|
||||
- struct timeval
|
||||
+ struct bpf_timeval
|
||||
file_start_time, /* time of first pkt in file */
|
||||
file_stop_time; /* time of last pkt in file */
|
||||
pcap_t *p;
|
||||
@@ -107,19 +107,19 @@ enum stamp_styles timestamp_style = TIME
|
||||
|
||||
|
||||
int is_timestamp( char *str );
|
||||
@ -11,17 +20,24 @@ $OpenBSD: patch-tcpslice_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
void get_file_range( char filename[], pcap_t **p,
|
||||
- struct timeval *first_time, struct timeval *last_time );
|
||||
-struct timeval first_packet_time(char filename[], pcap_t **p_addr);
|
||||
-struct timeval lowest_start_time(struct state *states, int numfiles);
|
||||
+ struct bpf_timeval *first_time, struct bpf_timeval *last_time );
|
||||
+struct bpf_timeval first_packet_time(char filename[], pcap_t **p_addr);
|
||||
void extract_slice(char filename[], char write_file_name[],
|
||||
- struct timeval *start_time, struct timeval *stop_time);
|
||||
+struct bpf_timeval lowest_start_time(struct state *states, int numfiles);
|
||||
void get_next_packet(struct state *s);
|
||||
struct state *open_files(char *filenames[], int numfiles);
|
||||
void extract_slice(struct state *states, int numfiles, char *write_file_name,
|
||||
- struct timeval *start_time, struct timeval *stop_time,
|
||||
+ struct bpf_timeval *start_time, struct bpf_timeval *stop_time,
|
||||
int keep_dups, int relative_time_merge,
|
||||
- struct timeval *base_time);
|
||||
-char *timestamp_to_string(struct timeval *timestamp);
|
||||
+ struct bpf_timeval *start_time, struct bpf_timeval *stop_time);
|
||||
+ struct bpf_timeval *base_time);
|
||||
+char *timestamp_to_string(struct bpf_timeval *timestamp);
|
||||
void dump_times(pcap_t **p, char filename[]);
|
||||
__dead void usage(void)__attribute__((volatile));
|
||||
|
||||
@@ -98,7 +98,7 @@ main(int argc, char **argv)
|
||||
@@ -144,7 +144,7 @@ main(int argc, char **argv)
|
||||
char *start_time_string = 0;
|
||||
char *stop_time_string = 0;
|
||||
char *write_file_name = "-"; /* default is stdout */
|
||||
@ -29,8 +45,8 @@ $OpenBSD: patch-tcpslice_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
+ struct bpf_timeval first_time, start_time, stop_time;
|
||||
pcap_t *pcap;
|
||||
char ebuf[PCAP_ERRBUF_SIZE];
|
||||
|
||||
@@ -223,15 +223,19 @@ int is_timestamp( char *str )
|
||||
struct state *states;
|
||||
@@ -280,15 +280,19 @@ int is_timestamp( char *str )
|
||||
* containing the specified time.
|
||||
*/
|
||||
|
||||
@ -39,8 +55,7 @@ $OpenBSD: patch-tcpslice_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
+struct bpf_timeval
|
||||
+parse_time(char *time_string, struct bpf_timeval base_time)
|
||||
{
|
||||
- struct tm *bt = localtime((time_t *) &base_time.tv_sec);
|
||||
+ struct tm *bt;
|
||||
struct tm *bt = localtime((time_t *) &base_time.tv_sec);
|
||||
struct tm t;
|
||||
- struct timeval result;
|
||||
+ struct bpf_timeval result;
|
||||
@ -54,7 +69,7 @@ $OpenBSD: patch-tcpslice_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
if ( is_delta )
|
||||
++time_string; /* skip over '+' sign */
|
||||
|
||||
@@ -412,7 +416,7 @@ fill_tm(char *time_string, int is_delta,
|
||||
@@ -472,7 +476,7 @@ fill_tm(char *time_string, int is_delta,
|
||||
*/
|
||||
void
|
||||
get_file_range( char filename[], pcap_t **p,
|
||||
@ -63,7 +78,7 @@ $OpenBSD: patch-tcpslice_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
{
|
||||
*first_time = first_packet_time( filename, p );
|
||||
|
||||
@@ -427,7 +431,7 @@ int snaplen;
|
||||
@@ -485,7 +489,7 @@ get_file_range( char filename[], pcap_t
|
||||
* reading.
|
||||
*/
|
||||
|
||||
@ -72,29 +87,37 @@ $OpenBSD: patch-tcpslice_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
first_packet_time(char filename[], pcap_t **p_addr)
|
||||
{
|
||||
struct pcap_pkthdr hdr;
|
||||
@@ -457,10 +461,10 @@ first_packet_time(char filename[], pcap_
|
||||
@@ -504,10 +508,10 @@ first_packet_time(char filename[], pcap_
|
||||
|
||||
|
||||
/* Of all the files, what is the lowest start time. */
|
||||
-struct timeval
|
||||
+struct bpf_timeval
|
||||
lowest_start_time(struct state *states, int numfiles)
|
||||
{
|
||||
- struct timeval min_time = states->file_start_time;
|
||||
+ struct bpf_timeval min_time = states->file_start_time;
|
||||
|
||||
while (numfiles--) {
|
||||
if (sf_timestamp_less_than(&states->file_start_time, &min_time)) {
|
||||
@@ -590,13 +594,13 @@ open_files(char *filenames[], int numfil
|
||||
|
||||
void
|
||||
extract_slice(char filename[], char write_file_name[],
|
||||
- struct timeval *start_time, struct timeval *stop_time)
|
||||
+ struct bpf_timeval *start_time, struct bpf_timeval *stop_time)
|
||||
extract_slice(struct state *states, int numfiles, char *write_file_name,
|
||||
- struct timeval *start_time, struct timeval *stop_time,
|
||||
+ struct bpf_timeval *start_time, struct bpf_timeval *stop_time,
|
||||
int keep_dups, int relative_time_merge,
|
||||
- struct timeval *base_time)
|
||||
+ struct bpf_timeval *base_time)
|
||||
{
|
||||
off_t start_pos, stop_pos;
|
||||
- struct timeval file_start_time, file_stop_time;
|
||||
+ struct bpf_timeval file_start_time, file_stop_time;
|
||||
struct pcap_pkthdr hdr;
|
||||
pcap_t *p;
|
||||
char errbuf[PCAP_ERRBUF_SIZE];
|
||||
@@ -511,7 +515,7 @@ extract_slice(char filename[], char writ
|
||||
struct state *s, *min_state;
|
||||
pcap_dumper_t *dumper;
|
||||
- struct timeval temp1, temp2, relative_start, relative_stop;
|
||||
+ struct bpf_timeval temp1, temp2, relative_start, relative_stop;
|
||||
int i;
|
||||
|
||||
for ( ; ; )
|
||||
{
|
||||
- struct timeval *timestamp;
|
||||
+ struct bpf_timeval *timestamp;
|
||||
const u_char *pkt = pcap_next( p, &hdr );
|
||||
|
||||
if ( pkt == 0 )
|
||||
@@ -554,7 +558,7 @@ extract_slice(char filename[], char writ
|
||||
struct state *last_state; /* remember the last packet */
|
||||
@@ -747,7 +751,7 @@ extract_slice(struct state *states, int
|
||||
*/
|
||||
|
||||
char *
|
||||
@ -103,7 +126,7 @@ $OpenBSD: patch-tcpslice_c,v 1.1 2001/10/18 15:12:40 naddy Exp $
|
||||
{
|
||||
struct tm *t;
|
||||
#define NUM_BUFFERS 2
|
||||
@@ -599,7 +603,7 @@ timestamp_to_string(struct timeval *time
|
||||
@@ -793,7 +797,7 @@ timestamp_to_string(struct timeval *time
|
||||
void
|
||||
dump_times(pcap_t **p, char filename[])
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user