Bugfixes and memory leak fixes, added RESET and EXPIRED
status detection, added a new way to write the stream to files, using
directories.
Federico Castaneda F_CASTANEDA:crm.com.ar
Added basic UDP support
Buck Huppmann buckh:pobox.com
wrote the RESET status detection
Saumil Shah
has helped me improving tcpick and making it useful to decode
application-level data (i.e. http).
Gianluigi Spagnuolo, kirash
has tested tcpick under many *BSD systems, helping me to make
tcpick more compatible on other systems.
He found also the pcap_next bug and a bug on the inet_ntoa return
ointer.
Kirash is currently helping me with several patches and increasing
the tcpick portability, which is really very important.
Penelope Fudd
Added a patch that allows to process with tcpick a tcpdump output
file instead of a live connection, in that way:
helped me to improve the performance of tcpick suggesting me a method
of session recognization with hash generated by addresses and ports
and a "chained" tracker of structures instead of a block of addresses
to structures (i.e. conn_ptr->next_conn).
Sebastian Prause
added support for DLT_PPP_ETHER datalink type
(including pppoe for NetBSD systems).
ShackaN
wrote a nice dprintf function for debugging purposes :)
Gimli
Spent a lot of time seeking for a bug I couldn't resolve on
a free().
kain
bug found at pcap_next, that returns NULL on some systems
suggested me to change pcap #include directive, because on
trustix (and perhaps other linux systems) libpcap are located in a
different place (pcap/pcap.h).
Ardoino Paolo
Suggested me to control memory allocated addresses
Robert Scheck
suggested me to improve the Makefile with variables.
Alberto 'JCN-9000' Varesio:
found that AIX doesn't have getopt_long and getopt.h
Davide Benini
corrected bug in calling S_calloc with only one argument
nextime has spent time compiling tcpick on an impressing number of
unix/gnu platforms helping me understanding tcpick
[in]compatibilities
AdHe5, Alt[O]s, hannibal, Kaioh, Alberto Panu, Maurizio Lemmo `Tannoiser',
Alberto 'JCN-9000' Varesio, gap, Kirillov
thanks to these people because they spent time testing tcpick
on their unix and linux distros sending me the report, that
I used to complete `PLATFORMS' file.
Thanks
Thanks to all people that are using tcpick and are sending me
description of problems encountered and to all people here not mentioned
that contributed to this software in many ways.
Thanks to all the mantainers of libpcap (http://www.tcpdump.org), that
indirectly contributed to the development of tcpick :)
Thanks to http://www.linuxlinks.com webmasters, that have added tcpick in their directory.
tcpick-0.2.1/doc/ChangeLog.html 0000644 0001751 0001751 00000045144 10173301003 013170 0000000 0000000
Added sigaction function to handle signals in a proper way.
Francesco Stablum (duskdruid:despammed.com):
Fixed -lpcap -lpcap etc. arguments to cc
Fixed SIGALRM freeze bug
Added setitimer workaround for *BSD systems (fork + sleep + kill)
Added -e option to exit when a certain number of packets is reached
Added atexit function
9 Jan 2005 0.2.0-final
Francesco Stablum (duskdruid:despammed.com):
Few bugfixes with -t and -td options
30 Dec 2004 0.2.0-rc6
Francesco Stablum (duskdruid:despammed.com):
expired functions are now checked every second, not every packet.
(use setitimer and the SIGALRM signal).
added DLT_PPP, DLT_SLIP, DLT_SLIP_BSDOS and DLT_PPP_BSDOS support.
credits: SNiFf v0.3 by uLiX
http://www.s0ftpj.org/bfi/online/bfi10/BFi10-05.html
added italian documentation (README.it, EXAMPLES.it, INSTALL.it, tcpick_italian.8)
25 Dec 2004 0.2.0-rc5
Gianluigi Spagnuolo (kirash:phreaker.net):
Added signal support + statistics (packets sniffed and
connection tracked) in a similar way to tcpdump.
Reorganized tcpick.c
Francesco Stablum (duskdruid:despammed.com):
Added autogen.sh script
Fixed bug of `-D' option
Updated to automake/aclocal 1.9.3
14 Dec 2004 0.2.0-rc4
Gianluigi Spagnuolo (kirash:phreaker.net):
found bug in avail_filename (write.c): too few arguments
to printf: fixed.
Francesco Stablum (duskdruid:despammed.com):
Now '\r' and '\t' charachters are printable in 'P' and 'U' modes.
MacOSX “BIOCSRTIMEOUT: Invalid argument” bug should be fixed.
port aligment in status displayer fixed (simplified)
12 Dec 2004 0.2.0-rc3
Francesco Stablum (duskdruid:despammed.com):
added date-timestamp
removed all typedefs. Now structures and unions should be better
recognizable (now names of types are UPPER-CASE)
Added .EDITME files for those people that have troubles with
the ./configure script
30 Nov 2004 0.2.0-rc2
Francesco Stablum (duskdruid:despammed.com):
Timeout value is now set by `-X' option, because `-t' will be used
for timestamps in the future.
Filenaming system is now chosen with the `-F' option.
Artyom Khafizov:
`-D num' option will cause tcpick to create subdirectories,
each for a desired number of sessions.
22 Nov 2004 0.2.0-rc1
Artyom Khafizov:
Added EXPIRED status for connection tracked with a -t option to choose
an appropriate timeout (default is 600)
Fixed many memory leaks
Added a new way to write the stream to files, using directories
Added an experimental file naming system
Buck Huppmann (buckh:pobox.com) and Artyom Khafizov
( both have had the same good idea :^D ):
Added RESET status for connections tracked. (RST-flagged packets will
delete the connection).
Federico Castaneda (F_CASTANEDA:crm.com.ar):
Added UDP support
Francesco Stablum (duskdruid:despammed.com):
Debug messages are now available only with the -DTCPICK_DEBUG argument
given to the compiler.
Changed signing key! Please read public_key_message.txt and check
the revocation certificate public_key_OLD.revoke
08/09/04 0.2.0-devel2
Segmentation fault bug fixed (with `u' tcpick tried to free 2 times
the same heap address and closed 2 times the same file).
(Saumil Shah discovered it)
Bugfix: `u' flag of `-w' worked as with `b' flag either if `b' wasn't choosen.
07/09/04 0.2.0-devel1
Robert Scheck fixed tcpick manual section in a `printf'
Saumil Shah feature request done:
the flag 'u' to the '-w' option enables tcpick to write sniffed data
in a unique file, with client and server data mixed together.
the flag 'b' to the '-w' option enables tcpick to write a banner to
the unique file that introduces server and client data.
28/08/04 0.1.24
BSD support _should_ be completed
added “suicide” and “fault” functions
some code cleanup
fixed netinet/ip.h check bug in the configure script for FreeBSD machines
fixed hexdump bug
fixed reset color. Background color is now not black, but the
terminal default
added the balanced tree to the lookup engine
applied patch by GLS to improve compatibility with openbsd 3.5 with
gcc 2.95.3
Now closed connections are freed and delinked; files will be closed.
Added the -E and -Ef arguments
Added the -Tf option
Fixed the segmentation bug of the `-y' option
added INTERNALS file (should be completed)
03/06/04 0.1.23
PFLOG support added by kirash aka GLS
patch by Sebastian Prause:
“I've created a little patch to make tcpick work with pppoe interfaces
on NetBSD (which use DLT_PPP_ETHER) and wanted to share it, so here it
is...”
now the options for displaying the payload should be prefixed by -y
I have added another set of displaying option, that are prefixed
with -b. The -b options are useful to view data only when acknowledged
(exactly like data written to files) and with this is particulary
useful the raw mode (-bR) that you can use if you want to redirect
data with a pipe to another software.
The newline carachter is suppressed when displaying the payload of the
packet or an acknowledged stream in the case there are no banners
except the case of the hexdump's.
Added the “–pipe” option, by a wish of loopback. See manpage for
details.
Now you are able to choose to write to file only data of clients or
servers or both, with the additional flags `C' and `S' to the option
`-w' (omitted means “both”).
Many, many changes, code cleanups and improvement made by whyx in
fragments.c and lookup.c
With the new option `-T<number>', it is now possible to
track only the first <number> connections, the following will be
discarded by the tracker engine. This is useful for the `-w' and `-b'
options; for `-y' and `-h' it has no effect, because they aren't part
of the tracker.
In the hexdump+ascii red dots rapresents now the unprintable carachter.
the lenght of the payload is now displayed in the packet banner
rewritten the core of verify.c and fragments.c
now connections with equal ip addresses and ports are stored in
different files
files dumped with tcpick -w* options are now saved vith “.tcpick”
extension
bugfix on datalink.c by kirash aka GLS
deleted alloc.c and match.c
used the “linux” 8-spaces indentation
added packet separator (by a Simone Gianni's wish)
added the `-p' flag to avoid to put the network interface in
promiscuous mode (I'm not sure it works) (by a Simone Gianni's wish)
Rewritten manpage. Read it! There are lots of changes in the options!
I have tested tcpick to sniff a file via ftp, and the md5sums were
equal. The tar.gz archive I have downloaded was more than 2MB
long. Other tests are confirming me that the newly-written code works
in the right way.
07/03/04 0.1.22-test2
now output files are opened in “a” (only append) mode
now data are written with “fwrite()” + ferror (thanks ^^Gimli^^)
06/02/04 0.1.22-test1
corrected bug in datalinktoa() by sbi!
Davide Benini: corrected bug in calling S_calloc with only one argument
added S_malloc function
now data are written with the write() function
28/02/04 0.1.21
Added src/ directory for the sources
Added a `flags` struct
Patch by Penelope Fudd: added `-r' option to read tcpdump filedumps: this is a very nice feature :)
Improved debugging system with dprintf (thank you ShackaN!)
Changed name of the `stack' memory block into `tracker'
Increased speed of the connection tracking system by adding many
return's instruction (instead of using some damned variables
like `loop_finished' and `result_bool') in verify() and match().
Added a "chained" tracker: now it is possible to track an
infinite number of connections (thank you mainman!)
Fixed bug that server file and client file were switched
30/01/04 0.1.20
added displaying of unprintable carachters (that are also dots in -P option)
with red color.
added hexdump mode colorizer
with option -C2 it is now possible see different colors depending on
the connection tracked (only status banners) (file colortrack.c)
added connection numbering (second field in status banner)
added time writing on banners and packet headers(time.c)
15/01/04 0.1.19
added <pcap/pcap.h> header support (i.e. trustix)
added DLT_PFLOG/DLT_NULL/DLT_RAW/DLT_IEEE802_11 header support (not tested!!!)
added datalinktooffset function (datalink.c)
added Push/Fin/Ack packet support
added support for those systems that don't have getopt_long and getopt.h
header (was a problem in AIX systems, thank you Alberto
'JCN-9000' Varesio)
added experimental color option (-C): it is very nice!
It should be helpful to read the output of tcpick.
added new file colors.c (read code comments to know about the
original author)
11/01/04 0.1.18
fixed ridicolous bug of "resulting_bool==" in match.c
fixed FIN-WAIT-2 bad detection
added TIME-WAIT status detection
added CLOSED status detection
11/01/04 0.1.18-test3 (UNSTABLE - BUGGY - ONLY FOR DEVELOPERS)
Precedent tarball -test2 was damaged (thank you kirash (aka GLS) to said it to me)
08/01/04 0.1.18-test2 (UNSTABLE - BUGGY - ONLY FOR
DEVELOPERS)
added DLT_NULL support by kirash (aka GLS)
fixed the ridicolous bug in -test1 (a if statement without braces)
rewritten functions verify() and match() are now fully working
08/01/04 0.1.18-test1 (UNSTABLE - BUGGY - ONLY FOR
DEVELOPERS)
completely rewritten match() and verify() functions
added new files datalink.c and match.c
datalink managing modified to be compatible on systems that
don't #define all datalinks
05/01/04 0.1.17
ip.h header ported internally to the package for compatibility with
BSD systems
patch by kirash: changes to myheader.h, lookup.c and stack.c in order to
improve compatibility on BSD systems
added FIN-WAIT-1 status tracking
05/01/04 0.1.16b
previously source tarball was corrupted
thank you Robert Scheck
05/01/04 0.1.16
added protection to memory allocation and freeing
in the file alloc.c
The new routines are called S_calloc and S_free and
display messages when in debug mode.
added file PLATFORMS, which describes platform tested
thanks nextime, Alt[O]s and Kaioh!
04/01/04 0.1.15b
fixed bug in ./configure script
04/01/04 0.1.15 (early morning)
"STATUS" string is now nicer :)
tcp.h header is now internal, to improve compatibility
with *BSD systems
added new header file "myheaders.h" that should keep track
of all headers used in the project
added definitively my public key in the package
03/01/04 0.1.14
reimplemented packet sniffer engine
(now it is managet by pcap_loop :)
added configure script, Makefile.in
config.h.in and other macro-automated files
fixed inet_ntoa bug (thank you kirash)
09/12/03 0.1.13
fixed name lookup: there will be only one dns query
for each host that doesn't have a name
removed source port in log filenames
added port into service translation
Makefile improved
now the tcpick manual page is in section 1!
07/12/03 0.1.12
improved and corrected name lookup feature
05/12/03 0.1.11-unstable
added host lookup cached feature (BUGGY!!)
04/12/03 0.1.10
added write status to file feature (-wS)
03/12/03 0.1.9
added lot of write to file features:
header writing, (-wH)
only printable charachters writing (-wP)
unprintable charachters transformed into hexadecimal code (-wU)
added other options (see manpage for details) -s -P -R -U
01/12/03 0.1.8
added write to file feature (-w[R])
added write to file in hexdump mode feature (-w[xX])
added new file write.c
30/11/03 0.1.7
fixed bad hex dump manamagment
some changes in the options (see OPTIONS file for details)
29/11/03 0.1.6
now you can display data in the packet in hexdump mode (-x)
and you can watch at the printable ascii charachters too, using -X option
28/11/03 0.1.5
better options managment, including long options
added data showing in hexadecimal
added –silent mode
done manpage prototype
27/11/03 0.1.4
fixed file writing: now files are opened in "w" mode
added fflush istruction when output files are updated
fixed bug: now all connection are tracked, not only the first
24/11/03 0.1.1
fixed bad managing of payload (now ack packets whith no data are dropped)
Tcpick is a sniffer able to understand wich status has the connection
(SYN-SENT, SYN-RECEIVED and so on). To see the connection tracker in
action on eth0 simply type:
# tcpick -i eth0 -C
`-C' means “enable colors”, and the output is very pretty.
`-yP' means “payload printable”, `-h' means
“header” and `-a' means names resolution.
Unprintable carachters are displayed as dots.
1.3 display client data only of the first smtp connection
# tcpick -i eth0 -C -bCU -T1 "port 25"
`-bCU' means: display the rebuilded stream (`-b') only the client side
(`C') and unprintable carachters will be displayed as hexcode (`U').
`T1' means: display only the first (1) connection.
“port 25” is the filter.
1.4 download a file passively
Yeah! It is very a simple job:
#tcpick -i eth0 -wR “port ftp-data”
When the file has been completely transmitted (connection displayed as
“CLOSED”) check in the working directory: you will find some files
named like this:
# ls *.tcpick
client_123.45.67.89_98.76.54.32_34567.tcpick
server_123.45.67.89_98.76.54.32_34567.tcpick
Bingo! If you do `$ file *.tcpick' you will find that one of the two is a
a gzip archive or whatever you sniffed.
1.5 redirect the first connection to a software
You must choose between client or server side, because you don't want
both stream mixed in the standard output. It is a really simple job,
just type:
Now, use your imagination and let me know what crazy experiments have
you done with tcpick ;^)
tcpick-0.2.1/doc/EXAMPLES.it.html 0000644 0001751 0001751 00000010644 10173301003 013167 0000000 0000000
ESEMPI
ESEMPI
Visualizzare lo stato delle connessioni tracciate
Tcpick e' uno sniffer in grado di tracciare le connessioni e
determinarne lo stato (SYN-SENT, SYN-RECEIVED e cosi' via).
Per vedere tcpick in azione si puo' eseguire questo comando da root:
# tcpick -i eth0 -C
L'opzione `-C' serve ad abilitare i colori per rendere la lettura
dell'output piu' gradevole, mentre l'opzione -i serve a specificare
l'interfaccia di rete.
Creando un po' di traffico (aprendo, ad esempio una pagina web)
dovreste vedere un output simile a questo:
Visualizzare il contenuto dei pacchetti e l'header
Se volete vedere i dati contenuti nei pacchetti, l'operazione
richiesta e' semplicissima:
# tcpick -i eth0 -C -yP -h -a
`-yP' significa “visualizza il contenuto del pacchetto”, `-h'
abilita la visualizzazione dell'header (semplificato) e `-a' abilita
la risoluzione dei nomi via dns.
I caratteri non stampabili vengono visualizzati come punti.
Visualizzare i dati del client in una connessione smtp
# tcpick -i eth0 -C -bCU -T1 "port 25"
`-bCU' significa: ricostruisci il flusso tcp (`-b') ma visualizza solo
la parte attinente al client (`C') e i caratteri non stampabili
vengono visualizzati tramite codice esadecimale (`U').
`-T1' significa: tracciare solo la prima connessione incontrata
“port 25” e' il filtro per catturare solo connessioni smtp.
scaricare un file in modo passivo
Qui' viene il bello!
#tcpick -i eth0 -wR ``port ftp-data''
Quando il file e' stato completamente trasmesso (CLOSED) controlla
nella directory corrente e troverai dei file simili a questi:
# ls *.tcpick
client_123.45.67.89_98.76.54.32_34567.tcpick
server_123.45.67.89_98.76.54.32_34567.tcpick
Ottimo! Se esegui il comando `$ file *.tcpick' vedrai che e' proprio
cio' che e' stato scaricato, e un md5sum garantira' e' stato sniffato
completamente e senza errori.
Redirigere la prima connessione incontrata ad un programma
Devi scegliere se sniffare la parte relativa al server o al client,
poiche' ovviamente non si vuole mischiare entrambi i flussi nello
standard output. E' estremamente semplice; ecco alcuni esempi:
Ora usa la tua immaginazione e se credi ne valga la pena, contattami
per farmi sapere che razza di alchimie hai inventato ;^)
(magari includero' degli script nel pacchetto sorgente).
The starting function main is in the file tcpick.c.
Command-line arguments are parsed by parse_args
(args.c).
The packet capture engine is powered by the pcap library, that
handles, with the function pcap_loop the callback loop function
got_packet (loop.c).
When a packet has been captured by pcap_loop it will be
calculated the offset of the ip header (ippacket), the offset
of the tcp header (tcppacket). Finally the function
verify (verify.c) will be called to analyze the packet.
Packet offset and size are declared globally (extern.h and
globals.h) not to allocate the stack every time a function that
works on the packet is called
The source code that contains the function verify begins with
several #define's used to verify if a sniffed packet match an
inizialized connection (or else if it creates a new one).
All connections tracked are stored in a linked list (i hope I will be
able to replace it with an efficient balanced tree).
The struct host_descriptor_t describes one side of the tcp
connection (the server or the client). The function verify
detects the changes of the status of the tracked connection and update
it with the function status_switch (tracker.c), that
calls the function display_status to notify the user of this
change and deletes the connection if it is CLOSED
When data are transmitted (IS_DATA_FLOW) the function
established_packet (verify.c) is called.
This function detects if the
packet is an acknowledgment one or a data one.
Unacknowledged data
packets are stored in a linked-list
by the function addfr (fragments.c).
When data are acknowledged by
a ack,
the function flush_ack (fragments.c) is called.
In flush_ack acknowledged data are flushed
to an output stream (display or file)
by the function wrebuild (write.c).
The function out_flavour (write.c)
is used to select the format of the
data wished by the user.
tcpick-0.2.1/doc/KNOWN-BUGS.html 0000644 0001751 0001751 00000006075 10173301003 012773 0000000 0000000
read() called by pcap_read() called by pcap_loop() blocks the program
until gets about 600.000 byte and then calls got_packet(). Then it
blocks until other 600.000 bytes aren't captured.
It may be a problem of setitimer. If setitimer is set to 2 seconds,
the program works fine, but this is only a workaround.
This seem to be a kernel bug:
Subject: kern/26470: all process stop for a long time by calling
settimeofday() and setitimer()
List: netbsd-bugs
Date: 07/29/2004 04:32:58
[cut]
Description:
All process stops for a long time by calling setitimer() with short
interval and then putting the system clock forward long.
This bug has been workarounded with a fork + sleep + kill trick.
Segmentation fault in status_switch(): prev->next is null.
I cannot understand this, because the malloc *didn't return NULL*, but a
valid address as gdb said me!. WTF!
NOTE: this is a very rare bug.
Marcos Costantini reported a segmentation fault bug in tcpick running on a
MacOSX system.
Penelope Fudd wrote:
Hi..
I've got a tcpdump program running that logs all email to & from the
mail server.
When I use 'tcpick -wR -r log-2004.xx.xx', and look at the resulting
client and server files, there are binary strings stuck in the middle
of
the conversation:
[cut]
Where are these 'A0 00 00 00 00 00' chunks coming from? I thought
that -wR was binary-safe. When I follow the stream using Ethereal, the
problem goes away.
maybe it doesn't go in promisc mode even without -p
Patches
We need somebody suggesting bugs and new features!
If you want to give some help, please subscribe to the mailing-list:
tcpick is a textmode sniffer libpcap-based that can track tcp streams
and saves the captured data in files or displays them in the terminal.
Useful for picking files in a passive way.
It can store all connections data in different files, or it can display all
the stream on the terminal, when the connection is closed.
There are useful display modes like hexdump, hexdump + ascii,
only printable charachters, raw mode and so on. Available a color mode too,
helpful to read better the output of the program.
Actually it can handle eth and ppp interfaces.
It is useful to keep track of what users of a network are doing, and is
usable with textmode tools like grep, sed, awk.
For example, this command displays all HTTP GET requests:
# tcpick -i ppp0 -yP | grep GET
Please read the manpage for further details.
home page
http://tcpick.sourceforge.net
other files to read:
AUTHORS
OPTIONS
KNOWN-BUGS
INSTALL
TODO
ChangeLog
COPYING
public_key.asc (key to check package signatures)
public_key_message.txt
contribute
tcpick project needs somebody suggesting me bugs and new features!
If you want to contribute sending patches, finding bugs, compilation errors,
platform-specific incompatibilies you are invited to the tcpick
mailing-list:
Francesco Stablum "duskdruid" <duskdruid @ despammed.com>
Little disclaimer and license:
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
For other details on GNU/GPL license read COPYING file
tcpick e' uno sniffer con interfaccia testuale basato sulle
celeberrime librerie libpcap.
Tra le sue funzioni quelle piu' importanti sono la capacita' di
tracciare flussi di dati trasferiti mediante il protocollo tcp e la
possibilita' di salvare i dati catturati all'interno di files, oppure
di visualizzarli direttamente nel terminale.
Puo' essere utilizzato per il download passivo di file trasferiti via
ftp (per l'http e' neccessaria una ulteriore decodifica a livello applicazione).
Tra le modalita' di visualizzazione dei dati ci sono: esadecimale,
esadecimale con ascii (ovvero il classico hexdump), visualizzazione
dei soli caratteri stampabili, modalita' “raw” ecc.
E' disponibile anche una modalita' a colori per rendere l'output piu'
leggibile.
Se viene posizionato su un gateway puo' essere utilizzato per
osservare le attivita' degli utenti di una rete interna.
Inoltre e' adatto ad essere utilizzato con strumenti testuali a riga
di comando come grep, sed e awk.
Un semplice esempio per visualizzare le richieste http:
# tcpick -i ppp0 -yP | grep GET
home page
http://tcpick.sourceforge.net
Altri file da leggere
AUTHORS
OPTIONS
KNOWN-BUGS
INSTALL
EXAMPLES.it
TODO
ChangeLog
COPYING
public_key.asc (key to check package signatures)
public_key_message.txt
contribuisci!
tcpick e' un progetto open-source, e, in quanto tale, sono graditi
qualsiasi tipo di richieste di funzionalita', report di bug, patch e
quanto altro.
Questa e' la mailing list,
che puoi utilizzare per segnalare qualsiasi problema:
Pagina di iscrizione
http://lists.sourceforge.net/lists/listinfo/tcpick-project
Note sulla licenza
Tcpick e' rilasciato con la licenza GNU GPL. Per ulteriori
informazioni leggere il file COPYING (in inglese)
tcpick-0.2.1/doc/TODO.html 0000644 0001751 0001751 00000006533 10173301003 012105 0000000 0000000
balanced/avl tree in the connection tracking engine
improve speed by using function pointers
(other?)
for 0.3.0 version (2005)
A more coherent EXPIRED status detection
XML output
managing DLT_LOOP, DLT_IEEE802_11 and DLT_NULL fully tested
complete INTERNALS file (there is lot to write)
http/yahoo decoder by Saumil Shah (separate package?)
increase tracking speed by adding a hash function or a `memcmp'
(thanks to mainman's experience)
increase speed by adding multithreading
add a “turbo” mode (with the ./configure remove features)
print only some status (i.e. only ESTABLISHED)
custom filenaming pattern
writing the offsets and seqs to file and terminal
colors
ability to enable/disable _detailed_ header printing
write name lookups to a file (useful?)
use the other nice libpcap functions (fully)
for the far future
autodetect and name ftp and http files (external program?)
autodect and decrypt ssh/ssl connections (external program?)
"spider" mode: make a path of all urls visited by some hosts
(external program?)
(that will be a nice mode to see what kind of sites are hosts visiting)
ncurses/gtk front-end
RFC1149 compatibility and RFC3514 support
tcpick-0.2.1/doc/AUTHORS.texinfo 0000644 0001751 0001751 00000010123 10165254735 013207 0000000 0000000 \input texinfo @c -*-texinfo-*-
@setfilename AUTHORS
@settitle AUTHORS
@c @setchapternewpage odd
@c @paragraphindent asis
@c 1st page:
@titlepage
@title AUTHORS
@subtitle credits
@author Francesco Stablum
@c copyright page
@end titlepage
@headings single
@c Contenuti
@contents
@c capitolo primo
@unnumbered Francesco Stablum @b{duskdruid:despammed.com}
Mantainer
@unnumbered Artyom Khafizov
Bugfixes and memory leak fixes, added RESET and EXPIRED
status detection, added a new way to write the stream to files, using
directories.
@unnumbered Federico Castaneda @b{F_CASTANEDA:crm.com.ar}
Added basic UDP support
@unnumbered Buck Huppmann @b{buckh:pobox.com}
wrote the RESET status detection
@unnumbered Saumil Shah
has helped me improving tcpick and making it useful to decode
application-level data (i.e. http).
@unnumbered Gianluigi Spagnuolo, kirash
has tested tcpick under many *BSD systems, helping me to make
tcpick more compatible on other systems.
He found also the pcap_next bug and a bug on the inet_ntoa return
ointer.
Kirash is currently helping me with several patches and increasing
the tcpick portability, which is really very important.
@unnumbered Penelope Fudd
Added a patch that allows to process with tcpick a tcpdump output
file instead of a live connection, in that way:
@example
% tcpdump -n -s 1600 -w /tmp/foo.tcpdump
% tcpick -r /tmp/foo.tcpdump
@end example
@unnumbered mainman
helped me to improve the performance of tcpick suggesting me a method
of session recognization with hash generated by addresses and ports
and a "chained" tracker of structures instead of a block of addresses
to structures (i.e. conn_ptr->next_conn).
@unnumbered Sebastian Prause
added support for DLT_PPP_ETHER datalink type
(including pppoe for NetBSD systems).
@unnumbered ShackaN
wrote a nice dprintf function for debugging purposes :)
@unnumbered Gimli
Spent a lot of time seeking for a bug I couldn't resolve on
a free().
@unnumbered kain
bug found at pcap_next, that returns NULL on some systems
suggested me to change pcap #include directive, because on
trustix (and perhaps other linux systems) libpcap are located in a
different place (pcap/pcap.h).
@unnumbered Ardoino Paolo
Suggested me to control memory allocated addresses
@unnumbered Robert Scheck
suggested me to improve the Makefile with variables.
@unnumbered Alberto 'JCN-9000' Varesio:
found that AIX doesn't have getopt_long and getopt.h
@unnumbered Davide Benini
corrected bug in calling S_calloc with only one argument
@unnumbered Packagers
@unnumbered Debian
Cédric Delfosse
@uref{http://packages.debian.org/unstable/net/tcpick/}
Maurizio Lemmo `Tannoiser'
@uref{http://erlug.linux.it/~tann/tcpick/}
@unnumbered Source RPM
Paul Drain mantains tcpick as a recompilable source RPM:
@uref{ftp://cipherfunk.org/pub/packages/redhat/tcpick/}
@unnumbered RPM:
Mantained by Dag Wieers, with a lot of platforms available:
@uref{http://dag.wieers.com/packages/tcpick/}
Lou Afonso has compiled version 0.1.20
@unnumbered Testers (read PLATFORMS.old file)
@b{nextime} has spent time compiling tcpick on an impressing number of
unix/gnu platforms helping me understanding tcpick
[in]compatibilities
AdHe5, Alt[O]s, hannibal, Kaioh, Alberto Panu, Maurizio Lemmo `Tannoiser',
Alberto 'JCN-9000' Varesio, gap, Kirillov
thanks to these people because they spent time testing tcpick
on their unix and linux distros sending me the report, that
I used to complete `PLATFORMS' file.
@unnumbered Thanks
Thanks to all people that are using tcpick and are sending me
description of problems encountered and to all people here not mentioned
that contributed to this software in many ways.
Thanks to sourceforge.net that hosts tcpick, available here:
@uref{http://sourceforge.net/projects/tcpick/}
Thanks to kuht.it, that is currently hosting tcpick packages at this url:
@uref{http://www.kuht.it/modules/xfmod/project/?tcpick}
Thanks to all the mantainers of libpcap (@uref{http://www.tcpdump.org}), that
indirectly contributed to the development of tcpick :)
Thanks to @uref{http://www.linuxlinks.com} webmasters, that have added tcpick in their directory.
tcpick-0.2.1/doc/ChangeLog.texinfo 0000644 0001751 0001751 00000034505 10173300667 013716 0000000 0000000 \input texinfo @c -*-texinfo-*-
@setfilename ChangeLog
@settitle ChangeLog
@c @setchapternewpage odd
@c @paragraphindent asis
@c 1st page:
@titlepage
@title ChangeLog
@subtitle subtitle
@author Francesco 'duskdruid' Stablum
@c copyright page
@end titlepage
@headings single
@c Contenuti
@contents
@c capitolo primo
@c chapter ChangeLog
@unnumbered 18 Jan 2005 0.2.1
unchanged from 0.2.1-rc1
@unnumbered 18 Jan 2005 0.2.1-rc1
@itemize
Michael Coulter (mjc:bitz.ca):
@item
Fixed headers include order for OpenBSD
Gianluigi Spagnuolo (kirash:phreaker.net):
@item
Added sigaction function to handle signals in a proper way.
Francesco Stablum (duskdruid:despammed.com):
@item
Fixed -lpcap -lpcap etc. arguments to cc
@item
Fixed SIGALRM freeze bug
@item
Added setitimer workaround for *BSD systems (fork + sleep + kill)
@item
Added -e option to exit when a certain number of packets is reached
@item
Added atexit function
@end itemize
@unnumbered 9 Jan 2005 0.2.0-final
@itemize
Francesco Stablum (duskdruid:despammed.com):
@item
Few bugfixes with -t and -td options
@end itemize
@unnumbered 30 Dec 2004 0.2.0-rc6
@itemize
Francesco Stablum (duskdruid:despammed.com):
@item
expired functions are now checked every second, not every packet.
(use setitimer and the SIGALRM signal).
@item
added DLT_PPP, DLT_SLIP, DLT_SLIP_BSDOS and DLT_PPP_BSDOS support.
credits: SNiFf v0.3 by uLiX
http://www.s0ftpj.org/bfi/online/bfi10/BFi10-05.html
@item
added italian documentation (README.it, EXAMPLES.it, INSTALL.it, tcpick_italian.8)
@end itemize
@unnumbered 25 Dec 2004 0.2.0-rc5
@itemize
Gianluigi Spagnuolo (kirash:phreaker.net):
@item
Added signal support + statistics (packets sniffed and
connection tracked) in a similar way to tcpdump.
@item
Reorganized tcpick.c
Francesco Stablum (duskdruid:despammed.com):
@item
Added autogen.sh script
@item
Fixed bug of `-D' option
@item
Updated to automake/aclocal 1.9.3
@end itemize
@unnumbered 14 Dec 2004 0.2.0-rc4
@itemize
Gianluigi Spagnuolo (kirash:phreaker.net):
@item
found bug in avail_filename (write.c): too few arguments
to printf: fixed.
Francesco Stablum (duskdruid:despammed.com):
@item
Now '\r' and '\t' charachters are printable in 'P' and 'U' modes.
@item
MacOSX ``BIOCSRTIMEOUT: Invalid argument'' bug should be fixed.
@item
port aligment in status displayer fixed (simplified)
@end itemize
@unnumbered 12 Dec 2004 0.2.0-rc3
@itemize
Francesco Stablum (duskdruid:despammed.com):
@item
added date-timestamp
@item
removed all typedefs. Now structures and unions should be better
recognizable (now names of types are UPPER-CASE)
@item
Added .EDITME files for those people that have troubles with
the ./configure script
@end itemize
@unnumbered 30 Nov 2004 0.2.0-rc2
@itemize
Francesco Stablum (duskdruid:despammed.com):
@item
Timeout value is now set by `-X' option, because `-t' will be used
for timestamps in the future.
@item
Filenaming system is now chosen with the `-F' option.
Artyom Khafizov:
@item
`-D num' option will cause tcpick to create subdirectories,
each for a desired number of sessions.
@end itemize
@unnumbered 22 Nov 2004 0.2.0-rc1
@itemize
Artyom Khafizov:
@item Added EXPIRED status for connection tracked with a -t option to choose
an appropriate timeout (default is 600)
@item Fixed many memory leaks
@item Added a new way to write the stream to files, using directories
@item Added an experimental file naming system
Buck Huppmann (buckh:pobox.com) and Artyom Khafizov
( both have had the same good idea :^D ):
@item Added RESET status for connections tracked. (RST-flagged packets will
delete the connection).
Federico Castaneda (F_CASTANEDA:crm.com.ar):
@item Added UDP support
Francesco Stablum (duskdruid:despammed.com):
@item Debug messages are now available only with the -DTCPICK_DEBUG argument
given to the compiler.
@item Changed signing key! Please read public_key_message.txt and check
the revocation certificate public_key_OLD.revoke
@end itemize
@unnumbered 08/09/04 0.2.0-devel2
@itemize
@item
Segmentation fault bug fixed (with `u' tcpick tried to free 2 times
the same heap address and closed 2 times the same file).
(Saumil Shah discovered it)
@item
Bugfix: `u' flag of `-w' worked as with `b' flag either if `b' wasn't choosen.
@end itemize
@unnumbered 07/09/04 0.2.0-devel1
@itemize
@item
Robert Scheck fixed tcpick manual section in a `printf'
@item
Saumil Shah feature request done:
the flag 'u' to the '-w' option enables tcpick to write sniffed data
in a unique file, with client and server data mixed together.
the flag 'b' to the '-w' option enables tcpick to write a banner to
the unique file that introduces server and client data.
@end itemize
@unnumbered 28/08/04 0.1.24
@itemize
@item
BSD support _should_ be completed
@item
added ``suicide'' and ``fault'' functions
@item
some code cleanup
@item
fixed netinet/ip.h check bug in the configure script for FreeBSD machines
@item
fixed hexdump bug
@item
fixed reset color. Background color is now not black, but the
terminal default
@item
added the balanced tree to the lookup engine
@item
applied patch by GLS to improve compatibility with openbsd 3.5 with
gcc 2.95.3
@item
Now closed connections are freed and delinked; files will be closed.
@item
Added the -E and -Ef arguments
@item
Added the -Tf option
@item
Fixed the segmentation bug of the `-y' option
@item
added INTERNALS file (should be completed)
@end itemize
@unnumbered 03/06/04 0.1.23
@itemize
@item
PFLOG support added by kirash aka GLS
@item
patch by Sebastian Prause:
``I've created a little patch to make tcpick work with pppoe interfaces
on NetBSD (which use DLT_PPP_ETHER) and wanted to share it, so here it
is...''
@item
now the options for displaying the payload should be prefixed by -y
I have added another set of displaying option, that are prefixed
with -b. The -b options are useful to view data only when acknowledged
(exactly like data written to files) and with this is particulary
useful the raw mode (-bR) that you can use if you want to redirect
data with a pipe to another software.
@item
The newline carachter is suppressed when displaying the payload of the
packet or an acknowledged stream in the case there are no banners
except the case of the hexdump's.
@item
Added the ``--pipe'' option, by a wish of loopback. See manpage for
details.
@item
Now you are able to choose to write to file only data of clients or
servers or both, with the additional flags `C' and `S' to the option
`-w' (omitted means ``both'').
@item
Many, many changes, code cleanups and improvement made by whyx in
fragments.c and lookup.c
@item
With the new option `-T', it is now possible to
track only the first connections, the following will be
discarded by the tracker engine. This is useful for the `-w' and `-b'
options; for `-y' and `-h' it has no effect, because they aren't part
of the tracker.
@item
In the hexdump+ascii red dots rapresents now the unprintable carachter.
@item
the lenght of the payload is now displayed in the packet banner
@item
rewritten the core of verify.c and fragments.c
@item
now connections with equal ip addresses and ports are stored in
different files
@item
files dumped with tcpick -w* options are now saved vith ``.tcpick''
extension
@item
bugfix on datalink.c by kirash aka GLS
@item
deleted alloc.c and match.c
@item
used the ``linux'' 8-spaces indentation
@item
added packet separator (by a Simone Gianni's wish)
@item
added the `-p' flag to avoid to put the network interface in
promiscuous mode (I'm not sure it works) (by a Simone Gianni's wish)
@item
Rewritten manpage. Read it! There are lots of changes in the options!
@item
I have tested tcpick to sniff a file via ftp, and the md5sums were
equal. The tar.gz archive I have downloaded was more than 2MB
long. Other tests are confirming me that the newly-written code works
in the right way.
@end itemize
@unnumbered 07/03/04 0.1.22-test2
@itemize
@item
now output files are opened in ``a'' (only append) mode
@item
now data are written with ``fwrite()'' + ferror (thanks ^^Gimli^^)
@end itemize
@unnumbered 06/02/04 0.1.22-test1
@itemize
@item
corrected bug in datalinktoa() by sbi!
@item
Davide Benini: corrected bug in calling S_calloc with only one argument
@item
added S_malloc function
@item
now data are written with the write() function
@end itemize
@unnumbered 28/02/04 0.1.21
@itemize
@item
Added src/ directory for the sources
@item
Added a `flags` struct
@item
Patch by Penelope Fudd: added `-r' option to read tcpdump filedumps: this is a very nice feature :)
@item
Improved debugging system with dprintf (thank you ShackaN!)
@item
Changed name of the `stack' memory block into `tracker'
@item
Increased speed of the connection tracking system by adding many
return's instruction (instead of using some damned variables
like `loop_finished' and `result_bool') in verify() and match().
@item
Added a "chained" tracker: now it is possible to track an
infinite number of connections (thank you mainman!)
@item
Fixed bug that server file and client file were switched
@end itemize
@unnumbered 30/01/04 0.1.20
@itemize
@item
added displaying of unprintable carachters (that are also dots in -P option)
with red color.
@item
added hexdump mode colorizer
@item
with option -C2 it is now possible see different colors depending on
the connection tracked (only status banners) (file colortrack.c)
@item
added connection numbering (second field in status banner)
@item
added time writing on banners and packet headers(time.c)
@end itemize
@unnumbered 15/01/04 0.1.19
@itemize
@item added header support (i.e. trustix)
@item added DLT_PFLOG/DLT_NULL/DLT_RAW/DLT_IEEE802_11 header support (not tested!!!)
@item added datalinktooffset function (datalink.c)
@item added Push/Fin/Ack packet support
@item added support for those systems that don't have getopt_long and getopt.h
header (was a problem in AIX systems, thank you Alberto
'JCN-9000' Varesio)
@item added experimental color option (-C): it is very nice!
It should be helpful to read the output of tcpick.
@item added new file colors.c (read code comments to know about the
original author)
@end itemize
@unnumbered 11/01/04 0.1.18
@itemize
@item fixed ridicolous bug of "resulting_bool==" in match.c
@item fixed FIN-WAIT-2 bad detection
@item added TIME-WAIT status detection
@item added CLOSED status detection
@end itemize
@unnumbered 11/01/04 0.1.18-test3 (UNSTABLE - BUGGY - ONLY FOR DEVELOPERS)
@itemize
@item Precedent tarball -test2 was damaged (thank you kirash (aka GLS) to said it to me)
@end itemize
@unnumbered 08/01/04 0.1.18-test2 (UNSTABLE - BUGGY - ONLY FOR
DEVELOPERS)
@itemize
@item added DLT_NULL support by kirash (aka GLS)
@item fixed the ridicolous bug in -test1 (a if statement without braces)
@item rewritten functions verify() and match() are now fully working
@end itemize
@unnumbered 08/01/04 0.1.18-test1 (UNSTABLE - BUGGY - ONLY FOR
DEVELOPERS)
@itemize
@item completely rewritten match() and verify() functions
@item added new files datalink.c and match.c
@item datalink managing modified to be compatible on systems that
don't #define all datalinks
@end itemize
@unnumbered 05/01/04 0.1.17
@itemize
@item ip.h header ported internally to the package for compatibility with
BSD systems
@item patch by kirash: changes to myheader.h, lookup.c and stack.c in order to
improve compatibility on BSD systems
@item added FIN-WAIT-1 status tracking
@end itemize
@unnumbered 05/01/04 0.1.16b
@itemize
@item previously source tarball was corrupted
thank you Robert Scheck
@end itemize
@unnumbered 05/01/04 0.1.16
@itemize
@item added protection to memory allocation and freeing
in the file alloc.c
The new routines are called S_calloc and S_free and
display messages when in debug mode.
@item added file PLATFORMS, which describes platform tested
thanks nextime, Alt[O]s and Kaioh!
@end itemize
@unnumbered 04/01/04 0.1.15b
@itemize
@item fixed bug in ./configure script
@end itemize
@unnumbered 04/01/04 0.1.15 (early morning)
@itemize
@item "STATUS" string is now nicer :)
@item tcp.h header is now internal, to improve compatibility
with *BSD systems
@item added new header file "myheaders.h" that should keep track
of all headers used in the project
@item added definitively my public key in the package
@end itemize
@unnumbered 03/01/04 0.1.14
@itemize
@item reimplemented packet sniffer engine
(now it is managet by pcap_loop :)
@item added configure script, Makefile.in
config.h.in and other macro-automated files
@item fixed inet_ntoa bug (thank you kirash)
@end itemize
@unnumbered 09/12/03 0.1.13
@itemize
@item fixed name lookup: there will be only one dns query
for each host that doesn't have a name
@item removed source port in log filenames
@item added port into service translation
@item Makefile improved
@item now the tcpick manual page is in section 1!
@end itemize
@unnumbered 07/12/03 0.1.12
@itemize
@item improved and corrected name lookup feature
@end itemize
@unnumbered 05/12/03 0.1.11-unstable
@itemize
@item added host lookup cached feature (BUGGY!!)
@end itemize
@unnumbered 04/12/03 0.1.10
@itemize
@item added write status to file feature (-wS)
@end itemize
@unnumbered 03/12/03 0.1.9
added lot of write to file features:
@itemize
@item header writing, (-wH)
@item only printable charachters writing (-wP)
@item unprintable charachters transformed into hexadecimal code (-wU)
@item added other options (see manpage for details) -s -P -R -U
@end itemize
@unnumbered 01/12/03 0.1.8
@itemize
@item added write to file feature (-w[R])
@item added write to file in hexdump mode feature (-w[xX])
@item added new file write.c
@end itemize
@unnumbered 30/11/03 0.1.7
@itemize
@item fixed bad hex dump manamagment
@item some changes in the options (see OPTIONS file for details)
@end itemize
@unnumbered 29/11/03 0.1.6
@itemize
@item now you can display data in the packet in hexdump mode (-x)
and you can watch at the printable ascii charachters too, using -X option
@end itemize
@unnumbered 28/11/03 0.1.5
@itemize
@item better options managment, including long options
@item added data showing in hexadecimal
@item added --silent mode
@item done manpage prototype
@end itemize
@unnumbered 27/11/03 0.1.4
@itemize
@item fixed file writing: now files are opened in "w" mode
@item added fflush istruction when output files are updated
@item fixed bug: now all connection are tracked, not only the first
@end itemize
@unnumbered 24/11/03 0.1.1
@itemize
@item fixed bad managing of payload (now ack packets whith no data are dropped)
@end itemize
tcpick-0.2.1/doc/EXAMPLES.it.texinfo 0000644 0001751 0001751 00000006722 10165254735 013725 0000000 0000000 \input texinfo @c -*-texinfo-*-
@setfilename EXAMPLES.it
@settitle ESEMPI
@c @setchapternewpage odd
@c @paragraphindent asis
@c 1st page:
@titlepage
@title Esempi d'uso di tcpick
@c @subtitle subtitle
@author Francesco 'duskdruid' Stablum
@c copyright page
@end titlepage
@headings single
@c capitolo primo
@unnumbered Visualizzare lo stato delle connessioni tracciate
Tcpick e' uno sniffer in grado di tracciare le connessioni e
determinarne lo stato (SYN-SENT, SYN-RECEIVED e cosi' via).
Per vedere tcpick in azione si puo' eseguire questo comando da root:
@example
# tcpick -i eth0 -C
@end example
L'opzione `-C' serve ad abilitare i colori per rendere la lettura
dell'output piu' gradevole, mentre l'opzione -i serve a specificare
l'interfaccia di rete.
Creando un po' di traffico (aprendo, ad esempio una pagina web)
dovreste vedere un output simile a questo:
@example
23:07:42.672171 1 SYN-SENT 12.34.56.78:41599 > 123.123.123.123:http
23:07:42.822239 2 SYN-SENT 12.34.56.78:41600 > 32.13.21.32:5973
23:07:42.826634 3 SYN-SENT 12.34.56.78:41601 > 123.45.67.89:5555
23:07:42.854681 4 SYN-SENT 12.34.56.78:41602 > 1.2.3.4:56789
23:07:43.084242 1 SYN-RECEIVED 12.34.56.78:41599 > 123.123.123.123:http
23:07:43.087045 1 ESTABLISHED 12.34.56.78:41599 > 123.123.123.123:http
23:07:44.061311 5 SYN-SENT 12.34.56.78:41603 > 10.20.30.40:8888
@end example
@unnumbered Visualizzare il contenuto dei pacchetti e l'header
Se volete vedere i dati contenuti nei pacchetti, l'operazione
richiesta e' semplicissima:
@example
# tcpick -i eth0 -C -yP -h -a
@end example
`-yP' significa ``visualizza il contenuto del pacchetto'', `-h'
abilita la visualizzazione dell'header (semplificato) e `-a' abilita
la risoluzione dei nomi via dns.
I caratteri non stampabili vengono visualizzati come punti.
@unnumbered Visualizzare i dati del client in una connessione smtp
@example
# tcpick -i eth0 -C -bCU -T1 "port 25"
@end example
`-bCU' significa: ricostruisci il flusso tcp (`-b') ma visualizza solo
la parte attinente al client (`C') e i caratteri non stampabili
vengono visualizzati tramite codice esadecimale (`U').
`-T1' significa: tracciare solo la prima connessione incontrata
``port 25'' e' il filtro per catturare solo connessioni smtp.
@unnumbered scaricare un file in modo passivo
Qui' viene il bello!
@example
#tcpick -i eth0 -wR ``port ftp-data''
@end example
Quando il file e' stato completamente trasmesso (CLOSED) controlla
nella directory corrente e troverai dei file simili a questi:
@example
# ls *.tcpick
client_123.45.67.89_98.76.54.32_34567.tcpick
server_123.45.67.89_98.76.54.32_34567.tcpick
@end example
Ottimo! Se esegui il comando `$ file *.tcpick' vedrai che e' proprio
cio' che e' stato scaricato, e un md5sum garantira' e' stato sniffato
completamente e senza errori.
@unnumbered Redirigere la prima connessione incontrata ad un programma
Devi scegliere se sniffare la parte relativa al server o al client,
poiche' ovviamente non si vuole mischiare entrambi i flussi nello
standard output. E' estremamente semplice; ecco alcuni esempi:
@example
# tcpick -i eth0 --pipe client "port 80" | gzip > risposta_http.gz
@end example
oppure
@example
# tcpick -i eth0 --pipe server "port 25" | nc foobar.net 25
@end example
Ora usa la tua immaginazione e se credi ne valga la pena, contattami
per farmi sapere che razza di alchimie hai inventato ;^)
(magari includero' degli script nel pacchetto sorgente).
Buon divertimento!
tcpick-0.2.1/doc/EXAMPLES.texinfo 0000644 0001751 0001751 00000005406 10165254735 013310 0000000 0000000 \input texinfo @c -*-texinfo-*-
@setfilename EXAMPLES
@settitle EXAMPLES
@c @setchapternewpage odd
@c @paragraphindent asis
@c 1st page:
@titlepage
@title EXAMPLES
@c @subtitle subtitle
@author Francesco 'duskdruid' Stablum
@c copyright page
@end titlepage
@headings single
@c capitolo primo
@chapter Examples of tcpick usage
@section connection status
Tcpick is a sniffer able to understand wich status has the connection
(SYN-SENT, SYN-RECEIVED and so on). To see the connection tracker in
action on eth0 simply type:
@example
# tcpick -i eth0 -C
@end example
`-C' means ``enable colors'', and the output is very pretty.
You will see something like this:
@example
23:07:42.672171 1 SYN-SENT 12.34.56.78:41599 > 123.123.123.123:http
23:07:42.822239 2 SYN-SENT 12.34.56.78:41600 > 32.13.21.32:5973
23:07:42.826634 3 SYN-SENT 12.34.56.78:41601 > 123.45.67.89:5555
23:07:42.854681 4 SYN-SENT 12.34.56.78:41602 > 1.2.3.4:56789
23:07:43.084242 1 SYN-RECEIVED 12.34.56.78:41599 > 123.123.123.123:http
23:07:43.087045 1 ESTABLISHED 12.34.56.78:41599 > 123.123.123.123:http
23:07:44.061311 5 SYN-SENT 12.34.56.78:41603 > 10.20.30.40:8888
@end example
@section display the payload and packet headers
It is very easy:
@example
# tcpick -i eth0 -C -yP -h -a
@end example
`-yP' means ``payload printable'', `-h' means
``header'' and `-a' means names resolution.
Unprintable carachters are displayed as dots.
@section display client data only of the first smtp connection
@example
# tcpick -i eth0 -C -bCU -T1 "port 25"
@end example
`-bCU' means: display the rebuilded stream (`-b') only the client side
(`C') and unprintable carachters will be displayed as hexcode (`U').
`T1' means: display only the first (1) connection.
``port 25'' is the filter.
@section download a file passively
Yeah! It is very a simple job:
#tcpick -i eth0 -wR ``port ftp-data''
When the file has been completely transmitted (connection displayed as
``CLOSED'') check in the working directory: you will find some files
named like this:
@example
# ls *.tcpick
client_123.45.67.89_98.76.54.32_34567.tcpick
server_123.45.67.89_98.76.54.32_34567.tcpick
@end example
Bingo! If you do `$ file *.tcpick' you will find that one of the two is a
a gzip archive or whatever you sniffed.
@section redirect the first connection to a software
You must choose between client or server side, because you don't want
both stream mixed in the standard output. It is a really simple job,
just type:
@example
# tcpick -i eth0 --pipe client "port 80" | gzip > http_response.gz
@end example
or
@example
# tcpick -i eth0 --pipe server "port 25" | nc foobar.net 25
@end example
Now, use your imagination and let me know what crazy experiments have
you done with tcpick ;^)
tcpick-0.2.1/doc/INTERNALS.texinfo 0000644 0001751 0001751 00000004643 10165254735 013433 0000000 0000000 \input texinfo @c -*-texinfo-*-
@setfilename INTERNALS
@settitle tcpick looked from the inside
@c @setchapternewpage odd
@c @paragraphindent asis
@c 1st page:
@titlepage
@title INTERNALS
@subtitle tcpick looked from the inside
@author Francesco 'DuskDruid' Stablum
@c copyright page
@end titlepage
@headings single
@c Contenuti
@contents
The starting function @code{main} is in the file @code{tcpick.c}.
Command-line arguments are parsed by @code{parse_args}
(@code{args.c}).
The packet capture engine is powered by the pcap library, that
handles, with the function @code{pcap_loop} the callback loop function
@code{got_packet} (@code{loop.c}).
When a packet has been captured by @code{pcap_loop} it will be
calculated the offset of the ip header (@code{ippacket}), the offset
of the tcp header (@code{tcppacket}). Finally the function
@code{verify} (@code{verify.c}) will be called to analyze the packet.
Packet offset and size are declared globally (@code{extern.h} and
@code{globals.h}) not to allocate the stack every time a function that
works on the packet is called
The source code that contains the function @code{verify} begins with
several @code{#define}'s used to verify if a sniffed packet match an
inizialized connection (or else if it creates a new one).
All connections tracked are stored in a linked list (i hope I will be
able to replace it with an efficient balanced tree).
The @code{struct host_descriptor_t} describes one side of the tcp
connection (the server or the client). The function @code{verify}
detects the changes of the status of the tracked connection and update
it with the function @code{status_switch} (@code{tracker.c}), that
calls the function @code{display_status} to notify the user of this
change and deletes the connection if it is @code{CLOSED}
When data are transmitted (@code{IS_DATA_FLOW}) the function
@code{established_packet} (@code{verify.c}) is called.
This function detects if the
packet is an acknowledgment one or a data one.
Unacknowledged data
packets are stored in a linked-list
by the function @code{addfr} (@code{fragments.c}).
When data are acknowledged by
a @code{ack},
the function @code{flush_ack} (@code{fragments.c}) is called.
In @code{flush_ack} acknowledged data are flushed
to an output stream (display or file)
by the function @code{wrebuild} (@code{write.c}).
The function @code{out_flavour} (@code{write.c})
is used to select the format of the
data wished by the user.
tcpick-0.2.1/doc/KNOWN-BUGS.texinfo 0000644 0001751 0001751 00000004320 10173200234 013476 0000000 0000000 \input texinfo @c -*-texinfo-*-
@setfilename KNOWN-BUGS
@settitle KNOWN-BUGS
@c @setchapternewpage odd
@c @paragraphindent asis
@c 1st page:
@titlepage
@title KNOWN-BUGS
@subtitle Known Bugs of the Tcpick sniffer
@author Francesco 'duskdruid' Stablum
@c copyright page
@end titlepage
@headings single
@c Contenuti
@contents
@c capitolo primo
@itemize
@item
Kirash reported under BSD:
read() called by pcap_read() called by pcap_loop() blocks the program
until gets about 600.000 byte and then calls got_packet(). Then it
blocks until other 600.000 bytes aren't captured.
It may be a problem of setitimer. If setitimer is set to 2 seconds,
the program works fine, but this is only a workaround.
This seem to be a kernel bug:
Subject: kern/26470: all process stop for a long time by calling
settimeofday() and setitimer()
List: netbsd-bugs
Date: 07/29/2004 04:32:58
[cut]
Description:
All process stops for a long time by calling setitimer() with short
interval and then putting the system clock forward long.
This bug has been workarounded with a fork + sleep + kill trick.
@item
Segmentation fault in status_switch(): prev->next is null.
I cannot understand this, because the malloc *didn't return NULL*, but a
valid address as gdb said me!. WTF!
NOTE: this is a very rare bug.
@item
Marcos Costantini reported a segmentation fault bug in tcpick running on a
MacOSX system.
@item
Penelope Fudd wrote:
Hi..
I've got a tcpdump program running that logs all email to & from the
mail server.
When I use 'tcpick -wR -r log-2004.xx.xx', and look at the resulting
client and server files, there are binary strings stuck in the middle
of
the conversation:
[cut]
Where are these 'A0 00 00 00 00 00' chunks coming from? I thought
that -wR was binary-safe. When I follow the stream using Ethereal, the
problem goes away.
@item
maybe it doesn't go in promisc mode even without -p
@end itemize
@unnumbered Patches
We need somebody suggesting bugs and new features!
If you want to give some help, please subscribe to the mailing-list:
Archive: http://sourceforge.net/mailarchive/forum.php?forum=tcpick-project
Subscribe: http://lists.sourceforge.net/lists/listinfo/tcpick-project
thanks
tcpick-0.2.1/doc/README.it.texinfo 0000644 0001751 0001751 00000004530 10165254735 013437 0000000 0000000 \input texinfo @c -*-texinfo-*-
@setfilename README.it
@settitle LEGGIMI
@c @setchapternewpage odd
@c @paragraphindent asis
@c 1st page:
@titlepage
@title LEGGIMI
@subtitle subtitle
@author Francesco 'duskdruid' Stablum
@c copyright page
@end titlepage
@headings single
@c Contenuti
@contents
@c capitolo primo
tcpick e' uno sniffer con interfaccia testuale basato sulle
celeberrime librerie libpcap.
Tra le sue funzioni quelle piu' importanti sono la capacita' di
tracciare flussi di dati trasferiti mediante il protocollo tcp e la
possibilita' di salvare i dati catturati all'interno di files, oppure
di visualizzarli direttamente nel terminale.
Puo' essere utilizzato per il download passivo di file trasferiti via
ftp (per l'http e' neccessaria una ulteriore decodifica a livello applicazione).
Tra le modalita' di visualizzazione dei dati ci sono: esadecimale,
esadecimale con ascii (ovvero il classico hexdump), visualizzazione
dei soli caratteri stampabili, modalita' ``raw'' ecc.
E' disponibile anche una modalita' a colori per rendere l'output piu'
leggibile.
Se viene posizionato su un gateway puo' essere utilizzato per
osservare le attivita' degli utenti di una rete interna.
Inoltre e' adatto ad essere utilizzato con strumenti testuali a riga
di comando come grep, sed e awk.
Un semplice esempio per visualizzare le richieste http:
@example
# tcpick -i ppp0 -yP | grep GET
@end example
@unnumbered home page
http://tcpick.sourceforge.net
@unnumbered Altri file da leggere
@itemize @bullet
@item AUTHORS
@item OPTIONS
@item KNOWN-BUGS
@item INSTALL
@item EXAMPLES.it
@item TODO
@item ChangeLog
@item COPYING
@item public_key.asc (key to check package signatures)
@item public_key_message.txt
@end itemize
@unnumbered contribuisci!
tcpick e' un progetto open-source, e, in quanto tale, sono graditi
qualsiasi tipo di richieste di funzionalita', report di bug, patch e
quanto altro.
Questa e' la mailing list,
che puoi utilizzare per segnalare qualsiasi problema:
@itemize
@item indirizzo
@b{tcpick-project@@lists.sourceforge.net}
@item Archivio
http://sourceforge.net/mailarchive/forum.php?forum=tcpick-project
@item Pagina di iscrizione
http://lists.sourceforge.net/lists/listinfo/tcpick-project
@end itemize
@unnumbered Note sulla licenza
Tcpick e' rilasciato con la licenza GNU GPL. Per ulteriori
informazioni leggere il file COPYING (in inglese)
@bye
tcpick-0.2.1/doc/README.texinfo 0000644 0001751 0001751 00000005514 10173300624 013013 0000000 0000000 \input texinfo @c -*-texinfo-*-
@setfilename README
@settitle README
@c @setchapternewpage odd
@c @paragraphindent asis
@c 1st page:
@titlepage
@title README
@subtitle subtitle
@author Francesco 'duskdruid' Stablum
@c copyright page
@end titlepage
@headings single
@c Contenuti
@contents
@c capitolo primo
tcpick is a textmode sniffer libpcap-based that can track tcp streams
and saves the captured data in files or displays them in the terminal.
Useful for picking files in a passive way.
It can store all connections data in different files, or it can display all
the stream on the terminal, when the connection is closed.
There are useful display modes like hexdump, hexdump + ascii,
only printable charachters, raw mode and so on. Available a color mode too,
helpful to read better the output of the program.
Actually it can handle eth and ppp interfaces.
It is useful to keep track of what users of a network are doing, and is
usable with textmode tools like grep, sed, awk.
For example, this command displays all HTTP GET requests:
@example
# tcpick -i ppp0 -yP | grep GET
@end example
Please read the manpage for further details.
@unnumbered home page
http://tcpick.sourceforge.net
@unnumbered other files to read:
@itemize @bullet
@item AUTHORS
@item OPTIONS
@item KNOWN-BUGS
@item INSTALL
@item TODO
@item ChangeLog
@item COPYING
@item public_key.asc (key to check package signatures)
@item public_key_message.txt
@end itemize
@unnumbered contribute
tcpick project needs somebody suggesting me bugs and new features!
If you want to contribute sending patches, finding bugs, compilation errors,
platform-specific incompatibilies you are invited to the tcpick
mailing-list:
@itemize
@item email address
@b{tcpick-project@@lists.sourceforge.net}
@item Archive
http://sourceforge.net/mailarchive/forum.php?forum=tcpick-project
@item Subscribe
http://lists.sourceforge.net/lists/listinfo/tcpick-project
@end itemize
I'm sorry for my bad english
thanks
Francesco Stablum "duskdruid" @b{}
@unnumbered Little disclaimer and license:
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
For other details on GNU/GPL license read COPYING file
Copyright (C) 2003, 2004 Francesco Stablum "duskdruid"
@bye
tcpick-0.2.1/doc/template.texinfo 0000644 0001751 0001751 00000000517 10165254735 013703 0000000 0000000 \input texinfo @c -*-texinfo-*-
@setfilename FILENAME
@settitle TITLE
@c @setchapternewpage odd
@c @paragraphindent asis
@c 1st page:
@titlepage
@title TITLE
@subtitle subtitle
@author Francesco 'DuskDruid' Stablum
@c copyright page
@end titlepage
@headings single
@c Contenuti
@contents
@c capitolo primo
@chapter CHAPTER
tcpick-0.2.1/doc/TODO.texinfo 0000644 0001751 0001751 00000004577 10173300777 012644 0000000 0000000 \input texinfo @c -*-texinfo-*-
@setfilename TODO
@settitle TODO
@c @setchapternewpage odd
@c @paragraphindent asis
@c 1st page:
@titlepage
@title TODO
@subtitle subtitle
@author Francesco 'duskdruid' Stablum
@c copyright page
@end titlepage
@headings single
@c Contenuti
@contents
@c capitolo primo
@itemize
@item
good homepage for tcpick (italian too)
@item
fix bugs in KNOWN-BUGS and FIXMEs
@end itemize
@unnumbered for 0.2.2 version (Feb 2005)
@itemize
@item
more speed for port->service resolution method.
@item
flag to distinguish between client and server data in a
tcp-bidirectional output file with an introductive banner.
@item
add acknowledged stream banner (i.e. ``data (offset:1234) sent from
client: foobar'')
@item
statistics:
@itemize
@item
bytes/second, connections resetted, connections/hour
@item
total connections
@item
total bytes transferred by @{clients|servers@}
@item
total packets received / lost
@end itemize
@item
(other?)
@end itemize
@unnumbered for 0.2.3 version (Mar 2005)
@itemize
@item
balanced/avl tree in the connection tracking engine
@item
improve speed by using function pointers
@item
(other?)
@end itemize
@unnumbered for 0.3.0 version (2005)
@itemize
@item
A more coherent EXPIRED status detection
@item
XML output
@item
managing DLT_LOOP, DLT_IEEE802_11 and DLT_NULL fully tested
@item
complete INTERNALS file (there is lot to write)
@item
http/yahoo decoder by Saumil Shah (separate package?)
@item
increase tracking speed by adding a hash function or a `memcmp'
(thanks to mainman's experience)
@item
increase speed by adding multithreading
@item
add a ``turbo'' mode (with the ./configure remove features)
@item
print only some status (i.e. only ESTABLISHED)
@item
custom filenaming pattern
@item
writing the offsets and seqs to file and terminal
colors
@item
ability to enable/disable _detailed_ header printing
@item
write name lookups to a file (useful?)
@item use the other nice libpcap functions (fully)
@end itemize
@unnumbered for the far future
@itemize
@item autodetect and name ftp and http files (external program?)
@item autodect and decrypt ssh/ssl connections (external program?)
@item "spider" mode: make a path of all urls visited by some hosts
(external program?)
(that will be a nice mode to see what kind of sites are hosts visiting)
@item ncurses/gtk front-end
@item RFC1149 compatibility and RFC3514 support
@end itemize
@bye
tcpick-0.2.1/src/ 0000777 0001751 0001751 00000000000 10173301174 010562 5 0000000 0000000 tcpick-0.2.1/src/Makefile.EDITME 0000644 0001751 0001751 00000033475 10165254732 013130 0000000 0000000 # *** WARNING ***
# USE .EDITME FILES ONLY IF ./configure DOESN'T WORK PROPERLY!
# If you have had troubles with ./configure, please tell me about
# the problem and your Operating System.
# Makefile.in generated by automake 1.8.5 from Makefile.am.
# src/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SOURCES = $(tcpick_SOURCES)
srcdir = .
top_srcdir = ..
pkgdatadir = $(datadir)/tcpick
pkglibdir = $(libdir)/tcpick
pkgincludedir = $(includedir)/tcpick
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/ginstall -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = tcpick$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_tcpick_OBJECTS = args.$(OBJEXT) display.$(OBJEXT) \
lookup_tree.$(OBJEXT) lookup_query.$(OBJEXT) loop.$(OBJEXT) \
tracker.$(OBJEXT) tcpick.$(OBJEXT) write.$(OBJEXT) \
datalink.$(OBJEXT) verify.$(OBJEXT) colors.$(OBJEXT) \
time.$(OBJEXT) debug.$(OBJEXT) fragments.$(OBJEXT) \
quit.$(OBJEXT) msg.$(OBJEXT)
tcpick_OBJECTS = $(am_tcpick_OBJECTS)
tcpick_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
DEP_FILES = ./$(DEPDIR)/args.Po ./$(DEPDIR)/colors.Po \
./$(DEPDIR)/datalink.Po ./$(DEPDIR)/debug.Po \
./$(DEPDIR)/display.Po ./$(DEPDIR)/fragments.Po \
./$(DEPDIR)/lookup_query.Po \
./$(DEPDIR)/lookup_tree.Po ./$(DEPDIR)/loop.Po \
./$(DEPDIR)/msg.Po ./$(DEPDIR)/quit.Po \
./$(DEPDIR)/tcpick.Po ./$(DEPDIR)/time.Po \
./$(DEPDIR)/tracker.Po ./$(DEPDIR)/verify.Po \
./$(DEPDIR)/write.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(tcpick_SOURCES)
DIST_SOURCES = $(tcpick_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run aclocal-1.8
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run tar
AUTOCONF = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run autoconf
AUTOHEADER = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run autoheader
AUTOMAKE = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run automake-1.8
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
LIBS = -lpcap -lpcap -lpcap -lpcap -lpcap -lpcap -lpcap -lpcap
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run makeinfo
OBJEXT = o
PACKAGE = tcpick
PACKAGE_BUGREPORT = duskdruid@despammed.com
PACKAGE_NAME = tcpick
PACKAGE_STRING = tcpick 0.2.0-rc2
PACKAGE_TARNAME = tcpick
PACKAGE_VERSION = 0.2.0-rc2
PATH_SEPARATOR = :
SET_MAKE =
SHELL = /bin/sh
STRIP =
VERSION = 0.2.0-rc2
ac_ct_CC = gcc
ac_ct_STRIP =
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__include = include
am__leading_dot = .
am__quote =
bindir = ${exec_prefix}/bin
build_alias =
datadir = ${prefix}/share
exec_prefix = ${prefix}
host_alias =
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /home/duskdruid/devel/tcpick/dist/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p -- .
oldincludedir = /usr/include
prefix = /usr
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target_alias =
tcpick_SOURCES = args.c display.c lookup_tree.c lookup_query.c loop.c tracker.c tcpick.c write.c datalink.c verify.c colors.c time.c debug.c fragments.c conn_t.h ip.h tcp.h udp.h tcpick.h flags_t.h fragment_t.h host_descriptor_t.h globals.h extern.h text.h colors.h def.h lookup.h quit.c msg.c
PACKS_AM_CFLAGS = -static -mcpu=i486
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status src/config.h
$(srcdir)/config.h.in: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
tcpick$(EXEEXT): $(tcpick_OBJECTS) $(tcpick_DEPENDENCIES)
@rm -f tcpick$(EXEEXT)
$(LINK) $(tcpick_LDFLAGS) $(tcpick_OBJECTS) $(tcpick_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
include ./$(DEPDIR)/args.Po
include ./$(DEPDIR)/colors.Po
include ./$(DEPDIR)/datalink.Po
include ./$(DEPDIR)/debug.Po
include ./$(DEPDIR)/display.Po
include ./$(DEPDIR)/fragments.Po
include ./$(DEPDIR)/lookup_query.Po
include ./$(DEPDIR)/lookup_tree.Po
include ./$(DEPDIR)/loop.Po
include ./$(DEPDIR)/msg.Po
include ./$(DEPDIR)/quit.Po
include ./$(DEPDIR)/tcpick.Po
include ./$(DEPDIR)/time.Po
include ./$(DEPDIR)/tracker.Po
include ./$(DEPDIR)/verify.Po
include ./$(DEPDIR)/write.Po
.c.o:
if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
# source='$<' object='$@' libtool=no \
# depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
# $(CCDEPMODE) $(depcomp) \
# $(COMPILE) -c $<
.c.obj:
if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
# source='$<' object='$@' libtool=no \
# depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
# $(CCDEPMODE) $(depcomp) \
# $(COMPILE) -c `$(CYGPATH_W) '$<'`
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) config.h
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic ctags distclean distclean-compile \
distclean-generic distclean-hdr distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
tcpick-0.2.1/src/config.h.EDITME 0000644 0001751 0001751 00000011276 10165254732 013101 0000000 0000000 /*
* *** WARNING ***
* USE .EDITME FILES ONLY IF ./configure DOESN'T WORK PROPERLY!
* If you have had troubles with ./configure, please tell me about
* the problem and your Operating System.
*/
/* src/config.h. Generated by configure. */
/* src/config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the `asctime' function. */
#define HAVE_ASCTIME 1
/* Define to 1 if you have the `atoi' function. */
#define HAVE_ATOI 1
/* Define to 1 if you have the header file. */
#define HAVE_ERRNO_H 1
/* Define to 1 if you have the `gethostbyaddr' function. */
#define HAVE_GETHOSTBYADDR 1
/* Define to 1 if you have the `getopt' function. */
#define HAVE_GETOPT 1
/* Define to 1 if you have the header file. */
#define HAVE_GETOPT_H 1
/* Define to 1 if you have the `getopt_long' function. */
#define HAVE_GETOPT_LONG 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the `inet_ntoa' function. */
#define HAVE_INET_NTOA 1
/* Define to 1 if you have the header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `isascii' function. */
#define HAVE_ISASCII 1
/* Define to 1 if you have the `isgraph' function. */
#define HAVE_ISGRAPH 1
/* Define to 1 if you have the `pcap' library (-lpcap). */
#define HAVE_LIBPCAP 1
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#define HAVE_MALLOC 1
/* Define to 1 if you have the header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the header file. */
#define HAVE_NETINET_IF_ETHER_H 1
/* Define to 1 if you have the header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the header file. */
#define HAVE_NETINET_IN_SYSTM_H 1
/* Define to 1 if you have the header file. */
#define HAVE_NETINET_IP_H 1
/* Define to 1 if you have the header file. */
#define HAVE_NETINET_UDP_H 1
/* Define to 1 if you have the header file. */
#define HAVE_NET_IF_H 1
/* Define to 1 if you have the header file. */
#define HAVE_PCAP_H 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_PCAP_PCAP_H */
/* Define to 1 if you have the `perror' function. */
#define HAVE_PERROR 1
/* Define to 1 if you have the `setuid' function. */
#define HAVE_SETUID 1
/* Define to 1 if you have the header file. */
#define HAVE_STDARG_H 1
/* Define to 1 if you have the header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strndup' function. */
#define HAVE_STRNDUP 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if you have the header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the header file. */
#define HAVE_TIME_H 1
/* Define to 1 if you have the header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vfprintf' function. */
#define HAVE_VFPRINTF 1
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Name of package */
#define PACKAGE "tcpick"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "duskdruid@despammed.com "
/* Define to the full name of this package. */
#define PACKAGE_NAME "tcpick"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "tcpick 0.2.0-rc2"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "tcpick"
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.2.0-rc2"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "0.2.0-rc2"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to rpl_malloc if the replacement function should be used. */
/* #undef malloc */
tcpick-0.2.1/src/Makefile.am 0000644 0001751 0001751 00000000531 10172515400 012527 0000000 0000000 bin_PROGRAMS = tcpick
tcpick_SOURCES = args.c display.c lookup_tree.c lookup_query.c loop.c tracker.c tcpick.c write.c datalink.c verify.c colors.c time.c timer.c timer.h debug.c fragments.c conn.h ip.h tcp.h udp.h tcpick.h flags.h fragment.h globals.h extern.h text.h colors.h def.h lookup.h quit.c msg.c
PACKS_AM_CFLAGS = -static -mcpu=i486
tcpick-0.2.1/src/Makefile.in 0000644 0001751 0001751 00000034140 10173301012 012534 0000000 0000000 # Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SOURCES = $(tcpick_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = tcpick$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_tcpick_OBJECTS = args.$(OBJEXT) display.$(OBJEXT) \
lookup_tree.$(OBJEXT) lookup_query.$(OBJEXT) loop.$(OBJEXT) \
tracker.$(OBJEXT) tcpick.$(OBJEXT) write.$(OBJEXT) \
datalink.$(OBJEXT) verify.$(OBJEXT) colors.$(OBJEXT) \
time.$(OBJEXT) timer.$(OBJEXT) debug.$(OBJEXT) \
fragments.$(OBJEXT) quit.$(OBJEXT) msg.$(OBJEXT)
tcpick_OBJECTS = $(am_tcpick_OBJECTS)
tcpick_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(tcpick_SOURCES)
DIST_SOURCES = $(tcpick_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
datadir = @datadir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
tcpick_SOURCES = args.c display.c lookup_tree.c lookup_query.c loop.c tracker.c tcpick.c write.c datalink.c verify.c colors.c time.c timer.c timer.h debug.c fragments.c conn.h ip.h tcp.h udp.h tcpick.h flags.h fragment.h globals.h extern.h text.h colors.h def.h lookup.h quit.c msg.c
PACKS_AM_CFLAGS = -static -mcpu=i486
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status src/config.h
$(srcdir)/config.h.in: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
tcpick$(EXEEXT): $(tcpick_OBJECTS) $(tcpick_DEPENDENCIES)
@rm -f tcpick$(EXEEXT)
$(LINK) $(tcpick_LDFLAGS) $(tcpick_OBJECTS) $(tcpick_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/args.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colors.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datalink.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/display.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fragments.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup_query.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup_tree.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loop.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quit.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpick.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tracker.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) config.h
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic ctags distclean distclean-compile \
distclean-generic distclean-hdr distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
tcpick-0.2.1/src/config.h.in 0000644 0001751 0001751 00000012255 10173301174 012526 0000000 0000000 /* src/config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the `asctime' function. */
#undef HAVE_ASCTIME
/* Define to 1 if you have the `atexit' function. */
#undef HAVE_ATEXIT
/* Define to 1 if you have the `atoi' function. */
#undef HAVE_ATOI
/* Define to 1 if you have the header file. */
#undef HAVE_ERRNO_H
/* Define to 1 if you have the `gethostbyaddr' function. */
#undef HAVE_GETHOSTBYADDR
/* Define to 1 if you have the `getopt' function. */
#undef HAVE_GETOPT
/* Define to 1 if you have the header file. */
#undef HAVE_GETOPT_H
/* Define to 1 if you have the `getopt_long' function. */
#undef HAVE_GETOPT_LONG
/* Define to 1 if you have the `getservbyport' function. */
#undef HAVE_GETSERVBYPORT
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the `getuid' function. */
#undef HAVE_GETUID
/* Define to 1 if you have the `inet_ntoa' function. */
#undef HAVE_INET_NTOA
/* Define to 1 if you have the header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII
/* Define to 1 if you have the `iscntrl' function. */
#undef HAVE_ISCNTRL
/* Define to 1 if you have the `isgraph' function. */
#undef HAVE_ISGRAPH
/* Define to 1 if you have the `pcap' library (-lpcap). */
#undef HAVE_LIBPCAP
/* Define to 1 if you have the `localtime' function. */
#undef HAVE_LOCALTIME
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
/* Define to 1 if you have the header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `mkdir' function. */
#undef HAVE_MKDIR
/* Define to 1 if you have the header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the header file. */
#undef HAVE_NETINET_IF_ETHER_H
/* Define to 1 if you have the header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if you have the header file. */
#undef HAVE_NETINET_IN_SYSTM_H
/* Define to 1 if you have the header file. */
#undef HAVE_NETINET_IP_H
/* Define to 1 if you have the header file. */
#undef HAVE_NETINET_UDP_H
/* Define to 1 if you have the header file. */
#undef HAVE_NET_IF_H
/* Define to 1 if you have the header file. */
#undef HAVE_PCAP_H
/* Define to 1 if you have the header file. */
#undef HAVE_PCAP_PCAP_H
/* Define to 1 if you have the `perror' function. */
#undef HAVE_PERROR
/* Define to 1 if you have the `setitimer' function. */
#undef HAVE_SETITIMER
/* Define to 1 if you have the `setuid' function. */
#undef HAVE_SETUID
/* Define to 1 if you have the `signal' function. */
#undef HAVE_SIGNAL
/* Define to 1 if you have the header file. */
#undef HAVE_SIGNAL_H
/* Define to 1 if you have the header file. */
#undef HAVE_STDARG_H
/* Define to 1 if you have the header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strftime' function. */
#undef HAVE_STRFTIME
/* Define to 1 if you have the header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strndup' function. */
#undef HAVE_STRNDUP
/* Define to 1 if you have the `strtol' function. */
#undef HAVE_STRTOL
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the `time' function. */
#undef HAVE_TIME
/* Define to 1 if you have the header file. */
#undef HAVE_TIME_H
/* Define to 1 if you have the header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `unlink' function. */
#undef HAVE_UNLINK
/* Define to 1 if you have the `vfprintf' function. */
#undef HAVE_VFPRINTF
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
/* Define to 1 if you have the `_exit' function. */
#undef HAVE__EXIT
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
tcpick-0.2.1/src/args.c 0000644 0001751 0001751 00000023211 10172503007 011573 0000000 0000000 /*
* args.c -- parse command-line arguments
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at you option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*
* Please read the COPYING file for the license details!
*/
/*
* tcpick project needs somebody suggesting me bugs and new features!
* If you want to contribute sending patches, finding bugs, compilation
* errors, platform-specific incompatibilies you are invited to the tcpick
* mailing-list:
*
* email address:
*
* Archive:
* http://sourceforge.net/mailarchive/forum.php?forum=tcpick-project
* Subscribe:
* http://lists.sourceforge.net/lists/listinfo/tcpick-project
*/
#include "tcpick.h"
#include "extern.h"
#define GNU_OPTIONS "ab::c:C::D::e:E::F:hi:npP:r:St::T::v::w::X:y::"
#define NONGNU_OPTIONS "ab:c:CD:e:E:F:hi:npP:r:St:T:v:w:X:y:"
int
usage()
{
color(c_USAGE, stderr, USAGE);
exit( TCPICK_SUCCESS );
}
int
parse_flav ( char c, enum FLAVOUR * flav )
{
switch( c ) {
case 'H':
case 'P':
case 'R':
case 's':
case 'U':
case 'x':
case 'X':
if ( * flav == SILENT )
* flav = c;
return 1;
break;
default:
return 0;
}
}
void
parse_write ( char * s )
{
#define WRITE_SIDE flags.writer.side
#define WRITE_FLAV flags.writer.flavour
int i;
char c;
for(i = 0; i < strlen( s ) ; i++) {
switch( c = *( s + i ) ) {
case 'C':
WRITE_SIDE = ( WRITE_SIDE == SERVER ) ? BOTH : CLIENT;
break;
case 'S':
WRITE_SIDE = ( WRITE_SIDE == CLIENT ) ? BOTH : SERVER;
break;
case 's':
flags.writer.type = SEPARATE;
break;
case 'u':
flags.writer.type = UNIQUE;
break;
case 'b':
flags.writer.banner = 1;
break;
default:
if (! parse_flav( c, &(flags.writer.flavour) ) ) {
ERR_FLAV( c );
}
break;
}
}
if ( WRITE_FLAV == SILENT )
WRITE_FLAV = RAW;
if ( WRITE_SIDE == NOTHING )
WRITE_SIDE = BOTH;
}
void
parse_display_rebuild ( char * s )
{
#define REBUILD_SIDE flags.display_rebuild.side
#define REBUILD_FLAV flags.display_rebuild.flavour
int i;
char c;
for(i = 0; i < strlen( s ) ; i++) {
c = *( s + i );
switch( c ) {
case 'C':
REBUILD_SIDE = ( REBUILD_SIDE == SERVER ) ? BOTH : CLIENT;
break;
case 'S':
REBUILD_SIDE = ( REBUILD_SIDE == CLIENT ) ? BOTH : SERVER;
break;
default:
if (! parse_flav( c, &(flags.display_rebuild.flavour) ) ) {
ERR_FLAV( c );
}
break;
}
}
if ( REBUILD_FLAV == SILENT )
REBUILD_FLAV = RAW;
if ( REBUILD_SIDE == NOTHING )
REBUILD_SIDE = BOTH;
}
void
parse_args(int argc, char ** argv)
{
char opt;
#ifdef HAVE_GETOPT_LONG
static struct option long_options[]=
{
{"version", no_argument, &(flags.versionandquit), 1 },
{"help", no_argument, &(flags.helpandquit), 1 },
{"show-header", no_argument, 0, 'h' },
{"separator", no_argument, &(flags.separator), 1 },
{"interface", required_argument, 0, 'i' },
{"readfile", required_argument, 0, 'r' },
{"dirs", required_argument, 0, 'D' },
{"filenaming", required_argument, 0, 'F' },
{"show-offsets", no_argument, &(flags.displayoffsets), 1 },
{"resolv-names", no_argument, 0, 'a' },
{"numerical-services",no_argument, 0, 'n' },
{"colors", no_argument, 0, 'C' },
{"pipe", required_argument, 0, 'P' },
{0,0,0,0} /* end */
};
#endif
int option_index = 0;
/* default values */
memset( &flags, 0, sizeof(struct FLAGS) );
flags.writer.flavour = SILENT;
flags.display_payload = SILENT;
flags.display_rebuild.side = NOTHING;
flags.display_rebuild.flavour = SILENT;
flags.verbosity = 1;
flags.trackonly = -1; /* infinite (-1) is default; -T0 means "don't track
anything"
*/
flags.filenaming = 1;
if ( argc <= 1 )
printf("important: `man 8 tcpick' explains all options available\n");
#if HAVE_GETOPT_LONG /* GNU/Linux systems */
while (( opt = getopt_long(argc,argv,
GNU_OPTIONS,
long_options, &option_index) ) != -1 )
#else /* BSD systems */
printf("Your system doesn't support getopt_long() function; you will be "
"unable to use the long options\n"
" i.e. `% tcpick --interface ppp0' DOESN'T WORK! \n");
while ( ( opt = getopt( argc, argv, NONGNU_OPTIONS ) ) !=-1 )
#endif
switch(opt) {
case 'a':
flags.lookup = 1;
break;
case 'b':
if( optarg != NULL )
parse_display_rebuild ( optarg );
else
parse_display_rebuild ( "R" );
break;
case 'c':
if (( flags.maxconns = atoi(optarg)) == 0)
suicide( "parse_args", "%s: invalid number of maximum connections",optarg );
else
flags.maxconns = 1;
break;
case 'C':
flags.color = 1;
break;
case 'D':
if( optarg != NULL ) {
flags.dirs = atoi(optarg);
if( flags.dirs == 0 )
suicide ("parse_args", "%s: invalid number of files per connection", optarg );
} else {
flags.dirs = 100;
}
break;
case 'e':
if( optarg != NULL ) {
flags.exitpackets = atoi(optarg);
if ( flags.exitpackets == 0 ) {
suicide ("parse_args",
"%s: invalid number of packets to exit",
optarg);
}
}
break;
case 'E': /* WARNING: if you modify this section, you
should modify section case 'T' too */
flags.exitclosed = 1; /* default value */
if( optarg != NULL ) {
if ( *optarg == 'f' ) {
flags.exitclosed_first = 1; /* -Ef */
if ( strlen(optarg) == 1 )
/* -Ef without number */
break;
else
optarg++;
/* -Ef with number */
}
if (! ( flags.exitclosed = atoi(optarg) ) )
suicide( "parse_args",
"%s: invalid number of closed connection"
" to track before exiting", optarg );
}
break;
case 'F':
if( optarg != NULL ) {
flags.filenaming = atoi(optarg);
if(flags.filenaming == 0) {
suicide( "parse_args",
"%s: invalid file naming system", optarg );
}
} else {
suicide( "parse_args",
"-F option needs a number\n"
"i.e. -F1 or -F2" );
}
case 'h':
flags.header = 1;
break;
case 'i':
dev = optarg;
break;
case 'n':
flags.numericalports = 1;
break;
case 'p':
flags.notpromisc = 1;
break;
case 'P':
switch( *optarg ) {
case 'c':
case 'C':
parse_display_rebuild ( "RC" ); /* -bRC */
break;
case 's':
case 'S':
parse_display_rebuild ( "RS" ); /* -bRS */
break;
default:
suicide("parse_args", "%s: invalid --pipe (-P) option",optarg);
}
flags.notstatus = 1; /* -S */
flags.verbosity = 0; /* -v0 */
flags.trackonly = 1; /* -T1 */
flags.trackonly_first = 1; /* -Tf */
flags.exitclosed = 1; /* -E1 */
flags.exitclosed_first = 1; /* -Ef */
break;
case 'r':
readfile = optarg;
break;
case 'S':
flags.notstatus = 1;
break;
case 't': /* timestamp */
if( optarg ) {
if( *optarg == 'd' ) {
flags.displaytime = TIMEDATE;
} else {
suicide( "parse_args",
"%s: invalid timestamp option", optarg );
}
} else {
flags.displaytime = ONLYTIME;
}
break;
case 'T':
/* WARNING: if you modify this section, you
should modify section case 'E' too */
flags.trackonly = 1; /* default value */
if( optarg ) {
if ( *optarg == 'f' ) {
flags.trackonly_first = 1; /* -Tf */
if ( strlen(optarg) == 1 )
/* -Tf without number */
break;
else
optarg++;
/* -Tf with number */
}
if (! ( flags.trackonly = atoi(optarg) ) ) {
suicide( "parse_args",
"%s: invalid number of connections to track", optarg );
}
}
break;
case 'v':
if ( optarg ) {
flags.verbosity = strtol(optarg,(char **)NULL, 10);
if ( flags.verbosity < 0 || flags.verbosity > 5 )
suicide( "%s: invalid verbosity number",optarg );
} else
flags.verbosity = 1;
break;
case 'w':
if( optarg )
parse_write( optarg );
else
parse_write( "R" );
break;
case 'y':
if( optarg ) {
if (! parse_flav( *optarg, &(flags.display_payload) ) )
ERR_FLAV( *optarg );
} else
parse_flav( 'P', &(flags.display_payload) );
break;
case 'X':
flags.timeout = atoi(optarg);
break;
default:
; /* UNREACHED */
}
filter = argv[optind];
if(flags.versionandquit) {
color( c_USAGE, stdout, PACKAGE_STRING "\n"
" Author: " AUTHOR "\n"
" for other info try `man 1 tcpick', or `%s --help'\n\n"
TERMS ,TCPICK_NAME);
exit( TCPICK_SUCCESS );
}
if(flags.helpandquit) {
usage();
exit( TCPICK_SUCCESS );
}
}
tcpick-0.2.1/src/display.c 0000644 0001751 0001751 00000015414 10165254732 012324 0000000 0000000 /*
* display.c -- displays data and status banners
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* FIXME: most code is duplicated: find a better solution! */
#include "tcpick.h"
#include "extern.h"
char *
status2str( enum STATUS status )
/* converts the status flag to a string */
{
char *str = (char *)S_calloc(1,128);
switch(status) {
case SYN_SENT:
strcpy( str, "SYN-SENT" );
break;
case SYN_RECEIVED:
strcpy( str, "SYN-RECEIVED" );
break;
case ESTABLISHED:
strcpy( str, "ESTABLISHED" );
break;
case FIN_WAIT_1:
strcpy( str, "FIN-WAIT-1" );
break;
case FIN_WAIT_2__CLOSE_WAIT:
strcpy( str, "FIN-WAIT-2" );
/* should it be CLOSE-WAIT? */
break;
case TIME_WAIT__LAST_ACK:
strcpy( str, "TIME-WAIT" );
/* should it be LAST-ACK? */
break;
case CLOSED:
strcpy( str, "CLOSED" );
/* should it be TIME-WAIT? */
break;
case RESET:
strcpy( str, "RESET" );
break;
case EXPIRED:
strcpy( str, "EXPIRED" );
break;
default:
strcpy( str, "ERROR" );
break;
}
return str;
}
int
display_status( FILE * out, struct CONN * conn, enum STATUS status )
/* display a "status banner" */
{
char *client_name;
char *server_name;
char *s_time;
char *status_string;
if ( flags.notstatus ) {
/* FIXME: sucks! and what if out will be a file? */
return 0;
}
client_name=(char *)lookup(conn->client.ip);
s_time = (char *)S_calloc( 128, 1 );
if( time_ascii( s_time ) )
color( c_TIME, out,"%-16s ",s_time ); /* FIXME: check */
color( c_NUMBERING, out,"%-6d ",conn->num );
S_free ( s_time );
status_string = status2str( status );
color( _STATUS_COLOR(status),
out,"%-14s",status_string );
S_free( status_string );
color( c_CLIENTNAME_STATUS, out, " %s:%s ",
client_name,
getportname(conn->client.port) );
color( _STATUS_COLOR(status), out,"> " );
server_name=(char *)lookup(conn->server.ip);
color( c_SERVERNAME_STATUS, out,"%s",
server_name );
fprintf( out,":" );
color( c_SERVICE, out,"%s",
getportname(conn->server.port) );
fprintf( out, "\n" );
fflush( out );
}
int display_header( FILE * out )
/* displays a banner for the header of the packet sniffed */
{ /* FIXME: sucks */
char * source = NULL;
char * dest = NULL;
char * s_time = (char *)S_calloc(128,1);
source=(char *)lookup(ippacket->ip_src);
debug("[display_header]: source(%x)",source);
debug("[display_header]: source=%s",source);
if( time_ascii(s_time) )
color ( c_TIME, out,"%-16s ",s_time );
color( c_CLIENTNAME_HEADER, out,"%s",source );
fprintf(out,":");
color( c_SERVICE_HEADER, out,"%s ",getportname(tcppacket->source) );
if(tcppacket->urg)
color(c_FLAGS, out,"U");
if(tcppacket->ack)
color(c_FLAGS, out,"A");
if(tcppacket->psh)
color(c_FLAGS, out,"P");
if(tcppacket->rst)
color(c_FLAGS, out,"R");
if(tcppacket->syn)
color(c_FLAGS, out,"S");
if(tcppacket->fin)
color(c_FLAGS, out,"F");
dest = (char *)lookup( ippacket->ip_dst );
color(c_DIRECTION, out," > ");
color(c_SERVERNAME_HEADER, out,"%s",dest);
fprintf(out,":");
color(c_SERVICE_HEADER, out,"%s",getportname(tcppacket->dest));
fprintf(out," (%i)\n",payload_len);
fflush(out);
}
int
out_h( FILE * out, u_char * buf, int buflen )
/* hex-spaced mode */
{
#define CHAR (int)( * buf )
while ( buflen ) {
fprintf(out,"%2.2x ", CHAR);
buf++;
buflen--;
}
if ( DISPLAY_NL )
fputc( '\n' , out );
}
int
out_hn( FILE * out, u_char * buf, int buflen )
/* non printable carachters are displayed as */
{
#define CHAR (int)( * buf )
while ( buflen ) {
if( ( isascii( CHAR ) && !iscntrl( CHAR ) ) ||
( CHAR == '\n' ) || (CHAR == '\r') || (CHAR == '\t') )
fputc( CHAR , out );
else
color(c_NONPRINT, out, "<%2.2x>", CHAR);
buf++;
buflen--;
}
if ( * ( --buf ) != '\n' )
if ( DISPLAY_NL )
fputc( '\n' , out );
}
int
out_p( FILE * out, u_char * buf, int buflen )
/* non printable carachters are displayed as dots */
{
#define CHAR (int)( * buf )
while (buflen) {
if( ( isascii( CHAR ) && !iscntrl( CHAR ) ) ||
( CHAR == '\n' ) || (CHAR == '\r') || (CHAR == '\t') )
fputc( CHAR , out );
else
color( c_NONPRINT, out, "." );
buf++;
buflen--;
}
if ( * ( --buf ) != '\n' )
if ( DISPLAY_NL )
fputc( '\n' , out );
}
/* WARNING:
if you want to modify out_xa, see carefully if it
affects out_x too */
int
out_xa (FILE * out, u_char * buf, int buflen)
{
register int pos = 0; /* first character is position 0 */
register int max;
register int i;
char a[16] = "................" ;
color(c_HEXOFF0, out, "0x%-8.4x", 0);
while( pos < buflen ) {
do {
if( pos < buflen ) {
/* print hex stuff */
if ( isgraph( *( buf + pos ) ) )
fprintf(out, pos % 2 ? "%2.2x " : "%2.2x", *( buf + pos ) );
else
color( c_NONPRINT, out, pos % 2 ? "%2.2x " : "%2.2x", *( buf + pos ) );
/* raw data */
a[ pos % 16 ] = *( buf + pos );
}
else {
/* hex space fill */
fprintf(out, pos % 2 ? " " : " ");
}
pos++;
} while ( pos % 16 );
max = ( pos <= buflen ) ? 15 : buflen % 16 ;
for(i = 0; max >= 0; max--) {
if ( isgraph( a[i] ) )
fputc( a[i], out );
else
color( c_NONPRINT, out, "." );
i++;
}
fputc( '\n', out );
if ( pos >= buflen )
break;
/* print offset at beginning of line */
color(c_HEXOFF, out,"0x%-8.4x", pos);
}
}
int
out_x (FILE * out, u_char * buf, int buflen)
/* hexdump */
{
register int pos = 0; /* first character is position 0 */
color(c_HEXOFF0, out, "0x%-8.4x", 0);
while( pos < buflen ) {
do {
if( pos < buflen )
/* print hex stuff */
if ( isgraph( *( buf + pos ) ) )
fprintf(out, pos % 2 ? "%2.2x " : "%2.2x", *( buf + pos ) );
else
color( c_NONPRINT, out, pos % 2 ? "%2.2x " : "%2.2x", *( buf + pos ) );
else
/* hex space fill */
fprintf(out, pos % 2 ? " " : " ", *( buf + pos ) );
pos++;
} while ( pos % 16 );
fprintf(out, "\n");
if ( pos >= buflen )
break;
/* print offset at beginning of line */
color(c_HEXOFF, out,"0x%-8.4x", pos);
}
}
tcpick-0.2.1/src/lookup_tree.c 0000644 0001751 0001751 00000011764 10165254732 013213 0000000 0000000 /*
* lookup_tree.c -- the tree of host lookup engine
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at you option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*/
/* lookup_tree.c
* this file contains the functions called by lookup.c
* all name/ip couples are cached in a balanced tree (in a similar way
* to the avl tree)
*/
#include "tcpick.h"
#include "extern.h"
#define PARENT_POSITION_IS_LEFT(p) (p->parent->right == p)
struct _l_node * _l_root; /* the first node */
/* prototypes */
struct _l_node *
_l_alloc(struct in_addr, char *);
char *
_l_get(struct in_addr);
int
_l_insert(struct _l_node *);
int
_l_walkup(struct _l_node *);
int
_l_checkweight(struct _l_node *);
int
_l_balance_right(struct _l_node *);
int
_l_balance_left(struct _l_node *);
int
_l_adjust_h(struct _l_node *);
struct _l_node *
_l_alloc(struct in_addr ip, char * name)
{
register struct _l_node * new;
new = (struct _l_node *) S_malloc(sizeof(struct _l_node));
memset(new, 0, sizeof(struct _l_node));
new->name = (char *)strdup(name);
/* FIXME: not sure strdup is a good thing*/
memcpy(&(new->ip), &ip, sizeof(struct in_addr));
return new;
}
char *
_l_get(struct in_addr ia)
{
register struct _l_node * p;
p = _l_root;
while(p) {
if ( p->ip.s_addr == ia.s_addr )
return p->name; /* found */
p = ( ia.s_addr > p->ip.s_addr )
? p->right : p->left;
}
return NULL; /* not found */
}
int
_l_insert(struct _l_node * new)
{
/* FIXME: could be better */
register struct _l_node ** p;
register struct _l_node * pre = NULL;
p = & _l_root;
while(*p) {
pre = *p;
p = ( new->ip.s_addr > (*p)->ip.s_addr ) ?
&((*p)->right) : &((*p)->left);
}
*p = new;
new->parent = pre;
_l_walkup(new);
return 1;
}
int
_l_walkup(struct _l_node * node)
/* FIXME: could be improved maybe */
{
register struct _l_node * par;
par = node->parent;
while( par != NULL ) {
if( par->right == node )
par->right_h = MAX(par->right->right_h,
par->right->left_h) + 1;
else
par->left_h = MAX(par->left->right_h,
par->left->left_h) + 1;
if( _l_checkweight(par) != 0 )
/* something was done */
return 1;
node = par;
par = par->parent;
}
return 0;
}
int
_l_checkweight(struct _l_node * node)
{
if( (node->right_h - node->left_h) > 1) {
/* need balance because of right too weight */
_l_balance_right(node->right);
return 1;
}
if( (node->left_h - node->right_h) > 1) {
/* need balance because of left too weight */
_l_balance_left(node->left);
return 2;
}
return 0;
}
int
_l_balance_right(struct _l_node * D)
{
/* before:
B
/ \
A D
/ \
C E
after:
D
/ \
B E
/ \
A C
*/
register struct _l_node *
B = D->parent;
/* 1. step: put up the node */
if( B->parent != NULL ) {
if( PARENT_POSITION_IS_LEFT(B) )
B->parent->right = D;
else
B->parent->left = D;
D->parent = B->parent;
} else { /* this is the root */
_l_root = D;
_l_root->parent = NULL;
}
/* 2. step: the left side C of the node D becames the
* right of the node B */
B->right = D->left;
if( B->right )
B->right->parent = B;
/* 3. step: left side of D is B */
D->left = B;
B->parent = D;
/* 4. step: adjust height values */
_l_adjust_h(B);
_l_adjust_h(D);
return 1;
}
int
_l_balance_left(struct _l_node * D)
{
/* before:
B
/ \
D A
/ \
E C
after:
D
/ \
E B
/ \
C A
*/
register struct _l_node *
B = D->parent;
/* 1. step: put up the node */
if( B->parent != NULL ) {
if( PARENT_POSITION_IS_LEFT(B) )
B->parent->right = D;
else
B->parent->left = D;
}
D->parent = B->parent;
/* 2. step: the right side C of the node D becames the
* left of the node B */
B->left = D->right;
if( B->left )
B->left->parent = B;
/* 3. step: right side of D is B */
D->right = B;
B->parent = D;
/* 4. step: adjust height values */
_l_adjust_h(B);
_l_adjust_h(D);
return 1;
}
int
_l_adjust_h(struct _l_node * node)
{
node->right_h = ( node->right != NULL )
? MAX(node->right->left_h,
node->right->right_h) + 1
: 0;
node->left_h = ( node->left != NULL )
? MAX(node->left->left_h,
node->left->right_h) + 1
: 0;
return 1;
}
tcpick-0.2.1/src/lookup_query.c 0000644 0001751 0001751 00000004421 10165254732 013411 0000000 0000000 /*
* lookup_query.c -- the host lookup engine
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at you option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*/
#include "tcpick.h"
#include "extern.h"
char *
lookup_new(struct in_addr ia)
{
register struct hostent * he;
register struct _l_node * node;
he = gethostbyaddr((char *)&ia, sizeof(struct in_addr), AF_INET);
node = (struct _l_node *)_l_alloc(ia, (he == NULL) ? inet_ntoa(ia) : he->h_name );
_l_insert( node );
return node->name;
}
char *
lookup(struct in_addr ia)
/* WARNING: returned buffer is by default static! */
{
register char * name;
if(flags.lookup == 0) /* this is default */
return inet_ntoa(ia);
name = (char *)_l_get(ia);
return ( (name == NULL)
? (char *)lookup_new(ia)
: (char *)name );
}
char *
getportname(u_int16_t port)
/* FIXME: completely rewrite! */
{
static char *service=NULL;
static char *s_port=NULL;
struct servent * ptr;
if(service) {
S_free(service);
service=NULL;
}
if(s_port) {
S_free(s_port);
s_port=NULL;
}
if(!flags.numericalports)
if(ptr=(struct servent *)getservbyport(port, "tcp"))
if(ptr->s_name) {
debug("service name resolved: %s",ptr->s_name);
return service=(char *)strdup(ptr->s_name);
}
debug( "service name NOT resolved: %d",ntohs(port) );
/* \n carachter should be inserted because this messages comes after
* a "printf" message not ended in \n in another function
*/
s_port=(char *)S_calloc(128,1);
sprintf(s_port,"%d",ntohs(port));
return s_port;
}
tcpick-0.2.1/src/loop.c 0000644 0001751 0001751 00000007257 10172503700 011624 0000000 0000000 /*
* loop.c -- the main loop of the capture engine
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at you option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*/
#include "tcpick.h"
#include "extern.h"
int
got_packet (u_char * useless,
const struct pcap_pkthdr* hdr,
const u_char* packet)
/* called by pcap_loop.
this is the main loop for the packet engine. */
{ /* FIXME: this function is too long */
/* check if the flag for checking for expired connections
is turned on */
if(expired_flag == CHECK_GOTPACKET) {
check_expired();
}
expired_flag = CHECK_NOT;
if(! packet)
fault( "got_packet", "didn't grab packet" );
count_packets++;
ippacket=(struct ip *)(packet + datalink_size);
#if __BYTE_ORDER == __LITTLE_ENDIAN
iplen = (ippacket->ip_len % 256) * 256 + (ippacket->ip_len) / 256;
#elif __BYTE_ORDER == __BIG_ENDIAN
iplen = ippacket->ip_len;
#else
# error "Please fix "
#endif
switch(ippacket->ip_p) {
case IPPROTO_TCP:
tcppacket = (struct tcphdr *)(packet + datalink_size + IP_SIZE);
tcp_size = tcppacket->doff * 4;
payload = (u_char *)(packet + datalink_size + IP_SIZE + tcp_size);
payload_len = iplen - IP_SIZE - tcp_size;
#ifdef TCPICK_DEBUG
if( payload_len != (hdr->len - (int)( payload - packet ) ) ) {
suicide( "got_packet",
"payload lenght calculated with iplen and hdr->len\n"
"differs by %d bytes\n"
"hdr->len = %d\n"
"datalink_size = %d\n"
"IP_SIZE = %d\n"
"iplen = %d\n"
"tcp_size = %d\n"
"iplen - IP_SIZE - tcp_size = %d\n"
"(hdr->len - (int)( payload - packet ) = %d\n",
payload_len - (hdr->len - (int)( payload - packet )),
hdr->len,
datalink_size,
IP_SIZE,
iplen,
tcp_size,
payload_len,
(hdr->len - (int)( payload - packet ))
);
}
#endif /* TCPICK_DEBUG */
if( flags.header > 0 )
display_header( stdout, ippacket, tcppacket,
payload_len );
verify(); /* call the core to manage the packet */
if( payload_len == 0 || SILENCE )
goto end;
out_flavour( flags.display_payload,
stdout, payload, payload_len );
break;
case IPPROTO_UDP:
udppacket = (struct udphdr *)(packet + datalink_size + IP_SIZE);
payload = (u_char *)(packet + datalink_size + IP_SIZE + sizeof(*udppacket));
payload_len = hdr->len - (int)( payload - packet );
if( payload_len == 0 || SILENCE )
goto end;
out_flavour( flags.display_payload,
stdout, payload, payload_len );
break;
default: /* Packet with an unidentified protocol */
debug( "Packet with unidentified protocol caught: %s > %s",
inet_ntoa(ippacket->ip_src),
inet_ntoa(ippacket->ip_dst) );
}
end:
if( flags.exitpackets != 0 ) {
if (count_packets == flags.exitpackets)
exit(EXIT_SUCCESS);
}
/* Now the callback is able to check! */
expired_flag = CHECK_LISTENING;
}
tcpick-0.2.1/src/tracker.c 0000644 0001751 0001751 00000007276 10165254732 012321 0000000 0000000 /*
* tracker.c -- connection status handler
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "tcpick.h"
#include "extern.h"
struct CONN * first_conn = NULL; /*all connections, ends on a 0*/
struct CONN * last_conn = NULL;
int
status_switch(struct CONN * prev, enum STATUS status)
{
#define CURR (prev->next)
display_status( stdout, CURR, status );
if ( status == CLOSED ||
status == RESET ||
status == EXPIRED )
rmconn( prev );
else
CURR->status = status;
}
int
newconn( struct CONN * prev_ring )
/* allocates a new connection */
{
struct CONN * conn;
if( flags.trackonly != -1 ) {
if( flags.trackonly_first &&
( count_conns >= flags.trackonly ) )
return -1;
else if( count_opened >= flags.trackonly )
return -1;
else
count_opened++;
}
count_conns++;
conn = ( struct CONN * )S_calloc( sizeof( struct CONN ), 1 );
prev_ring->next = conn; /* and the chain becomes longer... :)
thank you mainman for this good idea! */
last_conn = conn;
conn->client.side = CLIENT;
conn->server.side = SERVER;
conn->client.ip.s_addr = ippacket->ip_src.s_addr;
conn->server.ip.s_addr = ippacket->ip_dst.s_addr;
conn->client.port = tcppacket->source;
conn->server.port = tcppacket->dest;
conn->client.sip = ntohl(tcppacket->seq) + 1;
conn->client.oth = & (conn->server);
conn->server.oth = & (conn->client);
conn->num = count_conns;
conn->lasttime = time(NULL);
status_switch( prev_ring, SYN_SENT );
}
int rmconn( struct CONN * prev_ring )
/* removes from the linked-list and deallocates a connection
* prev_ring
*/
{
struct CONN * curr = prev_ring->next;
struct CONN * conn;
prev_ring->next = curr->next;
if( curr->next == NULL )
last_conn = prev_ring;
free_desc( &(curr->client) );
free_desc( &(curr->server) );
S_free( curr );
conn = first_conn;
if( flags.exitclosed ) {
if( flags.exitclosed_first ) { /* -Ef */
while( conn->num > flags.exitclosed ) {
if(! (conn->next) )
exit( EXIT_SUCCESS );
conn = conn->next;
}
} else { /* -E */
--flags.exitclosed;
if( flags.exitclosed == 0)
exit( EXIT_SUCCESS );
}
}
if( flags.trackonly &&
(! flags.trackonly_first) )
count_opened--;
}
int free_desc( struct HOST_DESC * desc )
/* frees the host descriptor and closes the file */
{
struct FRAGMENT * tmp;
if( desc->file ) {
fclose( desc->file );
if (flags.writer.type == UNIQUE)
desc->oth->file = NULL;
}
if( desc->filename ) {
S_free( desc->filename );
desc->filename = NULL;
}
if( desc->lockfilename ) {
unlink( desc->lockfilename );
S_free( desc->lockfilename );
desc->lockfilename = NULL;
}
while( desc->unack ) { /* FIXME: desc->unack should be just NULL when closes!
* I should check it! */
S_free( desc->unack->payload );
desc->unack->payload = NULL;
tmp = desc->unack;
desc->unack = desc->unack->next;
S_free( tmp );
}
}
tcpick-0.2.1/src/tcpick.c 0000644 0001751 0001751 00000015523 10173200100 012110 0000000 0000000 /*
* tcpick.c -- main project file
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at you option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*
* Please read the COPYING file for the license details!
*/
/*
* tcpick project needs somebody suggesting me bugs and new features!
* If you want to contribute sending patches, finding bugs, compilation
* errors, platform-specific incompatibilies you are invited to the tcpick
* mailing-list:
*
* email address:
*
* Archive:
* http://sourceforge.net/mailarchive/forum.php?forum=tcpick-project
* Subscribe:
* http://lists.sourceforge.net/lists/listinfo/tcpick-project
*/
/*
* in the code you will find many (sooo many) FIXME's: it means that
* I (or somebody else) should improve the code.
*/
#include "tcpick.h"
#include "globals.h"
char *errbuf[PCAP_ERRBUF_SIZE];
struct bpf_program filter_compiled;
bpf_u_int32 netp; /* ip */
bpf_u_int32 maskp; /* subnet mask */
struct in_addr addr;
char *other_args = NULL;
pcap_t *descr;
const u_char *packet;
u_char *curr_char;
struct pcap_pkthdr hdr;
u_char *datalink_str;
extern void got_packet();
extern void exit_signal(int);
void signal_setup(int sig, void (*handler)( ))
{
#ifdef HAVE_SIGACTION
struct sigaction sa;
sa.sa_handler = handler;
sigemptyset(&(sa.sa_mask));
sigaddset(&(sa.sa_mask), sig);
sa.sa_flags = 0;
if( sigaction(sig, &sa, 0) == -1)
sorry("signal_setup", "sigaction(%d,%p,0) returned -1");
#else
#ifdef HAVE_SIGNAL
if (signal(sig, handler) == SIG_ERR)
sorry("signal_setup", "signal(%d,%p) returned SIG_ERR");
#endif /* HAVE_SIGNAL */
#endif /* HAVE_SIGACTION */
}
int main(int argc, char **argv)
{
char tbuf[128];
struct tm *tm;
time_t now;
parse_args(argc, argv);
/* set a timer that sends every second a SIGALRM signal */
set_timer();
#ifdef HAVE_ATEXIT
{
extern void cleanup();
if (atexit (cleanup) != 0 ) {
sorry("main", "atexit returned a nonzero value");
}
}
#endif
#ifdef SIGINT
signal_setup (SIGINT, exit_signal);
#endif
#ifdef SIGTERM
signal_setup (SIGTERM, exit_signal);
#endif
#ifdef SIGQUIT
signal_setup (SIGQUIT, exit_signal);
#endif
#ifdef SIGHUP
/* TODO: maybe another use for this signal */
signal_setup (SIGHUP, exit_signal);
#endif
/* time stuff stolen by Fyodor's nmap */
now = time(NULL);
if (!(tm = localtime(&now)))
fault("main", "Unable to get current localtime()");
if (strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M %Z", tm) <= 0)
fault("main", "Unable to properly format time");
msg( 1, c_WELCOME,
"Starting " PACKAGE_STRING " at %s", tbuf );
#ifdef TCPICK_DEBUG
msg( 1, c_COMPILED,
"Compiled with -DTCPICK_DEBUG" );
#endif
if( flags.trackonly > -1 ) {
msg( 1, c_SETTING,
"Number of connections that will be tracked: %i",
flags.trackonly );
}
if( flags.timeout <= 0 ) { /* thank you Artyom Khafizov :^) */
flags.timeout = 600;
}
msg( 1, c_SETTING, "Timeout for connections is %i", flags.timeout );
if( flags.exitpackets != 0 ) {
msg( 1, c_SETTING,
"when %d packets will be sniffed, "
"tcpick exits", flags.exitpackets);
}
if( flags.exitclosed ) {
if( flags.exitclosed_first )
msg(1, c_SETTING,
"when _the first_ %i tracked "
"connections will be closed, tcpick exits",
flags.exitclosed );
else
msg(1, c_SETTING,
"when %i tracked connections "
"will be closed, tcpick exits",
flags.exitclosed );
}
/* I hope this was clear enough */
if( ( dev != NULL ) && ( readfile != NULL) ) {
suicide( "main",
"Please specify either a file (with -r )\n"
"\t or an interface (with -i ), not both" );
}
if( ( dev == NULL ) && ( readfile == NULL ) ) {
/* find first available network device */
dev = pcap_lookupdev( (char*) errbuf );
if( dev == NULL ) {
suicide( "main", errbuf );
}
} else if( readfile != NULL ) {
setuid(getuid());
msg( 1, c_INTERFACE,
"%s: reading from %s",
TCPICK_NAME, readfile );
descr = pcap_open_offline( readfile, (char *)errbuf );
}
if( dev != NULL) {
debug( "Using device: %s", dev );
msg( 1, c_INTERFACE,
"%s: listening on %s",
TCPICK_NAME, dev );
/* ask pcap for the network address and mask of the device */
ret = pcap_lookupnet( dev, &netp,
&maskp, (char *)errbuf);
if( ret == -1 ) {
netp = 0;
maskp = 0;
err( "%s", errbuf );
}
addr.s_addr = netp;
net = (char *)strdup( inet_ntoa(addr) );
if(! net )
fault( "main", "inet_ntoa" );
addr.s_addr = maskp;
mask = (char *)strdup( inet_ntoa(addr) );
if (! mask ) {
fault( "main", "inet_ntoa" );
}
debug( "net: %s", net );
debug( "mask: %s", mask );
descr = pcap_open_live( dev,
BUFSIZ,
flags.notpromisc ? 0 : 1 ,
1000,
(char *)errbuf );
}
if( descr == NULL)
suicide( "main", errbuf );
/* compiling the filter */
if( filter != NULL ) {
msg(1, c_SETTING, "setting filter: \"%s\"",filter);
if( ( pcap_compile( descr,
&filter_compiled,
filter,
0,
(int)net
) == -1) )
err("error compiling filter \"%s\"",filter);
pcap_setfilter( descr, &filter_compiled );
}
/* getting information about the datalink type of the device choosen
(not all are supported) */
datalink_id = pcap_datalink( descr );
datalink_str = (char *)datalink2str( datalink_id );
debug( "datalink: %s", datalink_str );
datalink_size = datalink2off( datalink_id );
debug ( "datalink header size: %d", datalink_size );
/* setting entry point of linked-list of connections tracked */
first_conn = (struct CONN *)S_calloc( sizeof(struct CONN), 1 );
last_conn = first_conn;
/* see timer.c for further details */
expired_flag = CHECK_LISTENING;
/* setting function that analyzes captured packets */
pcap_loop( descr, -1, got_packet, NULL );
/* this point should not be reached,
unless errors or -r option */
if( readfile ) {
msg( 1, c_DONE,
"%s: done reading from %s", TCPICK_NAME, readfile );
exit ( TCPICK_SUCCESS );
} else {
suicide( "main", "exited pcap loop" );
}
/* NOT REACHED */
return TCPICK_FAILURE;
}
tcpick-0.2.1/src/write.c 0000644 0001751 0001751 00000014607 10170071307 012003 0000000 0000000 /*
* write.c -- chooses output data
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "tcpick.h"
#include "extern.h"
__inline__ char *
avail_filename(struct CONN * conn_ptr,
enum PART side, char * ext)
/*
finds an available name for the connection file,
i.e. sometimes there are same filenames, this is useful
to invent a different filename
*/
{
char * client_server;
char * base_name;
char * dir_name;
char * test_name;
char * ret;
struct stat stat_struct;
/* this gets the name of the host */
char * clientname;
char * servername;
int server_port=conn_ptr->server.port;
int num = 0;
client_server = (char *)S_calloc(MAX_FILENAME_LENGHT,1);
base_name = (char *)S_calloc(MAX_FILENAME_LENGHT,1);
dir_name = (char *)S_calloc(MAX_FILENAME_LENGHT,1);
test_name = (char *)S_calloc(MAX_FILENAME_LENGHT,1);
if (flags.dirs > 0) {
/* -D option */
sprintf(dir_name,"%06u", conn_ptr->num / flags.dirs);
if( stat(dir_name, &stat_struct) == -1 ) {
switch (errno) {
case ENOENT:
/* directory don't exist: create it! */
if( mkdir(dir_name, 666) == -1 )
fault("avail_filename", "mkdir");
break;
default:
fault("avail_filename", "stat");
}
}
} else {
sprintf(dir_name,".");
}
clientname = (char *)lookup(conn_ptr->client.ip);
sprintf(client_server,"%s", clientname);
servername=(char *)lookup(conn_ptr->server.ip);
sprintf(client_server,"%s_%s_%s",
client_server,
servername,
getportname(server_port)
);
if(flags.writer.type == UNIQUE) {
/* this was Saumil Shah's wish ;^) */
switch( flags.filenaming ) {
case 1:
sprintf(base_name, "%s/tcpick_%s.both", dir_name, client_server);
break;
case 2:
sprintf(base_name, "%s/tcpick_%06u_%s.both", dir_name, conn_ptr->num, client_server);
break;
}
} else { /* flags.writer.type == SEPARATE,
* so, give different filenames!
* this is by default.
*/
switch( flags.filenaming ) {
case 1:
switch( side ) {
case CLIENT:
sprintf(base_name, "%s/tcpick_%s.clnt", dir_name, client_server);
break;
case SERVER:
sprintf(base_name,"%s/tcpick_%s.serv", dir_name, client_server);
break;
}
break;
case 2:
switch( side ) {
case CLIENT:
sprintf(base_name, "%s/tcpick_%06u_%s.clnt", dir_name, conn_ptr->num, client_server);
break;
case SERVER:
sprintf(base_name,"%s/tcpick_%06u_%s.serv", dir_name, conn_ptr->num, client_server);
break;
}
break;
}
}
sprintf( test_name, "%s.%s", base_name, ext );
while(! stat( test_name, &stat_struct )) {
num++;
sprintf( test_name, "%s.%x.%s", base_name, num, ext );
}
/* returning the right pointer and freeing wasted memory */
#ifdef HAVE_STRNDUP
ret = (char *)strndup( test_name, MAX_FILENAME_LENGHT );
#else
ret = (char *)strdup( test_name );
#endif
S_free( test_name );
S_free( dir_name );
S_free( base_name );
S_free( client_server );
return ret;
}
void
open_file( struct CONN * conn_ptr,
struct HOST_DESC * desc )
{
static char * s;
FILE * lockfile;
/* preparing for the connection side file */
if(flags.writer.type == UNIQUE
&& desc->oth->file != NULL ) {
/* user want a unique output file,
and it was just opened! */
desc->file = desc->oth->file;
desc->filename = desc->oth->filename;
} else {
s = (char *)avail_filename( conn_ptr, desc->side, "dat" );
desc->file = fopen( s , "a" );
if( desc->file == NULL )
fault("open_file", "fopen returned NULL");
desc->filename = s;
s = (char *)avail_filename( conn_ptr, desc->side, "lck");
lockfile = fopen( s , "a" );
if( lockfile == NULL )
fault("open_file", "fopen returned NULL");
fclose(lockfile);
desc->lockfilename = s;
}
return;
}
__inline__ int
flowflush ( struct CONN * conn_ptr,
struct HOST_DESC * desc,
u_char * buf,
int buflen )
/* data that are acknowledged come here in order to be written to
their file, or to stdout */
{
/* -b set of options */
if ( desc->side == flags.display_rebuild.side )
out_flavour ( flags.display_rebuild.flavour,
stdout, buf, buflen );
else if ( flags.display_rebuild.side == BOTH )
out_flavour ( flags.display_rebuild.flavour,
stdout, buf, buflen );
/* -w set of options */
if ( desc->side == flags.writer.side ) {
if(! desc->file )
open_file( conn_ptr, desc );
out_flavour ( flags.writer.flavour,
desc->file, buf, buflen );
}
else if ( flags.writer.side == BOTH ) {
if(! desc->file )
open_file( conn_ptr, desc );
if ( flags.writer.banner == 1 ) {
/* -wb */
/* FIXME: add it to `-b' too? Do a function for this? */
fprintf(desc->file,
(desc->side == CLIENT)
? "\n[client] %d:%d (%d)\n"
: "\n[server] %d:%d (%d)\n",
desc->wlen,
desc->wlen + buflen,
buflen);
}
out_flavour ( flags.writer.flavour,
desc->file, buf, buflen );
}
}
int
out_flavour( enum FLAVOUR flavour,
FILE * out,
u_char * buf,
int buflen )
/* chooses the function to call, according to the specified flavour */
{
if( flags.separator && ( out == stdout ) ) /* FIXME: sucks? */
color( c_SEPARATOR, stdout, SEPARATOR "\n" );
switch ( flavour ) {
case HEX_ASCII_DUMP:
out_xa( out, buf, buflen );
break;
case HEX_DUMP:
out_x( out, buf, buflen );
break;
case RAW:
fwrite( buf, sizeof(u_char), buflen, out );
if( DISPLAY_NL )
fprintf( out, "\n" );
break;
case PRINTABLE:
out_p( out, buf, buflen );
break;
case HEX:
out_h( out, buf, buflen );
break;
case HEX_NON_PRINT:
out_hn( out, buf, buflen );
break;
default: /* SILENT ??? */
break;
}
}
tcpick-0.2.1/src/datalink.c 0000644 0001751 0001751 00000010004 10165254732 012434 0000000 0000000 /*
* datalink.c -- calculates datalink offsets
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at you option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*/
#include "tcpick.h"
#include "extern.h"
char *datalink2str(int dl_id)
{
char *str = NULL;
if (str)
{
S_free (str);
str = NULL;
}
str = S_calloc(128 , 1);
debug( "datalink number: %d" , dl_id );
switch(dl_id) {
#ifdef DLT_NULL
case DLT_NULL:
strcpy(str, "DLT_NULL");
break;
#endif
#ifdef DLT_EN10MB
case DLT_EN10MB:
strcpy(str, "DLT_EN10MB");
break;
#endif
#ifdef DLT_IEEE802
case DLT_IEEE802:
strcpy(str, "DLT_IEEE802");
break;
#endif
#ifdef DLT_ARCNET
case DLT_ARCNET:
strcpy(str, "DLT_ARCNET");
break;
#endif
#ifdef DLT_FDDI
case DLT_FDDI:
strcpy(str, "DLT_FDDI");
break;
#endif
#ifdef DLT_ATM_RFC1483
case DLT_ATM_RFC1483:
strcpy(str, "DLT_ATM_RFC1483");
break;
#endif
#ifdef DLT_RAW
case DLT_RAW:
strcpy(str, "DLT_RAW");
break;
#endif
#ifdef DLT_PPP_SERIAL
case DLT_PPP_SERIAL:
strcpy(str, "DLT_PPP_SERIAL");
break;
#endif
#ifdef DLT_PPP_ETHER
case DLT_PPP_ETHER:
strcpy(str, "DLT_PPP_ETHER");
break;
#endif
#ifdef DLT_C_HDLC
case DLT_C_HDLC:
strcpy(str, "DLT_C_HDLC");
break;
#endif
#ifdef DLT_IEEE802_11
case DLT_IEEE802_11:
strcpy(str, "DLT_IEEE802_11");
break;
#endif
#ifdef DLT_LOOP
case DLT_LOOP:
strcpy(str, "DLT_LOOP");
break;
#endif
#ifdef DLT_LINUX_SLL
case DLT_LINUX_SLL:
strcpy(str, "DLT_LINUX_SLL");
break;
#endif
#ifdef DLT_LTALK
case DLT_LTALK:
strcpy(str, "DLT_LTALK");
break;
#endif
#ifdef DLT_PFLOG
case DLT_PFLOG:
strcpy(str, "DLT_PFLOG");
break;
#endif
#ifdef DLT_PPP
case DLT_PPP:
strcpy(str, "DLT_PPP");
break;
#endif
#ifdef DLT_SLIP
case DLT_SLIP:
strcpy(str, "DLT_SLIP");
break;
#endif
#ifdef DLT_SLIP_BSDOS
case DLT_SLIP_BSDOS:
strcpy(str, "DLT_SLIP_BSDOS");
break;
#endif
#ifdef DLT_PPP_BSDOS
case DLT_PPP_BSDOS:
strcpy(str, "DLT_PPP_BSDOS");
break;
#endif
default:
sprintf(str, "UNKNOWN(0x%x)(%d)" , dl_id , dl_id);
break;
}
return str;
}
int datalink2off(int dl_id)
{
int dl_size = 0;
switch(dl_id) {
#ifdef DLT_NULL /* not tested */
case DLT_NULL:
dl_size = 4;
break;
#endif
#ifdef DLT_EN10MB
case DLT_EN10MB:
dl_size = 14;
break;
#endif
#ifdef DLT_RAW
case DLT_RAW:
dl_size = 0;
break;
#endif
#ifdef DLT_IEEE802_11 /* not tested */
case DLT_IEEE802_11:
dl_size = 24;
break;
#endif
#ifdef DLT_LOOP /* not tested */
case DLT_LOOP:
dl_size = 4;
break;
#endif
#ifdef DLT_PPP_ETHER
case DLT_PPP_ETHER:
dl_size = 8;
break;
#endif
#ifdef DLT_LINUX_SLL
case DLT_LINUX_SLL:
dl_size = 16;
break;
#endif
#ifdef DLT_PFLOG
case DLT_PFLOG:
dl_size = 48;
break;
#endif
/* credits for DLT_PPP, DLT_SLIP, DLT_SLIP_BSDOS
and DLT_PPP_BSDOS offsets:
SNiFf v0.3 by uLiX
http://www.s0ftpj.org/bfi/online/bfi10/BFi10-05.html
*/
#ifdef DLT_PPP
case DLT_PPP:
dl_size = 4;
break;
#endif
#ifdef DLT_SLIP
case DLT_SLIP:
dl_size = 16;
break;
#endif
#ifdef DLT_SLIP_BSDOS
case DLT_SLIP_BSDOS:
dl_size = 24;
break;
#endif
#ifdef DLT_PPP_BSDOS
case DLT_PPP_BSDOS:
dl_size = 24;
break;
#endif
default:
suicide("datalink2off",
"Sorry, datalink %s type not recognized by %s !\n",
datalink2str(dl_id), PACKAGE_STRING);
}
return dl_size;
}
tcpick-0.2.1/src/verify.c 0000644 0001751 0001751 00000012754 10171512505 012157 0000000 0000000 /*
* verify.c -- the connection matching engine
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "tcpick.h"
#include "extern.h"
#define CURRENT_CONN (prev_conn->next)
#define ACK_OFF ntohl( tcppacket->ack_seq ) - Desc->oth->sip
/* FIXME: to def.h? */
#define IS_CLIENT_SENDER \
CURRENT_CONN->client.ip.s_addr == ippacket->ip_src.s_addr && \
CURRENT_CONN->server.ip.s_addr == ippacket->ip_dst.s_addr && \
CURRENT_CONN->client.port == tcppacket->source && \
CURRENT_CONN->server.port == tcppacket->dest
#define IS_SERVER_SENDER \
CURRENT_CONN->client.ip.s_addr == ippacket->ip_dst.s_addr && \
CURRENT_CONN->server.ip.s_addr == ippacket->ip_src.s_addr && \
CURRENT_CONN->client.port == tcppacket->dest && \
CURRENT_CONN->server.port == tcppacket->source
#define IS_SYN_SENT \
tcppacket->syn == 1 && \
tcppacket->ack == 0
#define IS_SYN_RECEIVED \
tcppacket->syn == 1 && \
tcppacket->ack == 1 && \
Desc->side == SERVER && \
CURRENT_CONN->status == SYN_SENT
#define IS_ESTABLISHING \
tcppacket->syn == 0 && \
tcppacket->ack == 1 && \
Desc->side == CLIENT && \
CURRENT_CONN->status == SYN_RECEIVED && \
CURRENT_CONN->client.sip == ntohl( tcppacket->seq )
#define IS_DATA_FLOW 1
#define IS_FIN_WAIT_1 \
tcppacket->fin == 1 && \
CURRENT_CONN->status == ESTABLISHED
#define IS_FIN_WAIT_2__CLOSE_WAIT \
tcppacket->ack == 1 && \
tcppacket->fin == 0 && \
CURRENT_CONN->status == FIN_WAIT_1 && \
CURRENT_CONN->closer != Desc->side
#define IS_TIME_WAIT__LAST_ACK \
tcppacket->ack == 1 && \
tcppacket->fin == 1 && \
( CURRENT_CONN->status == FIN_WAIT_2__CLOSE_WAIT || \
CURRENT_CONN->status == FIN_WAIT_1 ) && \
CURRENT_CONN->closer != Desc->side
#define IS_CLOSING \
tcppacket->ack == 1 && \
tcppacket->fin == 0 && \
CURRENT_CONN->status == TIME_WAIT__LAST_ACK && \
CURRENT_CONN->closer == Desc->side
#define IS_RESET \
tcppacket->rst == 1
__inline__ int
established_packet ( struct CONN * conn_ptr, struct HOST_DESC * Desc)
/* called by verify()
packets of established connections come here */
{
register u_int32_t off;
if( payload_len ) {
off = ntohl( tcppacket->seq ) - Desc->sip ;
/* unacknowledged data */
addfr( & (Desc->unack),
Desc->wlen,
off,
payload,
payload_len );
}
if( payload_len == 0) {
/* acknowledge data */
flush_ack ( Desc->oth, conn_ptr, ACK_OFF );
}
else if( tcppacket->psh ) {
/* PUSH data */
flush_ack ( Desc, conn_ptr, ACK_OFF );
}
}
__inline__ int
verify()
/* called by got_packet().
this is the engine that matches the packets with their connection */
{
register struct HOST_DESC * Desc = NULL;
register struct CONN * prev_conn;
prev_conn = first_conn;
/* SYN-SENT: (outside of the loop because the
* loop is used for sessions just tracked) */
if( IS_SYN_SENT ) {
newconn( last_conn );
return(1);
}
if(! CURRENT_CONN )
return 0 ;
while (! Desc ) {
/* cycle until it finds a connection that
matches on server or client side */
if ( IS_CLIENT_SENDER )
Desc = & (CURRENT_CONN->client);
else if ( IS_SERVER_SENDER )
Desc = & (CURRENT_CONN->server);
else {
prev_conn = prev_conn->next;
if(! CURRENT_CONN )
return 0 ;
}
}
/* update time of last packet in connection */
CURRENT_CONN->lasttime = time(NULL);
/* when this point is reached, we have found
the right matching connection */
if( IS_SYN_RECEIVED ) {
CURRENT_CONN->server.sip = ntohl(tcppacket->seq) + 1;
status_switch( prev_conn, SYN_RECEIVED );
return 1;
}
/* 3rd packet of the 3-way-handshake*/
if( IS_ESTABLISHING ) {
status_switch( prev_conn, ESTABLISHED );
return 1;
}
/* data or ack packets */
if( IS_DATA_FLOW ) {
if( REBUILD )
established_packet ( CURRENT_CONN, Desc );
}
/* first FIN sent */
if( IS_FIN_WAIT_1 ) {
status_switch( prev_conn, FIN_WAIT_1 );
CURRENT_CONN->closer = Desc->side;
return 1;
}
/* ACK of first FIN sent */
if( IS_FIN_WAIT_2__CLOSE_WAIT ) {
status_switch( prev_conn, FIN_WAIT_2__CLOSE_WAIT );
return 1;
}
/* second FIN sent */
if( IS_TIME_WAIT__LAST_ACK ) {
status_switch( prev_conn, TIME_WAIT__LAST_ACK );
return 1;
}
/* LAST-ACK sent */
if( IS_CLOSING ) {
status_switch( prev_conn, CLOSED );
return 1;
}
/* RST sent */
if( IS_RESET ) {
status_switch( prev_conn, RESET );
return 1;
}
/* nice work :^) */
}
tcpick-0.2.1/src/colors.c 0000644 0001751 0001751 00000002117 10165254732 012154 0000000 0000000 /*
snip code for the terminal colors is taken from
http://linuxgazette.net/issue65/padala.html
Copyright (c)2001, Pradeep Padala.
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 65 of Linux Gazette, April 2001
Note: Francesco Stablum has modified the code on 15/01/04
to take it useful for my program (tcpick) released under the GPL license.
*/
#include "tcpick.h"
#include "extern.h"
void textcolor(FILE * out, int attr, int fg, int bg)
{
char command[13];
/* Command is the control command to the terminal */
sprintf(command, "%c[%d;%dm", 0x1B, attr, fg + 30);
fprintf(out,"%s", command);
}
void resetcolor(FILE * out)
{
/* works on gnome-terminal, xterm and rxvt */
fprintf(out,"\x1b[0;0m");
}
void
color( int attr, int fg, FILE * out, char *fmt, ... )
{
#define COLOR_CONDITION ( ( out == stdout || out == stderr ) && flags.color )
va_list list;
if( COLOR_CONDITION )
textcolor ( out, attr, fg, GREEN );
va_start ( list, fmt );
vfprintf ( out, fmt, list );
va_end ( list );
if( COLOR_CONDITION )
resetcolor(out);
}
tcpick-0.2.1/src/time.c 0000644 0001751 0001751 00000004471 10170074430 011605 0000000 0000000 /*
* time.c -- manages timestamps
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at you option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*/
#include "tcpick.h"
#include "extern.h"
char * time_ascii(char * ret)
{
struct timeval *tp;
struct timezone *tzp;
struct tm * brokentime;
if(flags.displaytime == NOTHING_TIME)
goto retNULL;
tp = (struct timeval * ) S_malloc( sizeof(struct timeval) );
tzp = (struct timezone * ) S_malloc( sizeof(struct timezone) );
memset(tp, 0, sizeof(struct timeval));
memset(tzp, 0, sizeof(struct timeval));
if(gettimeofday(tp, tzp)) {
perror("gettimeofday returned not 0!");
goto retNULL;
} else {
brokentime = localtime(&(tp->tv_sec));
switch (flags.displaytime) {
case ONLYTIME:
sprintf(ret,"%2.2d:%2.2d:%2.2d.%6.6d",
brokentime->tm_hour,
brokentime->tm_min,
brokentime->tm_sec,
tp->tv_usec
);
break;
case TIMEDATE:
sprintf(ret,
"%2.2d-%2.2d-%2.2d " /* date */
"%2.2d:%2.2d:%2.2d.%6.6d", /* time */
/* date */
brokentime->tm_mday,
brokentime->tm_mon + 1,
brokentime->tm_year > 100 ?
brokentime->tm_year - 100 :
brokentime->tm_year,
/* time */
brokentime->tm_hour,
brokentime->tm_min,
brokentime->tm_sec,
tp->tv_usec
);
break;
default:
#ifdef TCPICK_DEBUG
suicide("time_ascii",
"unimplemented feature required.");
#endif
goto retNULL;
}
}
S_free ( tp );
S_free ( tzp );
return ret;
retNULL:
sprintf(ret,"");
return NULL;
}
tcpick-0.2.1/src/timer.c 0000644 0001751 0001751 00000005627 10173176762 012011 0000000 0000000 /*
* timer.c -- functions and callbacks for the
* timer managed by SIGALRM
*
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004, 2005 Francesco Stablum
* Licensed under the GPL
*
*/
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "tcpick.h"
#include "extern.h"
#define CURRENT_CONN (prev_conn->next)
void set_timer()
{
#define TIMER_ERR_MSG err( "unable to set timer properly.\n" \
"\t-X option and EXPIRED status will be disabled" )
#ifdef SIGALRM
extern void sigalrm_callback(int);
# if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined (TEST_BSD)
/* BSD stuff*/
pid_t pid;
pid = getpid();
if (fork() == 0) {
/* child process */
for(;;) {
sleep(1);
if( kill(pid, SIGALRM) == -1) {
if( errno == ESRCH)
_exit(EXIT_SUCCESS);
else
sorry("set_timer", "kill(%d, SIGALRM) returned -1");
}
}
}
# else
# ifdef HAVE_SETITIMER
/* Every second will be called the function that checks if there are
* expired connections.
*/
{
struct itimerval * expired_timer = (struct itimerval *)
malloc(sizeof(struct itimerval));
expired_timer->it_interval.tv_sec=1;
expired_timer->it_interval.tv_usec=1;
expired_timer->it_value.tv_sec=1;
expired_timer->it_value.tv_usec=1;
if ( setitimer( ITIMER_REAL, expired_timer, NULL ) == -1 ) {
sorry("main", "setitimer");
TIMER_ERR_MSG ;
}
}
# else
TIMER_ERR_MSG ;
# endif /* HAVE_SETITIMER */
# endif /* BSD stuff */
signal_setup (SIGALRM, sigalrm_callback);
#else
TIMER_ERR_MSG ;
#endif /* SIGALRM */
}
void check_expired()
/* called by sigalrm_callback or got_packet.
this is the engine to search expired connections (delete only 1) */
{
register struct CONN * prev_conn;
time_t now;
now = time(NULL);
prev_conn = first_conn;
while ( CURRENT_CONN ) {
if (now - CURRENT_CONN->lasttime > flags.timeout) {
status_switch( prev_conn, EXPIRED );
prev_conn = first_conn;
continue;
}
prev_conn = prev_conn->next;
}
}
void sigalrm_callback(int sig_type)
{
if(expired_flag == CHECK_LISTENING) {
/* we are listening to the socket
in the blocking mode now */
check_expired();
} else {
expired_flag = CHECK_GOTPACKET;
}
}
tcpick-0.2.1/src/timer.h 0000644 0001751 0001751 00000001745 10171512277 012004 0000000 0000000 /*
* timer.h -- header for timer.c
*
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004, 2005 Francesco Stablum
* Licensed under the GPL
*
*/
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
enum EXPIRED_FLAG {
CHECK_NOT,
CHECK_LISTENING,
CHECK_GOTPACKET
};
tcpick-0.2.1/src/debug.c 0000644 0001751 0001751 00000002512 10165254732 011740 0000000 0000000 /*
* debug.c -- debug functions
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*/
#include "tcpick.h"
void
print_conn_chain (struct CONN * f)
{
while (f) {
printf ("%x->",f);
if (f == f->next) {
printf ("inf\n");
return;
}
f = f->next;
}
printf("NULL\n");
return;
}
int
print_fragment_chain(struct FRAGMENT * f)
{
while (f) {
printf ("%x(%i,%i)->",f,f->off,f->len);
if (f == f->next) {
printf ("inf\n");
return 1;
}
f = f->next;
}
printf("NULL\n");
return 0;
}
tcpick-0.2.1/src/fragments.c 0000644 0001751 0001751 00000012076 10165273266 012651 0000000 0000000 /*
* fragments.c -- manages unacknowledged data
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
* Explanation of this code (fragments.c)
* ======================================
*
* The stream of data of the tcp connection will be saved on
* the file, but we know that tcp connection aren't datagram-oriented,
* but stream-oriented! This means we *must* rebuild the disordered
* flow. The problem is: we cannot store entire tcp connections in
* memory! This is simply crazy! What if somebody is downloading cd
* iso images, or dvd films! They will surely be corrupted.
* Solution: write the rebuilded part of tcp flow in the file when
* there are no missing pieces; so we will be able to store in memory
* a linked list that reorders the tcp data flow and then, when data
* are acknowledged by a "ack" packet, these data will be written to
* the output file.
*
* Phase 1:
* Picking up the packets containing data from the interface.
*
* Packets containing data fragments are stored into the linked list
* conn_ptr->unack, managed by the insfr(...) function
* These data are not yet acknowledged with the "ack"
* packet. Duplicates are discarded and the flow will be completely
* rebuilt.
*
* Phase 2:
* Acks are arriving!
*
* When a "ack" packet arrives, the function flush_ack(...) writes the
* acknowledged fragments to the output file, and deleletes them from
* the linked list.
*/
#include "tcpick.h"
#include "extern.h"
#define MATCH_OFF(fr, oth) fr->off + fr->len == oth->off
#define ATTACH_FR(prev, this){ \
\
this->next = prev->next; \
prev->next = this; \
\
if (MATCH_OFF(this, prev->next)) \
this->flag = CONTINUE; \
else \
this->flag = BREAK; \
}
#define FREE_FR(fr) S_free( fr->payload ); S_free( fr );
#define DELETE_FIRST_FR(list) { \
struct FRAGMENT * tmp; \
tmp = * list; \
* list = ( * list )->next; \
FREE_FR (tmp) \
}
__inline__ int
addfr( struct FRAGMENT ** first,
int wlen,
u_int32_t data_off,
u_char * payload,
int payload_len )
/* called by established_packet().
* Insert and reorder data fragments in a linked-list.
* Duplicates are discarded.
*
* return values:
* 0: fragment refused
* 1: fragment accepted in the linked-list
*/
{
struct FRAGMENT * new;
struct FRAGMENT * curr;
if ( data_off >= wlen ) {
/* allocate and build the fragment */
new = ( struct FRAGMENT * ) S_calloc ( 1, sizeof( struct FRAGMENT ));
new->payload = ( u_char * ) S_calloc( 1, payload_len );
new->off = data_off;
memcpy( new->payload, payload, payload_len );
new->len = payload_len;
/* now insert the fragment in the flagged linked list */
/* linked list was empty */
if (! * first ) {
* first = new;
(* first)->next = NULL;
return 1;
}
/* replace first */
if ( (* first)->off > new->off) {
new->next = * first;
* first = new;
return 1;
}
curr = * first;
while ( curr ) {
if( curr->flag == BREAK &&
MATCH_OFF(curr, new) ) {
/* the new data fragment is exactly next to curr */
ATTACH_FR( curr, new );
return 1;
}
else if ( curr->next ) {
if( curr->next->off > new->off ) {
/* the new data fragment is _not_ exactly next to curr,
but it must be there because the next
fragment has a bigger offset */
ATTACH_FR( curr, new );
return 1;
}
} else {
/* it is the last */
curr->next = new;
return 1;
}
curr = curr->next;
}
return 0;
}
}
__inline__ int
flush_ack ( struct HOST_DESC * desc,
struct CONN * conn_ptr,
int ack_num )
/* called by established_packet
* when a "ack" packet comes to the network device,
* data that are unacknowledged will be acknowledged and immediatly
* sent to the write engine wrebuild
*/
{
#define LIST (desc->unack)
while( LIST &&
LIST->off <= ack_num ) {
flowflush( conn_ptr, desc->oth, LIST->payload, LIST->len );
debug("wrote off=%i wlen=%i len=%i ack=%i\n",
LIST->off, desc->wlen, LIST->len, ack_num);
desc->wlen += LIST->len;
DELETE_FIRST_FR ( & LIST );
}
}
tcpick-0.2.1/src/conn.h 0000644 0001751 0001751 00000003341 10165254732 011615 0000000 0000000 /*
* conn.h -- enums and structs that describe a connection:
* enum PART, struct CONN, struct HOST_DESC and enum STATUS
*
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
enum PART
/* enum PART describes the side of a connection */
{
NOTHING = 0,
CLIENT,
SERVER,
BOTH
};
struct HOST_DESC {
/* HOST_DESC describes the client or server part of a tcp session */
u_int16_t port;
struct in_addr ip;
u_int32_t sip;
/* why have I called them SIP and not SIN?
well, SIP means Sequence Initial Pointer
that is exactly the SIN plus one
*/
FILE * file; /* NULL means closed */
char * filename;
char * lockfilename;
enum PART side;
int wlen;
struct FRAGMENT * unack;
struct HOST_DESC * oth;
};
enum STATUS {
/* STATUS describes the status of a tcp session */
NIHL = 0,
SYN_SENT,
SYN_RECEIVED,
ESTABLISHED,
FIN_WAIT_1,
FIN_WAIT_2__CLOSE_WAIT,
TIME_WAIT__LAST_ACK,
LAST_ACK,
CLOSED,
RESET,
EXPIRED
};
struct CONN
/* the struct CONN describes a tcp connection */
{
enum STATUS status;
FILE *both_file; /* FIXME: wtf??? */
int closer; /* when a connection is int open state this must be set to 0
when the client has sent the closing FIN, then closer=1
when it is the server closer=2
*/
int num; /* the number of this connection (useful for
calculate the color tracked)
*/
struct HOST_DESC client;
struct HOST_DESC server;
struct CONN * next; /* pointer for the next ring of the chain */
time_t lasttime; /* time of last packet in connection */
};
struct ip * ip_last_header; /* FIXME: check */
struct tcphdr * tcp_last_header;
tcpick-0.2.1/src/ip.h 0000644 0001751 0001751 00000017732 10165254732 011301 0000000 0000000 /* Copyright (C) 1991,92,93,95,96,97,98,99,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/*
* WARNING: THIS VERSION OF netinet/ip.h HAS BEEN MODIFIED BY DUSKDRUID
* run a "diff" to see differences
*/
// #include <-- should I uncomment this???
#ifndef __NETINET_IP_H
#define __NETINET_IP_H 1
#include
#include
#include
__BEGIN_DECLS
struct timestamp
{
u_int8_t len;
u_int8_t ptr;
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int flags:4;
unsigned int overflow:4;
#elif __BYTE_ORDER == __BIG_ENDIAN
unsigned int overflow:4;
unsigned int flags:4;
#else
# error "Please fix "
#endif
u_int32_t data[9];
};
struct iphdr
{
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int ihl:4;
unsigned int version:4;
#elif __BYTE_ORDER == __BIG_ENDIAN
unsigned int version:4;
unsigned int ihl:4;
#else
# error "Please fix "
#endif
u_int8_t tos;
u_int16_t tot_len;
u_int16_t id;
u_int16_t frag_off;
u_int8_t ttl;
u_int8_t protocol;
u_int16_t check;
u_int32_t saddr;
u_int32_t daddr;
/*The options start here. */
};
#ifdef __USE_BSD
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)ip.h 8.1 (Berkeley) 6/10/93
*/
/*
* Definitions for internet protocol version 4.
* Per RFC 791, September 1981.
*/
/*
* Structure of an internet header, naked of options.
*/
struct ip
{
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int ip_hl:4; /* header length */
unsigned int ip_v:4; /* version */
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int ip_v:4; /* version */
unsigned int ip_hl:4; /* header length */
#endif
u_int8_t ip_tos; /* type of service */
u_short ip_len; /* total length */
u_short ip_id; /* identification */
u_short ip_off; /* fragment offset field */
#define IP_RF 0x8000 /* reserved fragment flag */
#define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
u_int8_t ip_ttl; /* time to live */
u_int8_t ip_p; /* protocol */
u_short ip_sum; /* checksum */
struct in_addr ip_src, ip_dst; /* source and dest address */
};
/*
* Time stamp option structure.
*/
struct ip_timestamp
{
u_int8_t ipt_code; /* IPOPT_TS */
u_int8_t ipt_len; /* size of structure (variable) */
u_int8_t ipt_ptr; /* index of current entry */
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int ipt_flg:4; /* flags, see below */
unsigned int ipt_oflw:4; /* overflow counter */
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned int ipt_oflw:4; /* overflow counter */
unsigned int ipt_flg:4; /* flags, see below */
#endif
u_int32_t data[9];
};
#endif /* __USE_BSD */
#define IPVERSION 4 /* IP version number */
#define IP_MAXPACKET 65535 /* maximum packet size */
/*
* Definitions for IP type of service (ip_tos)
*/
#define IPTOS_TOS_MASK 0x1E
#define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK)
#define IPTOS_LOWDELAY 0x10
#define IPTOS_THROUGHPUT 0x08
#define IPTOS_RELIABILITY 0x04
#define IPTOS_LOWCOST 0x02
#define IPTOS_MINCOST IPTOS_LOWCOST
/*
* Definitions for IP precedence (also in ip_tos) (hopefully unused)
*/
#define IPTOS_PREC_MASK 0xe0
#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK)
#define IPTOS_PREC_NETCONTROL 0xe0
#define IPTOS_PREC_INTERNETCONTROL 0xc0
#define IPTOS_PREC_CRITIC_ECP 0xa0
#define IPTOS_PREC_FLASHOVERRIDE 0x80
#define IPTOS_PREC_FLASH 0x60
#define IPTOS_PREC_IMMEDIATE 0x40
#define IPTOS_PREC_PRIORITY 0x20
#define IPTOS_PREC_ROUTINE 0x00
/*
* Definitions for options.
*/
#define IPOPT_COPY 0x80
#define IPOPT_CLASS_MASK 0x60
#define IPOPT_NUMBER_MASK 0x1f
#define IPOPT_COPIED(o) ((o) & IPOPT_COPY)
#define IPOPT_CLASS(o) ((o) & IPOPT_CLASS_MASK)
#define IPOPT_NUMBER(o) ((o) & IPOPT_NUMBER_MASK)
#define IPOPT_CONTROL 0x00
#define IPOPT_RESERVED1 0x20
#define IPOPT_DEBMEAS 0x40
#define IPOPT_MEASUREMENT IPOPT_DEBMEAS
#define IPOPT_RESERVED2 0x60
#define IPOPT_EOL 0 /* end of option list */
#define IPOPT_END IPOPT_EOL
#define IPOPT_NOP 1 /* no operation */
#define IPOPT_NOOP IPOPT_NOP
#define IPOPT_RR 7 /* record packet route */
#define IPOPT_TS 68 /* timestamp */
#define IPOPT_TIMESTAMP IPOPT_TS
#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
#define IPOPT_SEC IPOPT_SECURITY
#define IPOPT_LSRR 131 /* loose source route */
#define IPOPT_SATID 136 /* satnet id */
#define IPOPT_SID IPOPT_SATID
#define IPOPT_SSRR 137 /* strict source route */
#define IPOPT_RA 148 /* router alert */
/*
* Offsets to fields in options other than EOL and NOP.
*/
#define IPOPT_OPTVAL 0 /* option ID */
#define IPOPT_OLEN 1 /* option length */
#define IPOPT_OFFSET 2 /* offset within option */
#define IPOPT_MINOFF 4 /* min value of above */
#define MAX_IPOPTLEN 40
/* flag bits for ipt_flg */
#define IPOPT_TS_TSONLY 0 /* timestamps only */
#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
#define IPOPT_TS_PRESPEC 3 /* specified modules only */
/* bits for security (not byte swapped) */
#define IPOPT_SECUR_UNCLASS 0x0000
#define IPOPT_SECUR_CONFID 0xf135
#define IPOPT_SECUR_EFTO 0x789a
#define IPOPT_SECUR_MMMM 0xbc4d
#define IPOPT_SECUR_RESTR 0xaf13
#define IPOPT_SECUR_SECRET 0xd788
#define IPOPT_SECUR_TOPSECRET 0x6bc5
/*
* Internet implementation parameters.
*/
#define MAXTTL 255 /* maximum time to live (seconds) */
#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
#define IPFRAGTTL 60 /* time to live for frags, slowhz */
#define IPTTLDEC 1 /* subtracted when forwarding */
#define IP_MSS 576 /* default maximum segment size */
__END_DECLS
#endif /* netinet/ip.h */
tcpick-0.2.1/src/tcp.h 0000644 0001751 0001751 00000005163 10165254732 011452 0000000 0000000 /*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)tcp.h 8.1 (Berkeley) 6/10/93
*
*/
/* Modified by Francesco Stablum (duskdruid:despammed.com) */
// #include <-- should I decomment this???
struct tcphdr
{
u_int16_t source;
u_int16_t dest;
u_int32_t seq;
u_int32_t ack_seq;
# if __BYTE_ORDER == __LITTLE_ENDIAN
u_int16_t res1:4;
u_int16_t doff:4;
u_int16_t fin:1;
u_int16_t syn:1;
u_int16_t rst:1;
u_int16_t psh:1;
u_int16_t ack:1;
u_int16_t urg:1;
u_int16_t res2:2;
# elif __BYTE_ORDER == __BIG_ENDIAN
u_int16_t doff:4;
u_int16_t res1:4;
u_int16_t res2:2;
u_int16_t urg:1;
u_int16_t ack:1;
u_int16_t psh:1;
u_int16_t rst:1;
u_int16_t syn:1;
u_int16_t fin:1;
# else
# error "Adjust your defines"
# endif
u_int16_t window;
u_int16_t check;
u_int16_t urg_ptr;
};
enum
{
TCP_ESTABLISHED = 1,
TCP_SYN_SENT,
TCP_SYN_RECV,
TCP_FIN_WAIT1,
TCP_FIN_WAIT2,
TCP_TIME_WAIT,
TCP_CLOSE,
TCP_CLOSE_WAIT,
TCP_LAST_ACK,
TCP_LISTEN,
TCP_CLOSING /* now a valid state */
};
tcpick-0.2.1/src/udp.h 0000644 0001751 0001751 00000005416 10165254732 011455 0000000 0000000 /* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/*
* Copyright (C) 1982, 1986 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
/* Modified by Francesco Stablum (duskdruid:despammed.com) */
#ifndef __NETINET_UDP_H
#define __NETINET_UDP_H 1
/* UDP header as specified by RFC 768, August 1980. */
struct udphdr {
u_int16_t source;
u_int16_t dest;
u_int16_t len;
u_int16_t check;
};
#endif
#define SOL_UDP 17 /* sockopt level for UDP */
#endif /* netinet/udp.h */
tcpick-0.2.1/src/tcpick.h 0000644 0001751 0001751 00000003431 10171512260 012123 0000000 0000000 /*
* tcpick.h -- main header
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
#include "config.h"
#include
#include
#include
#ifdef HAVE_SIGNAL_H
# include
#endif
#ifdef HAVE_SYS_TYPES_H
# include
#endif
#ifdef HAVE_STRING_H
# include
#endif
#ifdef HAVE_STDARG_H
# include
#endif
#ifdef HAVE_ERRNO_H
# include
#endif
#ifdef HAVE_GETOPT_H
# include
#endif
#ifdef HAVE_SYS_SOCKET_H
# include
#endif
#ifdef HAVE_NETINET_IN_H
# include
#endif
#ifdef HAVE_ARPA_INET_H
# include
#endif
#ifdef HAVE_NET_IF_H
# include
#endif
#ifdef HAVE_NET_BPF_H
# include
#else
# ifdef HAVE_PCAP_BPF_H
# include
# endif /* HAVE_PCAP_BPF_H */
#endif /* HAVE_NET_BPF_H */
#ifdef HAVE_NETINET_IN_SYSTM_H
#include
#endif
#ifdef HAVE_NETINET_IF_ETHER_H
# include
#endif
#ifdef HAVE_NETINET_IP_H
# include
#else
# include "ip.h"
#endif /* HAVE_NETINET_IP_H */
#ifdef HAVE_NETINET_UDP_H
# include
#else
# include "udp.h"
#endif /* HAVE_NETINET_UDP_H */
#include
#ifdef HAVE_PCAP_PCAP_H
# include
#else
# ifdef HAVE_PCAP_H
# include
# endif /* HAVE_PCAP_H */
#endif /* HAVE_PCAP_PCAP_H */
#ifdef HAVE_TIME_H
# include
#endif
#ifdef HAVE_SYS_TIME_H
# include
#endif
#ifdef HAVE_SYS_STAT_H
# include
#endif
#include "def.h"
#include "tcp.h"
#include "fragment.h"
#include "conn.h"
#include "text.h"
#include "colors.h"
#include "flags.h"
#include "lookup.h"
#include "timer.h"
tcpick-0.2.1/src/flags.h 0000644 0001751 0001751 00000003765 10172501520 011752 0000000 0000000 /*
* flags.h -- the struct for the command-line flags of the program
*
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* Copyright (C) 2003, 2004 Francesco Stablum (duskdruid)
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*/
enum FLAVOUR {
RAW = 'R',
PRINTABLE = 'P',
HEX = 'H',
HEX_NON_PRINT = 'U',
HEX_DUMP = 'x',
HEX_ASCII_DUMP = 'X' ,
SILENT = 's',
OTHER /* i.e. packet and status banners */
};
enum DISPLAYTIME {
NOTHING_TIME = 0, /* default */
ONLYTIME,
TIMEDATE,
ONLYDATE /* not implemented */
};
struct FLAGS {
int verbosity;
int file;
int filenaming;
int dirs;
int maxconns; /* FIXME: should be developed;
in the sense of SYN_SENT ?? */
int trackonly;
int trackonly_first;
int exitpackets;
int exitclosed;
int exitclosed_first;
enum DISPLAYTIME displaytime;
int header;
int separator;
int displayoffsets;
int notpromisc;
int notstatus;
enum FLAVOUR display_payload;
struct {
enum FLAVOUR flavour;
enum PART side;
} display_rebuild;
struct {
enum FLAVOUR flavour;
enum {SEPARATE = 0, UNIQUE} type;
int banner;
enum PART side;
} writer;
int helpandquit;
int versionandquit;
int lookup;
int numericalports;
int color;
int colortrack;
int timeout;
};
tcpick-0.2.1/src/fragment.h 0000644 0001751 0001751 00000000653 10165254732 012466 0000000 0000000 /*
* fragment.h -- the fragment_t linked-list:
* used to store unacknowledged data
*
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
enum fr_flag {
BREAK = 0,
CONTINUE,
};
struct FRAGMENT
{
int off;
u_char * payload;
int len;
enum fr_flag flag;
struct FRAGMENT * next;
};
tcpick-0.2.1/src/globals.h 0000644 0001751 0001751 00000001705 10171512342 012274 0000000 0000000 /*
* globals.h -- global variables
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
struct ip *ippacket;
struct tcphdr *tcppacket;
struct udphdr *udppacket;
u_char *payload;
int payload_len = 0;
struct FLAGS flags;
int count_packets = 0;
int count_conns; /* number of active connections */
int count_opened;
char *dl_str = NULL;
char *dev = NULL; /* name of the device to use */
char *readfile = NULL; /* name of the file to read */
char *net = NULL; /* dot notation of the network address */
char *mask = NULL; /* dot notation of the network mask */
char *filter = NULL;
int ret = 0; /* return code*/
int datalink_id = 0; /* datalink id */
int iplen = 0;
int datalink_size = 0;
int ip_size = 0;
int tcp_size = 0;
struct CONN * first_conn;
struct CONN * last_conn;
enum EXPIRED_FLAG expired_flag;
tcpick-0.2.1/src/extern.h 0000644 0001751 0001751 00000001416 10171512351 012155 0000000 0000000 /*
* extern.h -- external variables
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/* FIXME: it seems written by a ogre */
extern struct ip *ippacket;
extern struct tcphdr *tcppacket;
extern struct udphdr *udppacket;
extern u_char *payload;
extern int payload_len;
extern struct FLAGS flags;
extern int count_packets;
extern int count_conns;
extern int count_opened;
extern char * dev;
extern char * readfile;
extern char * filter;
extern int iplen;
extern int datalink_size;
extern int ip_size;
extern int tcp_size;
/* extern int data_trasl; */
extern struct CONN * first_conn;
extern struct CONN * last_conn;
extern enum EXPIRED_FLAG expired_flag;
tcpick-0.2.1/src/text.h 0000644 0001751 0001751 00000004432 10165254732 011646 0000000 0000000 /*
* text.h -- text definitions
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
#define AUTHOR "Francesco Stablum `duskdruid' < "PACKAGE_BUGREPORT">"
#define EXAMPLEARGS "-i ppp0 -yP -C -h \"not port 22\""
#define TERMS \
" tcpick is released under the GPL license\n" \
" and comes with ABSOLUTELY NO WARRANTY.\n" \
" This is free software, and you are welcome to redistribute it\n" \
" under certain conditions; for details read COPYING file.\n"
#define OPTIONS \
"tcpick [ -a ] [ -n ] [ -C ] \n"\
" [ -i interface ] \n"\
" [ -yH ] [ -yP ] [ -yR ] [ -yU ] [ -yx ] [ -yX ] \n"\
" [ -bH ] [ -bP ] [ -bR ] [ -bU ] [ -bx ] [ -bX ] \n"\
" [ -wH ] [ -wP ] [ -wR ] [ -wU ] \n"\
" [ -v [ verbosity ]] \n"\
" [ -S ] [ -h ] [ --separator ] \n"\
" [ \"filter\" ] [ -r file ] \n"\
" [ --help ] [ --version ] \n"
#define MAILING_LIST \
"mailing-list address:\n" \
"\t\n" \
"Archive:\n" \
"\thttp://sourceforge.net/mailarchive/forum.php?forum=tcpick-project\n" \
"Subscribe:\n" \
"\thttp://lists.sourceforge.net/lists/listinfo/tcpick-project\n" \
#define BUGREPORT \
"Please send bugreports and patches to the following mailing-list:\n" \
MAILING_LIST \
"don't forget to specify OS, kernel version and tcpick version!\n"
#define USAGE \
"\t" PACKAGE_STRING " is a sniffer tool written using libpcap.\n" \
"tcpick can keep track of tcp connection, sniff all tcp streams\n" \
"and store them to files, to show you what is happening on a network interface\n\n" \
"Usage: " OPTIONS \
"Example: tcpick " EXAMPLEARGS "\n\n" \
"for an updated list of options see tcpick(1) manpage\n" \
"to see version and license informations try `tcpick --version'\n" \
"or read the `COPYING' file, released with the package\n\n" \
"tcpick homepage: http://tcpick.sourceforge.net\n\n" \
MAILING_LIST \
"thank you for using tcpick!\n"
tcpick-0.2.1/src/colors.h 0000644 0001751 0001751 00000003474 10165254732 012170 0000000 0000000 /*
* colors.h -- color codes definitions
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
#define RESET 0
#define BRIGHT 1
#define DIM 2
#define UNDERLINE 3
#define BLINK 4
#define REVERSE 7
#define HIDDEN 8
/* black and white should NOT be used because of
black or white backgrounds of terminals */
//#define BLACK 0
#define RED 1
#define GREEN 2
#define YELLOW 3
#define BLUE 4
#define MAGENTA 5
#define CYAN 6
//#define WHITE 7
#define _STATUS_COLOR(s) BRIGHT, s == ESTABLISHED ? GREEN : \
s == CLOSED ? RED : \
s == RESET ? RED : \
s == EXPIRED ? BLUE : \
YELLOW
#define c_WELCOME BRIGHT, CYAN
#define c_COMPILED BRIGHT, RED
#define c_INTERFACE BRIGHT, GREEN
#define c_SETTING BRIGHT, MAGENTA
#define c_DONE BRIGHT, MAGENTA
#define c_USAGE BRIGHT, BLUE
#define c_ERR BRIGHT, RED
#define c_NUMBERING BRIGHT, MAGENTA
#define c_CLIENTNAME_STATUS BRIGHT, GREEN
#define c_SERVERNAME_STATUS BRIGHT, CYAN
#define c_SERVICE BRIGHT, BLUE
#define c_TIME BRIGHT, CYAN
#define c_CLIENTNAME_HEADER BRIGHT, GREEN
#define c_SERVERNAME_HEADER RESET , CYAN
#define c_SERVICE_HEADER BRIGHT, BLUE
#define c_HEXOFF BRIGHT, CYAN
#define c_HEXOFF0 BRIGHT, BLUE
#define c_NONPRINT RESET, RED
#define c_FLAGS BRIGHT, RED
#define c_DIRECTION BRIGHT, MAGENTA
#define c_SEPARATOR RESET, GREEN
#define c_STATISTICS BRIGHT, CYAN
tcpick-0.2.1/src/def.h 0000644 0001751 0001751 00000002567 10165272357 011432 0000000 0000000 /*
* def.h -- definitions
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/* Do you wanna debug tcpick? Oh, thank you very much :^)
* Uncomment the following line to add
* _really_ noisy debug messages
*/
//#define TCPICK_DEBUG 1
#define TCPICK_NAME "tcpick"
#define MAX_FILENAME_LENGHT 512
#define MAXCONN 16384
#define MAXMALLOC 16777216
#define S_calloc calloc
#define S_malloc malloc
#define S_free free
#define SEPARATOR "----------------"
#define REBUILD \
( ( flags.display_rebuild.flavour != SILENT ) || \
( flags.writer.flavour != SILENT ) )
/* FIXME: mumble mumble */
#define DISPLAY_NL \
( (( flags.header ) || ( flags.separator ) || (! flags.notpromisc )) && ( out == stdout ) ) /* lisp? */
#define TCPICK_SUCCESS EXIT_SUCCESS
#define TCPICK_FAILURE EXIT_FAILURE
#define SILENCE (flags.verbosity == 0) /* FIXME MAY WRONG!! */
#define WRITE_SOME_BANNER ((flags.writer.flavour == OTHER) || (flags.writer.headers == 1) || (flags.writer.headers == 1))
#define WFLAV (flags.writer.flavour)
#define ERR_FLAV(c) \
err( "Unrecognized option: %c\n", c );
#ifndef MAX
# define MAX(x,y) (((x)>(y))?(x):(y))
#endif
#ifndef TCPICK_DEBUG
# define debug(fmt, ...) /* see msg.c for #ifdef TCPICK_DEBUG */
#endif /* TCPICK_DEBUG */
#define IP_SIZE 20
tcpick-0.2.1/src/lookup.h 0000644 0001751 0001751 00000002216 10165254732 012171 0000000 0000000 /*
* lookup.h -- header of host lookup engine
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at you option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*/
struct _l_node /* the node/leaf of the tree */
{
/* tree stuff */
struct _l_node * parent;
struct _l_node * left;
char left_h;
struct _l_node * right;
char right_h;
/* data */
char * name;
struct in_addr ip;
};
tcpick-0.2.1/src/quit.c 0000644 0001751 0001751 00000004104 10173174553 011634 0000000 0000000 /*
* quit.c -- code for program exiting
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "tcpick.h"
#include "extern.h"
void
fault( char * func, char * desc )
/* function for error exiting by an
_external_ problem (calls perror) */
{
char * msg;
char len;
err( BUGREPORT );
color( c_ERR, stderr, "FAULT:\t" );
len = strlen(func) + strlen(desc) + 16;
msg = S_malloc( len );
sprintf( msg, "[%s] %s", func, desc );
perror( msg );
exit(TCPICK_FAILURE);
}
void
suicide( char * func, char * fmt, ... )
/* called for internal problems,
or user errors */
{
va_list list;
color( c_ERR, stderr, "SUICIDE: " );
fprintf( stderr, "[%s] ", func );
va_start (list, fmt);
vfprintf (stderr, fmt, list);
va_end (list);
fprintf (stderr, "\n");
exit(TCPICK_FAILURE);
}
void
print_statistics()
{
msg( 1, c_STATISTICS, "\n%d packets captured", count_packets);
msg( 1, c_STATISTICS, "%d tcp sessions detected", count_conns);
}
void
cleanup()
/* cleanup function called by exit() for normal
process termination (set by atexit) */
{
print_statistics();
}
void
exit_signal(int sig_type)
{
debug("Signal type: %s", sys_siglist[sig_type]);
#ifdef HAVE_ATEXIT
exit (EXIT_SUCCESS);
#else
print_statistics()
exit (EXIT_SUCCESS);
#endif
}
tcpick-0.2.1/src/msg.c 0000644 0001751 0001751 00000004267 10173175323 011446 0000000 0000000 /*
* exit.c -- code for program exiting
* Part of the tcpick project
*
* Author: Francesco Stablum
*
* Copyright (C) 2003, 2004 Francesco Stablum
* Licensed under the GPL
*
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "tcpick.h"
#include "extern.h"
#ifdef TCPICK_DEBUG
void
debug( char *fmt, ... )
/* this function has been provided by ShackaN
thank you very much :-) */
{
va_list list;
printf ("debug: ");
va_start (list, fmt);
vprintf (fmt, list);
va_end (list);
printf ("\n");
}
#else
# define debug(fmt, ...)
#endif /* TCPICK_DEBUG */
void
err( char *fmt, ... )
{
va_list list;
color( c_ERR, stderr, "ERROR: " );
va_start( list, fmt );
vfprintf( stderr, fmt, list );
va_end ( list );
fprintf ( stderr, "\n" );
}
void
msg( int v, int attr, int fg, char *fmt, ... )
{
va_list list;
if( flags.verbosity < v )
return;
if( flags.color )
textcolor ( stdout, attr, fg, GREEN );
va_start ( list, fmt );
vfprintf ( stdout, fmt, list );
va_end ( list );
if( flags.color )
resetcolor( stdout );
fprintf( stdout, "\n" );
}
void
sorry ( char * func, char * desc )
/* function for error by an
_external_ problem (calls perror)
this is like fault(..) but doesn't exit.
The sorry() function is used for light problems
that don't compromise program execution.
*/
{
char * msg;
char len;
color( c_ERR, stderr, "SORRY:\t" );
len = strlen(func) + strlen(desc) + 16;
msg = S_malloc( len );
sprintf( msg, "[%s] %s", func, desc );
perror( msg );
free(msg);
}
tcpick-0.2.1/README 0000644 0001751 0001751 00000005105 10173301003 010557 0000000 0000000 This is README, produced by makeinfo version 4.7 from README.texinfo.
tcpick is a textmode sniffer libpcap-based that can track tcp streams
and saves the captured data in files or displays them in the terminal.
Useful for picking files in a passive way. It can store all
connections data in different files, or it can display all the stream
on the terminal, when the connection is closed. There are useful
display modes like hexdump, hexdump + ascii, only printable
charachters, raw mode and so on. Available a color mode too, helpful to
read better the output of the program. Actually it can handle eth and
ppp interfaces. It is useful to keep track of what users of a network
are doing, and is usable with textmode tools like grep, sed, awk.
For example, this command displays all HTTP GET requests:
# tcpick -i ppp0 -yP | grep GET
Please read the manpage for further details.
home page
*********
http://tcpick.sourceforge.net
other files to read:
********************
* AUTHORS
* OPTIONS
* KNOWN-BUGS
* INSTALL
* TODO
* ChangeLog
* COPYING
* public_key.asc (key to check package signatures)
* public_key_message.txt
contribute
**********
tcpick project needs somebody suggesting me bugs and new features! If
you want to contribute sending patches, finding bugs, compilation
errors, platform-specific incompatibilies you are invited to the tcpick
mailing-list:
* email address
tcpick-project@lists.sourceforge.net
* Archive
http://sourceforge.net/mailarchive/forum.php?forum=tcpick-project
* Subscribe
http://lists.sourceforge.net/lists/listinfo/tcpick-project
I'm sorry for my bad english
thanks
Francesco Stablum "duskdruid"
Little disclaimer and license:
******************************
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
For other details on GNU/GPL license read COPYING file
Copyright (C) 2003, 2004 Francesco Stablum "duskdruid"
tcpick-0.2.1/configure.in 0000644 0001751 0001751 00000002772 10173300563 012231 0000000 0000000 # -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
BUILD_N=1
define([__VERSION], [0.2.1])
# if -test comment download.inc generation on package.sh
AC_PREREQ(2.59)
AC_INIT([tcpick],[__VERSION],[duskdruid@despammed.com ])
AM_INIT_AUTOMAKE(tcpick, [__VERSION])
# AM_CONFIG_HEADER([src/config.h])
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
define([__LPCAP_ERROR], [Latest libpcap libraries required; see INSTALL doc for more info])
AC_CHECK_LIB([pcap], pcap_loop,,
AC_MSG_ERROR([__LPCAP_ERROR]))
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in_systm.h netinet/udp.h netinet/in.h sys/socket.h getopt.h pcap.h pcap/pcap.h time.h sys/time.h errno.h stdarg.h signal.h])
AC_CHECK_HEADERS([netinet/ip.h net/if.h netinet/if_ether.h], [], [],
[#if HAVE_SYS_TYPES_H
# include
# endif
#if HAVE_NETINET_IN_H
# include
# endif
#if HAVE_NETINET_IN_SYSTM_H
# include
# endif
])
# Checks for library functions.
AC_CHECK_FUNCS([ gethostbyaddr getservbyport gettimeofday inet_ntoa strdup strndup strtol getopt getopt_long asctime atoi getuid isascii isgraph iscntrl vfprintf localtime vprintf setuid perror signal setitimer strftime time unlink mkdir atexit _exit])
AC_CONFIG_HEADERS(src/config.h)
AC_CONFIG_FILES(Makefile src/Makefile)
AC_OUTPUT
tcpick-0.2.1/aclocal.m4 0000644 0001751 0001751 00000113143 10173301007 011545 0000000 0000000 # generated automatically by aclocal 1.9.4 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# -*- Autoconf -*-
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
# Generated from amversion.in; do not edit by hand.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.9.4])])
# AM_AUX_DIR_EXPAND
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 6
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])
AC_SUBST([$1_FALSE])
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
# serial 7 -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#serial 2
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# So let's grep whole file.
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Do all the work for Automake. -*- Autoconf -*-
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 11
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.58])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$1 | $1:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# -*- Autoconf -*-
# Copyright (C) 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 1
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo done
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote="\""
_am_result=BSD
fi
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# AM_PROG_MKDIR_P
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077).
# This was a mistake. There are at least two reasons why we must not
# use `-m 0755':
# - it causes special bits like SGID to be ignored,
# - it may be too restrictive (some setups expect 775 directories).
#
# Do not use -m 0755 and let people choose whatever they expect by
# setting umask.
#
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
# Some implementations (such as Solaris 8's) are not thread-safe: if a
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
# concurrently, both version can detect that a/ is missing, but only
# one can create it and the other will error out. Consequently we
# restrict ourselves to GNU make (using the --version option ensures
# this.)
AC_DEFUN([AM_PROG_MKDIR_P],
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# We used to keeping the `.' as first argument, in order to
# allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
# where $(somedir) is conditionally defined. However this is wrong
# for two reasons:
# 1. if the package is installed by a user who cannot write `.'
# make install will fail,
# 2. the above comment should most certainly read
# $(mkdir_p) $(DESTDIR)$(somedir)
# so it does not work when $(somedir) is undefined and
# $(DESTDIR) is not.
# To support the latter case, we have to write
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
# so the `.' trick is pointless.
mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
for d in ./-p ./--version;
do
test -d $d && rmdir $d
done
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
if test -f "$ac_aux_dir/mkinstalldirs"; then
mkdir_p='$(mkinstalldirs)'
else
mkdir_p='$(install_sh) -d'
fi
fi
AC_SUBST([mkdir_p])])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
#
# Check to make sure that the build environment is sane.
#
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT(yes)])
# AM_PROG_INSTALL_STRIP
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 1
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of `v7', `ustar', or `pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
# tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility.
AM_MISSING_PROG([AMTAR], [tar])
m4_if([$1], [v7],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of `-'.
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar /dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
tcpick-0.2.1/Makefile.am 0000644 0001751 0001751 00000000675 10173202045 011750 0000000 0000000 SUBDIRS = src
man8_MANS = tcpick.8 tcpick_italian.8
EXTRA_DIST = INTERNALS INTERNALS INTERNALS.old KNOWN-BUGS tcpick.8 public_key.asc public_key_OLD.asc public_key_OLD.revoke public_key_message.txt PLATFORMS.compile PLATFORMS.running PLATFORMS.old EXAMPLES VERSION doc/*.html doc/*.texinfo Makefile.EDITME src/Makefile.EDITME src/config.h.EDITME autogen.sh README.it EXAMPLES.it tcpick_italian.8 INSTALL.it OPTIONS OPTIONS.it
nodist_DIST = NEWS
tcpick-0.2.1/Makefile.in 0000644 0001751 0001751 00000046337 10173301012 011760 0000000 0000000 # Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
ChangeLog INSTALL NEWS THANKS TODO depcomp install-sh missing \
mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
man8dir = $(mandir)/man8
am__installdirs = "$(DESTDIR)$(man8dir)"
NROFF = nroff
MANS = $(man8_MANS)
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
datadir = @datadir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUBDIRS = src
man8_MANS = tcpick.8 tcpick_italian.8
EXTRA_DIST = INTERNALS INTERNALS INTERNALS.old KNOWN-BUGS tcpick.8 public_key.asc public_key_OLD.asc public_key_OLD.revoke public_key_message.txt PLATFORMS.compile PLATFORMS.running PLATFORMS.old EXAMPLES VERSION doc/*.html doc/*.texinfo Makefile.EDITME src/Makefile.EDITME src/config.h.EDITME autogen.sh README.it EXAMPLES.it tcpick_italian.8 INSTALL.it OPTIONS OPTIONS.it
nodist_DIST = NEWS
all: all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
cd $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
uninstall-info-am:
install-man8: $(man8_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.8*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
8*) ;; \
*) ext='8' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
done
uninstall-man8:
@$(NORMAL_UNINSTALL)
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.8*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
8*) ;; \
*) ext='8' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man8dir)/$$inst"; \
done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/doc $(distdir)/src
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(MANS)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am: install-man
install-exec-am:
install-info: install-info-recursive
install-man: install-man8
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am uninstall-man
uninstall-info: uninstall-info-recursive
uninstall-man: uninstall-man8
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
check-am clean clean-generic clean-recursive ctags \
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
dist-tarZ dist-zip distcheck distclean distclean-generic \
distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-man8 install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-info-am uninstall-man uninstall-man8
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
tcpick-0.2.1/configure 0000755 0001751 0001751 00000520103 10173301013 011607 0000000 0000000 #! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for tcpick 0.2.1.
#
# Report bugs to .
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
fi
# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
for as_var in \
LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
fi
done
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
. : '\(.\)' 2>/dev/null ||
echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
/^X\/\(\/\/\)$/{ s//\1/; q; }
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" || {
# Find who we are. Look in the path if we contain no path at all
# relative or not.
case $0 in
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
{ echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
{ (exit 1); exit 1; }; }
fi
case $CONFIG_SHELL in
'')
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for as_base in sh bash ksh sh5; do
case $as_dir in
/*)
if ("$as_dir/$as_base" -c '
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
$as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
$as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
fi;;
esac
done
done
;;
esac
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
# line-number line before each line; the second 'sed' does the real
# work. The second script uses 'N' to pair each line-number line
# with the numbered line, and appends trailing '-' during
# substitution so that $LINENO is not a special case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
# second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
sed '=' <$as_myself |
sed '
N
s,$,-,
: loop
s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
t loop
s,-$,,
s,^['$as_cr_digits']*\n,,
' >$as_me.lineno &&
chmod +x $as_me.lineno ||
{ echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensible to this).
. ./$as_me.lineno
# Exit status is that of the last command.
exit
}
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;;
*c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
# We could just check for DJGPP; but this test a) works b) is more generic
# and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
if test -f conf$$.exe; then
# Don't use ln at all; we don't have any links
as_ln_s='cp -p'
else
as_ln_s='ln -s'
fi
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" $as_nl"
# CDPATH.
$as_unset CDPATH
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
exec 6>&1
#
# Initializations.
#
ac_default_prefix=/usr/local
ac_config_libobj_dir=.
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
# This variable seems obsolete. It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME='tcpick'
PACKAGE_TARNAME='tcpick'
PACKAGE_VERSION='0.2.1'
PACKAGE_STRING='tcpick 0.2.1'
PACKAGE_BUGREPORT='duskdruid@despammed.com '
# Factoring default headers for most tests.
ac_includes_default="\
#include
#if HAVE_SYS_TYPES_H
# include
#endif
#if HAVE_SYS_STAT_H
# include
#endif
#if STDC_HEADERS
# include
# include
#else
# if HAVE_STDLIB_H
# include
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include
# endif
# include
#endif
#if HAVE_STRINGS_H
# include
#endif
#if HAVE_INTTYPES_H
# include
#else
# if HAVE_STDINT_H
# include
# endif
#endif
#if HAVE_UNISTD_H
# include
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE
# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file=$ac_optarg ;;
--config-cache | -C)
cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir=$ac_optarg ;;
-disable-* | --disable-*)
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
case $ac_option in
*=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he | -h)
ac_init_help=long ;;
-help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
ac_init_help=recursive ;;
-help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
ac_init_help=short ;;
-host | --host | --hos | --ho)
ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers | -V)
ac_init_version=: ;;
-with-* | --with-*)
ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
case $ac_option in
*=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
ac_package=`echo $ac_package | sed 's/-/_/g'`
eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
-*) { echo "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; }
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid variable name: $ac_envvar" >&2
{ (exit 1); exit 1; }; }
ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
eval "$ac_envvar='$ac_optarg'"
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
echo "$as_me: WARNING: invalid host type: $ac_option" >&2
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
{ echo "$as_me: error: missing argument to $ac_option" >&2
{ (exit 1); exit 1; }; }
fi
# Be sure to have absolute paths.
for ac_var in exec_prefix prefix
do
eval ac_val=$`echo $ac_var`
case $ac_val in
[\\/$]* | ?:[\\/]* | NONE | '' ) ;;
*) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
[\\/$]* | ?:[\\/]* ) ;;
*) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias
# FIXME: To remove some day.
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
fi
ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$0" : 'X\(//\)[^/]' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$0" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
{ (exit 1); exit 1; }; }
else
{ echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
{ (exit 1); exit 1; }; }
fi
fi
(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
{ echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
{ (exit 1); exit 1; }; }
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
ac_cv_env_build_alias_set=${build_alias+set}
ac_cv_env_build_alias_value=$build_alias
ac_env_host_alias_set=${host_alias+set}
ac_env_host_alias_value=$host_alias
ac_cv_env_host_alias_set=${host_alias+set}
ac_cv_env_host_alias_value=$host_alias
ac_env_target_alias_set=${target_alias+set}
ac_env_target_alias_value=$target_alias
ac_cv_env_target_alias_set=${target_alias+set}
ac_cv_env_target_alias_value=$target_alias
ac_env_CC_set=${CC+set}
ac_env_CC_value=$CC
ac_cv_env_CC_set=${CC+set}
ac_cv_env_CC_value=$CC
ac_env_CFLAGS_set=${CFLAGS+set}
ac_env_CFLAGS_value=$CFLAGS
ac_cv_env_CFLAGS_set=${CFLAGS+set}
ac_cv_env_CFLAGS_value=$CFLAGS
ac_env_LDFLAGS_set=${LDFLAGS+set}
ac_env_LDFLAGS_value=$LDFLAGS
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
ac_cv_env_LDFLAGS_value=$LDFLAGS
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_env_CPPFLAGS_value=$CPPFLAGS
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures tcpick 0.2.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print \`checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
_ACEOF
cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
_ACEOF
cat <<\_ACEOF
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
_ACEOF
fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of tcpick 0.2.1:";;
esac
cat <<\_ACEOF
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L if you have libraries in a
nonstandard directory
CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have
headers in a nonstandard directory
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to .
_ACEOF
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
test -d $ac_dir || continue
ac_builddir=.
if test "$ac_dir" != .; then
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
# A "../" for each directory in $ac_dir_suffix.
ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
ac_dir_suffix= ac_top_builddir=
fi
case $srcdir in
.) # No --srcdir option. We are building in place.
ac_srcdir=.
if test -z "$ac_top_builddir"; then
ac_top_srcdir=.
else
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
fi ;;
[\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir ;;
*) # Relative path.
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case `pwd` in
.) ac_abs_builddir="$ac_dir";;
*)
case "$ac_dir" in
.) ac_abs_builddir=`pwd`;;
[\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
*) ac_abs_builddir=`pwd`/"$ac_dir";;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
case ${ac_top_builddir}. in
.) ac_abs_top_builddir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
*) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
case $ac_srcdir in
.) ac_abs_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
*) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
case $ac_top_srcdir in
.) ac_abs_top_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
*) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
esac;;
esac
cd $ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
if test -f $ac_srcdir/configure.gnu; then
echo
$SHELL $ac_srcdir/configure.gnu --help=recursive
elif test -f $ac_srcdir/configure; then
echo
$SHELL $ac_srcdir/configure --help=recursive
elif test -f $ac_srcdir/configure.ac ||
test -f $ac_srcdir/configure.in; then
echo
$ac_configure --help
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
cd "$ac_popdir"
done
fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
tcpick configure 0.2.1
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
exit 0
fi
exec 5>config.log
cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by tcpick $as_me 0.2.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
_ACEOF
{
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
_ASUNAME
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
echo "PATH: $as_dir"
done
} >&5
cat >&5 <<_ACEOF
## ----------- ##
## Core tests. ##
## ----------- ##
_ACEOF
# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
for ac_arg
do
case $ac_arg in
-no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
2)
ac_configure_args1="$ac_configure_args1 '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
case $ac_arg in
*=* | --config-cache | -C | -disable-* | --disable-* \
| -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
| -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
| -with-* | --with-* | -without-* | --without-* | --x)
case "$ac_configure_args0 " in
"$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
esac
;;
-* ) ac_must_keep_next=true ;;
esac
fi
ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
# Get rid of the leading space.
ac_sep=" "
;;
esac
done
done
$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
# WARNING: Be sure not to use single quotes in there, as some shells,
# such as our DU 5.0 friend, will then `close' the trap.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
## ---------------- ##
_ASBOX
echo
# The following way of writing the cache mishandles newlines in values,
{
(set) 2>&1 |
case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
*ac_space=\ *)
sed -n \
"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
;;
*)
sed -n \
"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
}
echo
cat <<\_ASBOX
## ----------------- ##
## Output variables. ##
## ----------------- ##
_ASBOX
echo
for ac_var in $ac_subst_vars
do
eval ac_val=$`echo $ac_var`
echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
if test -n "$ac_subst_files"; then
cat <<\_ASBOX
## ------------- ##
## Output files. ##
## ------------- ##
_ASBOX
echo
for ac_var in $ac_subst_files
do
eval ac_val=$`echo $ac_var`
echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
if test -s confdefs.h; then
cat <<\_ASBOX
## ----------- ##
## confdefs.h. ##
## ----------- ##
_ASBOX
echo
sed "/^$/d" confdefs.h | sort
echo
fi
test "$ac_signal" != 0 &&
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
rm -f core *.core &&
rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo >confdefs.h
# Predefined preprocessor variables.
cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
{ echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
if test -f "$cache_file"; then
{ echo "$as_me:$LINENO: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . $cache_file;;
*) . ./$cache_file;;
esac
fi
else
{ echo "$as_me:$LINENO: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
eval ac_old_val="\$ac_cv_env_${ac_var}_value"
eval ac_new_val="\$ac_env_${ac_var}_value"
case $ac_old_set,$ac_new_set in
set,)
{ echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
{ echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
{ echo "$as_me:$LINENO: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
{ echo "$as_me:$LINENO: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
*) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
{ echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
{ { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
{ (exit 1); exit 1; }; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
am__api_version="1.9"
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
elif test -f $ac_dir/shtool; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
{ { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
{ (exit 1); exit 1; }; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
# Account for people who put trailing slashes in PATH elements.
case $as_dir/ in
./ | .// | /cC/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
break 3
fi
fi
done
done
;;
esac
done
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL=$ac_install_sh
fi
fi
echo "$as_me:$LINENO: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo "$as_me:$LINENO: checking whether build environment is sane" >&5
echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
fi
rm -f conftest.file
if test "$*" != "X $srcdir/configure conftest.file" \
&& test "$*" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
{ { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" >&5
echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" >&2;}
{ (exit 1); exit 1; }; }
fi
test "$2" = conftest.file
)
then
# Ok.
:
else
{ { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
Check your system clock" >&5
echo "$as_me: error: newly created file is older than distributed files!
Check your system clock" >&2;}
{ (exit 1); exit 1; }; }
fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
test "$program_prefix" != NONE &&
program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
program_transform_name="s,\$,$program_suffix,;$program_transform_name"
# Double any \ or $. echo might interpret backslashes.
# By default was `s,x,x', remove it if useless.
cat <<\_ACEOF >conftest.sed
s/[\\$]/&&/g;s/;s,x,x,$//
_ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
{ echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# We used to keeping the `.' as first argument, in order to
# allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
# where $(somedir) is conditionally defined. However this is wrong
# for two reasons:
# 1. if the package is installed by a user who cannot write `.'
# make install will fail,
# 2. the above comment should most certainly read
# $(mkdir_p) $(DESTDIR)$(somedir)
# so it does not work when $(somedir) is undefined and
# $(DESTDIR) is not.
# To support the latter case, we have to write
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
# so the `.' trick is pointless.
mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
for d in ./-p ./--version;
do
test -d $d && rmdir $d
done
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
if test -f "$ac_aux_dir/mkinstalldirs"; then
mkdir_p='$(mkinstalldirs)'
else
mkdir_p='$(install_sh) -d'
fi
fi
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AWK+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
echo "$as_me:$LINENO: result: $AWK" >&5
echo "${ECHO_T}$AWK" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$AWK" && break
done
echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.make <<\_ACEOF
all:
@echo 'ac_maketemp="$(MAKE)"'
_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
SET_MAKE=
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
{ { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
{ (exit 1); exit 1; }; }
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
# Define the identity of the package.
PACKAGE=tcpick
VERSION=0.2.1
cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
_ACEOF
# Some tools Automake needs.
ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
install_sh=${install_sh-"$am_aux_dir/install-sh"}
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_STRIP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
echo "$as_me:$LINENO: result: $STRIP" >&5
echo "${ECHO_T}$STRIP" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
echo "${ECHO_T}$ac_ct_STRIP" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
STRIP=$ac_ct_STRIP
else
STRIP="$ac_cv_prog_STRIP"
fi
fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
# Always define AMTAR for backward compatibility.
AMTAR=${AMTAR-"${am_missing_run}tar"}
am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
# AM_CONFIG_HEADER([src/config.h])
# Checks for programs.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
CC=$ac_ct_CC
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
CC=$ac_ct_CC
else
CC="$ac_cv_prog_CC"
fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
for ac_prog in cl
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
for ac_prog in cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$ac_ct_CC" && break
done
CC=$ac_ct_CC
fi
fi
test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
echo "$as_me:$LINENO:" \
"checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5
(eval $ac_compiler --version &5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5
(eval $ac_compiler -v &5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5
(eval $ac_compiler -V &5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Find the output, starting from the most likely. This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
# resort.
# Be careful to initialize this variable, since it used to be cached.
# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
ac_cv_exeext=
# b.out is created by i960 compilers.
for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
;;
conftest.$ac_ext )
# This is the source file.
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
# FIXME: I believe we export ac_cv_exeext for Libtool,
# but it would be cool to find out if it's true. Does anybody
# maintain Libtool? --akim.
export ac_cv_exeext
break;;
* )
break;;
esac
done
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }
fi
ac_exeext=$ac_cv_exeext
echo "$as_me:$LINENO: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:$LINENO: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if { ac_try='./$ac_file'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
rm -f a.out a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6
echo "$as_me:$LINENO: checking for suffix of executables" >&5
echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
export ac_cv_exeext
break;;
* ) break;;
esac
done
else
{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest$ac_cv_exeext
echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
echo "$as_me:$LINENO: checking for suffix of object files" >&5
echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
#ifndef __GNUC__
choke me
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
if test "${ac_cv_prog_cc_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#include
#include
#include
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
char **p;
int i;
{
return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
char *s;
va_list v;
va_start (v,p);
s = g (p, va_arg (v,int));
va_end (v);
return s;
}
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
as 'x'. The following induces an error, until -std1 is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
that's true only with -std1. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
;
return 0;
}
_ACEOF
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
# Ultrix and OSF/1 -std1
# HP-UX 10.20 and later -Ae
# HP-UX older versions -Aa -D_HPUX_SOURCE
# SVR4 -Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_stdc=$ac_arg
break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
fi
case "x$ac_cv_prog_cc_stdc" in
x|xno)
echo "$as_me:$LINENO: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
*)
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
CC="$CC $ac_cv_prog_cc_stdc" ;;
esac
# Some people use a C++ compiler to compile C. Since we use `exit',
# in C++ we need to declare it. In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
# the declaration of exit, since it's the most demanding environment.
cat >conftest.$ac_ext <<_ACEOF
#ifndef __cplusplus
choke me
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
'' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_declaration
#include
int
main ()
{
exit (42);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
continue
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_declaration
int
main ()
{
exit (42);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
echo '#ifdef __cplusplus' >>confdefs.h
echo $ac_declaration >>confdefs.h
echo '#endif' >>confdefs.h
fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo done
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote="\""
_am_result=BSD
fi
fi
echo "$as_me:$LINENO: result: $_am_result" >&5
echo "${ECHO_T}$_am_result" >&6
rm -f confinc confmf
# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then
enableval="$enable_dependency_tracking"
fi;
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
AMDEP_FALSE='#'
else
AMDEP_TRUE='#'
AMDEP_FALSE=
fi
depcc="$CC" am_compiler_list=
echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_CC_dependencies_compiler_type=none
fi
fi
echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
am__fastdepCC_TRUE=
am__fastdepCC_FALSE='#'
else
am__fastdepCC_TRUE='#'
am__fastdepCC_FALSE=
fi
# Checks for libraries.
echo "$as_me:$LINENO: checking for pcap_loop in -lpcap" >&5
echo $ECHO_N "checking for pcap_loop in -lpcap... $ECHO_C" >&6
if test "${ac_cv_lib_pcap_pcap_loop+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpcap $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pcap_loop ();
int
main ()
{
pcap_loop ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_pcap_pcap_loop=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_pcap_pcap_loop=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_pcap_pcap_loop" >&5
echo "${ECHO_T}$ac_cv_lib_pcap_pcap_loop" >&6
if test $ac_cv_lib_pcap_pcap_loop = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPCAP 1
_ACEOF
LIBS="-lpcap $LIBS"
else
{ { echo "$as_me:$LINENO: error: Latest libpcap libraries required; see INSTALL doc for more info" >&5
echo "$as_me: error: Latest libpcap libraries required; see INSTALL doc for more info" >&2;}
{ (exit 1); exit 1; }; }
fi
# Checks for typedefs, structures, and compiler characteristics.
echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
/* Ultrix mips cc rejects this. */
typedef int charset[2];
const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
int x[] = {25, 17};
const int *foo = &x[0];
++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
typedef const int *iptr;
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
}
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_const=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_const=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then
cat >>confdefs.h <<\_ACEOF
#define const
_ACEOF
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer to if __STDC__ is defined, since
# exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef __STDC__
# include
#else
# include
#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
# Broken: success on invalid input.
continue
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
break
fi
done
ac_cv_prog_CPP=$CPP
fi
CPP=$ac_cv_prog_CPP
else
ac_cv_prog_CPP=$CPP
fi
echo "$as_me:$LINENO: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer to if __STDC__ is defined, since
# exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef __STDC__
# include
#else
# include
#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
# Broken: success on invalid input.
continue
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:$LINENO: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6
if test "${ac_cv_prog_egrep+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if echo a | (grep -E '(a|b)') >/dev/null 2>&1
then ac_cv_prog_egrep='grep -E'
else ac_cv_prog_egrep='egrep'
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
echo "${ECHO_T}$ac_cv_prog_egrep" >&6
EGREP=$ac_cv_prog_egrep
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#include
#include
#include
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "memchr" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "free" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
(('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
_ACEOF
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in stdlib.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## --------------------------------------- ##
## Report this to duskdruid@despammed.com ##
## --------------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_malloc_0_nonnull=no
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#if STDC_HEADERS || HAVE_STDLIB_H
# include
#else
char *malloc ();
#endif
int
main ()
{
exit (malloc (0) ? 0 : 1);
;
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_malloc_0_nonnull=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_malloc_0_nonnull=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
if test $ac_cv_func_malloc_0_nonnull = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_MALLOC 1
_ACEOF
else
cat >>confdefs.h <<\_ACEOF
#define HAVE_MALLOC 0
_ACEOF
case $LIBOBJS in
"malloc.$ac_objext" | \
*" malloc.$ac_objext" | \
"malloc.$ac_objext "* | \
*" malloc.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;;
esac
cat >>confdefs.h <<\_ACEOF
#define malloc rpl_malloc
_ACEOF
fi
echo "$as_me:$LINENO: checking for working memcmp" >&5
echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
if test "${ac_cv_func_memcmp_working+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_memcmp_working=no
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
/* Some versions of memcmp are not 8-bit clean. */
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
exit (1);
/* The Next x86 OpenStep bug shows up only when comparing 16 bytes
or more and with at least one buffer not starting on a 4-byte boundary.
William Lewis provided this test program. */
{
char foo[21];
char bar[21];
int i;
for (i = 0; i < 4; i++)
{
char *a = foo + i;
char *b = bar + i;
strcpy (a, "--------01111111");
strcpy (b, "--------10000000");
if (memcmp (a, b, 16) >= 0)
exit (1);
}
exit (0);
}
;
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_memcmp_working=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_memcmp_working=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
"memcmp.$ac_objext" | \
*" memcmp.$ac_objext" | \
"memcmp.$ac_objext "* | \
*" memcmp.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
esac
# Checks for header files.
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#include
#include
#include
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "memchr" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "free" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
(('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
_ACEOF
fi
for ac_header in arpa/inet.h netdb.h netinet/in_systm.h netinet/udp.h netinet/in.h sys/socket.h getopt.h pcap.h pcap/pcap.h time.h sys/time.h errno.h stdarg.h signal.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## --------------------------------------- ##
## Report this to duskdruid@despammed.com ##
## --------------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in netinet/ip.h net/if.h netinet/if_ether.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#if HAVE_SYS_TYPES_H
# include
# endif
#if HAVE_NETINET_IN_H
# include
# endif
#if HAVE_NETINET_IN_SYSTM_H
# include
# endif
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
# Checks for library functions.
for ac_func in gethostbyaddr getservbyport gettimeofday inet_ntoa strdup strndup strtol getopt getopt_long asctime atoi getuid isascii isgraph iscntrl vfprintf localtime vprintf setuid perror signal setitimer strftime time unlink mkdir atexit _exit
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define $ac_func to an innocuous variant, in case declares $ac_func.
For example, HP-UX 11i declares gettimeofday. */
#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != $ac_func;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
ac_config_headers="$ac_config_headers src/config.h"
ac_config_files="$ac_config_files Makefile src/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems. If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.
_ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
{
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n \
"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
} |
sed '
t clear
: clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
/^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
: end' >>confcache
if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[ ]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ ]*$//;
}'
fi
DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_i=`echo "$ac_i" |
sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
# 2. Add them.
ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
ac_cs_recheck=false
ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
fi
# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
for as_var in \
LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
fi
done
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
. : '\(.\)' 2>/dev/null ||
echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
/^X\/\(\/\/\)$/{ s//\1/; q; }
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" || {
# Find who we are. Look in the path if we contain no path at all
# relative or not.
case $0 in
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
{ { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
{ (exit 1); exit 1; }; }
fi
case $CONFIG_SHELL in
'')
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for as_base in sh bash ksh sh5; do
case $as_dir in
/*)
if ("$as_dir/$as_base" -c '
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
$as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
$as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
fi;;
esac
done
done
;;
esac
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
# line-number line before each line; the second 'sed' does the real
# work. The second script uses 'N' to pair each line-number line
# with the numbered line, and appends trailing '-' during
# substitution so that $LINENO is not a special case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
# second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
sed '=' <$as_myself |
sed '
N
s,$,-,
: loop
s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
t loop
s,-$,,
s,^['$as_cr_digits']*\n,,
' >$as_me.lineno &&
chmod +x $as_me.lineno ||
{ { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensible to this).
. ./$as_me.lineno
# Exit status is that of the last command.
exit
}
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;;
*c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
# We could just check for DJGPP; but this test a) works b) is more generic
# and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
if test -f conf$$.exe; then
# Don't use ln at all; we don't have any links
as_ln_s='cp -p'
else
as_ln_s='ln -s'
fi
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" $as_nl"
# CDPATH.
$as_unset CDPATH
exec 6>&1
# Open the log real soon, to keep \$[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. Logging --version etc. is OK.
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by tcpick $as_me 0.2.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
_CSEOF
echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
echo >&5
_ACEOF
# Files that config.status was made for.
if test -n "$ac_config_files"; then
echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
fi
if test -n "$ac_config_headers"; then
echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
fi
if test -n "$ac_config_links"; then
echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
fi
if test -n "$ac_config_commands"; then
echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi
cat >>$CONFIG_STATUS <<\_ACEOF
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
-V, --version print version number, then exit
-q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files:
$config_files
Configuration headers:
$config_headers
Configuration commands:
$config_commands
Report bugs to ."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
tcpick config.status 0.2.1
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright (C) 2003 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
INSTALL="$INSTALL"
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
# If no file are specified by the user, then we need to provide default
# value. By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
case $1 in
--*=*)
ac_option=`expr "x$1" : 'x\([^=]*\)='`
ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ac_shift=:
;;
-*)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
*) # This is not an option, so the user has probably given explicit
# arguments.
ac_option=$1
ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
{ { echo "$as_me:$LINENO: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
{ (exit 1); exit 1; }; };;
--help | --hel | -h )
echo "$ac_cs_usage"; exit 0 ;;
--debug | --d* | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
CONFIG_FILES="$CONFIG_FILES $ac_optarg"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
$ac_shift
CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
-*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
{ (exit 1); exit 1; }; } ;;
*) ac_config_targets="$ac_config_targets $1" ;;
esac
shift
done
ac_configure_extra_args=
if $ac_cs_silent; then
exec 6>/dev/null
ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
if \$ac_cs_recheck; then
echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
#
# INIT-COMMANDS section.
#
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
done
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
# simply because there is no reason to put it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
trap '{ (exit 1); exit 1; }' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
{
tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
tmp=./confstat$$-$RANDOM
(umask 077 && mkdir $tmp)
} ||
{
echo "$me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
#
# CONFIG_FILES section.
#
# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "\$CONFIG_FILES"; then
# Protect against being on the right side of a sed subst in config.status.
sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
s,@SHELL@,$SHELL,;t t
s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
s,@libexecdir@,$libexecdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
s,@localstatedir@,$localstatedir,;t t
s,@libdir@,$libdir,;t t
s,@includedir@,$includedir,;t t
s,@oldincludedir@,$oldincludedir,;t t
s,@infodir@,$infodir,;t t
s,@mandir@,$mandir,;t t
s,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
s,@DEFS@,$DEFS,;t t
s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@LIBS@,$LIBS,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@CYGPATH_W@,$CYGPATH_W,;t t
s,@PACKAGE@,$PACKAGE,;t t
s,@VERSION@,$VERSION,;t t
s,@ACLOCAL@,$ACLOCAL,;t t
s,@AUTOCONF@,$AUTOCONF,;t t
s,@AUTOMAKE@,$AUTOMAKE,;t t
s,@AUTOHEADER@,$AUTOHEADER,;t t
s,@MAKEINFO@,$MAKEINFO,;t t
s,@install_sh@,$install_sh,;t t
s,@STRIP@,$STRIP,;t t
s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
s,@mkdir_p@,$mkdir_p,;t t
s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@am__leading_dot@,$am__leading_dot,;t t
s,@AMTAR@,$AMTAR,;t t
s,@am__tar@,$am__tar,;t t
s,@am__untar@,$am__untar,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@DEPDIR@,$DEPDIR,;t t
s,@am__include@,$am__include,;t t
s,@am__quote@,$am__quote,;t t
s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_lines=48
ac_sed_frag=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_lines # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=
while $ac_more_lines; do
if test $ac_beg -gt 1; then
sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
else
sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
fi
if test ! -s $tmp/subs.frag; then
ac_more_lines=false
else
# The purpose of the label and of the branching condition is to
# speed up the sed processing (if there are no `@' at all, there
# is no need to browse any of the substitutions).
# These are the two extra sed commands mentioned above.
(echo ':t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
else
ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
fi
ac_sed_frag=`expr $ac_sed_frag + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_max_sed_lines`
fi
done
if test -z "$ac_sed_cmds"; then
ac_sed_cmds=cat
fi
fi # test -n "$CONFIG_FILES"
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
cat >$tmp/stdin
ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
# Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ if $as_mkdir_p; then
mkdir -p "$ac_dir"
else
as_dir="$ac_dir"
as_dirs=
while test ! -d "$as_dir"; do
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
done
test ! -n "$as_dirs" || mkdir $as_dirs
fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
{ (exit 1); exit 1; }; }; }
ac_builddir=.
if test "$ac_dir" != .; then
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
# A "../" for each directory in $ac_dir_suffix.
ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
ac_dir_suffix= ac_top_builddir=
fi
case $srcdir in
.) # No --srcdir option. We are building in place.
ac_srcdir=.
if test -z "$ac_top_builddir"; then
ac_top_srcdir=.
else
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
fi ;;
[\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir ;;
*) # Relative path.
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case `pwd` in
.) ac_abs_builddir="$ac_dir";;
*)
case "$ac_dir" in
.) ac_abs_builddir=`pwd`;;
[\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
*) ac_abs_builddir=`pwd`/"$ac_dir";;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
case ${ac_top_builddir}. in
.) ac_abs_top_builddir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
*) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
case $ac_srcdir in
.) ac_abs_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
*) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
case $ac_top_srcdir in
.) ac_abs_top_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
*) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
esac;;
esac
case $INSTALL in
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
if test x"$ac_file" = x-; then
configure_input=
else
configure_input="$ac_file. "
fi
configure_input=$configure_input"Generated from `echo $ac_file_in |
sed 's,.*/,,'` by configure."
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
for f in $ac_file_in; do
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo "$f";;
*) # Relative
if test -f "$f"; then
# Build tree
echo "$f"
elif test -f "$srcdir/$f"; then
# Source tree
echo "$srcdir/$f"
else
# /dev/null tree
{ { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
esac
done` || { (exit 1); exit 1; }
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@abs_srcdir@,$ac_abs_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
s,@builddir@,$ac_builddir,;t t
s,@abs_builddir@,$ac_abs_builddir,;t t
s,@top_builddir@,$ac_top_builddir,;t t
s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
rm -f $tmp/stdin
if test x"$ac_file" != x-; then
mv $tmp/out $ac_file
else
cat $tmp/out
rm -f $tmp/out
fi
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
#
# CONFIG_HEADER section.
#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
ac_dB='[ ].*$,\1#\2'
ac_dC=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'
for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
cat >$tmp/stdin
ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
for f in $ac_file_in; do
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
# Do quote $f, to prevent DOS paths from being IFS'd.
echo "$f";;
*) # Relative
if test -f "$f"; then
# Build tree
echo "$f"
elif test -f "$srcdir/$f"; then
# Source tree
echo "$srcdir/$f"
else
# /dev/null tree
{ { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
esac
done` || { (exit 1); exit 1; }
# Remove the trailing spaces.
sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
_ACEOF
# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
# config.h.in to produce config.h. The first handles `#define'
# templates, and the second `#undef' templates.
# And first: Protect against being on the right side of a sed subst in
# config.status. Protect against being in an unquoted here document
# in config.status.
rm -f conftest.defines conftest.undefs
# Using a here document instead of a string reduces the quoting nightmare.
# Putting comments in sed scripts is not portable.
#
# `end' is used to avoid that the second main sed command (meant for
# 0-ary CPP macros) applies to n-ary macro definitions.
# See the Autoconf documentation for `clear'.
cat >confdef2sed.sed <<\_ACEOF
s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
t end
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
_ACEOF
# If some macros were called several times there might be several times
# the same #defines, which is useless. Nevertheless, we may not want to
# sort them, since we want the *last* AC-DEFINE to be honored.
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >>conftest.undefs <<\_ACEOF
s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
_ACEOF
# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo ' :' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.defines >/dev/null
do
# Write a limited-size here document to $tmp/defines.sed.
echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS
# Speed up: don't consider the non `#define' lines.
echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
echo 'CEOF
sed -f $tmp/defines.sed $tmp/in >$tmp/out
rm -f $tmp/in
mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
rm -f conftest.defines
mv conftest.tail conftest.defines
done
rm -f conftest.defines
echo ' fi # grep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS
# Break up conftest.undefs because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.undefs >/dev/null
do
# Write a limited-size here document to $tmp/undefs.sed.
echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS
# Speed up: don't consider the non `#undef'
echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
sed -f $tmp/undefs.sed $tmp/in >$tmp/out
rm -f $tmp/in
mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
rm -f conftest.undefs
mv conftest.tail conftest.undefs
done
rm -f conftest.undefs
cat >>$CONFIG_STATUS <<\_ACEOF
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
if test x"$ac_file" = x-; then
echo "/* Generated by configure. */" >$tmp/config.h
else
echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
fi
cat $tmp/in >>$tmp/config.h
rm -f $tmp/in
if test x"$ac_file" != x-; then
if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
{ echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ if $as_mkdir_p; then
mkdir -p "$ac_dir"
else
as_dir="$ac_dir"
as_dirs=
while test ! -d "$as_dir"; do
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
done
test ! -n "$as_dirs" || mkdir $as_dirs
fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
{ (exit 1); exit 1; }; }; }
rm -f $ac_file
mv $tmp/config.h $ac_file
fi
else
cat $tmp/config.h
rm -f $tmp/config.h
fi
# Compute $ac_file's index in $config_headers.
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$ac_file | $ac_file:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X$ac_file : 'X\(//\)[^/]' \| \
X$ac_file : 'X\(//\)$' \| \
X$ac_file : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X$ac_file |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`/stamp-h$_am_stamp_count
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
#
# CONFIG_COMMANDS section.
#
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_dest" : 'X\(//\)[^/]' \| \
X"$ac_dest" : 'X\(//\)$' \| \
X"$ac_dest" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$ac_dest" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ if $as_mkdir_p; then
mkdir -p "$ac_dir"
else
as_dir="$ac_dir"
as_dirs=
while test ! -d "$as_dir"; do
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
done
test ! -n "$as_dirs" || mkdir $as_dirs
fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
{ (exit 1); exit 1; }; }; }
ac_builddir=.
if test "$ac_dir" != .; then
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
# A "../" for each directory in $ac_dir_suffix.
ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
ac_dir_suffix= ac_top_builddir=
fi
case $srcdir in
.) # No --srcdir option. We are building in place.
ac_srcdir=.
if test -z "$ac_top_builddir"; then
ac_top_srcdir=.
else
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
fi ;;
[\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir ;;
*) # Relative path.
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case `pwd` in
.) ac_abs_builddir="$ac_dir";;
*)
case "$ac_dir" in
.) ac_abs_builddir=`pwd`;;
[\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
*) ac_abs_builddir=`pwd`/"$ac_dir";;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
case ${ac_top_builddir}. in
.) ac_abs_top_builddir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
*) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
case $ac_srcdir in
.) ac_abs_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
*) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
case $ac_top_srcdir in
.) ac_abs_top_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
*) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
esac;;
esac
{ echo "$as_me:$LINENO: executing $ac_dest commands" >&5
echo "$as_me: executing $ac_dest commands" >&6;}
case $ac_dest in
depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# So let's grep whole file.
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
dirpart=`(dirname "$mf") 2>/dev/null ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
X"$mf" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`(dirname "$file") 2>/dev/null ||
$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$file" : 'X\(//\)[^/]' \| \
X"$file" : 'X\(//\)$' \| \
X"$file" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ if $as_mkdir_p; then
mkdir -p $dirpart/$fdir
else
as_dir=$dirpart/$fdir
as_dirs=
while test ! -d "$as_dir"; do
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
done
test ! -n "$as_dirs" || mkdir $as_dirs
fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
{ (exit 1); exit 1; }; }; }
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
;;
esac
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
{ (exit 0); exit 0; }
_ACEOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded. So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status. When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
ac_cs_success=:
ac_config_status_args=
test "$silent" = yes &&
ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null
$SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
$ac_cs_success || { (exit 1); exit 1; }
fi
tcpick-0.2.1/AUTHORS 0000644 0001751 0001751 00000007650 10173301003 010756 0000000 0000000 This is AUTHORS, produced by makeinfo version 4.7 from AUTHORS.texinfo.
Francesco Stablum duskdruid:despammed.com
*****************************************
Mantainer
Artyom Khafizov
***************
Bugfixes and memory leak fixes, added RESET and EXPIRED status
detection, added a new way to write the stream to files, using
directories.
Federico Castaneda F_CASTANEDA:crm.com.ar
*****************************************
Added basic UDP support
Buck Huppmann buckh:pobox.com
*****************************
wrote the RESET status detection
Saumil Shah
***********
has helped me improving tcpick and making it useful to decode
application-level data (i.e. http).
Gianluigi Spagnuolo, kirash
***************************
has tested tcpick under many *BSD systems, helping me to make tcpick
more compatible on other systems. He found also the pcap_next bug and
a bug on the inet_ntoa return ointer. Kirash is currently helping me
with several patches and increasing the tcpick portability, which is
really very important.
Penelope Fudd
*************
Added a patch that allows to process with tcpick a tcpdump output file
instead of a live connection, in that way:
% tcpdump -n -s 1600 -w /tmp/foo.tcpdump
% tcpick -r /tmp/foo.tcpdump
mainman
*******
helped me to improve the performance of tcpick suggesting me a method
of session recognization with hash generated by addresses and ports and
a "chained" tracker of structures instead of a block of addresses to
structures (i.e. conn_ptr->next_conn).
Sebastian Prause
****************
added support for DLT_PPP_ETHER datalink type (including pppoe for
NetBSD systems).
ShackaN
*******
wrote a nice dprintf function for debugging purposes :)
Gimli
*****
Spent a lot of time seeking for a bug I couldn't resolve on a free().
kain
****
bug found at pcap_next, that returns NULL on some systems suggested me
to change pcap #include directive, because on trustix (and perhaps
other linux systems) libpcap are located in a different place
(pcap/pcap.h).
Ardoino Paolo
*************
Suggested me to control memory allocated addresses
Robert Scheck
*************
suggested me to improve the Makefile with variables.
Alberto 'JCN-9000' Varesio:
***************************
found that AIX doesn't have getopt_long and getopt.h
Davide Benini
*************
corrected bug in calling S_calloc with only one argument
Packagers
*********
Debian
******
Cédric Delfosse `http://packages.debian.org/unstable/net/tcpick/'
Maurizio Lemmo `Tannoiser' `http://erlug.linux.it/~tann/tcpick/'
Source RPM
**********
Paul Drain mantains tcpick as a recompilable source RPM:
`ftp://cipherfunk.org/pub/packages/redhat/tcpick/'
RPM:
****
Mantained by Dag Wieers, with a lot of platforms available:
`http://dag.wieers.com/packages/tcpick/'
Lou Afonso has compiled version 0.1.20
Testers (read PLATFORMS.old file)
*********************************
nextime has spent time compiling tcpick on an impressing number of
unix/gnu platforms helping me understanding tcpick [in]compatibilities
AdHe5, Alt[O]s, hannibal, Kaioh, Alberto Panu, Maurizio Lemmo
`Tannoiser', Alberto 'JCN-9000' Varesio, gap, Kirillov
thanks to these people because they spent time testing tcpick on
their unix and linux distros sending me the report, that I used to
complete `PLATFORMS' file.
Thanks
******
Thanks to all people that are using tcpick and are sending me
description of problems encountered and to all people here not mentioned
that contributed to this software in many ways.
Thanks to sourceforge.net that hosts tcpick, available here:
`http://sourceforge.net/projects/tcpick/'
Thanks to kuht.it, that is currently hosting tcpick packages at this
url: `http://www.kuht.it/modules/xfmod/project/?tcpick'
Thanks to all the mantainers of libpcap (`http://www.tcpdump.org'),
that indirectly contributed to the development of tcpick :)
Thanks to `http://www.linuxlinks.com' webmasters, that have added
tcpick in their directory.
tcpick-0.2.1/COPYING 0000644 0001751 0001751 00000043162 10165254727 010764 0000000 0000000 =======
LICENSE
=======
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
tcpick-0.2.1/ChangeLog 0000644 0001751 0001751 00000033757 10173301003 011467 0000000 0000000 This is ChangeLog, produced by makeinfo version 4.7 from
ChangeLog.texinfo.
18 Jan 2005 0.2.1
*****************
unchanged from 0.2.1-rc1
18 Jan 2005 0.2.1-rc1
*********************
Michael Coulter (mjc:bitz.ca):
* Fixed headers include order for OpenBSD
Gianluigi Spagnuolo (kirash:phreaker.net):
* Added sigaction function to handle signals in a proper way.
Francesco Stablum (duskdruid:despammed.com):
* Fixed -lpcap -lpcap etc. arguments to cc
* Fixed SIGALRM freeze bug
* Added setitimer workaround for *BSD systems (fork + sleep + kill)
* Added -e option to exit when a certain number of packets is reached
* Added atexit function
9 Jan 2005 0.2.0-final
**********************
Francesco Stablum (duskdruid:despammed.com):
* Few bugfixes with -t and -td options
30 Dec 2004 0.2.0-rc6
*********************
Francesco Stablum (duskdruid:despammed.com):
* expired functions are now checked every second, not every packet.
(use setitimer and the SIGALRM signal).
* added DLT_PPP, DLT_SLIP, DLT_SLIP_BSDOS and DLT_PPP_BSDOS support.
credits: SNiFf v0.3 by uLiX
http://www.s0ftpj.org/bfi/online/bfi10/BFi10-05.html
* added italian documentation (README.it, EXAMPLES.it, INSTALL.it,
tcpick_italian.8)
25 Dec 2004 0.2.0-rc5
*********************
Gianluigi Spagnuolo (kirash:phreaker.net):
* Added signal support + statistics (packets sniffed and connection
tracked) in a similar way to tcpdump.
* Reorganized tcpick.c
Francesco Stablum (duskdruid:despammed.com):
* Added autogen.sh script
* Fixed bug of `-D' option
* Updated to automake/aclocal 1.9.3
14 Dec 2004 0.2.0-rc4
*********************
Gianluigi Spagnuolo (kirash:phreaker.net):
* found bug in avail_filename (write.c): too few arguments to
printf: fixed.
Francesco Stablum (duskdruid:despammed.com):
* Now '\r' and '\t' charachters are printable in 'P' and 'U' modes.
* MacOSX "BIOCSRTIMEOUT: Invalid argument" bug should be fixed.
* port aligment in status displayer fixed (simplified)
12 Dec 2004 0.2.0-rc3
*********************
Francesco Stablum (duskdruid:despammed.com):
* added date-timestamp
* removed all typedefs. Now structures and unions should be better
recognizable (now names of types are UPPER-CASE)
* Added .EDITME files for those people that have troubles with the
./configure script
30 Nov 2004 0.2.0-rc2
*********************
Francesco Stablum (duskdruid:despammed.com):
* Timeout value is now set by `-X' option, because `-t' will be used
for timestamps in the future.
* Filenaming system is now chosen with the `-F' option.
Artyom Khafizov:
* `-D num' option will cause tcpick to create subdirectories, each
for a desired number of sessions.
22 Nov 2004 0.2.0-rc1
*********************
Artyom Khafizov:
* Added EXPIRED status for connection tracked with a -t option to
choose an appropriate timeout (default is 600)
* Fixed many memory leaks
* Added a new way to write the stream to files, using directories
* Added an experimental file naming system
Buck Huppmann (buckh:pobox.com) and Artyom Khafizov ( both have
had the same good idea :^D ):
* Added RESET status for connections tracked. (RST-flagged packets
will delete the connection).
Federico Castaneda (F_CASTANEDA:crm.com.ar):
* Added UDP support
Francesco Stablum (duskdruid:despammed.com):
* Debug messages are now available only with the -DTCPICK_DEBUG
argument given to the compiler.
* Changed signing key! Please read public_key_message.txt and check
the revocation certificate public_key_OLD.revoke
08/09/04 0.2.0-devel2
*********************
* Segmentation fault bug fixed (with `u' tcpick tried to free 2 times
the same heap address and closed 2 times the same file). (Saumil
Shah discovered it)
* Bugfix: `u' flag of `-w' worked as with `b' flag either if `b'
wasn't choosen.
07/09/04 0.2.0-devel1
*********************
* Robert Scheck fixed tcpick manual section in a `printf'
* Saumil Shah feature request done:
the flag 'u' to the '-w' option enables tcpick to write sniffed
data in a unique file, with client and server data mixed together.
the flag 'b' to the '-w' option enables tcpick to write a banner to
the unique file that introduces server and client data.
28/08/04 0.1.24
***************
* BSD support _should_ be completed
* added "suicide" and "fault" functions
* some code cleanup
* fixed netinet/ip.h check bug in the configure script for FreeBSD
machines
* fixed hexdump bug
* fixed reset color. Background color is now not black, but the
terminal default
* added the balanced tree to the lookup engine
* applied patch by GLS to improve compatibility with openbsd 3.5 with
gcc 2.95.3
* Now closed connections are freed and delinked; files will be
closed.
* Added the -E and -Ef arguments
* Added the -Tf option
* Fixed the segmentation bug of the `-y' option
* added INTERNALS file (should be completed)
03/06/04 0.1.23
***************
* PFLOG support added by kirash aka GLS
* patch by Sebastian Prause: "I've created a little patch to make
tcpick work with pppoe interfaces on NetBSD (which use
DLT_PPP_ETHER) and wanted to share it, so here it is..."
* now the options for displaying the payload should be prefixed by -y
I have added another set of displaying option, that are prefixed
with -b. The -b options are useful to view data only when
acknowledged (exactly like data written to files) and with this is
particulary useful the raw mode (-bR) that you can use if you want
to redirect data with a pipe to another software.
* The newline carachter is suppressed when displaying the payload of
the packet or an acknowledged stream in the case there are no
banners except the case of the hexdump's.
* Added the "-pipe" option, by a wish of loopback. See manpage for
details.
* Now you are able to choose to write to file only data of clients or
servers or both, with the additional flags `C' and `S' to the
option `-w' (omitted means "both").
* Many, many changes, code cleanups and improvement made by whyx in
fragments.c and lookup.c
* With the new option `-T', it is now possible to track only
the first connections, the following will be discarded by
the tracker engine. This is useful for the `-w' and `-b' options;
for `-y' and `-h' it has no effect, because they aren't part of
the tracker.
* In the hexdump+ascii red dots rapresents now the unprintable
carachter.
* the lenght of the payload is now displayed in the packet banner
* rewritten the core of verify.c and fragments.c
* now connections with equal ip addresses and ports are stored in
different files
* files dumped with tcpick -w* options are now saved vith ".tcpick"
extension
* bugfix on datalink.c by kirash aka GLS
* deleted alloc.c and match.c
* used the "linux" 8-spaces indentation
* added packet separator (by a Simone Gianni's wish)
* added the `-p' flag to avoid to put the network interface in
promiscuous mode (I'm not sure it works) (by a Simone Gianni's
wish)
* Rewritten manpage. Read it! There are lots of changes in the
options!
* I have tested tcpick to sniff a file via ftp, and the md5sums were
equal. The tar.gz archive I have downloaded was more than 2MB
long. Other tests are confirming me that the newly-written code
works in the right way.
07/03/04 0.1.22-test2
*********************
* now output files are opened in "a" (only append) mode
* now data are written with "fwrite()" + ferror (thanks ^^Gimli^^)
06/02/04 0.1.22-test1
*********************
* corrected bug in datalinktoa() by sbi!
* Davide Benini: corrected bug in calling S_calloc with only one
argument
* added S_malloc function
* now data are written with the write() function
28/02/04 0.1.21
***************
* Added src/ directory for the sources
* Added a `flags` struct
* Patch by Penelope Fudd: added `-r' option to read tcpdump
filedumps: this is a very nice feature :)
* Improved debugging system with dprintf (thank you ShackaN!)
* Changed name of the `stack' memory block into `tracker'
* Increased speed of the connection tracking system by adding many
return's instruction (instead of using some damned variables like
`loop_finished' and `result_bool') in verify() and match().
* Added a "chained" tracker: now it is possible to track an infinite
number of connections (thank you mainman!)
* Fixed bug that server file and client file were switched
30/01/04 0.1.20
***************
* added displaying of unprintable carachters (that are also dots in
-P option) with red color.
* added hexdump mode colorizer
* with option -C2 it is now possible see different colors depending
on the connection tracked (only status banners) (file colortrack.c)
* added connection numbering (second field in status banner)
* added time writing on banners and packet headers(time.c)
15/01/04 0.1.19
***************
* added header support (i.e. trustix)
* added DLT_PFLOG/DLT_NULL/DLT_RAW/DLT_IEEE802_11 header support
(not tested!!!)
* added datalinktooffset function (datalink.c)
* added Push/Fin/Ack packet support
* added support for those systems that don't have getopt_long and
getopt.h header (was a problem in AIX systems, thank you
Alberto 'JCN-9000' Varesio)
* added experimental color option (-C): it is very nice! It
should be helpful to read the output of tcpick.
* added new file colors.c (read code comments to know about the
original author)
11/01/04 0.1.18
***************
* fixed ridicolous bug of "resulting_bool==" in match.c
* fixed FIN-WAIT-2 bad detection
* added TIME-WAIT status detection
* added CLOSED status detection
11/01/04 0.1.18-test3 (UNSTABLE - BUGGY - ONLY FOR DEVELOPERS)
**************************************************************
* Precedent tarball -test2 was damaged (thank you kirash (aka GLS)
to said it to me)
08/01/04 0.1.18-test2 (UNSTABLE - BUGGY - ONLY FOR
**************************************************
DEVELOPERS)
* added DLT_NULL support by kirash (aka GLS)
* fixed the ridicolous bug in -test1 (a if statement without braces)
* rewritten functions verify() and match() are now fully working
08/01/04 0.1.18-test1 (UNSTABLE - BUGGY - ONLY FOR
**************************************************
DEVELOPERS)
* completely rewritten match() and verify() functions
* added new files datalink.c and match.c
* datalink managing modified to be compatible on systems that don't
#define all datalinks
05/01/04 0.1.17
***************
* ip.h header ported internally to the package for compatibility with
BSD systems
* patch by kirash: changes to myheader.h, lookup.c and stack.c in
order to improve compatibility on BSD systems
* added FIN-WAIT-1 status tracking
05/01/04 0.1.16b
****************
* previously source tarball was corrupted thank you Robert Scheck
05/01/04 0.1.16
***************
* added protection to memory allocation and freeing in the file
alloc.c The new routines are called S_calloc and S_free and
display messages when in debug mode.
* added file PLATFORMS, which describes platform tested thanks
nextime, Alt[O]s and Kaioh!
04/01/04 0.1.15b
****************
* fixed bug in ./configure script
04/01/04 0.1.15 (early morning)
*******************************
* "STATUS" string is now nicer :)
* tcp.h header is now internal, to improve compatibility with *BSD
systems
* added new header file "myheaders.h" that should keep track of
all headers used in the project
* added definitively my public key in the package
03/01/04 0.1.14
***************
* reimplemented packet sniffer engine (now it is managet by
pcap_loop :)
* added configure script, Makefile.in config.h.in and other
macro-automated files
* fixed inet_ntoa bug (thank you kirash)
09/12/03 0.1.13
***************
* fixed name lookup: there will be only one dns query for each
host that doesn't have a name
* removed source port in log filenames
* added port into service translation
* Makefile improved
* now the tcpick manual page is in section 1!
07/12/03 0.1.12
***************
* improved and corrected name lookup feature
05/12/03 0.1.11-unstable
************************
* added host lookup cached feature (BUGGY!!)
04/12/03 0.1.10
***************
* added write status to file feature (-wS)
03/12/03 0.1.9
**************
added lot of write to file features:
* header writing, (-wH)
* only printable charachters writing (-wP)
* unprintable charachters transformed into hexadecimal code (-wU)
* added other options (see manpage for details) -s -P -R -U
01/12/03 0.1.8
**************
* added write to file feature (-w[R])
* added write to file in hexdump mode feature (-w[xX])
* added new file write.c
30/11/03 0.1.7
**************
* fixed bad hex dump manamagment
* some changes in the options (see OPTIONS file for details)
29/11/03 0.1.6
**************
* now you can display data in the packet in hexdump mode (-x) and
you can watch at the printable ascii charachters too, using -X
option
28/11/03 0.1.5
**************
* better options managment, including long options
* added data showing in hexadecimal
* added -silent mode
* done manpage prototype
27/11/03 0.1.4
**************
* fixed file writing: now files are opened in "w" mode
* added fflush istruction when output files are updated
* fixed bug: now all connection are tracked, not only the first
24/11/03 0.1.1
**************
* fixed bad managing of payload (now ack packets whith no data are
dropped)
tcpick-0.2.1/INSTALL 0000644 0001751 0001751 00000023746 10165254727 010770 0000000 0000000 =================
INSTALLING TCPICK
=================
The Quick Installation
======================
(should work on 99% unix systems)
Make sure you have libpcap installed, then
simply type:
$ ./configure
$ make
$ su -
# make install
If you don't have libpcap library you can download the latest version
at this url: http://www.tcpdump.org/
RARE PROBLEMS FOR NON-LINUX SYSTEMS -- ONLY FOR EXPERTS:
In some unixes there may be problems with the ./configure script.
If you feel brave you can check and edit as you want these files
for manual configuration:
./Makefile.EDITME
./src/Makefile.EDITME
./src/config.h.EDITME
and rename them to:
./Makefile
./src/Makefile
./src/config.h
Then please tell me about your configure error and your Operating System.
I will try to fix this ./configure bug.
Deep Install explanation
========================
(follows the INSTALL document provided from the automake package
with all options for configure and make)
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script).
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
tcpick-0.2.1/NEWS 0000644 0001751 0001751 00000000037 10165254727 010422 0000000 0000000 Read `ChangeLog' file, instead
tcpick-0.2.1/THANKS 0000644 0001751 0001751 00000000733 10165254727 010641 0000000 0000000 ======
THANKS
======
Thanks to all people that are using tcpick and are sending me
description of problems encountered.
Thanks to sourceforge.net that approved my project, available here:
http://sourceforge.net/projects/tcpick/
Thanks to kuht.it, that is currently hosting tcpick packages at this url:
http://www.kuht.it/modules/xfmod/project/?tcpick
Thanks to all the mantainers of libpcap (www.tcpdump.org), that
indirectly contributed to the development of tcpick :) tcpick-0.2.1/TODO 0000644 0001751 0001751 00000004114 10173301003 010366 0000000 0000000 This is TODO, produced by makeinfo version 4.7 from TODO.texinfo.
* good homepage for tcpick (italian too)
* fix bugs in KNOWN-BUGS and FIXMEs
for 0.2.2 version (Feb 2005)
****************************
* more speed for port->service resolution method.
* flag to distinguish between client and server data in a
tcp-bidirectional output file with an introductive banner.
* add acknowledged stream banner (i.e. "data (offset:1234) sent from
client: foobar")
* statistics:
* bytes/second, connections resetted, connections/hour
* total connections
* total bytes transferred by {clients|servers}
* total packets received / lost
* (other?)
for 0.2.3 version (Mar 2005)
****************************
* balanced/avl tree in the connection tracking engine
* improve speed by using function pointers
* (other?)
for 0.3.0 version (2005)
************************
* A more coherent EXPIRED status detection
* XML output
* managing DLT_LOOP, DLT_IEEE802_11 and DLT_NULL fully tested
* complete INTERNALS file (there is lot to write)
* http/yahoo decoder by Saumil Shah (separate package?)
* increase tracking speed by adding a hash function or a `memcmp'
(thanks to mainman's experience)
* increase speed by adding multithreading
* add a "turbo" mode (with the ./configure remove features)
* print only some status (i.e. only ESTABLISHED)
* custom filenaming pattern
* writing the offsets and seqs to file and terminal colors
* ability to enable/disable _detailed_ header printing
* write name lookups to a file (useful?)
* use the other nice libpcap functions (fully)
for the far future
******************
* autodetect and name ftp and http files (external program?)
* autodect and decrypt ssh/ssl connections (external program?)
* "spider" mode: make a path of all urls visited by some hosts
(external program?) (that will be a nice mode to see what kind
of sites are hosts visiting)
* ncurses/gtk front-end
* RFC1149 compatibility and RFC3514 support
tcpick-0.2.1/depcomp 0000744 0001751 0001751 00000035410 10165254727 011301 0000000 0000000 #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2004-04-25.13
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva .
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to .
EOF
exit 0
;;
-v | --v*)
echo "depcomp $scriptversion"
exit 0
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# Dependencies are output in .lo.d with libtool 1.4.
# They are output in .o.d with libtool 1.5.
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.o.d"
tmpdepfile3="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
tmpdepfile3="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
elif test -f "$tmpdepfile2"; then
tmpdepfile="$tmpdepfile2"
else
tmpdepfile="$tmpdepfile3"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
tcpick-0.2.1/install-sh 0000744 0001751 0001751 00000022441 10165254727 011730 0000000 0000000 #!/bin/sh
# install - install a program, script, or datafile
scriptversion=2004-04-01.17
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=
transform_arg=
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 -d DIRECTORIES...
In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
In the second, create the directory path DIR.
Options:
-b=TRANSFORMBASENAME
-c copy source (using $cpprog) instead of moving (using $mvprog).
-d create directories instead of installing files.
-g GROUP $chgrp installed files to GROUP.
-m MODE $chmod installed files to MODE.
-o USER $chown installed files to USER.
-s strip installed files (using $stripprog).
-t=TRANSFORM
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
case $1 in
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
-c) instcmd=$cpprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit 0;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
--version) echo "$0 $scriptversion"; exit 0;;
*) # When -d is used, all remaining arguments are directories to create.
test -n "$dir_arg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
instcmd=:
chmodcmd=
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
dst=$dst/`basename "$src"`
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp" || lasterr=$?
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; }
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$doit $instcmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
# If we're going to rename the final executable, determine the name now.
if test -z "$transformarg"; then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename \
| sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename.
test -z "$dstfile" && dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
tcpick-0.2.1/missing 0000744 0001751 0001751 00000024666 10165254727 011336 0000000 0000000 #! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2003-09-02.23
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to ."
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
tcpick-0.2.1/mkinstalldirs 0000744 0001751 0001751 00000006535 10165254727 012540 0000000 0000000 #! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2004-02-15.20
# Original author: Noah Friedman
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to or send patches to
# .
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to ."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit 0
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
tcpick-0.2.1/INTERNALS 0000644 0001751 0001751 00000003777 10173301003 011176 0000000 0000000 This is INTERNALS, produced by makeinfo version 4.7 from
INTERNALS.texinfo.
The starting function `main' is in the file `tcpick.c'.
Command-line arguments are parsed by `parse_args' (`args.c').
The packet capture engine is powered by the pcap library, that
handles, with the function `pcap_loop' the callback loop function
`got_packet' (`loop.c').
When a packet has been captured by `pcap_loop' it will be calculated
the offset of the ip header (`ippacket'), the offset of the tcp header
(`tcppacket'). Finally the function `verify' (`verify.c') will be
called to analyze the packet.
Packet offset and size are declared globally (`extern.h' and
`globals.h') not to allocate the stack every time a function that works
on the packet is called
The source code that contains the function `verify' begins with
several `#define''s used to verify if a sniffed packet match an
inizialized connection (or else if it creates a new one).
All connections tracked are stored in a linked list (i hope I will be
able to replace it with an efficient balanced tree).
The `struct host_descriptor_t' describes one side of the tcp
connection (the server or the client). The function `verify' detects
the changes of the status of the tracked connection and update it with
the function `status_switch' (`tracker.c'), that calls the function
`display_status' to notify the user of this change and deletes the
connection if it is `CLOSED'
When data are transmitted (`IS_DATA_FLOW') the function
`established_packet' (`verify.c') is called. This function detects if
the packet is an acknowledgment one or a data one. Unacknowledged data
packets are stored in a linked-list by the function `addfr'
(`fragments.c'). When data are acknowledged by a `ack', the function
`flush_ack' (`fragments.c') is called.
In `flush_ack' acknowledged data are flushed to an output stream
(display or file) by the function `wrebuild' (`write.c').
The function `out_flavour' (`write.c') is used to select the format
of the data wished by the user.
tcpick-0.2.1/INTERNALS.old 0000644 0001751 0001751 00000006725 10165254727 011774 0000000 0000000 ================
TCPICK INTERNALS
================
updated to version 0.1.2
tcpick is a sniffer libcap-based.
tcpick keeps track of all connection using a special structure,
conn_t, used to keep in memory the connection:
stack.c:
struct conn_t
{
int status; /* 1 means SYN_SENT,
2 means SYN_RECEIVED,
3 means ESTABLISHED,
4 ??? FIXME
*/
u_int32_t client_ip; /* ip address of client */
u_int32_t server_ip; /* ip address of server */
u_int32_t client_seq;
u_int32_t server_seq;
u_int16_t client_port;
u_int16_t server_port;
u_int32_t client_seq_off;
u_int32_t server_seq_off;
int server_packets_num;
int client_data_size; /* size of all data transmitted from client*/
int server_data_size; /* size of all data transmitted from server*/
char *client_data; /* data */
char *server_data; /* data */
FILE *client_file;
FILE *server_file;
char *client_filename;
char *server_filename;
FILE *both_file;
int file_opened;
};
All connection tracked are kept in a special "stack" (but isn't
properly a stack) that I declared in that way:
stack.c:
struct conn_t ** stack;
it is a pointer to the first address of a block of free data of size
MAXCONN, allocated with calloc. Every address of this structure points
to a conn_t structure (allocated when a new connection is tracked).
After capturing data tcpick finds the data offset (skipping tcp
options) and passes the packet to the function verify():
stack.c:
int verify(struct ip *ippacket,
struct tcphdr *tcppacket,
u_char *payload, /* pointer to the data(offset)*/
int payload_len) /* data lenght */
the function verify() analyzes the tcp flags and calls the function
match():
stack.c:
int match(int status,
struct ip *ippacket,
struct tcphdr *tcppacket,
u_char *payload,
int payload_len)
the first argument is a "status" flag, that describes what kind of
flag are set. Then, there is a cycle that "scans" the "stack" seeking
for a conn_t that matches with the received packet. In that way, if
the packet matches with a conn_t structure, the status flag of the
structure is changed properly with this function:
stack.c:
int status_switch(struct conn_t * conn,int status)
status_switch, in that way, print on the terminal the new status of
the connection tracked, according to the status flag:
status==1 => SYN-SENT
status==2 => SYN-RECEIVED
status==3 => ESTABLISHED
status==4 => FIN-WAIT-1
(other statuses should be developed soon!)
If the connection is just ESTABLISHED (conn_ptr->status_flag==0)
the packet is passed to the function data_write():
stack.c:
int data_write(struct conn_t * conn_ptr,
u_int32_t data_off, /* offset from beginning */
u_char * payload,
int payload_len,
int part /* client (1) or server (2) ? */
)
where data_off is the actual seq field minus the first minus one:
data_off=(ntohl(tcppacket->seq)-ntohl((*stack_ptr)->server_seq))-1;
the purpose of data_write is simple: write the payload to memory.
Then, if the file_flag is set, these data are written to disk through
the function file_write():
stack.c:
int file_write(struct conn_t * conn_ptr,
u_int32_t data_off, /* offset from beginning */
u_char * payload,
int payload_len,
int part /* client (1) or server (2) ? */
)
Conclusions: tcpick requires people willing to debug/improve it,
do you wanna get involved? :)
tcpick-0.2.1/KNOWN-BUGS 0000644 0001751 0001751 00000004103 10173301003 011251 0000000 0000000 This is KNOWN-BUGS, produced by makeinfo version 4.7 from
KNOWN-BUGS.texinfo.
* Kirash reported under BSD:
read() called by pcap_read() called by pcap_loop() blocks the
program until gets about 600.000 byte and then calls got_packet().
Then it blocks until other 600.000 bytes aren't captured. It may
be a problem of setitimer. If setitimer is set to 2 seconds, the
program works fine, but this is only a workaround.
This seem to be a kernel bug:
Subject: kern/26470: all process stop for a long time by calling
settimeofday() and setitimer()
List: netbsd-bugs
Date: 07/29/2004 04:32:58
[cut]
Description:
All process stops for a long time by calling setitimer() with short
interval and then putting the system clock forward long.
This bug has been workarounded with a fork + sleep + kill trick.
* Segmentation fault in status_switch(): prev->next is null. I
cannot understand this, because the malloc *didn't return NULL*,
but a valid address as gdb said me!. WTF! NOTE: this is a very
rare bug.
* Marcos Costantini reported a segmentation fault bug in tcpick
running on a MacOSX system.
* Penelope Fudd wrote:
Hi..
I've got a tcpdump program running that logs all email to & from
the mail server.
When I use 'tcpick -wR -r log-2004.xx.xx', and look at the
resulting client and server files, there are binary strings stuck
in the middle of the conversation:
[cut]
Where are these 'A0 00 00 00 00 00' chunks coming from? I thought
that -wR was binary-safe. When I follow the stream using
Ethereal, the problem goes away.
* maybe it doesn't go in promisc mode even without -p
Patches
*******
We need somebody suggesting bugs and new features!
If you want to give some help, please subscribe to the mailing-list:
Archive:
http://sourceforge.net/mailarchive/forum.php?forum=tcpick-project
Subscribe: http://lists.sourceforge.net/lists/listinfo/tcpick-project
thanks
tcpick-0.2.1/tcpick.8 0000644 0001751 0001751 00000026463 10173200435 011266 0000000 0000000 .TH "tcpick" 8
.SH NAME
tcpick \- tcp stream sniffer and connection tracker
.SH SYNOPSIS
.B tcpick
[\fB -a \fP] [\fB -n \fP] [\fB -C \fP]
.br
.ti +7
[\fB -e \fP\fIcount\fP ]
.br
.ti +7
[\fB -i \fP\fIinterface \fP|\fB -r \fP\fI file \fP]
.br
.ti +7
[\fB -X \fP\fItimeout\fP ]
.br
.ti +7
[\fB -D \fP ] [\fB -F1 \fP|\fB -F2 \fP]
.br
.ti +7
[\fB -yH \fP|\fB -yP \fP|\fB -yR \fP|\fB -yU \fP|\fB -yx \fP|\fB -yX \fP]
.br
.ti +7
[\fB -bH \fP|\fB -bP \fP|\fB -bR \fP|\fB -bU \fP|\fB -bx \fP|\fB -bX \fP]
.br
.ti +7
[\fB -wH[ub] \fP|\fB -wP[ub] \fP|\fB -wR[ub] \fP|\fB -wU[ub] \fP]
.br
.ti +7
[\fB -v \fP [\fI verbosity \fP]] [\fB -S \fP] [\fB -h \fP]
.br
.ti +7
[\fB --separator \fP]
.br
.ti +7
[\fB -T \fP|\fB -Tf \fP [\fI number \fP]]
.br
.ti +7
[\fB -E \fP|\fB -Ef \fP [\fI number \fP]]
.br
.ti +7
[\fB -Pc \fP | \fB -Ps \fP]
.br
.ti +7
[\fI "filter" \fP]
.br
.ti +7
[\fB --help \fP] [\fB --version \fP]
.SH DESCRIPTION
\fBtcpick\fP
is a textmode sniffer libpcap-based that can track
tcp streams and saves the
data captured in different files, each for every connection,
or displays them in the terminal in different
formats (hexdump, printable charachters, raw...)
Useful for picking files in a passive way.
It is useful to keep track of what users of a network are doing, and is
usable with textmode tools like grep, sed, awk.
Happy data hunting :-)
.SH BASE OPTIONS
.TP
.B \-i --interface \fIinterface\fP
listen on selected interface, (i.e. \fIppp0\fP or \fIeth0\fP). If option \fB-i\fP is omitted, tcpick is
able to select the first open interface (usually a ethernet card).
.TP
.B \-r --readfile
reads raw packets from a file written with
.B tcpdump -w
instead of using a network device.
.TP
\fB "filter" \fP
This is the filter for the capturer engine. You can set it in
the same way of setting the
.B tcpdump(1)
filter. Read tcpdump(1) manpage for other explanations.
.TP
.B \-a
Displays host names instead of ip addresses. Warning: for every new ip
grabbed a dns query will be generated! Use it carefully on
high-traffic network devices!
.TP
.B \-C --colors
Uses terminal colors: very nice!
It should help you to read the output of tcpick
.TP
.B \-D \fInumber\fP \fB--dirs\fP \fInumber\fP
Create directories to store sniffed sessions.
When a directory contains \fInumber\fP sessions, a new one will be
created.
.TP
.B \-e \fIcount\fP
Exits when \fIcount\fP packets have been sniffed
.TP
.B \-E \fInumber\fP
Exit when \fInumber\fP sniffed connections are detected as "CLOSED"
.TP
.B \-Ef \fInumber\fP
Exit when \fBthe first\fP \fInumber\fP connections are detected as "CLOSED"
.TP
.B \-F1 \-F2 \--filenaming 1|2
Choose the filenaming system.
.br
\fB \-F1 \fP: tcpick_\fBclientip\fP_\fBserverip\fP.\fBside\fP.dat
.br
(side means \fBclnt\fP, \fBserv\fP or \fBboth\fP)
.br
\fB \-F2 \fP: tcpick_\fBconnectionnumber\fP_\fBclientip\fP_\fBserverip\fP.\fBside\fP.dat
.TP
.B \-h
Shows source and destination ip and port; shows tcp flags as letters.
.TP
.B \--help
Displays a short help summary
.TP
.B \-p
\fIDon't\fP put the network interface in promiscuous mode. Note that
the interface might be in promiscuous mode for some other reason.
.TP
.B \-S
Suppresses the "status of the connection" banner.
.TP
.B \--separator
Add a separator for the payloads displayed.
.TP
.B \-t
Adds timestamp in \fBhour:minutes:seconds:microseconds\fP format
.TP
.B \-td
Like \fB-t\FP with date timestamp in \fBday-month-year\fP format
.TP
.B \-T \fInumber\fI
Track \fInumber\fP connections. It could be very useful on a
high-traffic network device.
If \fInumber\fP is not specified, it will be set to \fB1\fP.
.TP
.B \-Tf \fInumber\fP
Track \fBonly the first\fP \fInumber\fP connections; the following will be
discarded. If \fInumber\fP is not specified, it will be set to \fB1\fP.
.TP
.B \-v \fIverbosity\fP
Quite unuseful, yet. Set verbosity level. Actually there are not
really many
extra messages to display, this means it is enabled by default
(\fB-v1\fP).
Set verbosity level to \fB0\fP to suppress extra messages
(\fB-v0\fP) except error messages.
Set verbosity level to \fB5\fP to display debug messages
(\fB-v5\fP).
There are not other verbosity levels.
.TP
.B \-X \fItimeout\fI
Connections are considered \fBEXPIRED\fP when there is no traffic for at
least \fItimeout\fP seconds. Default is 600.
.TP
.B \--version
Displays the tcpick version
.SH DISPLAY THE DATA IN THE TCP PACKETS
These options are prefixed by \fB-y\fP and are useful to display in
various ways the content of the packet sniffed (the data, called
payload), once it arrives at the listening interface. In that way the
tcp duplicates will be not discarded and the packets will not be
reordered, but displayed "as is". If you want a fully acknowledged
stream, see the \fB-w\fP and \fB-b\fP set of options.
.TP
.B \-yH
View data in hexadecimal-spaced mode (for the hexdump see \fB-yx\fP and
\fB-yX\fP options.
.TP
.B \-yP
Shows data contained in the tcp packets. Non-printable charachters are
transformed in dots: "\fB.\fP". Newline character is preserved.
This is the best way, in my opinion to show data like HTTP requests,
IRC communication, SMTP stuff and so on.
.TP
.B \-yR
Displays all kind of charachters, printable and non printable. If
something binary is transmitted, the effect will probably be like
watching with "\fBcat\fP" at a gzipped file.
.TP
.B \-yx
Shows all data after the header in hexadecimal dump of 16 bytes per line.
.TP
.B \-yX
Shows all data after the header in hexadecimal and ascii dump with 16
bytes per line.
.TP
.B \-yU
Shows all data after the header, but \fBU\fPnprintable charachters are
displayed as hexadecimal values between a "<" and a ">" symbol.
.SH REBUILD AND WRITE THE TCP STREAM TO FILE
The prefix for these options is \fB-w\fP.
The TCP stream that has been sniffed with these options will be
written to file named:
.br
.I client___.tcpick
and
.br
.I server___.tcpick
.br
With the \fBu\fP flag of the \fB-w\fP option (i.e. \fB-wRu\fP)
both client and server data
will be written to a unique file named in that way:
.br
.I __.tcpick
.br
If you use the additional flag \fBb\fP of the \fB-w\fP option
(i.e. \fB-wPub\fP), in the file will be written this banner:
.br
\fB[client|server] offset before:offset after (lenght of rebuilded
segment)\fP
.br
to distinguish between client and server data.
.br
The flow is rebuilded, reordered and the duplicates are dropped. In
that way it is possible to sniff entire files transmitted via ftp
without data corruption (you can see this with md5sum).
If no argument is given to \fB-w\fP the data will be written like
\fB-wR\fP You can decide to write only client or server data by setting the flag
\fBC\fP (output only client data) and \fBS\fP (output only server
data) to the \fB-w\fP set.
.TP
.B \-wR
This is the preferred option: data will be written without any
changes. Useful for sniffing binary or compressed files.
.br
(\fB-wRC\fP only the client, \fB-wRS\fP only the server)
.TP
.B \-wP
Unprintable charachters are written like dots.
.br
(\fB-wPC\fP only the client, \fB-wPS\fP only the server)
.TP
.B \-wU
\fBU\fPnprintable charachters are
displayed as hexadecimal values between a "<" and a ">" symbol.
.br
(\fB-wPC\fP only the client, \fB-wPS\fP only the server)
.TP
.B \-wH
The flow is written in hexadecimal-spaced mode.
.br
(\fB-wHC\fP only the client, \fB-wHS\fP only the server)
.SH DISPLAY THE REBUILDED TCP STREAM
The prefix for these options is \fB-b\fP.
This set of options is very useful if you want to redirect the sniffed
flow to anoter program with a pipe, and there should be no data
corruption.
Of course the most useful is \fB-bR\fP to show the data as they are
(raw).
A very useful feature is the flag \fBC\fP (output only client data)
and \fBS\fP (output only server data). I.e.: \fB-bRC\fP will display
only the data from the client in raw mode; in that way you can put
them in a file with a pipe redirection.
The sub-options are quite the same of the \fB-y\fP set, so you have:
.TP
\fB -bH \fP hex-spaced
(\fB-bHC\fP only the client, \fB-bHS\fP only the server)
.TP
\fB -bP \fP unprintable displayed as dots
(\fB-bPC\fP only the client, \fB-bPS\fP only the server)
.TP
\fB -bR \fP raw mode
(\fB-bRC\fP only the client, \fB-bRS\fP only the server)
.TP
\fB -bU \fP unprintable as .
(\fB-bUC\fP only the client, \fB-bUS\fP only the server)
.TP
\fB -bx \fP hexdump
(\fB-bxC\fP only the client, \fB-bxS\fP only the server)
.TP
\fB -bU \fP hexdump + ascii
(\fB-bXC\fP only the client, \fB-bXS\fP only the server)
.TP
\fB -PC --pipe client \fP
This is an alias for \fB-bRC -S -v0 -Tf1 -Ef1\fP.
With this option you are able to track only the first connection (\fB-T1\fP)
matched by tcpick and data are displayed as raw. Only data from the
client are
put on stdout. All messages and banners are suppressed, except error
messages (\fB-S -v0\fP),
so this option is particulary useful to download an entire
fully rebuilded and acknowledged connection.
.TP
\fB -PS --pipe server \fP
This is an alias for \fB-bRS -S -v0 -Tf1 -Ef1\fP.
.SH EXAMPLES
.TP
how to display the connection status:
\fB # tcpick -i eth0 -C\fP
.TP
display the payload and packet headers:
\fB # tcpick -i eth0 -C -yP -h -a\fP
.TP
display client data only of the first smtp connection:
\fB # tcpick -i eth0 -C -bCU -T1 "port 25"\fP
.TP
download a file passively:
\fB # tcpick -i eth0 -wR "port ftp-data"\fP
.TP
log http data in unique files (client and server mixed together):
\fB # tcpick -i eth0 "port 80" -wRub\fP
.TP
redirect the first connection to a software:
\fB # tcpick -i eth0 --pipe client "port 80" | gzip > http_response.gz\fP
.br
\fB # tcpick -i eth0 --pipe server "port 25" | nc foobar.net 25\fP
.SH MAILING-LIST
Address:
\fI\fP
.br
Archive:
\fIhttp://sourceforge.net/mailarchive/forum.php?forum=tcpick-project\fP
.br
Subscribe:
\fIhttp://lists.sourceforge.net/lists/listinfo/tcpick-project\fP
.br
If you have new ideas, patches, feature requests or simply need help,
don't wait! I will be grateful if you send a message to the mailing
list (even if you want to say what you liked most on tcpick).
.SH TCPICK WEBSITE
The tcpick website is at \fIhttp://tcpick.sf.net\fP.
.br
You can find the project page here:
\fIhttp://sourceforge.net/projects/tcpick\fP kindly hosted by the
sourceforge team.
.SH AUTHORS
Please check \fBAUTHORS\fP file.
.SH BUGS
Tcpick is an experimental software, and maybe
some bugs are described in the \fBKNOWN-BUGS\fP
file.
.br
On some versions of MacOSX Segmentation Fault happens and connections
aren't tracked properly.
.br
If you find any other bug, please write to the tcpick mailing list.
.SH SEE ALSO
Other nice packet/data sniffers:
.br
tcpdump, ngrep, tcptrack, ettercap, ethereal, snort
.SH LICENSE
This program is
\fBfree software\fP; you can redistribute it and/or modify it under the terms of the
\fBGNU General Public License\fP
as published by the Free Software Foundation; either version 2 of the
License, or (at you option) any later version.
This program is distributed in the hope
that it will be useful, but \fB WITHOUT ANY WARRANTY\fP;
without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
USA.
tcpick-0.2.1/public_key.asc 0000644 0001751 0001751 00000004155 10165254727 012546 0000000 0000000 -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.4 (GNU/Linux)
mQGiBEGiO88RBADCmh7S7Xr/ekE76PmvjK66bHm+IhCuJCrqlQkSmbyOikBBgT3M
Rpy3D2I7vSoHQr9nchT7/RGIX52+TWUtbJsomSDc5BzD1vzKlSekm3eQKnlGExLM
YELKhdfNO6Ld86bCXNt2YUee+1bmYrANfkYqqp/+St8vuooFECzTvfVuiwCgzZZR
5U9+rIC+Qs/WFBjqvfkRRdcD/1z0NDEZNe3F58NVHA6JjjvZDmv7IsAGuz52h9PU
pwnTTwgfz0SFLHHVSK6V6iYMNHZOGuAn4CGj70xDvtSnHq/Ms5hJLRxyvWlW+fGI
sTQWoms6z1LA8Av3zweNDQG7lJu4tLBwUj2+7vQM/w624eAZfNMdIMHWTEXr/8lu
EftOBACHFGvYTOjh2ABlQWxlLalfrCcarL8ovvAXCoUCM8+X/PxzcgGIRsGTfvqL
XpSsQ2EeZ2gohWPxfgFi51beQ8U/dtnVPNzmrnxHowC1m0ELiXtwGBcbVCn6i9XB
/whZnEehZ3Tu18oStfZmwmiLO87iACBLHVEmmSAh9+6Qd1G4K7Q3RnJhbmNlc2Nv
IFN0YWJsdW0gKGR1c2tkcnVpZCkgPGR1c2tkcnVpZEBkZXNwYW1tZWQuY29tPohk
BBMRAgAkBQJBojvPAhsDBQkDwmcABgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEEIA
iBUvZohvuAcAoLv16/PQHaxxhs2wfhz6xv/3xax/AJ4yCj7vkVkP3wHyMrPqJgN4
ysB+9rQxRnJhbmNlc2NvIFN0YWJsdW0gKGR1c2tkcnVpZCkgPHN0YWJsdW1AZ21h
aWwuY29tPohkBBMRAgAkBQJBojxxAhsDBQkDwmcABgsJCAcDAgMVAgMDFgIBAh4B
AheAAAoJEEIAiBUvZohv62AAniC1boQ2ZcIstqKUkE2udfafSSyWAKCn071Yn4aA
rc6GmrYA+yyiuM+aqbQ/RnJhbmNlc2NvIFN0YWJsdW0gKGR1c2tkcnVpZCkgPGR1
c2tkcnVpZEB1c2Vycy5zb3VyY2Vmb3JnZS5uZXQ+iGQEExECACQFAkGiPLwCGwMF
CQPCZwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQQgCIFS9miG/mlwCfTZSdaou+
NkFO7M9Ram6554Ggf74AnjslfZye2j0xM/vnEo8d9868RUoFuQINBEGiO/EQCADh
UlT1bkIK7Z5dmscCObTh05JGIP4jD6Gw+uW1hcfR/67a00uAv4cPj7jtD6fo3t16
9CHfciz7vcu3nOHhyMHb/5g2a1iGHwBkoKcg9XQjlcwYAyIpmmU4tiLRAxhOVEHp
+oYZXlgNoHMwWMcxO73xMvBgMVujkNVkzoVRGdHsinwsvTaota7iQf2QAmT2Ou2/
cLRYCeUqs/6M4AcRB7kVqZfVrgK+gI8gLSH/wjRIvrjMjwK4ce9ZzdXWba0cRSST
M0TdEmRveb3NbNyvWStCZgeK1UlgjO5LqO1GWLyqSlTEEWO7t724PHu9mOgcoh6T
+DouzFT3GSTCk9jCI/oLAAMGCACzi1cuxTQxQymop05qvrR3KC4IXg32SdkRbknx
3lpYzkf9sWchd9NNF3f68Fma/3VlObOhJSjItgD2zuQy5q5tthHe3lOop5woy3Oa
vPTKuc2cb8JgbrcGcRjvE6Jji/Al1SfcRMnaCP/t+QOopKDKsePICbKrX3wIH2TM
CUf3BlQFhpT7Y26kjFlpnMNURfqac0J13mY6SSpu0EfO0lEYwDbSp4uXteJCN+zy
qrZTpdIb0brbR+orR8tVlWQUurrplMv6jnZyRDz5pOEWhY/KGBi5MARW+kVTOGey
NNHcPiOly9OoaEFTZOc3uNQC3rJi1uyuEeN+uy1PQ4VZl22GiE8EGBECAA8FAkGi
O/ECGwwFCQPCZwAACgkQQgCIFS9miG9+sACglZMZwtFbIxn25YC+9m25WgJxsksA
n0BiG6k7l5iQ+ovW7WKvjj7Ovc+V
=oCR6
-----END PGP PUBLIC KEY BLOCK-----
tcpick-0.2.1/public_key_OLD.asc 0000644 0001751 0001751 00000003252 10165254727 013241 0000000 0000000 -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.3 (GNU/Linux)
mQGiBD+QL1cRBADobg5aag94z1nNQAGgEBQw++NvcfbPv71Z5kggRb2V/rgsK61S
23KtrYkmhZSQDCZoFmTaL+r3s/Jz9GpuU9WmSgzTjb0UmtEJVL5vNajWZPnn3wdg
om3KfEviG3HS6Qa1M4WD4VcZVcWB3O8t4PjAhpg2Qq4AC0xOAFYENhnUowCght0f
iK1WqtQnuuwXY1e7X+tLARUEAJBjpLRWZiYF7cAm/RCcO6no/3tUv2EELRsWbddR
wHuTefQAtJ9WARAX8xtF8t2gATJZuDu91CY9HKa5ohj2gQrrrujGo3gSfz1ND4eO
LPP35Hp71rP8F4AGDkk0kPJJlC005m02kmXc06Oin5vqw7ictO9sjmHsXDb5cLKx
UuxWBAC0T9PNHNnEByswmQiY4TAuA7CImrbz/dR02mAN5k3oNs+WmRsVm2koBEKf
fUjNupDL9PDgLImg4qbZX4ZQU7X0ZBbfldWY/3MbpDjwpjJjaLOyjm9IRTqGHXuG
P6ECeLZaMnuMHcYwUrZb6hewod1vef32z634lv9p6nJaF1Jbc7QwRnJhbmNlc2Nv
IFN0YWJsdW0gKER1c2tEcnVpZCkgPHN0YWJsdW1AbGludXguaXQ+iGEEExECACEF
Aj+QL1cFCQHhM4AGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQjK3B/GbIJG/tiwCe
NvjQ17QVRGcgI5AQvYrBkuRwVRMAnR+cLAfdmiupPYJn3V0LKQd1FUGSuQINBD+Q
L1wQCADWw8DKVvvGXC9ccCYDALF1GL93tMw6JnCQE4ceQuSAH+ETtDUZvqvF7ZB6
PfwsIUJls6dNXohtzHNYP56B0bWl3ExTPBLHQgnz3Aetu978eKqiNltp7I2VyBgs
gxCRpvl+ZMlYe2hVA4lBLuXKkeb2Cc8wXwC6DhJd4krq1rjqSVOs8KuShwF9WNz2
ArIW1M8+nzDkeGrJysuNvnkZDo8O2yf01/Er3hFZmdGXn+/ZM6wceBttcpI95uDv
nl0IsG0q5NX9YRaoRJ0X+t9+w6cSrl6nHyGqDqxlNnkmmHHUnOoc+z3X6EdTTX5x
/e3Cd6bmUvKu3rPkcO8RNNBEFsErAAMGB/9Wn/rMb03/6EjltiUuDCvrxtqdIqG2
WJ8G7FFyN/RPz1Q23Xvb6cGIrVZv0KFDztAekIDmrI5Jww/q6TTu1VER/WX9k/sy
ETmvm5giVa7WBckiTcqdJeBPR5aAngtkWR9T74z9hul1Vy86mIPH9CFCCuUAKDem
g3hX9ZEMYmfc3eaRoMTFLuCndUg1vZvjwubqb+Ls54f9FY7HgkGxOlJ6kGkOFZNj
b5i2MFyqKJipigPku4y2QC7wF3IACeRCu7nVMYrXBujcZRCZgH7E5bQwrG+xnb9E
Yjt9FJ1Bdk0Xe8ysUFjSSimAXOR9+q4f+nB3Ou5KIB07I/l0e+1WMDdUiEwEGBEC
AAwFAj+QL1wFCQHhM4AACgkQjK3B/GbIJG8jzwCfbDUNm8l0nOlFeskIAbUDB000
v4MAn21IG1+ocsn/XrBMR2XL1rEbopfv
=T7Cm
-----END PGP PUBLIC KEY BLOCK-----
tcpick-0.2.1/public_key_OLD.revoke 0000644 0001751 0001751 00000001622 10165254727 013765 0000000 0000000 -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: A revocation certificate should follow
iQInBCARAgHnBQJBokLowR8dAVRoaXMga2V5IGhhcyBleHBpcmVkLgpJdCB3aWxs
IGJlIHN1cGVyc2VkZWQgYnkgdGhpcyBvbmU6CnB1YiAgMTAyNEQvMkY2Njg4NkYg
MjAwNC0xMS0yMiBGcmFuY2VzY28gU3RhYmx1bSAoZHVza2RydWlkKSA8ZHVza2Ry
dWlkOnVzZXJzLnNvdXJjZWZvcmdlLm5ldD4KS2V5IGZpbmdlcnByaW50ID0gNjgw
NSA2MTE4IDM2QzggRjdCMiBGM0VFICAwN0E3IDQyMDAgODgxNSAyRjY2IDg4NkYK
dWlkICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZyYW5jZXNjbyBTdGFibHVt
IChkdXNrZHJ1aWQpIDxkdXNrZHJ1aWQ6ZGVzcGFtbWVkLmNvbT4KdWlkICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIEZyYW5jZXNjbyBTdGFibHVtIChkdXNrZHJ1
aWQpIDxzdGFibHVtOmdtYWlsLmNvbT4Kc3ViICAyMDQ4Zy9GMUYwRTJERiAyMDA0
LTExLTIyIFtleHBpcmVzOiAyMDA2LTExLTIyXQoyMiBOb3ZlbWJlciAyMDA0LCBG
cmFuY2VzY28gU3RhYmx1bQAKCRCMrcH8Zsgkb4QIAJ9sRyS1Zcv68S4tXfYtc+rg
hmZv0gCcCM1AyrLxxMEU7m4vXpkuEFAmWO8=
=kAKC
-----END PGP PUBLIC KEY BLOCK-----
tcpick-0.2.1/public_key_message.txt 0000644 0001751 0001751 00000010636 10165254727 014324 0000000 0000000 -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
22 November 2004
Hello,
my old OpenPGP key (66C8246F) has expired last month.
Here is the revocation certificate for the old key, and the new
key (2F66886F) follows.
Please note that the new key (2F66886F) will be used to sign
the source packages of the tcpick sniffer (tcpick.sf.net) since
0.2.0-rc1 version.
Also note that this message has been signed with the old (66C8246F) key.
Thank you for the attention,
Francesco Stablum
mantainer of 'tcpick'
== Old key description and fingerprint ==
pub 1024D/66C8246F 2003-10-17 Francesco Stablum (DuskDruid)
Key fingerprint = 521D DAD3 EB81 B62B FE35 E644 8CAD C1FC 66C8 246F
sub 2048g/D017CC19 2003-10-17 [expires: 2004-10-16]
== New key description and fingerprint ==
pub 1024D/2F66886F 2004-11-22 Francesco Stablum (duskdruid)
Key fingerprint = 6805 6118 36C8 F7B2 F3EE 07A7 4200 8815 2F66 886F
uid Francesco Stablum (duskdruid)
uid Francesco Stablum (duskdruid)
sub 2048g/F1F0E2DF 2004-11-22 [expires: 2006-11-22]
== Old key revocation certificate ==
- -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: A revocation certificate should follow
iQInBCARAgHnBQJBokLowR8dAVRoaXMga2V5IGhhcyBleHBpcmVkLgpJdCB3aWxs
IGJlIHN1cGVyc2VkZWQgYnkgdGhpcyBvbmU6CnB1YiAgMTAyNEQvMkY2Njg4NkYg
MjAwNC0xMS0yMiBGcmFuY2VzY28gU3RhYmx1bSAoZHVza2RydWlkKSA8ZHVza2Ry
dWlkOnVzZXJzLnNvdXJjZWZvcmdlLm5ldD4KS2V5IGZpbmdlcnByaW50ID0gNjgw
NSA2MTE4IDM2QzggRjdCMiBGM0VFICAwN0E3IDQyMDAgODgxNSAyRjY2IDg4NkYK
dWlkICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZyYW5jZXNjbyBTdGFibHVt
IChkdXNrZHJ1aWQpIDxkdXNrZHJ1aWQ6ZGVzcGFtbWVkLmNvbT4KdWlkICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIEZyYW5jZXNjbyBTdGFibHVtIChkdXNrZHJ1
aWQpIDxzdGFibHVtOmdtYWlsLmNvbT4Kc3ViICAyMDQ4Zy9GMUYwRTJERiAyMDA0
LTExLTIyIFtleHBpcmVzOiAyMDA2LTExLTIyXQoyMiBOb3ZlbWJlciAyMDA0LCBG
cmFuY2VzY28gU3RhYmx1bQAKCRCMrcH8Zsgkb4QIAJ9sRyS1Zcv68S4tXfYtc+rg
hmZv0gCcCM1AyrLxxMEU7m4vXpkuEFAmWO8=
=kAKC
- -----END PGP PUBLIC KEY BLOCK-----
== New key (2F66886F) follows ==
- -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.4 (GNU/Linux)
mQGiBEGiO88RBADCmh7S7Xr/ekE76PmvjK66bHm+IhCuJCrqlQkSmbyOikBBgT3M
Rpy3D2I7vSoHQr9nchT7/RGIX52+TWUtbJsomSDc5BzD1vzKlSekm3eQKnlGExLM
YELKhdfNO6Ld86bCXNt2YUee+1bmYrANfkYqqp/+St8vuooFECzTvfVuiwCgzZZR
5U9+rIC+Qs/WFBjqvfkRRdcD/1z0NDEZNe3F58NVHA6JjjvZDmv7IsAGuz52h9PU
pwnTTwgfz0SFLHHVSK6V6iYMNHZOGuAn4CGj70xDvtSnHq/Ms5hJLRxyvWlW+fGI
sTQWoms6z1LA8Av3zweNDQG7lJu4tLBwUj2+7vQM/w624eAZfNMdIMHWTEXr/8lu
EftOBACHFGvYTOjh2ABlQWxlLalfrCcarL8ovvAXCoUCM8+X/PxzcgGIRsGTfvqL
XpSsQ2EeZ2gohWPxfgFi51beQ8U/dtnVPNzmrnxHowC1m0ELiXtwGBcbVCn6i9XB
/whZnEehZ3Tu18oStfZmwmiLO87iACBLHVEmmSAh9+6Qd1G4K7Q3RnJhbmNlc2Nv
IFN0YWJsdW0gKGR1c2tkcnVpZCkgPGR1c2tkcnVpZEBkZXNwYW1tZWQuY29tPohk
BBMRAgAkBQJBojvPAhsDBQkDwmcABgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEEIA
iBUvZohvuAcAoLv16/PQHaxxhs2wfhz6xv/3xax/AJ4yCj7vkVkP3wHyMrPqJgN4
ysB+9rQxRnJhbmNlc2NvIFN0YWJsdW0gKGR1c2tkcnVpZCkgPHN0YWJsdW1AZ21h
aWwuY29tPohkBBMRAgAkBQJBojxxAhsDBQkDwmcABgsJCAcDAgMVAgMDFgIBAh4B
AheAAAoJEEIAiBUvZohv62AAniC1boQ2ZcIstqKUkE2udfafSSyWAKCn071Yn4aA
rc6GmrYA+yyiuM+aqbQ/RnJhbmNlc2NvIFN0YWJsdW0gKGR1c2tkcnVpZCkgPGR1
c2tkcnVpZEB1c2Vycy5zb3VyY2Vmb3JnZS5uZXQ+iGQEExECACQFAkGiPLwCGwMF
CQPCZwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQQgCIFS9miG/mlwCfTZSdaou+
NkFO7M9Ram6554Ggf74AnjslfZye2j0xM/vnEo8d9868RUoFuQINBEGiO/EQCADh
UlT1bkIK7Z5dmscCObTh05JGIP4jD6Gw+uW1hcfR/67a00uAv4cPj7jtD6fo3t16
9CHfciz7vcu3nOHhyMHb/5g2a1iGHwBkoKcg9XQjlcwYAyIpmmU4tiLRAxhOVEHp
+oYZXlgNoHMwWMcxO73xMvBgMVujkNVkzoVRGdHsinwsvTaota7iQf2QAmT2Ou2/
cLRYCeUqs/6M4AcRB7kVqZfVrgK+gI8gLSH/wjRIvrjMjwK4ce9ZzdXWba0cRSST
M0TdEmRveb3NbNyvWStCZgeK1UlgjO5LqO1GWLyqSlTEEWO7t724PHu9mOgcoh6T
+DouzFT3GSTCk9jCI/oLAAMGCACzi1cuxTQxQymop05qvrR3KC4IXg32SdkRbknx
3lpYzkf9sWchd9NNF3f68Fma/3VlObOhJSjItgD2zuQy5q5tthHe3lOop5woy3Oa
vPTKuc2cb8JgbrcGcRjvE6Jji/Al1SfcRMnaCP/t+QOopKDKsePICbKrX3wIH2TM
CUf3BlQFhpT7Y26kjFlpnMNURfqac0J13mY6SSpu0EfO0lEYwDbSp4uXteJCN+zy
qrZTpdIb0brbR+orR8tVlWQUurrplMv6jnZyRDz5pOEWhY/KGBi5MARW+kVTOGey
NNHcPiOly9OoaEFTZOc3uNQC3rJi1uyuEeN+uy1PQ4VZl22GiE8EGBECAA8FAkGi
O/ECGwwFCQPCZwAACgkQQgCIFS9miG9+sACglZMZwtFbIxn25YC+9m25WgJxsksA
n0BiG6k7l5iQ+ovW7WKvjj7Ovc+V
=oCR6
- -----END PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBokYFjK3B/GbIJG8RAkk/AJ9H+7rV5M+PYCkb4xwDlHxGK60iYQCfW+bZ
dOD15OxuroiQ9329Kh7UE0w=
=l1TU
-----END PGP SIGNATURE-----
tcpick-0.2.1/PLATFORMS.compile 0000644 0001751 0001751 00000001360 10165254727 012644 0000000 0000000 == Successfully compilation on the following platforms ==
fields: OS - VERSION - ARCH - CC - BY
tcpick version 0.1.24
Slackware Linux 10.0 2.6.8.1 i386 gcc 3.3.4 duskdruid:despammed:com
Suse Linux 2.4.21-207-smp amd64 gcc 3.2.2 duskdruid:despammed:com
FreeBSD 6.0-CURRENT i386 gcc 3.4.2 lan:insys:it
NetBSD 1.6.2 i386 gcc 2.95.3 20010315
(release) kirash:phreaker:net
OpenBSD 3.6 i386 gcc 2.95.3 kirash:phreaker:net
OpenBSD 3.5 i386 gcc 2.95.3 20010125
(prerelease, propolice) kirash:phreaker:net
OpenBSD 3.4 i386 gcc 2.95.3 duskdruid:despammed:com
MacOSX-2 Darwin 6.8 powerpc gcc 3.3 duskdruid:despammed:com
tcpick version =< 0.1.23
Slackware Linux 9.1 2.6.2-7 i386 gcc 3.4.0 duskdruid:despammed:com
tcpick-0.2.1/PLATFORMS.running 0000644 0001751 0001751 00000001762 10165254727 012702 0000000 0000000 == Confirmed support for the following platforms and network interfaces ==
fields: OS - VERSION - ARCH - INTERFACE NAME - DLT_ NAME (INTERFACE DESCR.) - TEST BY
tcpick version 0.1.24
Slackware Linux 10.0 2.6.8.1 i386 eth0 EN10MB (ethernet10/100) duskdruid:despammed:com
Slackware Linux 10.0 2.6.8.1 i386 ppp0 LINUX_SLL (dial-up ppp) duskdruid:despammed:com
Slackware Linux 10.0 2.6.8.1 i386 lo EN10MB (loopback) duskdruid:despammed:com
OpenBSD 3.5 i386 rl0 EN10MB (Realtek 8129/8139) kirash:phreaker:net
OpenBSD 3.5 i386 lo0 LOOP (loopback interface) kirash:phreaker:net
OpenBSD 3.5 i386 pflog0 PFLOG (packet filter logging interface) kirash:phreaker:net
NetBSD 1.6.2 i386 rtk0 EN10MB (Realtek 8129/8139) kirash:phreaker:net
NetBSD 1.6.2 i386 lo0 LOOP (loopback interface) kirash:phreaker:net
tcpick version =< 0.1.23
Slackware Linux 9.1 2.6.2-7 i386 eth0 EN10MB (ethernet10/100) duskdruid:despammed:com
Slackware Linux 9.1 2.6.2-7 i386 ppp0 LINUX_SLL (dial-up ppp) duskdruid:despammed:com
tcpick-0.2.1/PLATFORMS.old 0000644 0001751 0001751 00000003021 10165254727 011766 0000000 0000000 =========
PLATFORMS
=========
tcpick compilation has been tested on these platforms:
* Slackware 9.1 with gcc 3.2.3 and linux 2.4.22 (my machine: Athlon i686)
* Slackware 9.1 with gcc 3.2.3 and linux 2.4.22 (thank you AdHe5)
* Slackware 9.1 with linux 2.4.23 on a Intel Celeron (thank you Alt[O]s)
* Slackware 9.0 with linux 2.4.22 on a Pentium 4 (thank you Kaioh)
* Gentoo 1.4 with gcc 3.2.2 and linux 2.6.0 (thank you hannibal)
* SuSE Linux 9.0 (thak you Alberto Panu)
* debian sid (unstable) with gcc 3.3.3 and libpcap-dev 0.7.2-5 on a linux 2.4.22 (thank you Maurizio Lemmo `Tannoiser')
* FreeBSD 5.2-RC (thank you Cristiano Deana)
* FreeBSD 5.0-RELEASE-p19 (i386) with gcc 3.2.1 (thank you Kirillov)
Failed tests:
* IBM AIX 4.3.3.11 (no getopt.h) (thank you Alberto 'JCN-9000' Varesio)
* darwin 7.2 on ppc(mac) (`DLT_PPP_ETHER' undeclared) (thank you gap)
* FreeBSD 4.9-RELEASE (getopt.h: No such file or directory) (thank you Cristiano Deana)
The following tests are provided by nextime: thank you very much!
* Debian SID with gcc 3.3.1 and linux 2.4.23 on x86
* Debian SID with gcc 3.3.1 and linux 2.6.0 on x86
* Debian woody with gcc 2.95 and linux 2.4.23 on x86
* Debian SID with gcc 3.3.0 and linux 2.4.23 on mips ( SGI Indy )
* Debian SID with gcc 3.3.1 and linux 2.4.23 on PPC
* Debian SID with gcc 3.3.0 and linux 2.4.23 on Sparc64
* FreeBSD 5.1 with gcc 3.3.1 on Sparc64
* Linux from scratch with gcc 3.3.0 and linux 2.4.23 on Alpha
Failed tests by nextime:
* NetBSD 1.6.1 with gcc 3.3.0 on m68k
* GNUStep gcc: 2.95 on NeXT Cube
tcpick-0.2.1/EXAMPLES 0000644 0001751 0001751 00000005262 10173301003 011044 0000000 0000000 This is EXAMPLES, produced by makeinfo version 4.7 from
EXAMPLES.texinfo.
1 Examples of tcpick usage
**************************
1.1 connection status
=====================
Tcpick is a sniffer able to understand wich status has the connection
(SYN-SENT, SYN-RECEIVED and so on). To see the connection tracker in
action on eth0 simply type:
# tcpick -i eth0 -C
`-C' means "enable colors", and the output is very pretty.
You will see something like this:
23:07:42.672171 1 SYN-SENT 12.34.56.78:41599 > 123.123.123.123:http
23:07:42.822239 2 SYN-SENT 12.34.56.78:41600 > 32.13.21.32:5973
23:07:42.826634 3 SYN-SENT 12.34.56.78:41601 > 123.45.67.89:5555
23:07:42.854681 4 SYN-SENT 12.34.56.78:41602 > 1.2.3.4:56789
23:07:43.084242 1 SYN-RECEIVED 12.34.56.78:41599 > 123.123.123.123:http
23:07:43.087045 1 ESTABLISHED 12.34.56.78:41599 > 123.123.123.123:http
23:07:44.061311 5 SYN-SENT 12.34.56.78:41603 > 10.20.30.40:8888
1.2 display the payload and packet headers
==========================================
It is very easy:
# tcpick -i eth0 -C -yP -h -a
`-yP' means "payload printable", `-h' means "header" and `-a' means
names resolution. Unprintable carachters are displayed as dots.
1.3 display client data only of the first smtp connection
=========================================================
# tcpick -i eth0 -C -bCU -T1 "port 25"
`-bCU' means: display the rebuilded stream (`-b') only the client
side (`C') and unprintable carachters will be displayed as hexcode
(`U').
`T1' means: display only the first (1) connection.
"port 25" is the filter.
1.4 download a file passively
=============================
Yeah! It is very a simple job:
#tcpick -i eth0 -wR "port ftp-data"
When the file has been completely transmitted (connection displayed
as "CLOSED") check in the working directory: you will find some files
named like this:
# ls *.tcpick
client_123.45.67.89_98.76.54.32_34567.tcpick
server_123.45.67.89_98.76.54.32_34567.tcpick
Bingo! If you do `$ file *.tcpick' you will find that one of the two
is a a gzip archive or whatever you sniffed.
1.5 redirect the first connection to a software
===============================================
You must choose between client or server side, because you don't want
both stream mixed in the standard output. It is a really simple job,
just type:
# tcpick -i eth0 --pipe client "port 80" | gzip > http_response.gz
or
# tcpick -i eth0 --pipe server "port 25" | nc foobar.net 25
Now, use your imagination and let me know what crazy experiments have
you done with tcpick ;^)
tcpick-0.2.1/VERSION 0000644 0001751 0001751 00000000006 10173301025 010746 0000000 0000000 0.2.1
tcpick-0.2.1/Makefile.EDITME 0000644 0001751 0001751 00000046270 10165254727 012342 0000000 0000000 # *** WARNING ***
# USE .EDITME FILES ONLY IF ./configure DOESN'T WORK PROPERLY!
# If you have had troubles with ./configure, please tell me about
# the problem and your Operating System.
# Makefile.in generated by automake 1.8.5 from Makefile.am.
# Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
srcdir = .
top_srcdir = .
pkgdatadir = $(datadir)/tcpick
pkglibdir = $(libdir)/tcpick
pkgincludedir = $(includedir)/tcpick
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/ginstall -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
ChangeLog INSTALL NEWS THANKS TODO depcomp install-sh missing \
mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
man8dir = $(mandir)/man8
am__installdirs = "$(DESTDIR)$(man8dir)"
NROFF = nroff
MANS = $(man8_MANS)
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run aclocal-1.8
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run tar
AUTOCONF = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run autoconf
AUTOHEADER = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run autoheader
AUTOMAKE = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run automake-1.8
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
LIBS = -lpcap -lpcap -lpcap -lpcap -lpcap -lpcap -lpcap -lpcap
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/duskdruid/devel/tcpick/dist/missing --run makeinfo
OBJEXT = o
PACKAGE = tcpick
PACKAGE_BUGREPORT = duskdruid@despammed.com
PACKAGE_NAME = tcpick
PACKAGE_STRING = tcpick 0.2.0-rc2
PACKAGE_TARNAME = tcpick
PACKAGE_VERSION = 0.2.0-rc2
PATH_SEPARATOR = :
SET_MAKE =
SHELL = /bin/sh
STRIP =
VERSION = 0.2.0-rc2
ac_ct_CC = gcc
ac_ct_STRIP =
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__include = include
am__leading_dot = .
am__quote =
bindir = ${exec_prefix}/bin
build_alias =
datadir = ${prefix}/share
exec_prefix = ${prefix}
host_alias =
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /home/duskdruid/devel/tcpick/dist/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p -- .
oldincludedir = /usr/include
prefix = /usr
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target_alias =
SUBDIRS = src
man8_MANS = tcpick.8
EXTRA_DIST = INTERNALS INTERNALS INTERNALS.old KNOWN-BUGS OPTIONS tcpick.8 public_key.asc public_key_OLD.asc public_key_OLD.revoke public_key_message.txt PLATFORMS.compile PLATFORMS.running PLATFORMS.old EXAMPLES VERSION doc/*.html doc/*.texinfo
nodist_DIST = NEWS
all: all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
cd $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
uninstall-info-am:
install-man8: $(man8_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.8*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
8*) ;; \
*) ext='8' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
done
uninstall-man8:
@$(NORMAL_UNINSTALL)
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.8*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
8*) ;; \
*) ext='8' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man8dir)/$$inst"; \
done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/doc
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| mkdir "$(distdir)/$$subdir" \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="../$(top_distdir)" \
distdir="../$(distdir)/$$subdir" \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
$(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(MANS)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am: install-man
install-exec-am:
install-info: install-info-recursive
install-man: install-man8
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am uninstall-man
uninstall-info: uninstall-info-recursive
uninstall-man: uninstall-man8
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
check-am clean clean-generic clean-recursive ctags \
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
dist-tarZ dist-zip distcheck distclean distclean-generic \
distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-man8 install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-info-am uninstall-man uninstall-man8
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
tcpick-0.2.1/autogen.sh 0000744 0001751 0001751 00000002216 10173201054 011703 0000000 0000000 #!/bin/sh
# Run this to generate all the initial makefiles, etc.
#
test -f configure.in || {
echo "This directory does not look like the top-level directory. stop."
exit 1
}
rm -rf config.cache autom4te*.cache aclocal.m4
echo "running "`autoheader --version | head -n 1` "..."
autoheader || {
echo "autoheader failed. stop."
exit 1
}
echo "running "`aclocal --version | head -n 1 ` "..."
aclocal --force $ACLOCAL_FLAGS 2> /dev/null || {
echo "aclocal failed. stop."
exit 1
}
echo "running "`automake --version | head -n 1` "..."
automake --foreign --include-deps --add-missing --copy || {
echo "automake failed. stop."
exit 1
}
echo "running "`autoconf --version | head -n 1` "..."
autoconf || {
echo "autoconf failed. stop."
exit 1
}
echo "running ./configure $* ..."
./configure > /dev/null $* || {
echo "./configure failed. stop."
exit 1
}
echo "Generating OPTIONS files"
man ./tcpick.8 | col -b > OPTIONS
man ./tcpick_italian.8 | col -b > OPTIONS.it
echo `cat configure.in | grep __VERSION | grep define| cut -f3 -d"[" | cut -f1 -d"]"` > VERSION
echo "tcpick version "`cat VERSION`" ready to be compiled"
tcpick-0.2.1/README.it 0000644 0001751 0001751 00000004074 10173301003 011176 0000000 0000000 This is README.it, produced by makeinfo version 4.7 from
README.it.texinfo.
tcpick e' uno sniffer con interfaccia testuale basato sulle
celeberrime librerie libpcap. Tra le sue funzioni quelle piu'
importanti sono la capacita' di tracciare flussi di dati trasferiti
mediante il protocollo tcp e la possibilita' di salvare i dati
catturati all'interno di files, oppure di visualizzarli direttamente
nel terminale. Puo' essere utilizzato per il download passivo di file
trasferiti via ftp (per l'http e' neccessaria una ulteriore decodifica
a livello applicazione). Tra le modalita' di visualizzazione dei dati
ci sono: esadecimale, esadecimale con ascii (ovvero il classico
hexdump), visualizzazione dei soli caratteri stampabili, modalita'
"raw" ecc. E' disponibile anche una modalita' a colori per rendere
l'output piu' leggibile. Se viene posizionato su un gateway puo'
essere utilizzato per osservare le attivita' degli utenti di una rete
interna. Inoltre e' adatto ad essere utilizzato con strumenti testuali
a riga di comando come grep, sed e awk.
Un semplice esempio per visualizzare le richieste http:
# tcpick -i ppp0 -yP | grep GET
home page
*********
http://tcpick.sourceforge.net
Altri file da leggere
*********************
* AUTHORS
* OPTIONS
* KNOWN-BUGS
* INSTALL
* EXAMPLES.it
* TODO
* ChangeLog
* COPYING
* public_key.asc (key to check package signatures)
* public_key_message.txt
contribuisci!
*************
tcpick e' un progetto open-source, e, in quanto tale, sono graditi
qualsiasi tipo di richieste di funzionalita', report di bug, patch e
quanto altro. Questa e' la mailing list, che puoi utilizzare per
segnalare qualsiasi problema:
* indirizzo
tcpick-project@lists.sourceforge.net
* Archivio
http://sourceforge.net/mailarchive/forum.php?forum=tcpick-project
* Pagina di iscrizione
http://lists.sourceforge.net/lists/listinfo/tcpick-project
Note sulla licenza
******************
Tcpick e' rilasciato con la licenza GNU GPL. Per ulteriori informazioni
leggere il file COPYING (in inglese)
tcpick-0.2.1/EXAMPLES.it 0000644 0001751 0001751 00000006546 10173301003 011465 0000000 0000000 This is EXAMPLES.it, produced by makeinfo version 4.7 from
EXAMPLES.it.texinfo.
Visualizzare lo stato delle connessioni tracciate
*************************************************
Tcpick e' uno sniffer in grado di tracciare le connessioni e
determinarne lo stato (SYN-SENT, SYN-RECEIVED e cosi' via).
Per vedere tcpick in azione si puo' eseguire questo comando da root:
# tcpick -i eth0 -C
L'opzione `-C' serve ad abilitare i colori per rendere la lettura
dell'output piu' gradevole, mentre l'opzione -i serve a specificare
l'interfaccia di rete.
Creando un po' di traffico (aprendo, ad esempio una pagina web)
dovreste vedere un output simile a questo:
23:07:42.672171 1 SYN-SENT 12.34.56.78:41599 > 123.123.123.123:http
23:07:42.822239 2 SYN-SENT 12.34.56.78:41600 > 32.13.21.32:5973
23:07:42.826634 3 SYN-SENT 12.34.56.78:41601 > 123.45.67.89:5555
23:07:42.854681 4 SYN-SENT 12.34.56.78:41602 > 1.2.3.4:56789
23:07:43.084242 1 SYN-RECEIVED 12.34.56.78:41599 > 123.123.123.123:http
23:07:43.087045 1 ESTABLISHED 12.34.56.78:41599 > 123.123.123.123:http
23:07:44.061311 5 SYN-SENT 12.34.56.78:41603 > 10.20.30.40:8888
Visualizzare il contenuto dei pacchetti e l'header
**************************************************
Se volete vedere i dati contenuti nei pacchetti, l'operazione richiesta
e' semplicissima:
# tcpick -i eth0 -C -yP -h -a
`-yP' significa "visualizza il contenuto del pacchetto", `-h'
abilita la visualizzazione dell'header (semplificato) e `-a' abilita la
risoluzione dei nomi via dns. I caratteri non stampabili vengono
visualizzati come punti.
Visualizzare i dati del client in una connessione smtp
******************************************************
# tcpick -i eth0 -C -bCU -T1 "port 25"
`-bCU' significa: ricostruisci il flusso tcp (`-b') ma visualizza
solo la parte attinente al client (`C') e i caratteri non stampabili
vengono visualizzati tramite codice esadecimale (`U').
`-T1' significa: tracciare solo la prima connessione incontrata
"port 25" e' il filtro per catturare solo connessioni smtp.
scaricare un file in modo passivo
*********************************
Qui' viene il bello!
#tcpick -i eth0 -wR ``port ftp-data''
Quando il file e' stato completamente trasmesso (CLOSED) controlla
nella directory corrente e troverai dei file simili a questi:
# ls *.tcpick
client_123.45.67.89_98.76.54.32_34567.tcpick
server_123.45.67.89_98.76.54.32_34567.tcpick
Ottimo! Se esegui il comando `$ file *.tcpick' vedrai che e' proprio
cio' che e' stato scaricato, e un md5sum garantira' e' stato sniffato
completamente e senza errori.
Redirigere la prima connessione incontrata ad un programma
**********************************************************
Devi scegliere se sniffare la parte relativa al server o al client,
poiche' ovviamente non si vuole mischiare entrambi i flussi nello
standard output. E' estremamente semplice; ecco alcuni esempi:
# tcpick -i eth0 --pipe client "port 80" | gzip > risposta_http.gz
oppure
# tcpick -i eth0 --pipe server "port 25" | nc foobar.net 25
Ora usa la tua immaginazione e se credi ne valga la pena, contattami
per farmi sapere che razza di alchimie hai inventato ;^) (magari
includero' degli script nel pacchetto sorgente).
Buon divertimento!
tcpick-0.2.1/tcpick_italian.8 0000644 0001751 0001751 00000030010 10173200523 012744 0000000 0000000 .TH "tcpick" 8
.SH NAME
tcpick \- sniffer tracciatore di connessioni
.SH SYNOPSIS
.B tcpick
[\fB -a \fP] [\fB -n \fP] [\fB -C \fP]
.br
.ti +7
[\fB -e \fP\fInum\fP ]
.br
.ti +7
[\fB -i \fP\fIinterfaccia \fP|\fB -r \fP\fI file \fP]
.br
.ti +7
[\fB -X \fP\fItimeout\fP ]
.br
.ti +7
[\fB -D \fP ] [\fB -F1 \fP|\fB -F2 \fP]
.br
.ti +7
[\fB -yH \fP|\fB -yP \fP|\fB -yR \fP|\fB -yU \fP|\fB -yx \fP|\fB -yX \fP]
.br
.ti +7
[\fB -bH \fP|\fB -bP \fP|\fB -bR \fP|\fB -bU \fP|\fB -bx \fP|\fB -bX \fP]
.br
.ti +7
[\fB -wH[ub] \fP|\fB -wP[ub] \fP|\fB -wR[ub] \fP|\fB -wU[ub] \fP]
.br
.ti +7
[\fB -v \fP [\fI verbosity \fP]] [\fB -S \fP] [\fB -h \fP]
.br
.ti +7
[\fB --separator \fP]
.br
.ti +7
[\fB -T \fP|\fB -Tf \fP [\fI n \fP]]
.br
.ti +7
[\fB -E \fP|\fB -Ef \fP [\fI n \fP]]
.br
.ti +7
[\fB -Pc \fP | \fB -Ps \fP]
.br
.ti +7
[\fI "filter" \fP]
.br
.ti +7
[\fB --help \fP] [\fB --version \fP]
.SH DESCRIZIONE
\fBtcpick\fP e' uno sniffer con interfaccia testuale basato sulle
celeberrime librerie libpcap. Tra le sue funzioni quelle piu'
importanti sono la capacita' di tracciare flussi di dati trasferiti
mediante il protocollo tcp e la possibilita' di salvare i dati
catturati all'interno di files, oppure di visualizzarli direttamente
nel terminale. Puo' essere utilizzato per il download passivo di file
trasferiti via ftp (per l'http e' neccessaria una ulteriore decodifica
a livello applicazione). Tra le modalita' di visualizzazione dei dati
ci sono: esadecimale, esadecimale con ascii (ovvero il classico
hexdump), visualizzazione dei soli caratteri stampabili, modalita' "raw"
ecc. E' disponibile anche una modalita' a colori per rendere
l'output piu' leggibile. Se viene posizionato su un gateway puo'
essere utilizzato per osservare le attivita' degli utenti di una rete
interna. Inoltre e' adatto ad essere utilizzato con strumenti testuali
a riga di comando come grep, sed e awk.
.SH OPZIONI BASE
.TP
.B \-i --interface \fIinterfaccia di rete\fP
ascolta l'interfaccia selezionata, (p.es. \fIppp0\fP o \fIeth0\fP).
Se non e' stata impostata l'opzione \fB-i\fP, tcpick selezionera'
di default il primo dispositivo disponibile.
.TP
.B \-r --readfile
legge i pacchetti da un file generato mediante
.B tcpdump -w
invece di utilizzare un interfaccia di rete ordinaria.
.TP
\fB "filtro" \fP
E' possibile impostare un filtro come quelli che si possono impostare
con \fB tcpdump(1)\fP
Un esauriente lettura della manpage di tcpdump(1) rendera' chiara la
logica di questa opzione.
.TP
.B \-a
Risolve i nomi degli host invece di mostrare indirizzi ip.
\fBAttenzione\fP: per ogni nuovo indirizzo ip sniffato verra' generata
una richiesta dns! Usare con cautela su dispositivi di rete ad alto traffico.
.TP
.B \-C --colors
Usa colori e rende il terminale piu' allegro per aiutarti a leggere l'output.
.TP
.B \-D \fIn\fP \fB--dirs\fP \fIn\fP
Crea directory per salvare le connessioni sniffate.
Quando una directory arriva a contenere \fIn\fP sessioni,
una nuova directory viene creata.
.TP
.B \-e \fInum\fP
Esce quando \fInum\fP pacchetti sono stati catturati.
.TP
.B \-E \fIn\fP
Esce quando \fIn\fP connessioni sono state tracciate (ovvero il loro
stato e' "CLOSED")
.TP
.B \-Ef \fIn\fP
Esce quando \fBle prime\fP \fIn\fP connessioni sono identificate come "CLOSED"
.TP
.B \-F1 \-F2 \--filenaming 1|2
sceglie la tipologia di nome per i file delle sessioni sniffate
.br
\fB \-F1 \fP: tcpick_\fBclientip\fP_\fBserverip\fP.\fBside\fP.dat
.br
(\fBside\fP puo' essere \fBclnt\fP, \fBserv\fP o \fBboth\fP)
.br
\fB \-F2 \fP: tcpick_\fBconnectionnumber\fP_\fBclientip\fP_\fBserverip\fP.\fBside\fP.dat
.TP
.B \-h
Mostra ip e porta sorgente e destinazione. Mostra i flag TCP come lettere.
.TP
.B \--help
Mostra un breve messaggio d'aiuto con il riassunto delle opzioni disponibili.
.TP
.B \-p
\fINon imposta\fP l'interfaccia di rete in modalita' promisqua.
Attenzione pero': l'interfaccia potrebbe essere in modalita' promisqua
per qualche altra ragione.
.TP
.B \-S
Sopprime la visualizzasione dello stato della connessione.
.TP
.B \--separator
Aggiunge un separatore ai pacchetti.
.TP
.B \-t
Visualizza il tempo (timestamp) in questo formato:
\fBore:minuti:secondi:microsecondi\fP
.TP
.B \-td
Esattamente come \fB-t\FP con l'aggiunta della data nel formato \fBgiorno-mese-anno\fP
.TP
.B \-T \fIn\fI
Traccia solo \fIn\fP connessioni. Molto utile per reti ad elevato
traffico.
Se \fIn\fP non e' stato specificato, viene impostato a \fB1\fP.
.TP
.B \-Tf \fIn\fP
Traccia \fBsolo le prime\fP \fIn\fP connessioni; le successive saranno
ignorate. Se \fIn\fP non e' stato specificato, viene impostato a \fB1\fP.
.TP
.B \-v \fIverbosity\fP
Opzione che probabilmente verra' rimossa. Imposta il livello
di "verbosita'"
Attualmente non ci sono molti messaggi extra da visualizzare.
\fB-v1\fP e' impostato di default.
Impostare la verbosita' a \fB0\fP (\fB-v0\fP) per sopprimere ogni messaggio ad
eccezione degli errori.
Non ci sono altri livelli di "verbosita'".
.TP
.B \-X \fItimeout\fI
Le connessioni vengono considerate \fBEXPIRED\fP (scadute)
quando non vengono scambiati pacchetti per almeno \fItimeout\fP
secondi. Di default sono 600 secondi.
.TP
.B \--version
Mostra la versione di tcpick
.SH VISUALIZZARE I DATI CONTENUTI NEI PACCHETTI
Queste opzioni hanno come prefisso \fB-y\fP
e sono utili per mostrare in svariati formati il contenuto dei
pacchetti (payload), ovvero i dati che vengono trasferiti a livello
applicazione non appena arrivano all'interfaccia di rete selezionata.
Questa opzione non sopprime i pacchetti tcp duplicati e non c'e'
neanche il riordino degli stessi, ma vengono mostrati "cosi' come
sono".
Per ottenere un flusso ricostruito e completamente riconosciuto
(esattamente come fa lo stack di rete di un S.O.)
leggi la descrizione del set di opzioni \fB-w\fP e \fB-b\fP.
.TP
.B \-yH
Visualizza i dati come cifre esadecimali spaziate
(per un hexdump vero e proprio si veda \fB-yx\fP e \fB-yX\fP).
.TP
.B \-yP
Visualizza i dati contenuti nel pacchetto. Caratteri non stampabili
vengono visualizzati come punti: "\fB.\fP".
Il carattere di nuova riga e le tabulazioni non vengono convertite in punti.
Questo e' probabilmente il modo migliore per vedere con semplicita'
richieste HTTP, comunicazioni IRC, sessioni SMTP eccetera.
.TP
.B \-yR
Modalita' "raw". Visualizza tutti i caratteri, stampabili e non. Se
qualcosa di binario (o compresso) viene trasferito, l'effetto sara'
probabilmente come visualizzare con "\fBcat\fP" un file zippato.
.TP
.B \-yx
Visualizza i dati in un dump esadecimale con 16 bytes per ogni riga.
.TP
.B \-yX
Visualizza i dati come \fB-yx\fP con l'aggiunta della corrispettiva
stringa ascii nella stessa riga.
.TP
.B \-yU
Visualizza i dati come \fB-yP\fP, ma i caratteri non stampabili
vengono visualizzati come valori esadecimali racchiusi tra parentesi
angolari.
.SH RICOSTRUIRE IL FLUSSO E SALVARLO SU FILE
Il prefisso di queste opzioni e' \fB-w\fP.
Attivando questa opzione le sessioni sniffate vengono salvate su file
nella directory corrente.
Il flusso viene ricostruito, riordinato e i pacchetti duplicati
vengono tralasciati. In questo modo e' possibile sniffare interi file
trasmessi via ftp (per fare un esempio) senza corruzione dei dati
(si puo' verificare con md5sum).
Con il flag \fBu\fP dell'opzione \fB-w\fP (p.es. \fB-wRu\fP)
i dati di entrambi client e server verranno salvati su un unico
file. Altrimenti i file saranno due e i flussi ben separati.
Usando il flag addizionale \fBb\fP all'opzione \fB-wu\fP
(p.es. \fB-wPub\fP), nel file sara' scritto questo banner
.br
\fB[client|server] offset prima:offset dopo (lunghezza del segmento ricostruito)\fP
.br
per distinguere tra dati del client e del server nello stesso file
.br
Se non viene attribuito nessun flag all'opzione \fB-w\fP
i dati saranno scritti come con \fB-wR\fP.
E' possibile decidere di salvare i dati dei soli client o dei soli server
impostando il flag
\fBC\fP (solo dati del client) oppure \fBS\fP (solo dati del server)
all'opzione \fB-w\fP.
.TP
.B \-wR
Questa e' l'opzione preferita: i dati vengono scritti senza alcun
cambiamento. Utilissima per sniffare dati binari, compressi o criptati.
.br
(\fB-wRC\fP solo il client, \fB-wRS\fP solo il server)
.TP
.B \-wP
Caratteri stampabili vengono scritti come punti.
.br
(\fB-wPC\fP solo il client, \fB-wPS\fP solo il server)
.TP
.B \-wU
Caratteri non stampabili vengono scritti come esadecimali tra
parentesi angolari.
.br
(\fB-wPC\fP solo il client, \fB-wPS\fP solo il server)
.TP
.B \-wH
Il flusso e' scritto sotto forma di esadecimali spaziati
.br
(\fB-wHC\fP solo il client, \fB-wHS\fP solo il server)
.SH VISUALIZZARE IL FLUSSO RICOSTRUITO
Il prefisso per queste opzioni e' \fB-b\fP.
Questo set di opzioni e' molto utile nell'intento di redirigere il
flusso sniffato verso un'altro programma tramite il pipe, e non ci
dovrebbe essere corruzione dei dati.
Naturalmente il piu' utile e' \fB-bR\fP per utilizzare i dati cosi'
come sono (raw).
Una funzionalita' molto utile e' \fBC\fP (visualizza solo il client)
e \fBS\fP (visualizza solo il server). p.es.: \fB-bRC\fP mostrera' in
formato "raw" solo i dati dal client.
I flag del set di opzioni \fB-b\fP sono molto simili a \fB-y\fP:
.TP
\fB -bH \fP esadecimale spaziato
(\fB-bHC\fP solo il client, \fB-bHS\fP solo il server)
.TP
\fB -bP \fP caratteri non stampabili visualizzati come punti
(\fB-bPC\fP solo il client, \fB-bPS\fP solo il server)
.TP
\fB -bR \fP modalita' raw
(\fB-bRC\fP solo il client, \fB-bRS\fP solo il server)
.TP
\fB -bU \fP caratteri non stampabili come esadecimali tra parentesi
angolari.
(\fB-bUC\fP solo il client, \fB-bUS\fP solo il server)
.TP
\fB -bx \fP hexdump
(\fB-bxC\fP solo il client, \fB-bxS\fP solo il server)
.TP
\fB -bU \fP hexdump + ascii
(\fB-bXC\fP solo il client, \fB-bXS\fP solo il server)
.TP
\fB -PC --pipe client \fP
E' un alias di \fB-bRC -S -v0 -Tf1 -Ef1\fP.
Con questa opzione puoi tracciare la prima connessione (\fB-T1\fP)
e i dati vengono visualizzato come "raw". Solo i dati che provengono
dal client vengono scritti sullo stdout.
Tutti i messaggi vengono soppressi, ad eccezione degli errori (\fB-S -v0\fP).
L'intenzione di questa opzione alias e' di riassumere l'intento di
scaricare per intero un flusso di dati di una sessione tcp.
.TP
\fB -PS --pipe server \fP
E' un alias di \fB-bRS -S -v0 -Tf1 -Ef1\fP.
.SH EXAMPLES
.TP
Visualizzare gli stati delle connessioni
\fB # tcpick -i eth0 -C\fP
.TP
Visualizzare il contenuto del pacchetto e una stringa riassuntiva dell'header:
\fB # tcpick -i eth0 -C -yP -h -a\fP
.TP
Visualizzare le email inviate da un utente
\fB # tcpick -i eth0 -C -bCU -T1 "port 25"\fP
.TP
scaricare file in maniera passiva
\fB # tcpick -i eth0 -wR "port ftp-data"\fP
.TP
loggare i dati http in file unici (client e server sono mescolati):
\fB # tcpick -i eth0 "port 80" -wRub\fP
.TP
redirigere la prima connessione verso un software
\fB # tcpick -i eth0 --pipe client "port 80" | gzip > http_response.gz\fP
.br
\fB # tcpick -i eth0 --pipe server "port 25" | nc foobar.net 25\fP
.SH MAILING-LIST
Indirizzo:
\fI\fP
.br
Archivio:
\fIhttp://sourceforge.net/mailarchive/forum.php?forum=tcpick-project\fP
.br
Iscrizione:
\fIhttp://lists.sourceforge.net/lists/listinfo/tcpick-project\fP
.br
Se hai qualche nuova idea, patch, richiesta di funzionalita' o
semplicemente necesiti di aiuto, scrivi in mailing-list!
.SH TCPICK SUL WEB
La home-page di tcpick e': \fIhttp://tcpick.sf.net\fP.
.br
La pagina di progetto invece e' qui':
\fIhttp://sourceforge.net/projects/tcpick\fP kindly hosted by the
sourceforge team.
.SH AUTORI
Controlla il file \fBAUTHORS\fP.
.SH BACHI
Bachi? Ci sono bachi? Beh, tcpick non e' certo un software perfetto, e
se hai qualche problema controlla il file \fBKNOWN-BUGS\fP.
.br
Sembra che su alcune versioni di MacOSX capiti un Segmentation Fault e
ci siano problemi nel tracciamento delle connessioni.
.br
Se trovi bachi, scrivi alla mailing-list.
.SH VEDERE ANCHE
Altri simpatici sniffer:
.br
tcpdump, ngrep, tcptrack, ettercap, ethereal, snort
.SH LICENZA
Tcpick e' rilasciato con la licenza GNU GPL. Per ulteriori informazioni
leggere il file COPYING (in inglese).
.SH Principio di Shaw:
.br
Fai un programma che anche un idiota puo' usare,
.br
e soltanto un idiota vorra' usarlo.
.br tcpick-0.2.1/INSTALL.it 0000644 0001751 0001751 00000002007 10165254727 011366 0000000 0000000 =================
INSTALLARE TCPICK
=================
Installazione veloce
====================
(dovrebbe funzionare sul 99% dei sistemi *nix)
Dopo essersi accertati che le librerie libpcap siano correttamente
installate digitare:
$ ./configure
$ make
$ su -
# make install
Nel caso le librerie libpcap non siano installate nel sistema, e'
possibile scaricare l'ultima versione da questo url:
http://www.tcpdump.org/
IN CASO DI PROBLEMI NELLA CONFIGURAZIONE - SOLO PER ESPERTI:
In qualche sistema unix ci potrebbero essere problemi nella
configurazione con lo script ./configure
Se ti senti impavido puoi modificare manualmente questi file:
./Makefile.EDITME
./src/Makefile.EDITME
./src/config.h.EDITME
e poi rinominarli in:
./Makefile
./src/Makefile
./src/config.h
A questo punto ti offrirei una birra (virtuale) se mi notifichi il
problema che hai riscontrato (e su quale sistema operativo) e io
cerchero' di fixare tutti i bachi del ./configure.
Per ulteriori informazioni leggere il file INSTALL (in inglese) tcpick-0.2.1/OPTIONS 0000644 0001751 0001751 00000026511 10173301025 010765 0000000 0000000 tcpick(8) tcpick(8)
NAME
tcpick - tcp stream sniffer and connection tracker
SYNOPSIS
tcpick [ -a ] [ -n ] [ -C ]
[ -e count ]
[ -i interface | -r file ]
[ -X timeout ]
[ -D ] [ -F1 | -F2 ]
[ -yH | -yP | -yR | -yU | -yx | -yX ]
[ -bH | -bP | -bR | -bU | -bx | -bX ]
[ -wH[ub] | -wP[ub] | -wR[ub] | -wU[ub] ]
[ -v [ verbosity ]] [ -S ] [ -h ]
[ --separator ]
[ -T | -Tf [ number ]]
[ -E | -Ef [ number ]]
[ -Pc | -Ps ]
[ "filter" ]
[ --help ] [ --version ]
DESCRIPTION
tcpick is a textmode sniffer libpcap-based that can track tcp streams
and saves the data captured in different files, each for every connec-
tion, or displays them in the terminal in different formats (hexdump,
printable charachters, raw...) Useful for picking files in a passive
way. It is useful to keep track of what users of a network are doing,
and is usable with textmode tools like grep, sed, awk. Happy data
hunting :-)
BASE OPTIONS
-i --interface interface
listen on selected interface, (i.e. ppp0 or eth0). If option -i
is omitted, tcpick is able to select the first open interface
(usually a ethernet card).
-r --readfile
reads raw packets from a file written with tcpdump -w instead of
using a network device.
"filter"
This is the filter for the capturer engine. You can set it in
the same way of setting the tcpdump(1) filter. Read tcpdump(1)
manpage for other explanations.
-a Displays host names instead of ip addresses. Warning: for every
new ip grabbed a dns query will be generated! Use it carefully
on high-traffic network devices!
-C --colors
Uses terminal colors: very nice! It should help you to read the
output of tcpick
-D number --dirs number
Create directories to store sniffed sessions. When a directory
contains number sessions, a new one will be created.
-e count
Exits when count packets have been sniffed
-E number
Exit when number sniffed connections are detected as "CLOSED"
-Ef number
Exit when the first number connections are detected as "CLOSED"
-F1 -F2 --filenaming 1|2
Choose the filenaming system.
-F1 : tcpick_clientip_serverip.side.dat
(side means clnt, serv or both)
-F2 : tcpick_connectionnumber_clientip_serverip.side.dat
-h Shows source and destination ip and port; shows tcp flags as
letters.
--help Displays a short help summary
-p Don't put the network interface in promiscuous mode. Note that
the interface might be in promiscuous mode for some other
reason.
-S Suppresses the "status of the connection" banner.
--separator
Add a separator for the payloads displayed.
-t Adds timestamp in hour:minutes:seconds:microseconds format
-td Like -t with date timestamp in day-month-year format
-T number
Track number connections. It could be very useful on a high-
traffic network device. If number is not specified, it will be
set to 1.
-Tf number
Track only the first number connections; the following will be
discarded. If number is not specified, it will be set to 1.
-v verbosity
Quite unuseful, yet. Set verbosity level. Actually there are not
really many extra messages to display, this means it is enabled
by default (-v1). Set verbosity level to 0 to suppress extra
messages (-v0) except error messages. Set verbosity level to 5
to display debug messages (-v5). There are not other verbosity
levels.
-X timeout
Connections are considered EXPIRED when there is no traffic for
at least timeout seconds. Default is 600.
--version
Displays the tcpick version
DISPLAY THE DATA IN THE TCP PACKETS
These options are prefixed by -y and are useful to display in various
ways the content of the packet sniffed (the data, called payload), once
it arrives at the listening interface. In that way the tcp duplicates
will be not discarded and the packets will not be reordered, but dis-
played "as is". If you want a fully acknowledged stream, see the -w and
-b set of options.
-yH View data in hexadecimal-spaced mode (for the hexdump see -yx
and -yX options.
-yP Shows data contained in the tcp packets. Non-printable
charachters are transformed in dots: ".". Newline character is
preserved. This is the best way, in my opinion to show data
like HTTP requests, IRC communication, SMTP stuff and so on.
-yR Displays all kind of charachters, printable and non printable.
If something binary is transmitted, the effect will probably be
like watching with "cat" at a gzipped file.
-yx Shows all data after the header in hexadecimal dump of 16 bytes
per line.
-yX Shows all data after the header in hexadecimal and ascii dump
with 16 bytes per line.
-yU Shows all data after the header, but Unprintable charachters are
displayed as hexadecimal values between a "<" and a ">" symbol.
REBUILD AND WRITE THE TCP STREAM TO FILE
The prefix for these options is -w. The TCP stream that has been
sniffed with these options will be written to file named:
client___.tcpick and
server___.tcpick
With the u flag of the -w option (i.e. -wRu) both client and server
data will be written to a unique file named in that way:
__.tcpick
If you use the additional flag b of the -w option (i.e. -wPub), in the
file will be written this banner:
[client|server] offset before:offset after (lenght of rebuilded seg-
ment)
to distinguish between client and server data.
The flow is rebuilded, reordered and the duplicates are dropped. In
that way it is possible to sniff entire files transmitted via ftp with-
out data corruption (you can see this with md5sum). If no argument is
given to -w the data will be written like -wR You can decide to write
only client or server data by setting the flag
C (output only client data) and S (output only server data) to the -w
set.
-wR This is the preferred option: data will be written without any
changes. Useful for sniffing binary or compressed files.
(-wRC only the client, -wRS only the server)
-wP Unprintable charachters are written like dots.
(-wPC only the client, -wPS only the server)
-wU Unprintable charachters are displayed as hexadecimal values
between a "<" and a ">" symbol.
(-wPC only the client, -wPS only the server)
-wH The flow is written in hexadecimal-spaced mode.
(-wHC only the client, -wHS only the server)
DISPLAY THE REBUILDED TCP STREAM
The prefix for these options is -b. This set of options is very useful
if you want to redirect the sniffed flow to anoter program with a pipe,
and there should be no data corruption. Of course the most useful is
-bR to show the data as they are (raw). A very useful feature is the
flag C (output only client data) and S (output only server data). I.e.:
-bRC will display only the data from the client in raw mode; in that
way you can put them in a file with a pipe redirection.
The sub-options are quite the same of the -y set, so you have:
-bH hex-spaced
(-bHC only the client, -bHS only the server)
-bP unprintable displayed as dots
(-bPC only the client, -bPS only the server)
-bR raw mode
(-bRC only the client, -bRS only the server)
-bU unprintable as .
(-bUC only the client, -bUS only the server)
-bx hexdump
(-bxC only the client, -bxS only the server)
-bU hexdump + ascii
(-bXC only the client, -bXS only the server)
-PC --pipe client
This is an alias for -bRC -S -v0 -Tf1 -Ef1. With this option
you are able to track only the first connection (-T1) matched by
tcpick and data are displayed as raw. Only data from the client
are put on stdout. All messages and banners are suppressed,
except error messages (-S -v0), so this option is particulary
useful to download an entire fully rebuilded and acknowledged
connection.
-PS --pipe server
This is an alias for -bRS -S -v0 -Tf1 -Ef1.
EXAMPLES
how to display the connection status:
# tcpick -i eth0 -C
display the payload and packet headers:
# tcpick -i eth0 -C -yP -h -a
display client data only of the first smtp connection:
# tcpick -i eth0 -C -bCU -T1 "port 25"
download a file passively:
# tcpick -i eth0 -wR "port ftp-data"
log http data in unique files (client and server mixed together):
# tcpick -i eth0 "port 80" -wRub
redirect the first connection to a software:
# tcpick -i eth0 --pipe client "port 80" | gzip >
http_response.gz
# tcpick -i eth0 --pipe server "port 25" | nc foobar.net 25
MAILING-LIST
Address:
Archive: http://sourceforge.net/mailarchive/forum.php?forum=tcpick-
project
Subscribe: http://lists.sourceforge.net/lists/listinfo/tcpick-project
If you have new ideas, patches, feature requests or simply need help,
don't wait! I will be grateful if you send a message to the mailing
list (even if you want to say what you liked most on tcpick).
TCPICK WEBSITE
The tcpick website is at http://tcpick.sf.net.
You can find the project page here:
http://sourceforge.net/projects/tcpick kindly hosted by the sourceforge
team.
AUTHORS
Please check AUTHORS file.
BUGS
Tcpick is an experimental software, and maybe some bugs are described
in the KNOWN-BUGS file.
On some versions of MacOSX Segmentation Fault happens and connections
aren't tracked properly.
If you find any other bug, please write to the tcpick mailing list.
SEE ALSO
Other nice packet/data sniffers:
tcpdump, ngrep, tcptrack, ettercap, ethereal, snort
LICENSE
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at you
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111, USA.
tcpick(8)
tcpick-0.2.1/OPTIONS.it 0000644 0001751 0001751 00000030325 10173301025 011376 0000000 0000000 tcpick(8) tcpick(8)
NAME
tcpick - sniffer tracciatore di connessioni
SYNOPSIS
tcpick [ -a ] [ -n ] [ -C ]
[ -e num ]
[ -i interfaccia | -r file ]
[ -X timeout ]
[ -D ] [ -F1 | -F2 ]
[ -yH | -yP | -yR | -yU | -yx | -yX ]
[ -bH | -bP | -bR | -bU | -bx | -bX ]
[ -wH[ub] | -wP[ub] | -wR[ub] | -wU[ub] ]
[ -v [ verbosity ]] [ -S ] [ -h ]
[ --separator ]
[ -T | -Tf [ n ]]
[ -E | -Ef [ n ]]
[ -Pc | -Ps ]
[ "filter" ]
[ --help ] [ --version ]
DESCRIZIONE
tcpick e' uno sniffer con interfaccia testuale basato sulle celeberrime
librerie libpcap. Tra le sue funzioni quelle piu' importanti sono la
capacita' di tracciare flussi di dati trasferiti mediante il protocollo
tcp e la possibilita' di salvare i dati catturati all'interno di files,
oppure di visualizzarli direttamente nel terminale. Puo' essere uti-
lizzato per il download passivo di file trasferiti via ftp (per l'http
e' neccessaria una ulteriore decodifica a livello applicazione). Tra
le modalita' di visualizzazione dei dati ci sono: esadecimale, esadeci-
male con ascii (ovvero il classico hexdump), visualizzazione dei soli
caratteri stampabili, modalita' "raw" ecc. E' disponibile anche una
modalita' a colori per rendere l'output piu' leggibile. Se viene
posizionato su un gateway puo' essere utilizzato per osservare le
attivita' degli utenti di una rete interna. Inoltre e' adatto ad
essere utilizzato con strumenti testuali a riga di comando come grep,
sed e awk.
OPZIONI BASE
-i --interface interfaccia di rete
ascolta l'interfaccia selezionata, (p.es. ppp0 o eth0). Se non
e' stata impostata l'opzione -i, tcpick selezionera' di default
il primo dispositivo disponibile.
-r --readfile
legge i pacchetti da un file generato mediante tcpdump -w invece
di utilizzare un interfaccia di rete ordinaria.
"filtro"
E' possibile impostare un filtro come quelli che si possono
impostare con tcpdump(1) Un esauriente lettura della manpage di
tcpdump(1) rendera' chiara la logica di questa opzione.
-a Risolve i nomi degli host invece di mostrare indirizzi ip.
Attenzione: per ogni nuovo indirizzo ip sniffato verra' generata
una richiesta dns! Usare con cautela su dispositivi di rete ad
alto traffico.
-C --colors
Usa colori e rende il terminale piu' allegro per aiutarti a leg-
gere l'output.
-D n --dirs n
Crea directory per salvare le connessioni sniffate. Quando una
directory arriva a contenere n sessioni, una nuova directory
viene creata.
-e num Esce quando num pacchetti sono stati catturati.
-E n Esce quando n connessioni sono state tracciate (ovvero il loro
stato e' "CLOSED")
-Ef n Esce quando le prime n connessioni sono identificate come
"CLOSED"
-F1 -F2 --filenaming 1|2
sceglie la tipologia di nome per i file delle sessioni sniffate
-F1 : tcpick_clientip_serverip.side.dat
(side puo' essere clnt, serv o both)
-F2 : tcpick_connectionnumber_clientip_serverip.side.dat
-h Mostra ip e porta sorgente e destinazione. Mostra i flag TCP
come lettere.
--help Mostra un breve messaggio d'aiuto con il riassunto delle opzioni
disponibili.
-p Non imposta l'interfaccia di rete in modalita' promisqua.
Attenzione pero': l'interfaccia potrebbe essere in modalita'
promisqua per qualche altra ragione.
-S Sopprime la visualizzasione dello stato della connessione.
--separator
Aggiunge un separatore ai pacchetti.
-t Visualizza il tempo (timestamp) in questo formato:
ore:minuti:secondi:microsecondi
-td Esattamente come -t con l'aggiunta della data nel formato
giorno-mese-anno
-T n Traccia solo n connessioni. Molto utile per reti ad elevato
traffico. Se n non e' stato specificato, viene impostato a 1.
-Tf n Traccia solo le prime n connessioni; le successive saranno igno-
rate. Se n non e' stato specificato, viene impostato a 1.
-v verbosity
Opzione che probabilmente verra' rimossa. Imposta il livello di
"verbosita'" Attualmente non ci sono molti messaggi extra da
visualizzare. -v1 e' impostato di default. Impostare la ver-
bosita' a 0 (-v0) per sopprimere ogni messaggio ad eccezione
degli errori. Non ci sono altri livelli di "verbosita'".
-X timeout
Le connessioni vengono considerate EXPIRED (scadute) quando non
vengono scambiati pacchetti per almeno timeout secondi. Di
default sono 600 secondi.
--version
Mostra la versione di tcpick
VISUALIZZARE I DATI CONTENUTI NEI PACCHETTI
Queste opzioni hanno come prefisso -y e sono utili per mostrare in
svariati formati il contenuto dei pacchetti (payload), ovvero i dati
che vengono trasferiti a livello applicazione non appena arrivano
all'interfaccia di rete selezionata. Questa opzione non sopprime i
pacchetti tcp duplicati e non c'e' neanche il riordino degli stessi, ma
vengono mostrati "cosi' come sono". Per ottenere un flusso ricostruito
e completamente riconosciuto (esattamente come fa lo stack di rete di
un S.O.) leggi la descrizione del set di opzioni -w e -b.
-yH Visualizza i dati come cifre esadecimali spaziate (per un hex-
dump vero e proprio si veda -yx e -yX).
-yP Visualizza i dati contenuti nel pacchetto. Caratteri non stampa-
bili vengono visualizzati come punti: ".". Il carattere di
nuova riga e le tabulazioni non vengono convertite in punti.
Questo e' probabilmente il modo migliore per vedere con sem-
plicita' richieste HTTP, comunicazioni IRC, sessioni SMTP
eccetera.
-yR Modalita' "raw". Visualizza tutti i caratteri, stampabili e non.
Se qualcosa di binario (o compresso) viene trasferito, l'effetto
sara' probabilmente come visualizzare con "cat" un file zippato.
-yx Visualizza i dati in un dump esadecimale con 16 bytes per ogni
riga.
-yX Visualizza i dati come -yx con l'aggiunta della corrispettiva
stringa ascii nella stessa riga.
-yU Visualizza i dati come -yP, ma i caratteri non stampabili ven-
gono visualizzati come valori esadecimali racchiusi tra par-
entesi angolari.
RICOSTRUIRE IL FLUSSO E SALVARLO SU FILE
Il prefisso di queste opzioni e' -w. Attivando questa opzione le ses-
sioni sniffate vengono salvate su file nella directory corrente.
Il flusso viene ricostruito, riordinato e i pacchetti duplicati vengono
tralasciati. In questo modo e' possibile sniffare interi file trasmessi
via ftp (per fare un esempio) senza corruzione dei dati (si puo' veri-
ficare con md5sum).
Con il flag u dell'opzione -w (p.es. -wRu) i dati di entrambi client e
server verranno salvati su un unico file. Altrimenti i file saranno due
e i flussi ben separati.
Usando il flag addizionale b all'opzione -wu (p.es. -wPub), nel file
sara' scritto questo banner
[client|server] offset prima:offset dopo (lunghezza del segmento
ricostruito)
per distinguere tra dati del client e del server nello stesso file
Se non viene attribuito nessun flag all'opzione -w i dati saranno
scritti come con -wR.
E' possibile decidere di salvare i dati dei soli client o dei soli
server impostando il flag C (solo dati del client) oppure S (solo dati
del server) all'opzione -w.
-wR Questa e' l'opzione preferita: i dati vengono scritti senza
alcun cambiamento. Utilissima per sniffare dati binari, com-
pressi o criptati.
(-wRC solo il client, -wRS solo il server)
-wP Caratteri stampabili vengono scritti come punti.
(-wPC solo il client, -wPS solo il server)
-wU Caratteri non stampabili vengono scritti come esadecimali tra
parentesi angolari.
(-wPC solo il client, -wPS solo il server)
-wH Il flusso e' scritto sotto forma di esadecimali spaziati
(-wHC solo il client, -wHS solo il server)
VISUALIZZARE IL FLUSSO RICOSTRUITO
Il prefisso per queste opzioni e' -b. Questo set di opzioni e' molto
utile nell'intento di redirigere il flusso sniffato verso un'altro pro-
gramma tramite il pipe, e non ci dovrebbe essere corruzione dei dati.
Naturalmente il piu' utile e' -bR per utilizzare i dati cosi' come sono
(raw). Una funzionalita' molto utile e' C (visualizza solo il client)
e S (visualizza solo il server). p.es.: -bRC mostrera' in formato "raw"
solo i dati dal client.
I flag del set di opzioni -b sono molto simili a -y:
-bH esadecimale spaziato
(-bHC solo il client, -bHS solo il server)
-bP caratteri non stampabili visualizzati come punti
(-bPC solo il client, -bPS solo il server)
-bR modalita' raw
(-bRC solo il client, -bRS solo il server)
-bU caratteri non stampabili come esadecimali tra parentesi
angolari. (-bUC solo il client, -bUS solo il server)
-bx hexdump
(-bxC solo il client, -bxS solo il server)
-bU hexdump + ascii
(-bXC solo il client, -bXS solo il server)
-PC --pipe client
E' un alias di -bRC -S -v0 -Tf1 -Ef1. Con questa opzione puoi
tracciare la prima connessione (-T1) e i dati vengono visualiz-
zato come "raw". Solo i dati che provengono dal client vengono
scritti sullo stdout. Tutti i messaggi vengono soppressi, ad
eccezione degli errori (-S -v0). L'intenzione di questa opzione
alias e' di riassumere l'intento di scaricare per intero un
flusso di dati di una sessione tcp.
-PS --pipe server
E' un alias di -bRS -S -v0 -Tf1 -Ef1.
EXAMPLES
Visualizzare gli stati delle connessioni
# tcpick -i eth0 -C
Visualizzare il contenuto del pacchetto e una stringa riassuntiva
dell'header:
# tcpick -i eth0 -C -yP -h -a
Visualizzare le email inviate da un utente
# tcpick -i eth0 -C -bCU -T1 "port 25"
scaricare file in maniera passiva
# tcpick -i eth0 -wR "port ftp-data"
loggare i dati http in file unici (client e server sono mescolati):
# tcpick -i eth0 "port 80" -wRub
redirigere la prima connessione verso un software
# tcpick -i eth0 --pipe client "port 80" | gzip >
http_response.gz
# tcpick -i eth0 --pipe server "port 25" | nc foobar.net 25
MAILING-LIST
Indirizzo:
Archivio: http://sourceforge.net/mailarchive/forum.php?forum=tcpick-
project
Iscrizione: http://lists.sourceforge.net/lists/listinfo/tcpick-project
Se hai qualche nuova idea, patch, richiesta di funzionalita' o sem-
plicemente necesiti di aiuto, scrivi in mailing-list!
TCPICK SUL WEB
La home-page di tcpick e': http://tcpick.sf.net.
La pagina di progetto invece e' qui': http://source-
forge.net/projects/tcpick kindly hosted by the sourceforge team.
AUTORI
Controlla il file AUTHORS.
BACHI
Bachi? Ci sono bachi? Beh, tcpick non e' certo un software perfetto, e
se hai qualche problema controlla il file KNOWN-BUGS.
Sembra che su alcune versioni di MacOSX capiti un Segmentation Fault e
ci siano problemi nel tracciamento delle connessioni.
Se trovi bachi, scrivi alla mailing-list.
VEDERE ANCHE
Altri simpatici sniffer:
tcpdump, ngrep, tcptrack, ettercap, ethereal, snort
LICENZA
Tcpick e' rilasciato con la licenza GNU GPL. Per ulteriori informazioni
leggere il file COPYING (in inglese).
Principio di Shaw:
Fai un programma che anche un idiota puo' usare,
e soltanto un idiota vorra' usarlo.
tcpick(8)