Bug 124588

Summary: tcpslice won't read files with leading number
Product: Red Hat Enterprise Linux 3 Reporter: Steve Bonds <ij2fdc402>
Component: tcpdumpAssignee: Martin Stransky <stransky>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-28 11:33:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve Bonds 2004-05-27 19:36:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2)
Gecko/20040301

Description of problem:
When running "tcpslice" on a filename that starts with a number, it
gives the error:

tcpslice: at least one input file must be given



Version-Release number of selected component (if applicable):
tcpdump-3.7.2-7.E3.2

How reproducible:
Always

Steps to Reproduce:
1. touch 1_tcpdump.bin (file contents don't matter for this test)
2. /usr/sbin/tcpslice -r 1_tcpdump.bin

Actual Results:  tcpslice: at least one input file must be given

Expected Results:  tcpslice: bad tcpdump file 1_tcpdump.bin: fread:
Success

Additional info:

The workaround is simple, just rename the file so it starts with an
alphabetic character:

$ mv 1_tcpdump.bin tcpdump.bin
$ /usr/sbin/tcpslice -r tcpdump.bin
tcpslice: bad tcpdump file 1_tcpdump.bin: fread: Success

(if used with a real capture it will show the start/end dates in the file)

$ /usr/sbin/tcpslice -h
Version 1.1a3
Usage: tcpslice [-dRrt] [-w file] [start-time [end-time]] file ... 

tcpslice version 1.2a1 shows the same behavior.

  -- Steve

Comment 1 Martin Stransky 2005-01-28 11:33:09 UTC
Please, read man-pages of tcpslice carefuly:

An input filename that beings with a digit or a  â+â  can  be 
confused with  a start/end time.  
Such filenames can be specified with a leading â./â; for   example,
specify the file â04Jul76.traceâ as â./04Jul76.traceâ.