Merge lp:~logan/ubuntu/quantal/tcpdump/debian-merge into lp:ubuntu/quantal/tcpdump

Proposed by Logan Rosen
Status: Merged
Merged at revision: 30
Proposed branch: lp:~logan/ubuntu/quantal/tcpdump/debian-merge
Merge into: lp:ubuntu/quantal/tcpdump
Diff against target: 16960 lines (+1638/-13853)
57 files modified
.pc/10_man_install.diff/Makefile.in (+0/-448)
.pc/15_install.diff/Makefile.in (+0/-448)
.pc/20_man_fixes.diff/tcpdump.1.in (+0/-1744)
.pc/40_openssl.diff/configure.in (+0/-1111)
.pc/50_autotools-dev.diff/config.guess (+0/-1502)
.pc/50_autotools-dev.diff/config.sub (+0/-1708)
.pc/50_hurd.diff/tcpdump-stdinc.h (+0/-226)
.pc/50_kfreebsd.diff/configure.in (+0/-1056)
.pc/90_man_apparmor.diff/tcpdump.1.in (+0/-1744)
.pc/applied-patches (+0/-8)
CHANGES (+16/-0)
CREDITS (+3/-0)
Makefile.in (+12/-8)
VERSION (+1/-1)
aclocal.m4 (+8/-1)
config.guess (+0/-5)
config.sub (+0/-5)
configure (+18/-4)
configure.in (+58/-4)
debian/changelog (+31/-0)
debian/control (+1/-1)
debian/patches/40_openssl.diff (+3/-1)
debian/patches/50_kfreebsd.diff (+0/-16)
debian/patches/series (+0/-1)
decode_prefix.h (+2/-2)
ethertype.h (+3/-0)
forces.h (+1/-1)
netdissect.h (+1/-0)
print-802_11.c (+1/-1)
print-bgp.c (+319/-198)
print-ether.c (+5/-1)
print-forces.c (+16/-16)
print-icmp6.c (+1/-1)
print-igmp.c (+5/-1)
print-ip.c (+13/-13)
print-ip6opts.c (+4/-1)
print-ldp.c (+71/-18)
print-lldp.c (+2/-2)
print-lwapp.c (+1/-2)
print-ospf6.c (+131/-76)
print-pim.c (+2/-2)
print-pppoe.c (+2/-0)
print-rrcp.c (+2/-2)
print-tipc.c (+392/-0)
tcpdump-stdinc.h (+0/-4)
tcpdump.1.in (+58/-16)
tcpdump.c (+10/-4)
tests/TESTLIST (+8/-2)
tests/TESTrun.sh (+4/-4)
tests/forces1vvv.out (+3/-3)
tests/forces1vvvv.out (+3/-3)
tests/forces2.out (+0/-491)
tests/forces2v.out (+0/-982)
tests/forces2vv.out (+377/-1965)
tests/icmpv6.out (+13/-0)
tests/lmp.new (+36/-0)
tests/pppoe.out (+1/-0)
To merge this branch: bzr merge lp:~logan/ubuntu/quantal/tcpdump/debian-merge
Reviewer Review Type Date Requested Status
Jamie Strandboge Approve
Ubuntu branches Pending
Review via email: mp+118851@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

ACK. Looks great. Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed directory '.pc/10_man_install.diff'
2=== removed file '.pc/10_man_install.diff/Makefile.in'
3--- .pc/10_man_install.diff/Makefile.in 2012-01-04 10:33:48 +0000
4+++ .pc/10_man_install.diff/Makefile.in 1970-01-01 00:00:00 +0000
5@@ -1,448 +0,0 @@
6-# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
7-# The Regents of the University of California. All rights reserved.
8-#
9-# Redistribution and use in source and binary forms, with or without
10-# modification, are permitted provided that: (1) source code distributions
11-# retain the above copyright notice and this paragraph in its entirety, (2)
12-# distributions including binary code include the above copyright notice and
13-# this paragraph in its entirety in the documentation or other materials
14-# provided with the distribution, and (3) all advertising materials mentioning
15-# features or use of this software display the following acknowledgement:
16-# ``This product includes software developed by the University of California,
17-# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
18-# the University nor the names of its contributors may be used to endorse
19-# or promote products derived from this software without specific prior
20-# written permission.
21-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
22-# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
23-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
24-#
25-# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.325 2008-11-21 23:17:26 guy Exp $ (LBL)
26-
27-#
28-# Various configurable paths (remember to edit Makefile.in, not Makefile)
29-#
30-
31-# Top level hierarchy
32-prefix = @prefix@
33-exec_prefix = @exec_prefix@
34-datarootdir = @datarootdir@
35-# Pathname of directory to install the binary
36-sbindir = @sbindir@
37-# Pathname of directory to install the man page
38-mandir = @mandir@
39-
40-# VPATH
41-srcdir = @srcdir@
42-VPATH = @srcdir@
43-
44-#
45-# You shouldn't need to edit anything below here.
46-#
47-
48-CC = @CC@
49-PROG = tcpdump
50-CCOPT = @V_CCOPT@
51-INCLS = -I. @V_INCLS@
52-DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@
53-
54-# Standard CFLAGS
55-CFLAGS = @CFLAGS@
56-FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS)
57-
58-# Standard LDFLAGS
59-LDFLAGS = @LDFLAGS@
60-
61-# Standard LIBS
62-LIBS = @LIBS@
63-
64-INSTALL = @INSTALL@
65-INSTALL_PROGRAM = @INSTALL_PROGRAM@
66-INSTALL_DATA = @INSTALL_DATA@
67-RANLIB = @RANLIB@
68-
69-# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
70-# Also, gcc does not remove the .o before forking 'as', which can be a
71-# problem if you don't own the file but can write to the directory.
72-.c.o:
73- @rm -f $@
74- $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
75-
76-CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
77- nlpid.c l2vpn.c machdep.c parsenfsfh.c in_cksum.c \
78- print-802_11.c print-802_15_4.c print-ap1394.c print-ah.c \
79- print-arcnet.c print-aodv.c print-arp.c print-ascii.c print-atalk.c \
80- print-atm.c print-beep.c print-bfd.c print-bgp.c \
81- print-bootp.c print-bt.c print-carp.c print-cdp.c print-cfm.c \
82- print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \
83- print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \
84- print-eap.c print-eigrp.c\
85- print-esp.c print-ether.c print-fddi.c print-fr.c \
86- print-gre.c print-hsrp.c print-icmp.c print-igmp.c \
87- print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \
88- print-ipx.c print-isoclns.c print-juniper.c print-krb.c \
89- print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \
90- print-lmp.c print-lspping.c print-lwapp.c \
91- print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \
92- print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \
93- print-pgm.c print-pim.c \
94- print-ppi.c print-ppp.c print-pppoe.c print-pptp.c \
95- print-radius.c print-raw.c print-rip.c print-rpki-rtr.c print-rrcp.c print-rsvp.c \
96- print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \
97- print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \
98- print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \
99- print-timed.c print-token.c print-udld.c print-udp.c print-usb.c \
100- print-vjc.c print-vqp.c print-vrrp.c print-vtp.c print-forces.c \
101- print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c
102-
103-LIBNETDISSECT_SRC=print-isakmp.c
104-LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o)
105-LIBNETDISSECT=libnetdissect.a
106-
107-LOCALSRC = @LOCALSRC@
108-GENSRC = version.c
109-LIBOBJS = @LIBOBJS@
110-
111-SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LIBNETDISSECT_SRC)
112-
113-# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
114-# hack the extra indirection
115-OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS) $(LIBNETDISSECT_OBJ)
116-HDR = \
117- acconfig.h \
118- addrtoname.h \
119- af.h \
120- ah.h \
121- aodv.h \
122- appletalk.h \
123- arcnet.h \
124- atm.h \
125- atmuni31.h \
126- bootp.h \
127- bgp.h \
128- chdlc.h \
129- cpack.h \
130- dccp.h \
131- decnet.h \
132- decode_prefix.h \
133- enc.h \
134- esp.h \
135- ether.h \
136- ethertype.h \
137- extract.h \
138- fddi.h \
139- forces.h \
140- gmpls.h \
141- gmt2local.h \
142- icmp6.h \
143- ieee802_11.h \
144- ieee802_11_radio.h \
145- igrp.h \
146- interface.h \
147- interface.h \
148- ip.h \
149- ip6.h \
150- ipfc.h \
151- ipnet.h \
152- ipproto.h \
153- ipsec_doi.h \
154- ipx.h \
155- isakmp.h \
156- l2tp.h \
157- l2vpn.h \
158- lane.h \
159- llc.h \
160- machdep.h \
161- mib.h \
162- mpls.h \
163- nameser.h \
164- netbios.h \
165- netdissect.h \
166- nfs.h \
167- nfsfh.h \
168- nlpid.h \
169- ntp.h \
170- oakley.h \
171- ospf.h \
172- ospf6.h \
173- oui.h \
174- pcap-missing.h \
175- pmap_prot.h \
176- ppi.h \
177- ppp.h \
178- route6d.h \
179- rpc_auth.h \
180- rpc_msg.h \
181- rx.h \
182- sctpConstants.h \
183- sctpHeader.h \
184- setsignal.h \
185- signature.h \
186- slcompress.h \
187- slip.h \
188- sll.h \
189- smb.h \
190- tcp.h \
191- tcpdump-stdinc.h \
192- telnet.h \
193- tftp.h \
194- timed.h \
195- token.h \
196- udp.h
197-
198-TAGHDR = \
199- /usr/include/arpa/tftp.h \
200- /usr/include/net/if_arp.h \
201- /usr/include/net/slip.h \
202- /usr/include/netinet/if_ether.h \
203- /usr/include/netinet/in.h \
204- /usr/include/netinet/ip_icmp.h \
205- /usr/include/netinet/tcp.h \
206- /usr/include/netinet/udp.h \
207- /usr/include/protocols/routed.h
208-
209-TAGFILES = $(SRC) $(HDR) $(TAGHDR)
210-
211-CLEANFILES = $(PROG) $(OBJ) $(GENSRC)
212-
213-EXTRA_DIST = \
214- CHANGES \
215- CREDITS \
216- INSTALL.txt \
217- LICENSE \
218- Makefile.in \
219- Makefile-devel-adds \
220- README \
221- Readme.Win32 \
222- VERSION \
223- aclocal.m4 \
224- atime.awk \
225- bpf_dump.c \
226- config.guess \
227- config.h.in \
228- config.sub \
229- configure \
230- configure.in \
231- install-sh \
232- lbl/os-osf4.h \
233- lbl/os-solaris2.h \
234- lbl/os-sunos4.h \
235- lbl/os-ultrix4.h \
236- makemib \
237- missing/addrinfo.h \
238- missing/dlnames.c \
239- missing/datalinks.c \
240- missing/getnameinfo.c \
241- missing/inet_aton.c \
242- missing/inet_ntop.c \
243- missing/inet_pton.c \
244- missing/snprintf.c \
245- missing/sockstorage.h \
246- missing/strdup.c \
247- missing/strlcat.c \
248- missing/strlcpy.c \
249- missing/strsep.c \
250- mkdep \
251- packetdat.awk \
252- pcap_dump_ftell.c \
253- print-babel.c \
254- print-dhcp6.c \
255- print-frag6.c \
256- print-icmp6.c \
257- print-ip6.c \
258- print-ip6opts.c \
259- print-mobility.c \
260- print-netbios.c \
261- print-ospf6.c \
262- print-pflog.c \
263- print-ripng.c \
264- print-rt6.c \
265- print-smb.c \
266- send-ack.awk \
267- smbutil.c \
268- stime.awk \
269- strcasecmp.c \
270- tcpdump.1.in \
271- tests/02-sunrise-sunset-esp.pcap \
272- tests/08-sunrise-sunset-aes.pcap \
273- tests/08-sunrise-sunset-esp2.pcap \
274- tests/QinQpacket.out \
275- tests/QinQpacket.pcap \
276- tests/QinQpacketv.out \
277- tests/TESTLIST \
278- tests/TESTonce \
279- tests/TESTrun.sh \
280- tests/babel.pcap \
281- tests/babel1.out \
282- tests/babel1v.out \
283- tests/bgp-infinite-loop.pcap \
284- tests/bgp_vpn_attrset.out \
285- tests/bgp_vpn_attrset.pcap \
286- tests/chdlc-slarp-short.pcap \
287- tests/chdlc-slarp.pcap \
288- tests/dio.out \
289- tests/dio.pcap \
290- tests/e1000g.out \
291- tests/e1000g.pcap \
292- tests/eapon1.gdbinit \
293- tests/eapon1.out \
294- tests/eapon1.pcap \
295- tests/empty.uu \
296- tests/esp-secrets.txt \
297- tests/esp0.out \
298- tests/esp1.gdbinit \
299- tests/esp1.out \
300- tests/esp2.gdbinit \
301- tests/esp2.out \
302- tests/esp3.gdbinit \
303- tests/esp4.gdbinit \
304- tests/esp5.gdbinit \
305- tests/esp5.out \
306- tests/espudp1.out \
307- tests/espudp1.pcap \
308- tests/forces1.out \
309- tests/forces1.pcap \
310- tests/forces1vvv.out \
311- tests/forces1vvvv.out \
312- tests/forces2.out \
313- tests/forces2v.out \
314- tests/forces2vv.out \
315- tests/forces3vvv.out \
316- tests/ikev2four.out \
317- tests/ikev2four.pcap \
318- tests/ikev2fourv.out \
319- tests/ikev2fourv4.out \
320- tests/ikev2pI2-secrets.txt \
321- tests/ikev2pI2.out \
322- tests/ikev2pI2.pcap \
323- tests/isakmp-delete-segfault.pcap \
324- tests/isakmp-identification-segfault.pcap \
325- tests/isakmp-pointer-loop.pcap \
326- tests/isakmp1.out \
327- tests/isakmp2.out \
328- tests/isakmp3.out \
329- tests/isakmp4.out \
330- tests/isakmp4500.pcap \
331- tests/isis-infinite-loop.pcap \
332- tests/ldp-infinite-loop.pcap \
333- tests/lmp.out \
334- tests/lmp.pcap \
335- tests/lmp.sh \
336- tests/lspping-fec-ldp.pcap \
337- tests/lspping-fec-rsvp.pcap \
338- tests/mpls-ldp-hello.out \
339- tests/mpls-ldp-hello.pcap \
340- tests/mpls-traceroute.pcap \
341- tests/ospf-gmpls.out \
342- tests/ospf-gmpls.pcap \
343- tests/print-A.out \
344- tests/print-AA.out \
345- tests/print-capX.out \
346- tests/print-capXX.out \
347- tests/print-flags.pcap \
348- tests/print-flags.sh \
349- tests/print-x.out \
350- tests/print-xx.out \
351- tests/rsvp-infinite-loop.pcap \
352- tests/sflow_multiple_counter_30_pdus.out \
353- tests/sflow_multiple_counter_30_pdus.pcap \
354- vfprintf.c \
355- win32/Include/errno.h \
356- win32/Include/getopt.h \
357- win32/Include/w32_fzs.h \
358- win32/Src/getopt.c \
359- win32/prj/GNUmakefile \
360- win32/prj/WinDump.dsp \
361- win32/prj/WinDump.dsw
362-
363-all: $(PROG)
364-
365-$(PROG): $(OBJ) @V_PCAPDEP@
366- @rm -f $@
367- $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
368-
369-$(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
370- @rm -f $@
371- $(AR) cr $@ $(LIBNETDISSECT_OBJ)
372- $(RANLIB) $@
373-
374-datalinks.o: $(srcdir)/missing/datalinks.c
375- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
376-dlnames.o: $(srcdir)/missing/dlnames.c
377- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
378-getnameinfo.o: $(srcdir)/missing/getnameinfo.c
379- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
380-getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
381- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
382-inet_pton.o: $(srcdir)/missing/inet_pton.c
383- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
384-inet_ntop.o: $(srcdir)/missing/inet_ntop.c
385- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c
386-inet_aton.o: $(srcdir)/missing/inet_aton.c
387- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
388-snprintf.o: $(srcdir)/missing/snprintf.c
389- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
390-strlcat.o: $(srcdir)/missing/strlcat.c
391- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
392-strlcpy.o: $(srcdir)/missing/strlcpy.c
393- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
394-strsep.o: $(srcdir)/missing/strsep.c
395- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
396-
397-version.o: version.c
398- $(CC) $(FULL_CFLAGS) -c version.c
399-
400-version.c: $(srcdir)/VERSION
401- @rm -f $@
402- if grep GIT ${srcdir}/VERSION >/dev/null; then \
403- read ver <${srcdir}/VERSION; \
404- echo $$ver | tr -d '\012'; \
405- date +_%Y_%m_%d; \
406- else \
407- cat ${srcdir}/VERSION; \
408- fi | sed -e 's/.*/const char version[] = "&";/' > $@
409-
410-install: all
411- [ -d $(DESTDIR)$(sbindir) ] || \
412- (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
413- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
414- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION`
415- [ -d $(DESTDIR)$(mandir)/man1 ] || \
416- (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
417- $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
418-
419-uninstall:
420- rm -f $(DESTDIR)$(sbindir)/$(PROG)
421- rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
422-
423-lint: $(GENSRC)
424- lint -hbxn $(SRC) | \
425- grep -v 'struct/union .* never defined' | \
426- grep -v 'possible pointer alignment problem'
427-
428-clean:
429- rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar.gz
430-
431-distclean:
432- rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
433- config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1
434- rm -rf autom4te.cache
435-
436-check: tcpdump
437- (cd tests && ./TESTrun.sh)
438-
439-tags: $(TAGFILES)
440- ctags -wtd $(TAGFILES)
441-
442-TAGS: $(TAGFILES)
443- etags $(TAGFILES)
444-
445-releasetar:
446- @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
447- mkdir $$name; \
448- tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) | (cd $$name; tar xf -); \
449- tar -c -z -f $$name.tar.gz $$name; \
450- rm -rf $$name
451-
452-depend: $(GENSRC)
453- ${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
454
455=== removed directory '.pc/15_install.diff'
456=== removed file '.pc/15_install.diff/Makefile.in'
457--- .pc/15_install.diff/Makefile.in 2012-01-04 10:33:48 +0000
458+++ .pc/15_install.diff/Makefile.in 1970-01-01 00:00:00 +0000
459@@ -1,448 +0,0 @@
460-# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
461-# The Regents of the University of California. All rights reserved.
462-#
463-# Redistribution and use in source and binary forms, with or without
464-# modification, are permitted provided that: (1) source code distributions
465-# retain the above copyright notice and this paragraph in its entirety, (2)
466-# distributions including binary code include the above copyright notice and
467-# this paragraph in its entirety in the documentation or other materials
468-# provided with the distribution, and (3) all advertising materials mentioning
469-# features or use of this software display the following acknowledgement:
470-# ``This product includes software developed by the University of California,
471-# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
472-# the University nor the names of its contributors may be used to endorse
473-# or promote products derived from this software without specific prior
474-# written permission.
475-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
476-# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
477-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
478-#
479-# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.325 2008-11-21 23:17:26 guy Exp $ (LBL)
480-
481-#
482-# Various configurable paths (remember to edit Makefile.in, not Makefile)
483-#
484-
485-# Top level hierarchy
486-prefix = @prefix@
487-exec_prefix = @exec_prefix@
488-datarootdir = @datarootdir@
489-# Pathname of directory to install the binary
490-sbindir = @sbindir@
491-# Pathname of directory to install the man page
492-mandir = @mandir@
493-
494-# VPATH
495-srcdir = @srcdir@
496-VPATH = @srcdir@
497-
498-#
499-# You shouldn't need to edit anything below here.
500-#
501-
502-CC = @CC@
503-PROG = tcpdump
504-CCOPT = @V_CCOPT@
505-INCLS = -I. @V_INCLS@
506-DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@
507-
508-# Standard CFLAGS
509-CFLAGS = @CFLAGS@
510-FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS)
511-
512-# Standard LDFLAGS
513-LDFLAGS = @LDFLAGS@
514-
515-# Standard LIBS
516-LIBS = @LIBS@
517-
518-INSTALL = @INSTALL@
519-INSTALL_PROGRAM = @INSTALL_PROGRAM@
520-INSTALL_DATA = @INSTALL_DATA@
521-RANLIB = @RANLIB@
522-
523-# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
524-# Also, gcc does not remove the .o before forking 'as', which can be a
525-# problem if you don't own the file but can write to the directory.
526-.c.o:
527- @rm -f $@
528- $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
529-
530-CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
531- nlpid.c l2vpn.c machdep.c parsenfsfh.c in_cksum.c \
532- print-802_11.c print-802_15_4.c print-ap1394.c print-ah.c \
533- print-arcnet.c print-aodv.c print-arp.c print-ascii.c print-atalk.c \
534- print-atm.c print-beep.c print-bfd.c print-bgp.c \
535- print-bootp.c print-bt.c print-carp.c print-cdp.c print-cfm.c \
536- print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \
537- print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \
538- print-eap.c print-eigrp.c\
539- print-esp.c print-ether.c print-fddi.c print-fr.c \
540- print-gre.c print-hsrp.c print-icmp.c print-igmp.c \
541- print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \
542- print-ipx.c print-isoclns.c print-juniper.c print-krb.c \
543- print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \
544- print-lmp.c print-lspping.c print-lwapp.c \
545- print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \
546- print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \
547- print-pgm.c print-pim.c \
548- print-ppi.c print-ppp.c print-pppoe.c print-pptp.c \
549- print-radius.c print-raw.c print-rip.c print-rpki-rtr.c print-rrcp.c print-rsvp.c \
550- print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \
551- print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \
552- print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \
553- print-timed.c print-token.c print-udld.c print-udp.c print-usb.c \
554- print-vjc.c print-vqp.c print-vrrp.c print-vtp.c print-forces.c \
555- print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c
556-
557-LIBNETDISSECT_SRC=print-isakmp.c
558-LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o)
559-LIBNETDISSECT=libnetdissect.a
560-
561-LOCALSRC = @LOCALSRC@
562-GENSRC = version.c
563-LIBOBJS = @LIBOBJS@
564-
565-SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LIBNETDISSECT_SRC)
566-
567-# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
568-# hack the extra indirection
569-OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS) $(LIBNETDISSECT_OBJ)
570-HDR = \
571- acconfig.h \
572- addrtoname.h \
573- af.h \
574- ah.h \
575- aodv.h \
576- appletalk.h \
577- arcnet.h \
578- atm.h \
579- atmuni31.h \
580- bootp.h \
581- bgp.h \
582- chdlc.h \
583- cpack.h \
584- dccp.h \
585- decnet.h \
586- decode_prefix.h \
587- enc.h \
588- esp.h \
589- ether.h \
590- ethertype.h \
591- extract.h \
592- fddi.h \
593- forces.h \
594- gmpls.h \
595- gmt2local.h \
596- icmp6.h \
597- ieee802_11.h \
598- ieee802_11_radio.h \
599- igrp.h \
600- interface.h \
601- interface.h \
602- ip.h \
603- ip6.h \
604- ipfc.h \
605- ipnet.h \
606- ipproto.h \
607- ipsec_doi.h \
608- ipx.h \
609- isakmp.h \
610- l2tp.h \
611- l2vpn.h \
612- lane.h \
613- llc.h \
614- machdep.h \
615- mib.h \
616- mpls.h \
617- nameser.h \
618- netbios.h \
619- netdissect.h \
620- nfs.h \
621- nfsfh.h \
622- nlpid.h \
623- ntp.h \
624- oakley.h \
625- ospf.h \
626- ospf6.h \
627- oui.h \
628- pcap-missing.h \
629- pmap_prot.h \
630- ppi.h \
631- ppp.h \
632- route6d.h \
633- rpc_auth.h \
634- rpc_msg.h \
635- rx.h \
636- sctpConstants.h \
637- sctpHeader.h \
638- setsignal.h \
639- signature.h \
640- slcompress.h \
641- slip.h \
642- sll.h \
643- smb.h \
644- tcp.h \
645- tcpdump-stdinc.h \
646- telnet.h \
647- tftp.h \
648- timed.h \
649- token.h \
650- udp.h
651-
652-TAGHDR = \
653- /usr/include/arpa/tftp.h \
654- /usr/include/net/if_arp.h \
655- /usr/include/net/slip.h \
656- /usr/include/netinet/if_ether.h \
657- /usr/include/netinet/in.h \
658- /usr/include/netinet/ip_icmp.h \
659- /usr/include/netinet/tcp.h \
660- /usr/include/netinet/udp.h \
661- /usr/include/protocols/routed.h
662-
663-TAGFILES = $(SRC) $(HDR) $(TAGHDR)
664-
665-CLEANFILES = $(PROG) $(OBJ) $(GENSRC)
666-
667-EXTRA_DIST = \
668- CHANGES \
669- CREDITS \
670- INSTALL.txt \
671- LICENSE \
672- Makefile.in \
673- Makefile-devel-adds \
674- README \
675- Readme.Win32 \
676- VERSION \
677- aclocal.m4 \
678- atime.awk \
679- bpf_dump.c \
680- config.guess \
681- config.h.in \
682- config.sub \
683- configure \
684- configure.in \
685- install-sh \
686- lbl/os-osf4.h \
687- lbl/os-solaris2.h \
688- lbl/os-sunos4.h \
689- lbl/os-ultrix4.h \
690- makemib \
691- missing/addrinfo.h \
692- missing/dlnames.c \
693- missing/datalinks.c \
694- missing/getnameinfo.c \
695- missing/inet_aton.c \
696- missing/inet_ntop.c \
697- missing/inet_pton.c \
698- missing/snprintf.c \
699- missing/sockstorage.h \
700- missing/strdup.c \
701- missing/strlcat.c \
702- missing/strlcpy.c \
703- missing/strsep.c \
704- mkdep \
705- packetdat.awk \
706- pcap_dump_ftell.c \
707- print-babel.c \
708- print-dhcp6.c \
709- print-frag6.c \
710- print-icmp6.c \
711- print-ip6.c \
712- print-ip6opts.c \
713- print-mobility.c \
714- print-netbios.c \
715- print-ospf6.c \
716- print-pflog.c \
717- print-ripng.c \
718- print-rt6.c \
719- print-smb.c \
720- send-ack.awk \
721- smbutil.c \
722- stime.awk \
723- strcasecmp.c \
724- tcpdump.1.in \
725- tests/02-sunrise-sunset-esp.pcap \
726- tests/08-sunrise-sunset-aes.pcap \
727- tests/08-sunrise-sunset-esp2.pcap \
728- tests/QinQpacket.out \
729- tests/QinQpacket.pcap \
730- tests/QinQpacketv.out \
731- tests/TESTLIST \
732- tests/TESTonce \
733- tests/TESTrun.sh \
734- tests/babel.pcap \
735- tests/babel1.out \
736- tests/babel1v.out \
737- tests/bgp-infinite-loop.pcap \
738- tests/bgp_vpn_attrset.out \
739- tests/bgp_vpn_attrset.pcap \
740- tests/chdlc-slarp-short.pcap \
741- tests/chdlc-slarp.pcap \
742- tests/dio.out \
743- tests/dio.pcap \
744- tests/e1000g.out \
745- tests/e1000g.pcap \
746- tests/eapon1.gdbinit \
747- tests/eapon1.out \
748- tests/eapon1.pcap \
749- tests/empty.uu \
750- tests/esp-secrets.txt \
751- tests/esp0.out \
752- tests/esp1.gdbinit \
753- tests/esp1.out \
754- tests/esp2.gdbinit \
755- tests/esp2.out \
756- tests/esp3.gdbinit \
757- tests/esp4.gdbinit \
758- tests/esp5.gdbinit \
759- tests/esp5.out \
760- tests/espudp1.out \
761- tests/espudp1.pcap \
762- tests/forces1.out \
763- tests/forces1.pcap \
764- tests/forces1vvv.out \
765- tests/forces1vvvv.out \
766- tests/forces2.out \
767- tests/forces2v.out \
768- tests/forces2vv.out \
769- tests/forces3vvv.out \
770- tests/ikev2four.out \
771- tests/ikev2four.pcap \
772- tests/ikev2fourv.out \
773- tests/ikev2fourv4.out \
774- tests/ikev2pI2-secrets.txt \
775- tests/ikev2pI2.out \
776- tests/ikev2pI2.pcap \
777- tests/isakmp-delete-segfault.pcap \
778- tests/isakmp-identification-segfault.pcap \
779- tests/isakmp-pointer-loop.pcap \
780- tests/isakmp1.out \
781- tests/isakmp2.out \
782- tests/isakmp3.out \
783- tests/isakmp4.out \
784- tests/isakmp4500.pcap \
785- tests/isis-infinite-loop.pcap \
786- tests/ldp-infinite-loop.pcap \
787- tests/lmp.out \
788- tests/lmp.pcap \
789- tests/lmp.sh \
790- tests/lspping-fec-ldp.pcap \
791- tests/lspping-fec-rsvp.pcap \
792- tests/mpls-ldp-hello.out \
793- tests/mpls-ldp-hello.pcap \
794- tests/mpls-traceroute.pcap \
795- tests/ospf-gmpls.out \
796- tests/ospf-gmpls.pcap \
797- tests/print-A.out \
798- tests/print-AA.out \
799- tests/print-capX.out \
800- tests/print-capXX.out \
801- tests/print-flags.pcap \
802- tests/print-flags.sh \
803- tests/print-x.out \
804- tests/print-xx.out \
805- tests/rsvp-infinite-loop.pcap \
806- tests/sflow_multiple_counter_30_pdus.out \
807- tests/sflow_multiple_counter_30_pdus.pcap \
808- vfprintf.c \
809- win32/Include/errno.h \
810- win32/Include/getopt.h \
811- win32/Include/w32_fzs.h \
812- win32/Src/getopt.c \
813- win32/prj/GNUmakefile \
814- win32/prj/WinDump.dsp \
815- win32/prj/WinDump.dsw
816-
817-all: $(PROG)
818-
819-$(PROG): $(OBJ) @V_PCAPDEP@
820- @rm -f $@
821- $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
822-
823-$(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
824- @rm -f $@
825- $(AR) cr $@ $(LIBNETDISSECT_OBJ)
826- $(RANLIB) $@
827-
828-datalinks.o: $(srcdir)/missing/datalinks.c
829- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
830-dlnames.o: $(srcdir)/missing/dlnames.c
831- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
832-getnameinfo.o: $(srcdir)/missing/getnameinfo.c
833- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
834-getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
835- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
836-inet_pton.o: $(srcdir)/missing/inet_pton.c
837- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
838-inet_ntop.o: $(srcdir)/missing/inet_ntop.c
839- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c
840-inet_aton.o: $(srcdir)/missing/inet_aton.c
841- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
842-snprintf.o: $(srcdir)/missing/snprintf.c
843- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
844-strlcat.o: $(srcdir)/missing/strlcat.c
845- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
846-strlcpy.o: $(srcdir)/missing/strlcpy.c
847- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
848-strsep.o: $(srcdir)/missing/strsep.c
849- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
850-
851-version.o: version.c
852- $(CC) $(FULL_CFLAGS) -c version.c
853-
854-version.c: $(srcdir)/VERSION
855- @rm -f $@
856- if grep GIT ${srcdir}/VERSION >/dev/null; then \
857- read ver <${srcdir}/VERSION; \
858- echo $$ver | tr -d '\012'; \
859- date +_%Y_%m_%d; \
860- else \
861- cat ${srcdir}/VERSION; \
862- fi | sed -e 's/.*/const char version[] = "&";/' > $@
863-
864-install: all
865- [ -d $(DESTDIR)$(sbindir) ] || \
866- (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
867- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
868- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION`
869- [ -d $(DESTDIR)$(mandir)/man8 ] || \
870- (mkdir -p $(DESTDIR)$(mandir)/man8; chmod 755 $(DESTDIR)$(mandir)/man8)
871- $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man8/$(PROG).8
872-
873-uninstall:
874- rm -f $(DESTDIR)$(sbindir)/$(PROG)
875- rm -f $(DESTDIR)$(mandir)/man8/$(PROG).8
876-
877-lint: $(GENSRC)
878- lint -hbxn $(SRC) | \
879- grep -v 'struct/union .* never defined' | \
880- grep -v 'possible pointer alignment problem'
881-
882-clean:
883- rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar.gz
884-
885-distclean:
886- rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
887- config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1
888- rm -rf autom4te.cache
889-
890-check: tcpdump
891- (cd tests && ./TESTrun.sh)
892-
893-tags: $(TAGFILES)
894- ctags -wtd $(TAGFILES)
895-
896-TAGS: $(TAGFILES)
897- etags $(TAGFILES)
898-
899-releasetar:
900- @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
901- mkdir $$name; \
902- tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) | (cd $$name; tar xf -); \
903- tar -c -z -f $$name.tar.gz $$name; \
904- rm -rf $$name
905-
906-depend: $(GENSRC)
907- ${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
908
909=== removed directory '.pc/20_man_fixes.diff'
910=== removed file '.pc/20_man_fixes.diff/tcpdump.1.in'
911--- .pc/20_man_fixes.diff/tcpdump.1.in 2012-01-02 20:19:22 +0000
912+++ .pc/20_man_fixes.diff/tcpdump.1.in 1970-01-01 00:00:00 +0000
913@@ -1,1744 +0,0 @@
914-.\" @(#) $Header: /tcpdump/master/tcpdump/tcpdump.1.in,v 1.2 2008-11-09 23:35:03 mcr Exp $ (LBL)
915-.\"
916-.\" $NetBSD: tcpdump.8,v 1.9 2003/03/31 00:18:17 perry Exp $
917-.\"
918-.\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997
919-.\" The Regents of the University of California. All rights reserved.
920-.\" All rights reserved.
921-.\"
922-.\" Redistribution and use in source and binary forms, with or without
923-.\" modification, are permitted provided that: (1) source code distributions
924-.\" retain the above copyright notice and this paragraph in its entirety, (2)
925-.\" distributions including binary code include the above copyright notice and
926-.\" this paragraph in its entirety in the documentation or other materials
927-.\" provided with the distribution, and (3) all advertising materials mentioning
928-.\" features or use of this software display the following acknowledgement:
929-.\" ``This product includes software developed by the University of California,
930-.\" Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
931-.\" the University nor the names of its contributors may be used to endorse
932-.\" or promote products derived from this software without specific prior
933-.\" written permission.
934-.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
935-.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
936-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
937-.\"
938-.TH TCPDUMP 1 "05 March 2009"
939-.SH NAME
940-tcpdump \- dump traffic on a network
941-.SH SYNOPSIS
942-.na
943-.B tcpdump
944-[
945-.B \-AbdDefhHIJKlLnNOpqRStuUvxX
946-] [
947-.B \-B
948-.I buffer_size
949-] [
950-.B \-c
951-.I count
952-]
953-.br
954-.ti +8
955-[
956-.B \-C
957-.I file_size
958-] [
959-.B \-G
960-.I rotate_seconds
961-] [
962-.B \-F
963-.I file
964-]
965-.br
966-.ti +8
967-[
968-.B \-i
969-.I interface
970-]
971-[
972-.B \-j
973-.I tstamp_type
974-]
975-[
976-.B \-m
977-.I module
978-]
979-[
980-.B \-M
981-.I secret
982-]
983-.br
984-.ti +8
985-[
986-.B \-r
987-.I file
988-]
989-[
990-.B \-s
991-.I snaplen
992-]
993-[
994-.B \-T
995-.I type
996-]
997-[
998-.B \-w
999-.I file
1000-]
1001-.br
1002-.ti +8
1003-[
1004-.B \-W
1005-.I filecount
1006-]
1007-.br
1008-.ti +8
1009-[
1010-.B \-E
1011-.I spi@ipaddr algo:secret,...
1012-]
1013-.br
1014-.ti +8
1015-[
1016-.B \-y
1017-.I datalinktype
1018-]
1019-[
1020-.B \-z
1021-.I postrotate-command
1022-]
1023-[
1024-.B \-Z
1025-.I user
1026-]
1027-.ti +8
1028-[
1029-.I expression
1030-]
1031-.br
1032-.ad
1033-.SH DESCRIPTION
1034-.LP
1035-\fITcpdump\fP prints out a description of the contents of packets on a
1036-network interface that match the boolean \fIexpression\fP. It can also
1037-be run with the
1038-.B \-w
1039-flag, which causes it to save the packet data to a file for later
1040-analysis, and/or with the
1041-.B \-r
1042-flag, which causes it to read from a saved packet file rather than to
1043-read packets from a network interface. In all cases, only packets that
1044-match
1045-.I expression
1046-will be processed by
1047-.IR tcpdump .
1048-.LP
1049-.I Tcpdump
1050-will, if not run with the
1051-.B \-c
1052-flag, continue capturing packets until it is interrupted by a SIGINT
1053-signal (generated, for example, by typing your interrupt character,
1054-typically control-C) or a SIGTERM signal (typically generated with the
1055-.BR kill (1)
1056-command); if run with the
1057-.B \-c
1058-flag, it will capture packets until it is interrupted by a SIGINT or
1059-SIGTERM signal or the specified number of packets have been processed.
1060-.LP
1061-When
1062-.I tcpdump
1063-finishes capturing packets, it will report counts of:
1064-.IP
1065-packets ``captured'' (this is the number of packets that
1066-.I tcpdump
1067-has received and processed);
1068-.IP
1069-packets ``received by filter'' (the meaning of this depends on the OS on
1070-which you're running
1071-.IR tcpdump ,
1072-and possibly on the way the OS was configured - if a filter was
1073-specified on the command line, on some OSes it counts packets regardless
1074-of whether they were matched by the filter expression and, even if they
1075-were matched by the filter expression, regardless of whether
1076-.I tcpdump
1077-has read and processed them yet, on other OSes it counts only packets that were
1078-matched by the filter expression regardless of whether
1079-.I tcpdump
1080-has read and processed them yet, and on other OSes it counts only
1081-packets that were matched by the filter expression and were processed by
1082-.IR tcpdump );
1083-.IP
1084-packets ``dropped by kernel'' (this is the number of packets that were
1085-dropped, due to a lack of buffer space, by the packet capture mechanism
1086-in the OS on which
1087-.I tcpdump
1088-is running, if the OS reports that information to applications; if not,
1089-it will be reported as 0).
1090-.LP
1091-On platforms that support the SIGINFO signal, such as most BSDs
1092-(including Mac OS X) and Digital/Tru64 UNIX, it will report those counts
1093-when it receives a SIGINFO signal (generated, for example, by typing
1094-your ``status'' character, typically control-T, although on some
1095-platforms, such as Mac OS X, the ``status'' character is not set by
1096-default, so you must set it with
1097-.BR stty (1)
1098-in order to use it) and will continue capturing packets.
1099-.LP
1100-Reading packets from a network interface may require that you have
1101-special privileges; see the
1102-.B pcap (3PCAP)
1103-man page for details. Reading a saved packet file doesn't require
1104-special privileges.
1105-.SH OPTIONS
1106-.TP
1107-.B \-A
1108-Print each packet (minus its link level header) in ASCII. Handy for
1109-capturing web pages.
1110-.TP
1111-.B \-b
1112-Print the AS number in BGP packets in ASDOT notation rather than ASPLAIN
1113-notation.
1114-.TP
1115-.B \-B
1116-Set the operating system capture buffer size to \fIbuffer_size\fP.
1117-.TP
1118-.B \-c
1119-Exit after receiving \fIcount\fP packets.
1120-.TP
1121-.B \-C
1122-Before writing a raw packet to a savefile, check whether the file is
1123-currently larger than \fIfile_size\fP and, if so, close the current
1124-savefile and open a new one. Savefiles after the first savefile will
1125-have the name specified with the
1126-.B \-w
1127-flag, with a number after it, starting at 1 and continuing upward.
1128-The units of \fIfile_size\fP are millions of bytes (1,000,000 bytes,
1129-not 1,048,576 bytes).
1130-.TP
1131-.B \-d
1132-Dump the compiled packet-matching code in a human readable form to
1133-standard output and stop.
1134-.TP
1135-.B \-dd
1136-Dump packet-matching code as a
1137-.B C
1138-program fragment.
1139-.TP
1140-.B \-ddd
1141-Dump packet-matching code as decimal numbers (preceded with a count).
1142-.TP
1143-.B \-D
1144-Print the list of the network interfaces available on the system and on
1145-which
1146-.I tcpdump
1147-can capture packets. For each network interface, a number and an
1148-interface name, possibly followed by a text description of the
1149-interface, is printed. The interface name or the number can be supplied
1150-to the
1151-.B \-i
1152-flag to specify an interface on which to capture.
1153-.IP
1154-This can be useful on systems that don't have a command to list them
1155-(e.g., Windows systems, or UNIX systems lacking
1156-.BR "ifconfig \-a" );
1157-the number can be useful on Windows 2000 and later systems, where the
1158-interface name is a somewhat complex string.
1159-.IP
1160-The
1161-.B \-D
1162-flag will not be supported if
1163-.I tcpdump
1164-was built with an older version of
1165-.I libpcap
1166-that lacks the
1167-.B pcap_findalldevs()
1168-function.
1169-.TP
1170-.B \-e
1171-Print the link-level header on each dump line.
1172-.TP
1173-.B \-E
1174-Use \fIspi@ipaddr algo:secret\fP for decrypting IPsec ESP packets that
1175-are addressed to \fIaddr\fP and contain Security Parameter Index value
1176-\fIspi\fP. This combination may be repeated with comma or newline separation.
1177-.IP
1178-Note that setting the secret for IPv4 ESP packets is supported at this time.
1179-.IP
1180-Algorithms may be
1181-\fBdes-cbc\fP,
1182-\fB3des-cbc\fP,
1183-\fBblowfish-cbc\fP,
1184-\fBrc3-cbc\fP,
1185-\fBcast128-cbc\fP, or
1186-\fBnone\fP.
1187-The default is \fBdes-cbc\fP.
1188-The ability to decrypt packets is only present if \fItcpdump\fP was compiled
1189-with cryptography enabled.
1190-.IP
1191-\fIsecret\fP is the ASCII text for ESP secret key.
1192-If preceded by 0x, then a hex value will be read.
1193-.IP
1194-The option assumes RFC2406 ESP, not RFC1827 ESP.
1195-The option is only for debugging purposes, and
1196-the use of this option with a true `secret' key is discouraged.
1197-By presenting IPsec secret key onto command line
1198-you make it visible to others, via
1199-.IR ps (1)
1200-and other occasions.
1201-.IP
1202-In addition to the above syntax, the syntax \fIfile name\fP may be used
1203-to have tcpdump read the provided file in. The file is opened upon
1204-receiving the first ESP packet, so any special permissions that tcpdump
1205-may have been given should already have been given up.
1206-.TP
1207-.B \-f
1208-Print `foreign' IPv4 addresses numerically rather than symbolically
1209-(this option is intended to get around serious brain damage in
1210-Sun's NIS server \(em usually it hangs forever translating non-local
1211-internet numbers).
1212-.IP
1213-The test for `foreign' IPv4 addresses is done using the IPv4 address and
1214-netmask of the interface on which capture is being done. If that
1215-address or netmask are not available, available, either because the
1216-interface on which capture is being done has no address or netmask or
1217-because the capture is being done on the Linux "any" interface, which
1218-can capture on more than one interface, this option will not work
1219-correctly.
1220-.TP
1221-.B \-F
1222-Use \fIfile\fP as input for the filter expression.
1223-An additional expression given on the command line is ignored.
1224-.TP
1225-.B \-G
1226-If specified, rotates the dump file specified with the
1227-.B \-w
1228-option every \fIrotate_seconds\fP seconds.
1229-Savefiles will have the name specified by
1230-.B \-w
1231-which should include a time format as defined by
1232-.BR strftime (3).
1233-If no time format is specified, each new file will overwrite the previous.
1234-.IP
1235-If used in conjunction with the
1236-.B \-C
1237-option, filenames will take the form of `\fIfile\fP<count>'.
1238-.TP
1239-.B \-h
1240-Print the tcpdump and libpcap version strings, print a usage message,
1241-and exit.
1242-.TP
1243-.B \-H
1244-Attempt to detect 802.11s draft mesh headers.
1245-.TP
1246-.B \-i
1247-Listen on \fIinterface\fP.
1248-If unspecified, \fItcpdump\fP searches the system interface list for the
1249-lowest numbered, configured up interface (excluding loopback).
1250-Ties are broken by choosing the earliest match.
1251-.IP
1252-On Linux systems with 2.2 or later kernels, an
1253-.I interface
1254-argument of ``any'' can be used to capture packets from all interfaces.
1255-Note that captures on the ``any'' device will not be done in promiscuous
1256-mode.
1257-.IP
1258-If the
1259-.B \-D
1260-flag is supported, an interface number as printed by that flag can be
1261-used as the
1262-.I interface
1263-argument.
1264-.TP
1265-.B \-I
1266-Put the interface in "monitor mode"; this is supported only on IEEE
1267-802.11 Wi-Fi interfaces, and supported only on some operating systems.
1268-.IP
1269-Note that in monitor mode the adapter might disassociate from the
1270-network with which it's associated, so that you will not be able to use
1271-any wireless networks with that adapter. This could prevent accessing
1272-files on a network server, or resolving host names or network addresses,
1273-if you are capturing in monitor mode and are not connected to another
1274-network with another adapter.
1275-.IP
1276-This flag will affect the output of the
1277-.B \-L
1278-flag. If
1279-.B \-I
1280-isn't specified, only those link-layer types available when not in
1281-monitor mode will be shown; if
1282-.B \-I
1283-is specified, only those link-layer types available when in monitor mode
1284-will be shown.
1285-.TP
1286-.B \-j
1287-Set the time stamp type for the capture to \fItstamp_type\fP. The names
1288-to use for the time stamp types are given in
1289-.BR pcap-tstamp-type (@MAN_MISC_INFO@);
1290-not all the types listed there will necessarily be valid for any given
1291-interface.
1292-.TP
1293-.B \-J
1294-List the supported time stamp types for the interface and exit. If the
1295-time stamp type cannot be set for the interface, no time stamp types are
1296-listed.
1297-.TP
1298-.B \-K
1299-Don't attempt to verify IP, TCP, or UDP checksums. This is useful for
1300-interfaces that perform some or all of those checksum calculation in
1301-hardware; otherwise, all outgoing TCP checksums will be flagged as bad.
1302-.TP
1303-.B \-l
1304-Make stdout line buffered.
1305-Useful if you want to see the data
1306-while capturing it.
1307-E.g.,
1308-.br
1309-``tcpdump\ \ \-l\ \ |\ \ tee dat'' or
1310-``tcpdump\ \ \-l \ \ > dat\ \ &\ \ tail\ \ \-f\ \ dat''.
1311-.TP
1312-.B \-L
1313-List the known data link types for the interface, in the specified mode,
1314-and exit. The list of known data link types may be dependent on the
1315-specified mode; for example, on some platforms, a Wi-Fi interface might
1316-support one set of data link types when not in monitor mode (for
1317-example, it might support only fake Ethernet headers, or might support
1318-802.11 headers but not support 802.11 headers with radio information)
1319-and another set of data link types when in monitor mode (for example, it
1320-might support 802.11 headers, or 802.11 headers with radio information,
1321-only in monitor mode).
1322-.TP
1323-.B \-m
1324-Load SMI MIB module definitions from file \fImodule\fR.
1325-This option
1326-can be used several times to load several MIB modules into \fItcpdump\fP.
1327-.TP
1328-.B \-M
1329-Use \fIsecret\fP as a shared secret for validating the digests found in
1330-TCP segments with the TCP-MD5 option (RFC 2385), if present.
1331-.TP
1332-.B \-n
1333-Don't convert addresses (i.e., host addresses, port numbers, etc.) to names.
1334-.TP
1335-.B \-N
1336-Don't print domain name qualification of host names.
1337-E.g.,
1338-if you give this flag then \fItcpdump\fP will print ``nic''
1339-instead of ``nic.ddn.mil''.
1340-.TP
1341-.B \-O
1342-Do not run the packet-matching code optimizer.
1343-This is useful only
1344-if you suspect a bug in the optimizer.
1345-.TP
1346-.B \-p
1347-\fIDon't\fP put the interface
1348-into promiscuous mode.
1349-Note that the interface might be in promiscuous
1350-mode for some other reason; hence, `-p' cannot be used as an abbreviation for
1351-`ether host {local-hw-addr} or ether broadcast'.
1352-.TP
1353-.B \-q
1354-Quick (quiet?) output.
1355-Print less protocol information so output
1356-lines are shorter.
1357-.TP
1358-.B \-R
1359-Assume ESP/AH packets to be based on old specification (RFC1825 to RFC1829).
1360-If specified, \fItcpdump\fP will not print replay prevention field.
1361-Since there is no protocol version field in ESP/AH specification,
1362-\fItcpdump\fP cannot deduce the version of ESP/AH protocol.
1363-.TP
1364-.B \-r
1365-Read packets from \fIfile\fR (which was created with the
1366-.B \-w
1367-option).
1368-Standard input is used if \fIfile\fR is ``-''.
1369-.TP
1370-.B \-S
1371-Print absolute, rather than relative, TCP sequence numbers.
1372-.TP
1373-.B \-s
1374-Snarf \fIsnaplen\fP bytes of data from each packet rather than the
1375-default of 65535 bytes.
1376-Packets truncated because of a limited snapshot
1377-are indicated in the output with ``[|\fIproto\fP]'', where \fIproto\fP
1378-is the name of the protocol level at which the truncation has occurred.
1379-Note that taking larger snapshots both increases
1380-the amount of time it takes to process packets and, effectively,
1381-decreases the amount of packet buffering.
1382-This may cause packets to be
1383-lost.
1384-You should limit \fIsnaplen\fP to the smallest number that will
1385-capture the protocol information you're interested in.
1386-Setting
1387-\fIsnaplen\fP to 0 sets it to the default of 65535,
1388-for backwards compatibility with recent older versions of
1389-.IR tcpdump .
1390-.TP
1391-.B \-T
1392-Force packets selected by "\fIexpression\fP" to be interpreted the
1393-specified \fItype\fR.
1394-Currently known types are
1395-\fBaodv\fR (Ad-hoc On-demand Distance Vector protocol),
1396-\fBcnfp\fR (Cisco NetFlow protocol),
1397-\fBrpc\fR (Remote Procedure Call),
1398-\fBrtp\fR (Real-Time Applications protocol),
1399-\fBrtcp\fR (Real-Time Applications control protocol),
1400-\fBsnmp\fR (Simple Network Management Protocol),
1401-\fBtftp\fR (Trivial File Transfer Protocol),
1402-\fBvat\fR (Visual Audio Tool),
1403-and
1404-\fBwb\fR (distributed White Board).
1405-.TP
1406-.B \-t
1407-\fIDon't\fP print a timestamp on each dump line.
1408-.TP
1409-.B \-tt
1410-Print an unformatted timestamp on each dump line.
1411-.TP
1412-.B \-ttt
1413-Print a delta (micro-second resolution) between current and previous line
1414-on each dump line.
1415-.TP
1416-.B \-tttt
1417-Print a timestamp in default format proceeded by date on each dump line.
1418-.TP
1419-.B \-ttttt
1420-Print a delta (micro-second resolution) between current and first line
1421-on each dump line.
1422-.TP
1423-.B \-u
1424-Print undecoded NFS handles.
1425-.TP
1426-.B \-U
1427-Make output saved via the
1428-.B \-w
1429-option ``packet-buffered''; i.e., as each packet is saved, it will be
1430-written to the output file, rather than being written only when the
1431-output buffer fills.
1432-.IP
1433-The
1434-.B \-U
1435-flag will not be supported if
1436-.I tcpdump
1437-was built with an older version of
1438-.I libpcap
1439-that lacks the
1440-.B pcap_dump_flush()
1441-function.
1442-.TP
1443-.B \-v
1444-When parsing and printing, produce (slightly more) verbose output.
1445-For example, the time to live,
1446-identification, total length and options in an IP packet are printed.
1447-Also enables additional packet integrity checks such as verifying the
1448-IP and ICMP header checksum.
1449-.IP
1450-When writing to a file with the
1451-.B \-w
1452-option, report, every 10 seconds, the number of packets captured.
1453-.TP
1454-.B \-vv
1455-Even more verbose output.
1456-For example, additional fields are
1457-printed from NFS reply packets, and SMB packets are fully decoded.
1458-.TP
1459-.B \-vvv
1460-Even more verbose output.
1461-For example,
1462-telnet \fBSB\fP ... \fBSE\fP options
1463-are printed in full.
1464-With
1465-.B \-X
1466-Telnet options are printed in hex as well.
1467-.TP
1468-.B \-w
1469-Write the raw packets to \fIfile\fR rather than parsing and printing
1470-them out.
1471-They can later be printed with the \-r option.
1472-Standard output is used if \fIfile\fR is ``-''.
1473-See
1474-.BR pcap-savefile (@MAN_FILE_FORMATS@)
1475-for a description of the file format.
1476-.TP
1477-.B \-W
1478-Used in conjunction with the
1479-.B \-C
1480-option, this will limit the number
1481-of files created to the specified number, and begin overwriting files
1482-from the beginning, thus creating a 'rotating' buffer.
1483-In addition, it will name
1484-the files with enough leading 0s to support the maximum number of
1485-files, allowing them to sort correctly.
1486-.IP
1487-Used in conjunction with the
1488-.B \-G
1489-option, this will limit the number of rotated dump files that get
1490-created, exiting with status 0 when reaching the limit. If used with
1491-.B \-C
1492-as well, the behavior will result in cyclical files per timeslice.
1493-.TP
1494-.B \-x
1495-When parsing and printing,
1496-in addition to printing the headers of each packet, print the data of
1497-each packet (minus its link level header) in hex.
1498-The smaller of the entire packet or
1499-.I snaplen
1500-bytes will be printed. Note that this is the entire link-layer
1501-packet, so for link layers that pad (e.g. Ethernet), the padding bytes
1502-will also be printed when the higher layer packet is shorter than the
1503-required padding.
1504-.TP
1505-.B \-xx
1506-When parsing and printing,
1507-in addition to printing the headers of each packet, print the data of
1508-each packet,
1509-.I including
1510-its link level header, in hex.
1511-.TP
1512-.B \-X
1513-When parsing and printing,
1514-in addition to printing the headers of each packet, print the data of
1515-each packet (minus its link level header) in hex and ASCII.
1516-This is very handy for analysing new protocols.
1517-.TP
1518-.B \-XX
1519-When parsing and printing,
1520-in addition to printing the headers of each packet, print the data of
1521-each packet,
1522-.I including
1523-its link level header, in hex and ASCII.
1524-.TP
1525-.B \-y
1526-Set the data link type to use while capturing packets to \fIdatalinktype\fP.
1527-.TP
1528-.B \-z
1529-Used in conjunction with the
1530-.B -C
1531-or
1532-.B -G
1533-options, this will make
1534-.I tcpdump
1535-run "
1536-.I command file
1537-" where
1538-.I file
1539-is the savefile being closed after each rotation. For example, specifying
1540-.B \-z gzip
1541-or
1542-.B \-z bzip2
1543-will compress each savefile using gzip or bzip2.
1544-.IP
1545-Note that tcpdump will run the command in parallel to the capture, using
1546-the lowest priority so that this doesn't disturb the capture process.
1547-.IP
1548-And in case you would like to use a command that itself takes flags or
1549-different arguments, you can always write a shell script that will take the
1550-savefile name as the only argument, make the flags & arguments arrangements
1551-and execute the command that you want.
1552-.TP
1553-.B \-Z
1554-If
1555-.I tcpdump
1556-is running as root, after opening the capture device or input savefile,
1557-but before opening any savefiles for output, change the user ID to
1558-.I user
1559-and the group ID to the primary group of
1560-.IR user .
1561-.IP
1562-This behavior can also be enabled by default at compile time.
1563-.IP "\fI expression\fP"
1564-.RS
1565-selects which packets will be dumped.
1566-If no \fIexpression\fP
1567-is given, all packets on the net will be dumped.
1568-Otherwise,
1569-only packets for which \fIexpression\fP is `true' will be dumped.
1570-.LP
1571-For the \fIexpression\fP syntax, see
1572-.BR pcap-filter (@MAN_MISC_INFO@).
1573-.LP
1574-Expression arguments can be passed to \fItcpdump\fP as either a single
1575-argument or as multiple arguments, whichever is more convenient.
1576-Generally, if the expression contains Shell metacharacters, it is
1577-easier to pass it as a single, quoted argument.
1578-Multiple arguments are concatenated with spaces before being parsed.
1579-.SH EXAMPLES
1580-.LP
1581-To print all packets arriving at or departing from \fIsundown\fP:
1582-.RS
1583-.nf
1584-\fBtcpdump host sundown\fP
1585-.fi
1586-.RE
1587-.LP
1588-To print traffic between \fIhelios\fR and either \fIhot\fR or \fIace\fR:
1589-.RS
1590-.nf
1591-\fBtcpdump host helios and \\( hot or ace \\)\fP
1592-.fi
1593-.RE
1594-.LP
1595-To print all IP packets between \fIace\fR and any host except \fIhelios\fR:
1596-.RS
1597-.nf
1598-\fBtcpdump ip host ace and not helios\fP
1599-.fi
1600-.RE
1601-.LP
1602-To print all traffic between local hosts and hosts at Berkeley:
1603-.RS
1604-.nf
1605-.B
1606-tcpdump net ucb-ether
1607-.fi
1608-.RE
1609-.LP
1610-To print all ftp traffic through internet gateway \fIsnup\fP:
1611-(note that the expression is quoted to prevent the shell from
1612-(mis-)interpreting the parentheses):
1613-.RS
1614-.nf
1615-.B
1616-tcpdump 'gateway snup and (port ftp or ftp-data)'
1617-.fi
1618-.RE
1619-.LP
1620-To print traffic neither sourced from nor destined for local hosts
1621-(if you gateway to one other net, this stuff should never make it
1622-onto your local net).
1623-.RS
1624-.nf
1625-.B
1626-tcpdump ip and not net \fIlocalnet\fP
1627-.fi
1628-.RE
1629-.LP
1630-To print the start and end packets (the SYN and FIN packets) of each
1631-TCP conversation that involves a non-local host.
1632-.RS
1633-.nf
1634-.B
1635-tcpdump 'tcp[tcpflags] & (tcp-syn|tcp-fin) != 0 and not src and dst net \fIlocalnet\fP'
1636-.fi
1637-.RE
1638-.LP
1639-To print all IPv4 HTTP packets to and from port 80, i.e. print only
1640-packets that contain data, not, for example, SYN and FIN packets and
1641-ACK-only packets. (IPv6 is left as an exercise for the reader.)
1642-.RS
1643-.nf
1644-.B
1645-tcpdump 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
1646-.fi
1647-.RE
1648-.LP
1649-To print IP packets longer than 576 bytes sent through gateway \fIsnup\fP:
1650-.RS
1651-.nf
1652-.B
1653-tcpdump 'gateway snup and ip[2:2] > 576'
1654-.fi
1655-.RE
1656-.LP
1657-To print IP broadcast or multicast packets that were
1658-.I not
1659-sent via Ethernet broadcast or multicast:
1660-.RS
1661-.nf
1662-.B
1663-tcpdump 'ether[0] & 1 = 0 and ip[16] >= 224'
1664-.fi
1665-.RE
1666-.LP
1667-To print all ICMP packets that are not echo requests/replies (i.e., not
1668-ping packets):
1669-.RS
1670-.nf
1671-.B
1672-tcpdump 'icmp[icmptype] != icmp-echo and icmp[icmptype] != icmp-echoreply'
1673-.fi
1674-.RE
1675-.SH OUTPUT FORMAT
1676-.LP
1677-The output of \fItcpdump\fP is protocol dependent.
1678-The following
1679-gives a brief description and examples of most of the formats.
1680-.de HD
1681-.sp 1.5
1682-.B
1683-..
1684-.HD
1685-Link Level Headers
1686-.LP
1687-If the '-e' option is given, the link level header is printed out.
1688-On Ethernets, the source and destination addresses, protocol,
1689-and packet length are printed.
1690-.LP
1691-On FDDI networks, the '-e' option causes \fItcpdump\fP to print
1692-the `frame control' field, the source and destination addresses,
1693-and the packet length.
1694-(The `frame control' field governs the
1695-interpretation of the rest of the packet.
1696-Normal packets (such
1697-as those containing IP datagrams) are `async' packets, with a priority
1698-value between 0 and 7; for example, `\fBasync4\fR'.
1699-Such packets
1700-are assumed to contain an 802.2 Logical Link Control (LLC) packet;
1701-the LLC header is printed if it is \fInot\fR an ISO datagram or a
1702-so-called SNAP packet.
1703-.LP
1704-On Token Ring networks, the '-e' option causes \fItcpdump\fP to print
1705-the `access control' and `frame control' fields, the source and
1706-destination addresses, and the packet length.
1707-As on FDDI networks,
1708-packets are assumed to contain an LLC packet.
1709-Regardless of whether
1710-the '-e' option is specified or not, the source routing information is
1711-printed for source-routed packets.
1712-.LP
1713-On 802.11 networks, the '-e' option causes \fItcpdump\fP to print
1714-the `frame control' fields, all of the addresses in the 802.11 header,
1715-and the packet length.
1716-As on FDDI networks,
1717-packets are assumed to contain an LLC packet.
1718-.LP
1719-\fI(N.B.: The following description assumes familiarity with
1720-the SLIP compression algorithm described in RFC-1144.)\fP
1721-.LP
1722-On SLIP links, a direction indicator (``I'' for inbound, ``O'' for outbound),
1723-packet type, and compression information are printed out.
1724-The packet type is printed first.
1725-The three types are \fIip\fP, \fIutcp\fP, and \fIctcp\fP.
1726-No further link information is printed for \fIip\fR packets.
1727-For TCP packets, the connection identifier is printed following the type.
1728-If the packet is compressed, its encoded header is printed out.
1729-The special cases are printed out as
1730-\fB*S+\fIn\fR and \fB*SA+\fIn\fR, where \fIn\fR is the amount by which
1731-the sequence number (or sequence number and ack) has changed.
1732-If it is not a special case,
1733-zero or more changes are printed.
1734-A change is indicated by U (urgent pointer), W (window), A (ack),
1735-S (sequence number), and I (packet ID), followed by a delta (+n or -n),
1736-or a new value (=n).
1737-Finally, the amount of data in the packet and compressed header length
1738-are printed.
1739-.LP
1740-For example, the following line shows an outbound compressed TCP packet,
1741-with an implicit connection identifier; the ack has changed by 6,
1742-the sequence number by 49, and the packet ID by 6; there are 3 bytes of
1743-data and 6 bytes of compressed header:
1744-.RS
1745-.nf
1746-\fBO ctcp * A+6 S+49 I+6 3 (6)\fP
1747-.fi
1748-.RE
1749-.HD
1750-ARP/RARP Packets
1751-.LP
1752-Arp/rarp output shows the type of request and its arguments.
1753-The
1754-format is intended to be self explanatory.
1755-Here is a short sample taken from the start of an `rlogin' from
1756-host \fIrtsg\fP to host \fIcsam\fP:
1757-.RS
1758-.nf
1759-.sp .5
1760-\f(CWarp who-has csam tell rtsg
1761-arp reply csam is-at CSAM\fR
1762-.sp .5
1763-.fi
1764-.RE
1765-The first line says that rtsg sent an arp packet asking
1766-for the Ethernet address of internet host csam.
1767-Csam
1768-replies with its Ethernet address (in this example, Ethernet addresses
1769-are in caps and internet addresses in lower case).
1770-.LP
1771-This would look less redundant if we had done \fItcpdump \-n\fP:
1772-.RS
1773-.nf
1774-.sp .5
1775-\f(CWarp who-has 128.3.254.6 tell 128.3.254.68
1776-arp reply 128.3.254.6 is-at 02:07:01:00:01:c4\fP
1777-.fi
1778-.RE
1779-.LP
1780-If we had done \fItcpdump \-e\fP, the fact that the first packet is
1781-broadcast and the second is point-to-point would be visible:
1782-.RS
1783-.nf
1784-.sp .5
1785-\f(CWRTSG Broadcast 0806 64: arp who-has csam tell rtsg
1786-CSAM RTSG 0806 64: arp reply csam is-at CSAM\fR
1787-.sp .5
1788-.fi
1789-.RE
1790-For the first packet this says the Ethernet source address is RTSG, the
1791-destination is the Ethernet broadcast address, the type field
1792-contained hex 0806 (type ETHER_ARP) and the total length was 64 bytes.
1793-.HD
1794-TCP Packets
1795-.LP
1796-\fI(N.B.:The following description assumes familiarity with
1797-the TCP protocol described in RFC-793.
1798-If you are not familiar
1799-with the protocol, neither this description nor \fItcpdump\fP will
1800-be of much use to you.)\fP
1801-.LP
1802-The general format of a tcp protocol line is:
1803-.RS
1804-.nf
1805-.sp .5
1806-\fIsrc > dst: flags data-seqno ack window urgent options\fP
1807-.sp .5
1808-.fi
1809-.RE
1810-\fISrc\fP and \fIdst\fP are the source and destination IP
1811-addresses and ports.
1812-\fIFlags\fP are some combination of S (SYN),
1813-F (FIN), P (PUSH), R (RST), U (URG), W (ECN CWR), E (ECN-Echo) or
1814-`.' (ACK), or `none' if no flags are set.
1815-\fIData-seqno\fP describes the portion of sequence space covered
1816-by the data in this packet (see example below).
1817-\fIAck\fP is sequence number of the next data expected the other
1818-direction on this connection.
1819-\fIWindow\fP is the number of bytes of receive buffer space available
1820-the other direction on this connection.
1821-\fIUrg\fP indicates there is `urgent' data in the packet.
1822-\fIOptions\fP are tcp options enclosed in angle brackets (e.g., <mss 1024>).
1823-.LP
1824-\fISrc, dst\fP and \fIflags\fP are always present.
1825-The other fields
1826-depend on the contents of the packet's tcp protocol header and
1827-are output only if appropriate.
1828-.LP
1829-Here is the opening portion of an rlogin from host \fIrtsg\fP to
1830-host \fIcsam\fP.
1831-.RS
1832-.nf
1833-.sp .5
1834-\s-2\f(CWrtsg.1023 > csam.login: S 768512:768512(0) win 4096 <mss 1024>
1835-csam.login > rtsg.1023: S 947648:947648(0) ack 768513 win 4096 <mss 1024>
1836-rtsg.1023 > csam.login: . ack 1 win 4096
1837-rtsg.1023 > csam.login: P 1:2(1) ack 1 win 4096
1838-csam.login > rtsg.1023: . ack 2 win 4096
1839-rtsg.1023 > csam.login: P 2:21(19) ack 1 win 4096
1840-csam.login > rtsg.1023: P 1:2(1) ack 21 win 4077
1841-csam.login > rtsg.1023: P 2:3(1) ack 21 win 4077 urg 1
1842-csam.login > rtsg.1023: P 3:4(1) ack 21 win 4077 urg 1\fR\s+2
1843-.sp .5
1844-.fi
1845-.RE
1846-The first line says that tcp port 1023 on rtsg sent a packet
1847-to port \fIlogin\fP
1848-on csam.
1849-The \fBS\fP indicates that the \fISYN\fP flag was set.
1850-The packet sequence number was 768512 and it contained no data.
1851-(The notation is `first:last(nbytes)' which means `sequence
1852-numbers \fIfirst\fP
1853-up to but not including \fIlast\fP which is \fInbytes\fP bytes of user data'.)
1854-There was no piggy-backed ack, the available receive window was 4096
1855-bytes and there was a max-segment-size option requesting an mss of
1856-1024 bytes.
1857-.LP
1858-Csam replies with a similar packet except it includes a piggy-backed
1859-ack for rtsg's SYN.
1860-Rtsg then acks csam's SYN.
1861-The `.' means the ACK flag was set.
1862-The packet contained no data so there is no data sequence number.
1863-Note that the ack sequence
1864-number is a small integer (1).
1865-The first time \fItcpdump\fP sees a
1866-tcp `conversation', it prints the sequence number from the packet.
1867-On subsequent packets of the conversation, the difference between
1868-the current packet's sequence number and this initial sequence number
1869-is printed.
1870-This means that sequence numbers after the
1871-first can be interpreted
1872-as relative byte positions in the conversation's data stream (with the
1873-first data byte each direction being `1').
1874-`-S' will override this
1875-feature, causing the original sequence numbers to be output.
1876-.LP
1877-On the 6th line, rtsg sends csam 19 bytes of data (bytes 2 through 20
1878-in the rtsg \(-> csam side of the conversation).
1879-The PUSH flag is set in the packet.
1880-On the 7th line, csam says it's received data sent by rtsg up to
1881-but not including byte 21.
1882-Most of this data is apparently sitting in the
1883-socket buffer since csam's receive window has gotten 19 bytes smaller.
1884-Csam also sends one byte of data to rtsg in this packet.
1885-On the 8th and 9th lines,
1886-csam sends two bytes of urgent, pushed data to rtsg.
1887-.LP
1888-If the snapshot was small enough that \fItcpdump\fP didn't capture
1889-the full TCP header, it interprets as much of the header as it can
1890-and then reports ``[|\fItcp\fP]'' to indicate the remainder could not
1891-be interpreted.
1892-If the header contains a bogus option (one with a length
1893-that's either too small or beyond the end of the header), \fItcpdump\fP
1894-reports it as ``[\fIbad opt\fP]'' and does not interpret any further
1895-options (since it's impossible to tell where they start).
1896-If the header
1897-length indicates options are present but the IP datagram length is not
1898-long enough for the options to actually be there, \fItcpdump\fP reports
1899-it as ``[\fIbad hdr length\fP]''.
1900-.HD
1901-.B Capturing TCP packets with particular flag combinations (SYN-ACK, URG-ACK, etc.)
1902-.PP
1903-There are 8 bits in the control bits section of the TCP header:
1904-.IP
1905-.I CWR | ECE | URG | ACK | PSH | RST | SYN | FIN
1906-.PP
1907-Let's assume that we want to watch packets used in establishing
1908-a TCP connection.
1909-Recall that TCP uses a 3-way handshake protocol
1910-when it initializes a new connection; the connection sequence with
1911-regard to the TCP control bits is
1912-.PP
1913-.RS
1914-1) Caller sends SYN
1915-.RE
1916-.RS
1917-2) Recipient responds with SYN, ACK
1918-.RE
1919-.RS
1920-3) Caller sends ACK
1921-.RE
1922-.PP
1923-Now we're interested in capturing packets that have only the
1924-SYN bit set (Step 1).
1925-Note that we don't want packets from step 2
1926-(SYN-ACK), just a plain initial SYN.
1927-What we need is a correct filter
1928-expression for \fItcpdump\fP.
1929-.PP
1930-Recall the structure of a TCP header without options:
1931-.PP
1932-.nf
1933- 0 15 31
1934------------------------------------------------------------------
1935-| source port | destination port |
1936------------------------------------------------------------------
1937-| sequence number |
1938------------------------------------------------------------------
1939-| acknowledgment number |
1940------------------------------------------------------------------
1941-| HL | rsvd |C|E|U|A|P|R|S|F| window size |
1942------------------------------------------------------------------
1943-| TCP checksum | urgent pointer |
1944------------------------------------------------------------------
1945-.fi
1946-.PP
1947-A TCP header usually holds 20 octets of data, unless options are
1948-present.
1949-The first line of the graph contains octets 0 - 3, the
1950-second line shows octets 4 - 7 etc.
1951-.PP
1952-Starting to count with 0, the relevant TCP control bits are contained
1953-in octet 13:
1954-.PP
1955-.nf
1956- 0 7| 15| 23| 31
1957-----------------|---------------|---------------|----------------
1958-| HL | rsvd |C|E|U|A|P|R|S|F| window size |
1959-----------------|---------------|---------------|----------------
1960-| | 13th octet | | |
1961-.fi
1962-.PP
1963-Let's have a closer look at octet no. 13:
1964-.PP
1965-.nf
1966- | |
1967- |---------------|
1968- |C|E|U|A|P|R|S|F|
1969- |---------------|
1970- |7 5 3 0|
1971-.fi
1972-.PP
1973-These are the TCP control bits we are interested
1974-in.
1975-We have numbered the bits in this octet from 0 to 7, right to
1976-left, so the PSH bit is bit number 3, while the URG bit is number 5.
1977-.PP
1978-Recall that we want to capture packets with only SYN set.
1979-Let's see what happens to octet 13 if a TCP datagram arrives
1980-with the SYN bit set in its header:
1981-.PP
1982-.nf
1983- |C|E|U|A|P|R|S|F|
1984- |---------------|
1985- |0 0 0 0 0 0 1 0|
1986- |---------------|
1987- |7 6 5 4 3 2 1 0|
1988-.fi
1989-.PP
1990-Looking at the
1991-control bits section we see that only bit number 1 (SYN) is set.
1992-.PP
1993-Assuming that octet number 13 is an 8-bit unsigned integer in
1994-network byte order, the binary value of this octet is
1995-.IP
1996-00000010
1997-.PP
1998-and its decimal representation is
1999-.PP
2000-.nf
2001- 7 6 5 4 3 2 1 0
2002-0*2 + 0*2 + 0*2 + 0*2 + 0*2 + 0*2 + 1*2 + 0*2 = 2
2003-.fi
2004-.PP
2005-We're almost done, because now we know that if only SYN is set,
2006-the value of the 13th octet in the TCP header, when interpreted
2007-as a 8-bit unsigned integer in network byte order, must be exactly 2.
2008-.PP
2009-This relationship can be expressed as
2010-.RS
2011-.B
2012-tcp[13] == 2
2013-.RE
2014-.PP
2015-We can use this expression as the filter for \fItcpdump\fP in order
2016-to watch packets which have only SYN set:
2017-.RS
2018-.B
2019-tcpdump -i xl0 tcp[13] == 2
2020-.RE
2021-.PP
2022-The expression says "let the 13th octet of a TCP datagram have
2023-the decimal value 2", which is exactly what we want.
2024-.PP
2025-Now, let's assume that we need to capture SYN packets, but we
2026-don't care if ACK or any other TCP control bit is set at the
2027-same time.
2028-Let's see what happens to octet 13 when a TCP datagram
2029-with SYN-ACK set arrives:
2030-.PP
2031-.nf
2032- |C|E|U|A|P|R|S|F|
2033- |---------------|
2034- |0 0 0 1 0 0 1 0|
2035- |---------------|
2036- |7 6 5 4 3 2 1 0|
2037-.fi
2038-.PP
2039-Now bits 1 and 4 are set in the 13th octet.
2040-The binary value of
2041-octet 13 is
2042-.IP
2043- 00010010
2044-.PP
2045-which translates to decimal
2046-.PP
2047-.nf
2048- 7 6 5 4 3 2 1 0
2049-0*2 + 0*2 + 0*2 + 1*2 + 0*2 + 0*2 + 1*2 + 0*2 = 18
2050-.fi
2051-.PP
2052-Now we can't just use 'tcp[13] == 18' in the \fItcpdump\fP filter
2053-expression, because that would select only those packets that have
2054-SYN-ACK set, but not those with only SYN set.
2055-Remember that we don't care
2056-if ACK or any other control bit is set as long as SYN is set.
2057-.PP
2058-In order to achieve our goal, we need to logically AND the
2059-binary value of octet 13 with some other value to preserve
2060-the SYN bit.
2061-We know that we want SYN to be set in any case,
2062-so we'll logically AND the value in the 13th octet with
2063-the binary value of a SYN:
2064-.PP
2065-.nf
2066-
2067- 00010010 SYN-ACK 00000010 SYN
2068- AND 00000010 (we want SYN) AND 00000010 (we want SYN)
2069- -------- --------
2070- = 00000010 = 00000010
2071-.fi
2072-.PP
2073-We see that this AND operation delivers the same result
2074-regardless whether ACK or another TCP control bit is set.
2075-The decimal representation of the AND value as well as
2076-the result of this operation is 2 (binary 00000010),
2077-so we know that for packets with SYN set the following
2078-relation must hold true:
2079-.IP
2080-( ( value of octet 13 ) AND ( 2 ) ) == ( 2 )
2081-.PP
2082-This points us to the \fItcpdump\fP filter expression
2083-.RS
2084-.B
2085- tcpdump -i xl0 'tcp[13] & 2 == 2'
2086-.RE
2087-.PP
2088-Some offsets and field values may be expressed as names
2089-rather than as numeric values. For example tcp[13] may
2090-be replaced with tcp[tcpflags]. The following TCP flag
2091-field values are also available: tcp-fin, tcp-syn, tcp-rst,
2092-tcp-push, tcp-act, tcp-urg.
2093-.PP
2094-This can be demonstrated as:
2095-.RS
2096-.B
2097- tcpdump -i xl0 'tcp[tcpflags] & tcp-push != 0'
2098-.RE
2099-.PP
2100-Note that you should use single quotes or a backslash
2101-in the expression to hide the AND ('&') special character
2102-from the shell.
2103-.HD
2104-.B
2105-UDP Packets
2106-.LP
2107-UDP format is illustrated by this rwho packet:
2108-.RS
2109-.nf
2110-.sp .5
2111-\f(CWactinide.who > broadcast.who: udp 84\fP
2112-.sp .5
2113-.fi
2114-.RE
2115-This says that port \fIwho\fP on host \fIactinide\fP sent a udp
2116-datagram to port \fIwho\fP on host \fIbroadcast\fP, the Internet
2117-broadcast address.
2118-The packet contained 84 bytes of user data.
2119-.LP
2120-Some UDP services are recognized (from the source or destination
2121-port number) and the higher level protocol information printed.
2122-In particular, Domain Name service requests (RFC-1034/1035) and Sun
2123-RPC calls (RFC-1050) to NFS.
2124-.HD
2125-UDP Name Server Requests
2126-.LP
2127-\fI(N.B.:The following description assumes familiarity with
2128-the Domain Service protocol described in RFC-1035.
2129-If you are not familiar
2130-with the protocol, the following description will appear to be written
2131-in greek.)\fP
2132-.LP
2133-Name server requests are formatted as
2134-.RS
2135-.nf
2136-.sp .5
2137-\fIsrc > dst: id op? flags qtype qclass name (len)\fP
2138-.sp .5
2139-\f(CWh2opolo.1538 > helios.domain: 3+ A? ucbvax.berkeley.edu. (37)\fR
2140-.sp .5
2141-.fi
2142-.RE
2143-Host \fIh2opolo\fP asked the domain server on \fIhelios\fP for an
2144-address record (qtype=A) associated with the name \fIucbvax.berkeley.edu.\fP
2145-The query id was `3'.
2146-The `+' indicates the \fIrecursion desired\fP flag
2147-was set.
2148-The query length was 37 bytes, not including the UDP and
2149-IP protocol headers.
2150-The query operation was the normal one, \fIQuery\fP,
2151-so the op field was omitted.
2152-If the op had been anything else, it would
2153-have been printed between the `3' and the `+'.
2154-Similarly, the qclass was the normal one,
2155-\fIC_IN\fP, and omitted.
2156-Any other qclass would have been printed
2157-immediately after the `A'.
2158-.LP
2159-A few anomalies are checked and may result in extra fields enclosed in
2160-square brackets: If a query contains an answer, authority records or
2161-additional records section,
2162-.IR ancount ,
2163-.IR nscount ,
2164-or
2165-.I arcount
2166-are printed as `[\fIn\fPa]', `[\fIn\fPn]' or `[\fIn\fPau]' where \fIn\fP
2167-is the appropriate count.
2168-If any of the response bits are set (AA, RA or rcode) or any of the
2169-`must be zero' bits are set in bytes two and three, `[b2&3=\fIx\fP]'
2170-is printed, where \fIx\fP is the hex value of header bytes two and three.
2171-.HD
2172-UDP Name Server Responses
2173-.LP
2174-Name server responses are formatted as
2175-.RS
2176-.nf
2177-.sp .5
2178-\fIsrc > dst: id op rcode flags a/n/au type class data (len)\fP
2179-.sp .5
2180-\f(CWhelios.domain > h2opolo.1538: 3 3/3/7 A 128.32.137.3 (273)
2181-helios.domain > h2opolo.1537: 2 NXDomain* 0/1/0 (97)\fR
2182-.sp .5
2183-.fi
2184-.RE
2185-In the first example, \fIhelios\fP responds to query id 3 from \fIh2opolo\fP
2186-with 3 answer records, 3 name server records and 7 additional records.
2187-The first answer record is type A (address) and its data is internet
2188-address 128.32.137.3.
2189-The total size of the response was 273 bytes,
2190-excluding UDP and IP headers.
2191-The op (Query) and response code
2192-(NoError) were omitted, as was the class (C_IN) of the A record.
2193-.LP
2194-In the second example, \fIhelios\fP responds to query 2 with a
2195-response code of non-existent domain (NXDomain) with no answers,
2196-one name server and no authority records.
2197-The `*' indicates that
2198-the \fIauthoritative answer\fP bit was set.
2199-Since there were no
2200-answers, no type, class or data were printed.
2201-.LP
2202-Other flag characters that might appear are `\-' (recursion available,
2203-RA, \fInot\fP set) and `|' (truncated message, TC, set).
2204-If the
2205-`question' section doesn't contain exactly one entry, `[\fIn\fPq]'
2206-is printed.
2207-.HD
2208-SMB/CIFS decoding
2209-.LP
2210-\fItcpdump\fP now includes fairly extensive SMB/CIFS/NBT decoding for data
2211-on UDP/137, UDP/138 and TCP/139.
2212-Some primitive decoding of IPX and
2213-NetBEUI SMB data is also done.
2214-.LP
2215-By default a fairly minimal decode is done, with a much more detailed
2216-decode done if -v is used.
2217-Be warned that with -v a single SMB packet
2218-may take up a page or more, so only use -v if you really want all the
2219-gory details.
2220-.LP
2221-For information on SMB packet formats and what all the fields mean see
2222-www.cifs.org or the pub/samba/specs/ directory on your favorite
2223-samba.org mirror site.
2224-The SMB patches were written by Andrew Tridgell
2225-(tridge@samba.org).
2226-.HD
2227-NFS Requests and Replies
2228-.LP
2229-Sun NFS (Network File System) requests and replies are printed as:
2230-.RS
2231-.nf
2232-.sp .5
2233-\fIsrc.xid > dst.nfs: len op args\fP
2234-\fIsrc.nfs > dst.xid: reply stat len op results\fP
2235-.sp .5
2236-\f(CW
2237-sushi.6709 > wrl.nfs: 112 readlink fh 21,24/10.73165
2238-wrl.nfs > sushi.6709: reply ok 40 readlink "../var"
2239-sushi.201b > wrl.nfs:
2240- 144 lookup fh 9,74/4096.6878 "xcolors"
2241-wrl.nfs > sushi.201b:
2242- reply ok 128 lookup fh 9,74/4134.3150
2243-\fR
2244-.sp .5
2245-.fi
2246-.RE
2247-In the first line, host \fIsushi\fP sends a transaction with id \fI6709\fP
2248-to \fIwrl\fP (note that the number following the src host is a
2249-transaction id, \fInot\fP the source port).
2250-The request was 112 bytes,
2251-excluding the UDP and IP headers.
2252-The operation was a \fIreadlink\fP
2253-(read symbolic link) on file handle (\fIfh\fP) 21,24/10.731657119.
2254-(If one is lucky, as in this case, the file handle can be interpreted
2255-as a major,minor device number pair, followed by the inode number and
2256-generation number.)
2257-\fIWrl\fP replies `ok' with the contents of the link.
2258-.LP
2259-In the third line, \fIsushi\fP asks \fIwrl\fP to lookup the name
2260-`\fIxcolors\fP' in directory file 9,74/4096.6878.
2261-Note that the data printed
2262-depends on the operation type.
2263-The format is intended to be self
2264-explanatory if read in conjunction with
2265-an NFS protocol spec.
2266-.LP
2267-If the \-v (verbose) flag is given, additional information is printed.
2268-For example:
2269-.RS
2270-.nf
2271-.sp .5
2272-\f(CW
2273-sushi.1372a > wrl.nfs:
2274- 148 read fh 21,11/12.195 8192 bytes @ 24576
2275-wrl.nfs > sushi.1372a:
2276- reply ok 1472 read REG 100664 ids 417/0 sz 29388
2277-\fP
2278-.sp .5
2279-.fi
2280-.RE
2281-(\-v also prints the IP header TTL, ID, length, and fragmentation fields,
2282-which have been omitted from this example.) In the first line,
2283-\fIsushi\fP asks \fIwrl\fP to read 8192 bytes from file 21,11/12.195,
2284-at byte offset 24576.
2285-\fIWrl\fP replies `ok'; the packet shown on the
2286-second line is the first fragment of the reply, and hence is only 1472
2287-bytes long (the other bytes will follow in subsequent fragments, but
2288-these fragments do not have NFS or even UDP headers and so might not be
2289-printed, depending on the filter expression used).
2290-Because the \-v flag
2291-is given, some of the file attributes (which are returned in addition
2292-to the file data) are printed: the file type (``REG'', for regular file),
2293-the file mode (in octal), the uid and gid, and the file size.
2294-.LP
2295-If the \-v flag is given more than once, even more details are printed.
2296-.LP
2297-Note that NFS requests are very large and much of the detail won't be printed
2298-unless \fIsnaplen\fP is increased.
2299-Try using `\fB\-s 192\fP' to watch
2300-NFS traffic.
2301-.LP
2302-NFS reply packets do not explicitly identify the RPC operation.
2303-Instead,
2304-\fItcpdump\fP keeps track of ``recent'' requests, and matches them to the
2305-replies using the transaction ID.
2306-If a reply does not closely follow the
2307-corresponding request, it might not be parsable.
2308-.HD
2309-AFS Requests and Replies
2310-.LP
2311-Transarc AFS (Andrew File System) requests and replies are printed
2312-as:
2313-.HD
2314-.RS
2315-.nf
2316-.sp .5
2317-\fIsrc.sport > dst.dport: rx packet-type\fP
2318-\fIsrc.sport > dst.dport: rx packet-type service call call-name args\fP
2319-\fIsrc.sport > dst.dport: rx packet-type service reply call-name args\fP
2320-.sp .5
2321-\f(CW
2322-elvis.7001 > pike.afsfs:
2323- rx data fs call rename old fid 536876964/1/1 ".newsrc.new"
2324- new fid 536876964/1/1 ".newsrc"
2325-pike.afsfs > elvis.7001: rx data fs reply rename
2326-\fR
2327-.sp .5
2328-.fi
2329-.RE
2330-In the first line, host elvis sends a RX packet to pike.
2331-This was
2332-a RX data packet to the fs (fileserver) service, and is the start of
2333-an RPC call.
2334-The RPC call was a rename, with the old directory file id
2335-of 536876964/1/1 and an old filename of `.newsrc.new', and a new directory
2336-file id of 536876964/1/1 and a new filename of `.newsrc'.
2337-The host pike
2338-responds with a RPC reply to the rename call (which was successful, because
2339-it was a data packet and not an abort packet).
2340-.LP
2341-In general, all AFS RPCs are decoded at least by RPC call name.
2342-Most
2343-AFS RPCs have at least some of the arguments decoded (generally only
2344-the `interesting' arguments, for some definition of interesting).
2345-.LP
2346-The format is intended to be self-describing, but it will probably
2347-not be useful to people who are not familiar with the workings of
2348-AFS and RX.
2349-.LP
2350-If the -v (verbose) flag is given twice, acknowledgement packets and
2351-additional header information is printed, such as the the RX call ID,
2352-call number, sequence number, serial number, and the RX packet flags.
2353-.LP
2354-If the -v flag is given twice, additional information is printed,
2355-such as the the RX call ID, serial number, and the RX packet flags.
2356-The MTU negotiation information is also printed from RX ack packets.
2357-.LP
2358-If the -v flag is given three times, the security index and service id
2359-are printed.
2360-.LP
2361-Error codes are printed for abort packets, with the exception of Ubik
2362-beacon packets (because abort packets are used to signify a yes vote
2363-for the Ubik protocol).
2364-.LP
2365-Note that AFS requests are very large and many of the arguments won't
2366-be printed unless \fIsnaplen\fP is increased.
2367-Try using `\fB-s 256\fP'
2368-to watch AFS traffic.
2369-.LP
2370-AFS reply packets do not explicitly identify the RPC operation.
2371-Instead,
2372-\fItcpdump\fP keeps track of ``recent'' requests, and matches them to the
2373-replies using the call number and service ID.
2374-If a reply does not closely
2375-follow the
2376-corresponding request, it might not be parsable.
2377-
2378-.HD
2379-KIP AppleTalk (DDP in UDP)
2380-.LP
2381-AppleTalk DDP packets encapsulated in UDP datagrams are de-encapsulated
2382-and dumped as DDP packets (i.e., all the UDP header information is
2383-discarded).
2384-The file
2385-.I /etc/atalk.names
2386-is used to translate AppleTalk net and node numbers to names.
2387-Lines in this file have the form
2388-.RS
2389-.nf
2390-.sp .5
2391-\fInumber name\fP
2392-
2393-\f(CW1.254 ether
2394-16.1 icsd-net
2395-1.254.110 ace\fR
2396-.sp .5
2397-.fi
2398-.RE
2399-The first two lines give the names of AppleTalk networks.
2400-The third
2401-line gives the name of a particular host (a host is distinguished
2402-from a net by the 3rd octet in the number \-
2403-a net number \fImust\fP have two octets and a host number \fImust\fP
2404-have three octets.) The number and name should be separated by
2405-whitespace (blanks or tabs).
2406-The
2407-.I /etc/atalk.names
2408-file may contain blank lines or comment lines (lines starting with
2409-a `#').
2410-.LP
2411-AppleTalk addresses are printed in the form
2412-.RS
2413-.nf
2414-.sp .5
2415-\fInet.host.port\fP
2416-
2417-\f(CW144.1.209.2 > icsd-net.112.220
2418-office.2 > icsd-net.112.220
2419-jssmag.149.235 > icsd-net.2\fR
2420-.sp .5
2421-.fi
2422-.RE
2423-(If the
2424-.I /etc/atalk.names
2425-doesn't exist or doesn't contain an entry for some AppleTalk
2426-host/net number, addresses are printed in numeric form.)
2427-In the first example, NBP (DDP port 2) on net 144.1 node 209
2428-is sending to whatever is listening on port 220 of net icsd node 112.
2429-The second line is the same except the full name of the source node
2430-is known (`office').
2431-The third line is a send from port 235 on
2432-net jssmag node 149 to broadcast on the icsd-net NBP port (note that
2433-the broadcast address (255) is indicated by a net name with no host
2434-number \- for this reason it's a good idea to keep node names and
2435-net names distinct in /etc/atalk.names).
2436-.LP
2437-NBP (name binding protocol) and ATP (AppleTalk transaction protocol)
2438-packets have their contents interpreted.
2439-Other protocols just dump
2440-the protocol name (or number if no name is registered for the
2441-protocol) and packet size.
2442-
2443-\fBNBP packets\fP are formatted like the following examples:
2444-.RS
2445-.nf
2446-.sp .5
2447-\s-2\f(CWicsd-net.112.220 > jssmag.2: nbp-lkup 190: "=:LaserWriter@*"
2448-jssmag.209.2 > icsd-net.112.220: nbp-reply 190: "RM1140:LaserWriter@*" 250
2449-techpit.2 > icsd-net.112.220: nbp-reply 190: "techpit:LaserWriter@*" 186\fR\s+2
2450-.sp .5
2451-.fi
2452-.RE
2453-The first line is a name lookup request for laserwriters sent by net icsd host
2454-112 and broadcast on net jssmag.
2455-The nbp id for the lookup is 190.
2456-The second line shows a reply for this request (note that it has the
2457-same id) from host jssmag.209 saying that it has a laserwriter
2458-resource named "RM1140" registered on port 250.
2459-The third line is
2460-another reply to the same request saying host techpit has laserwriter
2461-"techpit" registered on port 186.
2462-
2463-\fBATP packet\fP formatting is demonstrated by the following example:
2464-.RS
2465-.nf
2466-.sp .5
2467-\s-2\f(CWjssmag.209.165 > helios.132: atp-req 12266<0-7> 0xae030001
2468-helios.132 > jssmag.209.165: atp-resp 12266:0 (512) 0xae040000
2469-helios.132 > jssmag.209.165: atp-resp 12266:1 (512) 0xae040000
2470-helios.132 > jssmag.209.165: atp-resp 12266:2 (512) 0xae040000
2471-helios.132 > jssmag.209.165: atp-resp 12266:3 (512) 0xae040000
2472-helios.132 > jssmag.209.165: atp-resp 12266:4 (512) 0xae040000
2473-helios.132 > jssmag.209.165: atp-resp 12266:5 (512) 0xae040000
2474-helios.132 > jssmag.209.165: atp-resp 12266:6 (512) 0xae040000
2475-helios.132 > jssmag.209.165: atp-resp*12266:7 (512) 0xae040000
2476-jssmag.209.165 > helios.132: atp-req 12266<3,5> 0xae030001
2477-helios.132 > jssmag.209.165: atp-resp 12266:3 (512) 0xae040000
2478-helios.132 > jssmag.209.165: atp-resp 12266:5 (512) 0xae040000
2479-jssmag.209.165 > helios.132: atp-rel 12266<0-7> 0xae030001
2480-jssmag.209.133 > helios.132: atp-req* 12267<0-7> 0xae030002\fR\s+2
2481-.sp .5
2482-.fi
2483-.RE
2484-Jssmag.209 initiates transaction id 12266 with host helios by requesting
2485-up to 8 packets (the `<0-7>').
2486-The hex number at the end of the line
2487-is the value of the `userdata' field in the request.
2488-.LP
2489-Helios responds with 8 512-byte packets.
2490-The `:digit' following the
2491-transaction id gives the packet sequence number in the transaction
2492-and the number in parens is the amount of data in the packet,
2493-excluding the atp header.
2494-The `*' on packet 7 indicates that the
2495-EOM bit was set.
2496-.LP
2497-Jssmag.209 then requests that packets 3 & 5 be retransmitted.
2498-Helios
2499-resends them then jssmag.209 releases the transaction.
2500-Finally,
2501-jssmag.209 initiates the next request.
2502-The `*' on the request
2503-indicates that XO (`exactly once') was \fInot\fP set.
2504-
2505-.HD
2506-IP Fragmentation
2507-.LP
2508-Fragmented Internet datagrams are printed as
2509-.RS
2510-.nf
2511-.sp .5
2512-\fB(frag \fIid\fB:\fIsize\fB@\fIoffset\fB+)\fR
2513-\fB(frag \fIid\fB:\fIsize\fB@\fIoffset\fB)\fR
2514-.sp .5
2515-.fi
2516-.RE
2517-(The first form indicates there are more fragments.
2518-The second
2519-indicates this is the last fragment.)
2520-.LP
2521-\fIId\fP is the fragment id.
2522-\fISize\fP is the fragment
2523-size (in bytes) excluding the IP header.
2524-\fIOffset\fP is this
2525-fragment's offset (in bytes) in the original datagram.
2526-.LP
2527-The fragment information is output for each fragment.
2528-The first
2529-fragment contains the higher level protocol header and the frag
2530-info is printed after the protocol info.
2531-Fragments
2532-after the first contain no higher level protocol header and the
2533-frag info is printed after the source and destination addresses.
2534-For example, here is part of an ftp from arizona.edu to lbl-rtsg.arpa
2535-over a CSNET connection that doesn't appear to handle 576 byte datagrams:
2536-.RS
2537-.nf
2538-.sp .5
2539-\s-2\f(CWarizona.ftp-data > rtsg.1170: . 1024:1332(308) ack 1 win 4096 (frag 595a:328@0+)
2540-arizona > rtsg: (frag 595a:204@328)
2541-rtsg.1170 > arizona.ftp-data: . ack 1536 win 2560\fP\s+2
2542-.sp .5
2543-.fi
2544-.RE
2545-There are a couple of things to note here: First, addresses in the
2546-2nd line don't include port numbers.
2547-This is because the TCP
2548-protocol information is all in the first fragment and we have no idea
2549-what the port or sequence numbers are when we print the later fragments.
2550-Second, the tcp sequence information in the first line is printed as if there
2551-were 308 bytes of user data when, in fact, there are 512 bytes (308 in
2552-the first frag and 204 in the second).
2553-If you are looking for holes
2554-in the sequence space or trying to match up acks
2555-with packets, this can fool you.
2556-.LP
2557-A packet with the IP \fIdon't fragment\fP flag is marked with a
2558-trailing \fB(DF)\fP.
2559-.HD
2560-Timestamps
2561-.LP
2562-By default, all output lines are preceded by a timestamp.
2563-The timestamp
2564-is the current clock time in the form
2565-.RS
2566-.nf
2567-\fIhh:mm:ss.frac\fP
2568-.fi
2569-.RE
2570-and is as accurate as the kernel's clock.
2571-The timestamp reflects the time the kernel first saw the packet.
2572-No attempt
2573-is made to account for the time lag between when the
2574-Ethernet interface removed the packet from the wire and when the kernel
2575-serviced the `new packet' interrupt.
2576-.SH "SEE ALSO"
2577-stty(1), pcap(3PCAP), bpf(4), nit(4P), pcap-savefile(@MAN_FILE_FORMATS@),
2578-pcap-filter(@MAN_MISC_INFO@), pcap-tstamp-type(@MAN_MISC_INFO@)
2579-.SH AUTHORS
2580-The original authors are:
2581-.LP
2582-Van Jacobson,
2583-Craig Leres and
2584-Steven McCanne, all of the
2585-Lawrence Berkeley National Laboratory, University of California, Berkeley, CA.
2586-.LP
2587-It is currently being maintained by tcpdump.org.
2588-.LP
2589-The current version is available via http:
2590-.LP
2591-.RS
2592-.I http://www.tcpdump.org/
2593-.RE
2594-.LP
2595-The original distribution is available via anonymous ftp:
2596-.LP
2597-.RS
2598-.I ftp://ftp.ee.lbl.gov/tcpdump.tar.Z
2599-.RE
2600-.LP
2601-IPv6/IPsec support is added by WIDE/KAME project.
2602-This program uses Eric Young's SSLeay library, under specific configurations.
2603-.SH BUGS
2604-Please send problems, bugs, questions, desirable enhancements, patches
2605-etc. to:
2606-.LP
2607-.RS
2608-tcpdump-workers@lists.tcpdump.org
2609-.RE
2610-.LP
2611-NIT doesn't let you watch your own outbound traffic, BPF will.
2612-We recommend that you use the latter.
2613-.LP
2614-On Linux systems with 2.0[.x] kernels:
2615-.IP
2616-packets on the loopback device will be seen twice;
2617-.IP
2618-packet filtering cannot be done in the kernel, so that all packets must
2619-be copied from the kernel in order to be filtered in user mode;
2620-.IP
2621-all of a packet, not just the part that's within the snapshot length,
2622-will be copied from the kernel (the 2.0[.x] packet capture mechanism, if
2623-asked to copy only part of a packet to userland, will not report the
2624-true length of the packet; this would cause most IP packets to get an
2625-error from
2626-.BR tcpdump );
2627-.IP
2628-capturing on some PPP devices won't work correctly.
2629-.LP
2630-We recommend that you upgrade to a 2.2 or later kernel.
2631-.LP
2632-Some attempt should be made to reassemble IP fragments or, at least
2633-to compute the right length for the higher level protocol.
2634-.LP
2635-Name server inverse queries are not dumped correctly: the (empty)
2636-question section is printed rather than real query in the answer
2637-section.
2638-Some believe that inverse queries are themselves a bug and
2639-prefer to fix the program generating them rather than \fItcpdump\fP.
2640-.LP
2641-A packet trace that crosses a daylight savings time change will give
2642-skewed time stamps (the time change is ignored).
2643-.LP
2644-Filter expressions on fields other than those in Token Ring headers will
2645-not correctly handle source-routed Token Ring packets.
2646-.LP
2647-Filter expressions on fields other than those in 802.11 headers will not
2648-correctly handle 802.11 data packets with both To DS and From DS set.
2649-.LP
2650-.BR "ip6 proto"
2651-should chase header chain, but at this moment it does not.
2652-.BR "ip6 protochain"
2653-is supplied for this behavior.
2654-.LP
2655-Arithmetic expression against transport layer headers, like \fBtcp[0]\fP,
2656-does not work against IPv6 packets.
2657-It only looks at IPv4 packets.
2658
2659=== removed directory '.pc/40_openssl.diff'
2660=== removed file '.pc/40_openssl.diff/configure.in'
2661--- .pc/40_openssl.diff/configure.in 2012-01-02 20:19:22 +0000
2662+++ .pc/40_openssl.diff/configure.in 1970-01-01 00:00:00 +0000
2663@@ -1,1111 +0,0 @@
2664-dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.204 2008-11-18 07:39:20 guy Exp $ (LBL)
2665-dnl
2666-dnl Copyright (c) 1994, 1995, 1996, 1997
2667-dnl The Regents of the University of California. All rights reserved.
2668-dnl
2669-dnl Process this file with autoconf to produce a configure script.
2670-dnl
2671-
2672-#
2673-# See
2674-#
2675-# http://ftp.gnu.org/gnu/config/README
2676-#
2677-# for the URLs to use to fetch new versions of config.guess and
2678-# config.sub.
2679-#
2680-
2681-AC_REVISION($Revision: 1.204 $)
2682-AC_PREREQ(2.50)
2683-AC_INIT(tcpdump.c)
2684-
2685-AC_CANONICAL_HOST
2686-
2687-AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS)
2688-AC_PROG_CC
2689-AC_LBL_C_INIT(V_CCOPT, V_INCLS)
2690-AC_LBL_C_INLINE
2691-AC_C___ATTRIBUTE__
2692-if test "$ac_cv___attribute__" = "yes"; then
2693- AC_C___ATTRIBUTE___FORMAT_FUNCTION_POINTER
2694-fi
2695-AC_CHECK_HEADERS(fcntl.h rpc/rpc.h rpc/rpcent.h netdnet/dnetdb.h)
2696-AC_CHECK_HEADERS(net/pfvar.h, , , [#include <sys/types.h>
2697-#include <sys/socket.h>
2698-#include <net/if.h>])
2699-if test "$ac_cv_header_net_pfvar_h" = yes; then
2700- LOCALSRC="print-pflog.c $LOCALSRC"
2701-fi
2702-AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h>
2703-#include <sys/socket.h>])
2704-if test "$ac_cv_header_netinet_if_ether_h" != yes; then
2705- #
2706- # The simple test didn't work.
2707- # Do we need to include <net/if.h> first?
2708- # Unset ac_cv_header_netinet_if_ether_h so we don't
2709- # treat the previous failure as a cached value and
2710- # suppress the next test.
2711- #
2712- AC_MSG_NOTICE([Rechecking with some additional includes])
2713- unset ac_cv_header_netinet_if_ether_h
2714- AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h>
2715-#include <sys/socket.h>
2716-#include <netinet/in.h>
2717-struct mbuf;
2718-struct rtentry;
2719-#include <net/if.h>])
2720-fi
2721-
2722-AC_HEADER_TIME
2723-
2724-case "$host_os" in
2725-
2726-darwin*)
2727- AC_ARG_ENABLE(universal,
2728- AC_HELP_STRING([--disable-universal],[don't build universal on OS X]))
2729- if test "$enable_universal" != "no"; then
2730- case "$host_os" in
2731-
2732- darwin9.*)
2733- #
2734- # Leopard. Build for x86 and 32-bit PowerPC, with
2735- # x86 first. (That's what Apple does.)
2736- #
2737- V_CCOPT="$V_CCOPT -arch i386 -arch ppc"
2738- LDFLAGS="$LDFLAGS -arch i386 -arch ppc"
2739- ;;
2740-
2741- darwin10.*)
2742- #
2743- # Snow Leopard. Build for x86-64 and x86, with
2744- # x86-64 first. (That's what Apple does.)
2745- #
2746- V_CCOPT="$V_CCOPT -arch x86_64 -arch i386"
2747- LDFLAGS="$LDFLAGS -arch x86_64 -arch i386"
2748- ;;
2749- esac
2750- fi
2751- ;;
2752-
2753-linux*)
2754- AC_MSG_CHECKING(Linux kernel version)
2755- if test "$cross_compiling" = yes; then
2756- AC_CACHE_VAL(ac_cv_linux_vers,
2757- ac_cv_linux_vers=unknown)
2758- else
2759- AC_CACHE_VAL(ac_cv_linux_vers,
2760- ac_cv_linux_vers=`uname -r 2>&1 | \
2761- sed -n -e '$s/.* //' -e '$s/\..*//p'`)
2762- fi
2763- AC_MSG_RESULT($ac_cv_linux_vers)
2764- if test $ac_cv_linux_vers = unknown ; then
2765- AC_MSG_ERROR(cannot determine linux version when cross-compiling)
2766- fi
2767- if test $ac_cv_linux_vers -lt 2 ; then
2768- AC_MSG_ERROR(version 2 or higher required; see the INSTALL doc for more info)
2769- fi
2770- ;;
2771-
2772-*)
2773- ;;
2774-esac
2775-
2776-
2777-AC_ARG_WITH(smi,
2778-[ --with-smi link with libsmi (allows to load MIBs on the fly to decode SNMP packets. [default=yes]
2779- --without-smi don't link with libsmi],,
2780- with_smi=yes)
2781-
2782-if test "x$with_smi" != "xno" ; then
2783-AC_CHECK_HEADERS(smi.h)
2784-AC_CHECK_LIB(smi, smiInit)
2785-if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes
2786-then
2787-AC_MSG_CHECKING([whether to enable libsmi])
2788- AC_TRY_RUN([ /* libsmi available check */
2789-#include <smi.h>
2790-main()
2791-{
2792- int current, revision, age, n;
2793- const int required = 2;
2794- if (smiInit(""))
2795- exit(1);
2796- if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
2797- exit(2);
2798- n = sscanf(smi_library_version, "%d:%d:%d", &current, &revision, &age);
2799- if (n != 3)
2800- exit(3);
2801- if (required < current - age || required > current)
2802- exit(4);
2803- exit(0);
2804-}
2805-],
2806-[ AC_MSG_RESULT(yes)
2807- AC_DEFINE(LIBSMI)
2808- libsmi=yes],
2809-dnl autoconf documentation says that $? contains the exit value.
2810-dnl reality is that it does not. We leave this in just in case
2811-dnl autoconf ever comes back to match the documentation.
2812-[ case $? in
2813- 1) AC_MSG_RESULT(no - smiInit failed) ;;
2814- 2) AC_MSG_RESULT(no - header/library version mismatch) ;;
2815- 3) AC_MSG_RESULT(no - can't determine library version) ;;
2816- 4) AC_MSG_RESULT(no - too old) ;;
2817- *) AC_MSG_RESULT(no) ;;
2818- esac
2819- libsmi=no],
2820-[ AC_MSG_RESULT(not when cross-compiling)
2821- libsmi=no]
2822-)
2823-fi
2824-fi
2825-
2826-AC_MSG_CHECKING([whether to enable the possibly-buggy SMB printer])
2827-AC_ARG_ENABLE(smb,
2828-[ --enable-smb enable possibly-buggy SMB printer [default=yes]
2829- --disable-smb disable possibly-buggy SMB printer],,
2830- enableval=yes)
2831-case "$enableval" in
2832-yes) AC_MSG_RESULT(yes)
2833- AC_WARN([The SMB printer may have exploitable buffer overflows!!!])
2834- AC_DEFINE(TCPDUMP_DO_SMB)
2835- LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
2836- ;;
2837-*) AC_MSG_RESULT(no)
2838- ;;
2839-esac
2840-
2841-AC_ARG_WITH(user, [ --with-user=USERNAME drop privileges by default to USERNAME])
2842-AC_MSG_CHECKING([whether to drop root privileges by default])
2843-if test ! -z "$with_user" ; then
2844- AC_DEFINE_UNQUOTED(WITH_USER, "$withval")
2845- AC_MSG_RESULT(to \"$withval\")
2846-else
2847- AC_MSG_RESULT(no)
2848-fi
2849-
2850-AC_ARG_WITH(chroot, [ --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY])
2851-AC_MSG_CHECKING([whether to chroot])
2852-if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then
2853- AC_DEFINE_UNQUOTED(WITH_CHROOT, "$withval")
2854- AC_MSG_RESULT(to \"$withval\")
2855-else
2856- AC_MSG_RESULT(no)
2857-fi
2858-
2859-AC_MSG_CHECKING([whether to enable ipv6])
2860-AC_ARG_ENABLE(ipv6,
2861-[ --enable-ipv6 enable ipv6 (with ipv4) support
2862- --disable-ipv6 disable ipv6 support],
2863-[ case "$enableval" in
2864-yes) AC_MSG_RESULT(yes)
2865- LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC"
2866- AC_DEFINE(INET6)
2867- ipv6=yes
2868- ;;
2869-*)
2870- AC_MSG_RESULT(no)
2871- ipv6=no
2872- ;;
2873- esac ],
2874-
2875- AC_TRY_RUN([ /* AF_INET6 available check */
2876-#include <sys/types.h>
2877-#include <sys/socket.h>
2878-main()
2879-{
2880- if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
2881- exit(1);
2882- else
2883- exit(0);
2884-}
2885-],
2886-[ AC_MSG_RESULT(yes)
2887- LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC"
2888- AC_DEFINE(INET6)
2889- ipv6=yes],
2890-[ AC_MSG_RESULT(no)
2891- ipv6=no],
2892-[ AC_MSG_RESULT(no)
2893- ipv6=no]
2894-))
2895-
2896-ipv6type=unknown
2897-ipv6lib=none
2898-ipv6trylibc=no
2899-
2900-if test "$ipv6" = "yes"; then
2901- AC_MSG_CHECKING([ipv6 stack type])
2902- for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
2903- case $i in
2904- inria)
2905- dnl http://www.kame.net/
2906- AC_EGREP_CPP(yes,
2907-[#include <netinet/in.h>
2908-#ifdef IPV6_INRIA_VERSION
2909-yes
2910-#endif],
2911- [ipv6type=$i;
2912- CFLAGS="-DINET6 $CFLAGS"])
2913- ;;
2914- kame)
2915- dnl http://www.kame.net/
2916- AC_EGREP_CPP(yes,
2917-[#include <netinet/in.h>
2918-#ifdef __KAME__
2919-yes
2920-#endif],
2921- [ipv6type=$i;
2922- ipv6lib=inet6;
2923- ipv6libdir=/usr/local/v6/lib;
2924- ipv6trylibc=yes;
2925- CFLAGS="-DINET6 $CFLAGS"])
2926- ;;
2927- linux-glibc)
2928- dnl http://www.v6.linux.or.jp/
2929- AC_EGREP_CPP(yes,
2930-[#include <features.h>
2931-#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
2932-yes
2933-#endif],
2934- [ipv6type=$i;
2935- CFLAGS="-DINET6 $CFLAGS"])
2936- ;;
2937- linux-libinet6)
2938- dnl http://www.v6.linux.or.jp/
2939- dnl
2940- dnl This also matches Solaris 8 and Tru64 UNIX 5.1,
2941- dnl and possibly other versions of those OSes
2942- dnl
2943- if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then
2944- ipv6type=$i
2945- ipv6lib=inet6
2946- ipv6libdir=/usr/inet6/lib
2947- ipv6trylibc=yes;
2948- CFLAGS="-DINET6 -I/usr/inet6/include $CFLAGS"
2949- fi
2950- ;;
2951- toshiba)
2952- AC_EGREP_CPP(yes,
2953-[#include <sys/param.h>
2954-#ifdef _TOSHIBA_INET6
2955-yes
2956-#endif],
2957- [ipv6type=$i;
2958- ipv6lib=inet6;
2959- ipv6libdir=/usr/local/v6/lib;
2960- CFLAGS="-DINET6 $CFLAGS"])
2961- ;;
2962- v6d)
2963- AC_EGREP_CPP(yes,
2964-[#include </usr/local/v6/include/sys/v6config.h>
2965-#ifdef __V6D__
2966-yes
2967-#endif],
2968- [ipv6type=$i;
2969- ipv6lib=v6;
2970- ipv6libdir=/usr/local/v6/lib;
2971- CFLAGS="-I/usr/local/v6/include $CFLAGS"])
2972- ;;
2973- zeta)
2974- AC_EGREP_CPP(yes,
2975-[#include <sys/param.h>
2976-#ifdef _ZETA_MINAMI_INET6
2977-yes
2978-#endif],
2979- [ipv6type=$i;
2980- ipv6lib=inet6;
2981- ipv6libdir=/usr/local/v6/lib;
2982- CFLAGS="-DINET6 $CFLAGS"])
2983- ;;
2984- esac
2985- if test "$ipv6type" != "unknown"; then
2986- break
2987- fi
2988- done
2989- AC_MSG_RESULT($ipv6type)
2990-fi
2991-
2992-if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
2993- if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
2994- LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
2995- echo "You have $ipv6lib library, using it"
2996- else
2997- if test "$ipv6trylibc" = "yes"; then
2998- echo "You do not have $ipv6lib library, using libc"
2999- else
3000- echo 'Fatal: no $ipv6lib library found. cannot continue.'
3001- echo "You need to fetch lib$ipv6lib.a from appropriate"
3002- echo 'ipv6 kit and compile beforehand.'
3003- exit 1
3004- fi
3005- fi
3006-fi
3007-
3008-
3009-if test "$ipv6" = "yes"; then
3010- #
3011- # XXX - on Tru64 UNIX 5.1, there is no "getaddrinfo()"
3012- # function in libc; there are "ngetaddrinfo()" and
3013- # "ogetaddrinfo()" functions, and <netdb.h> #defines
3014- # "getaddrinfo" to be either "ngetaddrinfo" or
3015- # "ogetaddrinfo", depending on whether _SOCKADDR_LEN
3016- # or _XOPEN_SOURCE_EXTENDED are defined or not.
3017- #
3018- # So this test doesn't work on Tru64 5.1, and possibly
3019- # on other 5.x releases. This causes the configure
3020- # script to become confused, and results in libpcap
3021- # being unbuildable.
3022- #
3023- AC_SEARCH_LIBS(getaddrinfo, socket, [dnl
3024- AC_MSG_CHECKING(getaddrinfo bug)
3025- AC_CACHE_VAL(td_cv_buggygetaddrinfo, [AC_TRY_RUN([
3026-#include <sys/types.h>
3027-#include <netdb.h>
3028-#include <string.h>
3029-#include <sys/socket.h>
3030-#include <netinet/in.h>
3031-
3032-main()
3033-{
3034- int passive, gaierr, inet4 = 0, inet6 = 0;
3035- struct addrinfo hints, *ai, *aitop;
3036- char straddr[INET6_ADDRSTRLEN], strport[16];
3037-
3038- for (passive = 0; passive <= 1; passive++) {
3039- memset(&hints, 0, sizeof(hints));
3040- hints.ai_family = AF_UNSPEC;
3041- hints.ai_flags = passive ? AI_PASSIVE : 0;
3042- hints.ai_socktype = SOCK_STREAM;
3043- hints.ai_protocol = IPPROTO_TCP;
3044- if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
3045- (void)gai_strerror(gaierr);
3046- goto bad;
3047- }
3048- for (ai = aitop; ai; ai = ai->ai_next) {
3049- if (ai->ai_addr == NULL ||
3050- ai->ai_addrlen == 0 ||
3051- getnameinfo(ai->ai_addr, ai->ai_addrlen,
3052- straddr, sizeof(straddr), strport, sizeof(strport),
3053- NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
3054- goto bad;
3055- }
3056- switch (ai->ai_family) {
3057- case AF_INET:
3058- if (strcmp(strport, "54321") != 0) {
3059- goto bad;
3060- }
3061- if (passive) {
3062- if (strcmp(straddr, "0.0.0.0") != 0) {
3063- goto bad;
3064- }
3065- } else {
3066- if (strcmp(straddr, "127.0.0.1") != 0) {
3067- goto bad;
3068- }
3069- }
3070- inet4++;
3071- break;
3072- case AF_INET6:
3073- if (strcmp(strport, "54321") != 0) {
3074- goto bad;
3075- }
3076- if (passive) {
3077- if (strcmp(straddr, "::") != 0) {
3078- goto bad;
3079- }
3080- } else {
3081- if (strcmp(straddr, "::1") != 0) {
3082- goto bad;
3083- }
3084- }
3085- inet6++;
3086- break;
3087- case AF_UNSPEC:
3088- goto bad;
3089- break;
3090-#ifdef AF_UNIX
3091- case AF_UNIX:
3092-#else
3093-#ifdef AF_LOCAL
3094- case AF_LOCAL:
3095-#endif
3096-#endif
3097- default:
3098- /* another family support? */
3099- break;
3100- }
3101- }
3102- }
3103-
3104- /* supported family should be 2, unsupported family should be 0 */
3105- if (!(inet4 == 0 || inet4 == 2))
3106- goto bad;
3107- if (!(inet6 == 0 || inet6 == 2))
3108- goto bad;
3109-
3110- if (aitop)
3111- freeaddrinfo(aitop);
3112- exit(0);
3113-
3114- bad:
3115- if (aitop)
3116- freeaddrinfo(aitop);
3117- exit(1);
3118-}
3119-],
3120- td_cv_buggygetaddrinfo=no,
3121- td_cv_buggygetaddrinfo=yes,
3122- td_cv_buggygetaddrinfo=yes)])
3123- if test "$td_cv_buggygetaddrinfo" = no; then
3124- AC_MSG_RESULT(good)
3125- else
3126- AC_MSG_RESULT(buggy)
3127- fi
3128-
3129- if test "$td_cv_buggygetaddrinfo" = "yes"; then
3130- #
3131- # XXX - it doesn't appear that "ipv6type" can ever be
3132- # set to "linux". Should this be testing for
3133- # "linux-glibc", or for that *or* "linux-libinet6"?
3134- # If the latter, note that "linux-libinet6" is also
3135- # the type given to some non-Linux OSes.
3136- #
3137- if test "$ipv6type" != "linux"; then
3138- echo 'Fatal: You must get working getaddrinfo() function.'
3139- echo ' or you can specify "--disable-ipv6"'.
3140- exit 1
3141- else
3142- echo 'Warning: getaddrinfo() implementation on your system seems be buggy.'
3143- echo ' Better upgrade your system library to newest version'
3144- echo ' of GNU C library (aka glibc).'
3145- fi
3146- fi
3147- ])
3148- AC_REPLACE_FUNCS(getnameinfo)
3149-fi
3150-
3151-AC_CACHE_CHECK([for dnet_htoa declaration in netdnet/dnetdb.h],
3152-[td_cv_decl_netdnet_dnetdb_h_dnet_htoa],
3153-[AC_EGREP_HEADER(dnet_htoa, netdnet/dnetdb.h,
3154- td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes,
3155- td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no)])
3156-if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then
3157- AC_DEFINE(HAVE_NETDNET_DNETDB_H_DNET_HTOA)
3158-fi
3159-
3160-dnl
3161-dnl Checks for addrinfo structure
3162-AC_STRUCT_ADDRINFO(ac_cv_addrinfo)
3163-if test "$ac_cv_addrinfo" = no; then
3164- missing_includes=yes
3165-fi
3166-
3167-dnl
3168-dnl Checks for NI_MAXSERV
3169-AC_NI_MAXSERV(ac_cv_maxserv)
3170-if test "$ac_cv_maxserv" = no; then
3171- missing_includes=yes
3172-fi
3173-
3174-dnl
3175-dnl Checks for NI_NAMEREQD
3176-AC_NI_NAMEREQD(ac_cv_namereqd)
3177-if test "$ac_cv_namereqd" = no; then
3178- missing_includes=yes
3179-fi
3180-
3181-dnl
3182-dnl Checks for sockaddr_storage structure
3183-AC_STRUCT_SA_STORAGE(ac_cv_sa_storage)
3184-if test "$ac_cv_sa_storage" = no; then
3185- missing_includes=yes
3186-fi
3187-
3188-AC_REPLACE_FUNCS(vfprintf strcasecmp strlcat strlcpy strdup strsep)
3189-AC_CHECK_FUNCS(fork vfork strftime)
3190-AC_CHECK_FUNCS(setlinebuf alarm)
3191-
3192-needsnprintf=no
3193-AC_CHECK_FUNCS(vsnprintf snprintf,,
3194- [needsnprintf=yes])
3195-if test $needsnprintf = yes; then
3196- AC_LIBOBJ(snprintf)
3197-fi
3198-
3199-AC_LBL_TYPE_SIGNAL
3200-
3201-AC_SEARCH_LIBS(dnet_htoa, dnet, AC_DEFINE(HAVE_DNET_HTOA))
3202-
3203-AC_CHECK_LIB(rpc, main) dnl It's unclear why we might need -lrpc
3204-
3205-dnl Some platforms may need -lnsl for getrpcbynumber.
3206-AC_SEARCH_LIBS(getrpcbynumber, nsl, AC_DEFINE(HAVE_GETRPCBYNUMBER))
3207-
3208-dnl AC_CHECK_LIB(z, uncompress)
3209-dnl AC_CHECK_HEADERS(zlib.h)
3210-
3211-AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
3212-
3213-#
3214-# Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
3215-# libraries (e.g., "-lsocket -lnsl" on Solaris).
3216-#
3217-# We don't use AC_REPLACE_FUNCS because that uses AC_CHECK_FUNCS which
3218-# use AC_CHECK_FUNC which doesn't let us specify the right #includes
3219-# to make this work on BSD/OS 4.x. BSD/OS 4.x ships with the BIND8
3220-# resolver, and the way it defines inet_{ntop,pton} is rather strange;
3221-# it does not ship with a libc symbol "inet_ntop()", it ships with
3222-# "_inet_ntop()", and has a #define macro in one of the system headers
3223-# to rename it.
3224-#
3225-dnl AC_TRY_COMPILE(inet_ntop inet_pton inet_aton)
3226-AC_MSG_CHECKING(for inet_ntop)
3227-AC_TRY_LINK([#include <sys/types.h>
3228-#include <sys/socket.h>
3229-#include <netinet/in.h>
3230-#include <arpa/inet.h>], [char src[4], dst[128];
3231-inet_ntop(AF_INET, src, dst, sizeof(dst));],
3232- [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
3233- AC_LIBOBJ(inet_ntop)])
3234-AC_MSG_CHECKING(for inet_pton)
3235-AC_TRY_LINK([#include <sys/types.h>
3236-#include <sys/socket.h>
3237-#include <netinet/in.h>
3238-#include <arpa/inet.h>], [char src[128], dst[4];
3239-inet_pton(AF_INET, src, dst);],
3240- [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
3241- AC_LIBOBJ(inet_pton)])
3242-AC_MSG_CHECKING(for inet_aton)
3243-AC_TRY_LINK([#include <sys/types.h>
3244-#include <netinet/in.h>
3245-#include <arpa/inet.h>], [char src[128];
3246-struct in_addr dst;
3247-inet_aton(src, &dst);],
3248- [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
3249- AC_LIBOBJ(inet_aton)])
3250-
3251-#
3252-# Check for these after AC_LBL_LIBPCAP, for the same reason.
3253-#
3254-# You are in a twisty little maze of UN*Xes, all different.
3255-# Some might not have ether_ntohost().
3256-# Some might have it, but not declare it in any header file.
3257-# Some might have it, but declare it in <netinet/if_ether.h>.
3258-# Some might have it, but declare it in <netinet/ether.h>
3259-# (And some might have it but document it as something declared in
3260-# <netinet/ethernet.h>, although <netinet/if_ether.h> appears to work.)
3261-#
3262-# Before you is a C compiler.
3263-#
3264-AC_CHECK_FUNCS(ether_ntohost, [
3265- AC_CACHE_CHECK(for buggy ether_ntohost, ac_cv_buggy_ether_ntohost, [
3266- AC_TRY_RUN([
3267- #include <netdb.h>
3268- #include <sys/types.h>
3269- #include <sys/param.h>
3270- #include <sys/socket.h>
3271-
3272- int
3273- main(int argc, char **argv)
3274- {
3275- u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff };
3276- char name[MAXHOSTNAMELEN];
3277-
3278- ether_ntohost(name, (struct ether_addr *)ea);
3279- exit(0);
3280- }
3281- ], [ac_cv_buggy_ether_ntohost=no],
3282- [ac_cv_buggy_ether_ntohost=yes],
3283- [ac_cv_buggy_ether_ntohost="not while cross-compiling"])])
3284- if test "$ac_cv_buggy_ether_ntohost" = "no"; then
3285- AC_DEFINE(USE_ETHER_NTOHOST)
3286- fi
3287-])
3288-if test "$ac_cv_func_ether_ntohost" = yes -a \
3289- "$ac_cv_buggy_ether_ntohost" = "no"; then
3290- #
3291- # OK, we have ether_ntohost(). Do we have <netinet/if_ether.h>?
3292- #
3293- if test "$ac_cv_header_netinet_if_ether_h" = yes; then
3294- #
3295- # Yes. Does it declare ether_ntohost()?
3296- #
3297- AC_CHECK_DECL(ether_ntohost,
3298- [
3299- AC_DEFINE(NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST,,
3300- [Define to 1 if netinet/if_ether.h declares `ether_ntohost'])
3301- ],,
3302- [
3303-#include <sys/types.h>
3304-#include <sys/socket.h>
3305-#include <netinet/in.h>
3306-#include <arpa/inet.h>
3307-struct mbuf;
3308-struct rtentry;
3309-#include <net/if.h>
3310-#include <netinet/if_ether.h>
3311- ])
3312- fi
3313- #
3314- # Did that succeed?
3315- #
3316- if test "$ac_cv_have_decl_ether_ntohost" != yes; then
3317- #
3318- # No, how about <netinet/ether.h>, as on Linux?
3319- #
3320- AC_CHECK_HEADERS(netinet/ether.h)
3321- if test "$ac_cv_header_netinet_ether_h" = yes; then
3322- #
3323- # We have it - does it declare ether_ntohost()?
3324- # Unset ac_cv_have_decl_ether_ntohost so we don't
3325- # treat the previous failure as a cached value and
3326- # suppress the next test.
3327- #
3328- unset ac_cv_have_decl_ether_ntohost
3329- AC_CHECK_DECL(ether_ntohost,
3330- [
3331- AC_DEFINE(NETINET_ETHER_H_DECLARES_ETHER_NTOHOST,,
3332- [Define to 1 if netinet/ether.h declares `ether_ntohost'])
3333- ],,
3334- [
3335-#include <netinet/ether.h>
3336- ])
3337- fi
3338- fi
3339- #
3340- # Is ether_ntohost() declared?
3341- #
3342- if test "$ac_cv_have_decl_ether_ntohost" != yes; then
3343- #
3344- # No, we'll have to declare it ourselves.
3345- # Do we have "struct ether_addr"?
3346- #
3347- AC_CHECK_TYPES(struct ether_addr,,,
3348- [
3349-#include <sys/types.h>
3350-#include <sys/socket.h>
3351-#include <netinet/in.h>
3352-#include <arpa/inet.h>
3353-struct mbuf;
3354-struct rtentry;
3355-#include <net/if.h>
3356-#include <netinet/if_ether.h>
3357- ])
3358- AC_DEFINE(HAVE_DECL_ETHER_NTOHOST, 0,
3359- [Define to 1 if you have the declaration of `ether_ntohost', and to 0 if you
3360-don't.])
3361- else
3362- AC_DEFINE(HAVE_DECL_ETHER_NTOHOST, 1,
3363- [Define to 1 if you have the declaration of `ether_ntohost', and to 0 if you
3364-don't.])
3365- fi
3366-fi
3367-
3368-# libdlpi is needed for Solaris 11 and later.
3369-AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
3370-
3371-dnl portability macros for getaddrinfo/getnameinfo
3372-dnl
3373-dnl Check for sa_len
3374-AC_CHECK_SA_LEN(ac_cv_sockaddr_has_sa_len)
3375-if test "$ac_cv_sockaddr_has_sa_len" = no; then
3376- missing_includes=yes
3377-fi
3378-
3379-#
3380-# Do we have the new open API? Check for pcap_create, and assume that,
3381-# if we do, we also have pcap_activate() and the other new routines
3382-# introduced in libpcap 1.0.0.
3383-#
3384-AC_CHECK_FUNCS(pcap_create)
3385-if test $ac_cv_func_pcap_create = "yes" ; then
3386- #
3387- # OK, do we have pcap_set_tstamp_type? If so, assume we have
3388- # pcap_list_tstamp_types and pcap_free_tstamp_types as well.
3389- #
3390- AC_CHECK_FUNCS(pcap_set_tstamp_type)
3391-fi
3392-
3393-AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version)
3394-if test $ac_cv_func_pcap_findalldevs = "yes" ; then
3395-dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may
3396-dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't
3397-dnl have pcap_if_t.
3398- savedppflags="$CPPLAGS"
3399- CPPFLAGS="$CPPFLAGS $V_INCLS"
3400- AC_CHECK_TYPES(pcap_if_t, , , [#include <pcap.h>])
3401- CPPFLAGS="$savedcppflags"
3402-fi
3403-
3404-if test $ac_cv_func_pcap_lib_version = "no" ; then
3405- AC_MSG_CHECKING(whether pcap_version is defined by libpcap)
3406- AC_TRY_LINK([],
3407- [
3408- extern char pcap_version[];
3409-
3410- return (int)pcap_version;
3411- ],
3412- ac_lbl_cv_pcap_version_defined=yes,
3413- ac_lbl_cv_pcap_version_defined=no)
3414- if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
3415- AC_MSG_RESULT(yes)
3416- AC_DEFINE(HAVE_PCAP_VERSION)
3417- else
3418- AC_MSG_RESULT(no)
3419- fi
3420-fi
3421-AC_MSG_CHECKING(whether pcap_debug is defined by libpcap)
3422-AC_TRY_LINK([],
3423- [
3424- extern int pcap_debug;
3425-
3426- return pcap_debug;
3427- ],
3428- ac_lbl_cv_pcap_debug_defined=yes,
3429- ac_lbl_cv_pcap_debug_defined=no)
3430-if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
3431- AC_MSG_RESULT(yes)
3432- AC_DEFINE(HAVE_PCAP_DEBUG)
3433-else
3434- AC_MSG_RESULT(no)
3435- #
3436- # OK, what about "yydebug"?
3437- #
3438- AC_MSG_CHECKING(whether yydebug is defined by libpcap)
3439- AC_TRY_LINK([],
3440- [
3441- extern int yydebug;
3442-
3443- return yydebug;
3444- ],
3445- ac_lbl_cv_yydebug_defined=yes,
3446- ac_lbl_cv_yydebug_defined=no)
3447- if test "$ac_lbl_cv_yydebug_defined" = yes ; then
3448- AC_MSG_RESULT(yes)
3449- AC_DEFINE(HAVE_YYDEBUG)
3450- else
3451- AC_MSG_RESULT(no)
3452- fi
3453-fi
3454-AC_REPLACE_FUNCS(bpf_dump) dnl moved to libpcap in 0.6
3455-
3456-V_GROUP=0
3457-if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
3458- V_GROUP=wheel
3459-fi
3460-#
3461-# Assume V7/BSD convention for man pages (file formats in section 5,
3462-# miscellaneous info in section 7).
3463-#
3464-MAN_FILE_FORMATS=5
3465-MAN_MISC_INFO=7
3466-case "$host_os" in
3467-
3468-aix*)
3469- dnl Workaround to enable certain features
3470- AC_DEFINE(_SUN,1,[define on AIX to get certain functions])
3471- ;;
3472-
3473-hpux*)
3474- #
3475- # Use System V conventions for man pages.
3476- #
3477- MAN_FILE_FORMATS=4
3478- MAN_MISC_INFO=5
3479- ;;
3480-
3481-irix*)
3482- V_GROUP=sys
3483-
3484- #
3485- # Use System V conventions for man pages.
3486- #
3487- MAN_FILE_FORMATS=4
3488- MAN_MISC_INFO=5
3489- ;;
3490-
3491-osf*)
3492- V_GROUP=system
3493-
3494- #
3495- # Use System V conventions for man pages.
3496- #
3497- MAN_FILE_FORMATS=4
3498- MAN_MISC_INFO=5
3499- ;;
3500-
3501-solaris*)
3502- V_GROUP=sys
3503-
3504- #
3505- # Use System V conventions for man pages.
3506- #
3507- MAN_FILE_FORMATS=4
3508- MAN_MISC_INFO=5
3509- ;;
3510-esac
3511-
3512-if test -f /dev/bpf0 ; then
3513- V_GROUP=bpf
3514-fi
3515-
3516-AC_CHECK_HEADERS(sys/bitypes.h)
3517-
3518-AC_CHECK_TYPE([int8_t], ,
3519- [AC_DEFINE([int8_t], [signed char],
3520- [Define to `signed char' if int8_t not defined.])],
3521- [AC_INCLUDES_DEFAULT
3522-#ifdef HAVE_SYS_BITYPES_H
3523-#include <sys/bitypes.h>
3524-#endif])
3525-AC_CHECK_TYPE([u_int8_t], ,
3526- [AC_DEFINE([u_int8_t], [unsigned char],
3527- [Define to `unsigned char' if u_int8_t not defined.])],
3528- [AC_INCLUDES_DEFAULT
3529-#ifdef HAVE_SYS_BITYPES_H
3530-#include <sys/bitypes.h>
3531-#endif])
3532-AC_CHECK_TYPE([int16_t], ,
3533- [AC_DEFINE([int16_t], [short],
3534- [Define to `short' if int16_t not defined.])]
3535- [AC_INCLUDES_DEFAULT
3536-#ifdef HAVE_SYS_BITYPES_H
3537-#include <sys/bitypes.h>
3538-#endif])
3539-AC_CHECK_TYPE([u_int16_t], ,
3540- [AC_DEFINE([u_int16_t], [unsigned short],
3541- [Define to `unsigned short' if u_int16_t not defined.])],
3542- [AC_INCLUDES_DEFAULT
3543-#ifdef HAVE_SYS_BITYPES_H
3544-#include <sys/bitypes.h>
3545-#endif])
3546-AC_CHECK_TYPE([int32_t], ,
3547- [AC_DEFINE([int32_t], [int],
3548- [Define to `int' if int32_t not defined.])],
3549- [AC_INCLUDES_DEFAULT
3550-#ifdef HAVE_SYS_BITYPES_H
3551-#include <sys/bitypes.h>
3552-#endif])
3553-AC_CHECK_TYPE([u_int32_t], ,
3554- [AC_DEFINE([u_int32_t], [unsigned int],
3555- [Define to `unsigned int' if u_int32_t not defined.])],
3556- [AC_INCLUDES_DEFAULT
3557-#ifdef HAVE_SYS_BITYPES_H
3558-#include <sys/bitypes.h>
3559-#endif])
3560-AC_CHECK_TYPE([int64_t], ,
3561- [AC_DEFINE([int64_t], [long long],
3562- [Define to `long long' if int64_t not defined.])],
3563- [AC_INCLUDES_DEFAULT
3564-#ifdef HAVE_SYS_BITYPES_H
3565-#include <sys/bitypes.h>
3566-#endif])
3567-AC_CHECK_TYPE([u_int64_t], ,
3568- [AC_DEFINE([u_int64_t], [unsigned long long],
3569- [Define to `unsigned long long' if u_int64_t not defined.])],
3570- [AC_INCLUDES_DEFAULT
3571-#ifdef HAVE_SYS_BITYPES_H
3572-#include <sys/bitypes.h>
3573-#endif])
3574-
3575-#
3576-# We can't just check for <inttypes.h> - some systems have one that
3577-# doesn't define all the PRI[doxu]64 macros.
3578-#
3579-AC_CHECK_HEADERS(inttypes.h,
3580- [
3581- #
3582- # OK, we have inttypes.h, but does it define those macros?
3583- #
3584- AC_MSG_CHECKING([[whether inttypes.h defines the PRI[doxu]64 macros]])
3585- AC_COMPILE_IFELSE(
3586- [
3587- AC_LANG_SOURCE(
3588- [[
3589- #include <inttypes.h>
3590- #include <stdio.h>
3591- #include <sys/types.h>
3592- #ifdef HAVE_SYS_BITYPES_H
3593- #include <sys/bitypes.h>
3594- #endif
3595-
3596- main()
3597- {
3598- printf("%" PRId64 "\n", (u_int64_t)1);
3599- printf("%" PRIo64 "\n", (u_int64_t)1);
3600- printf("%" PRIx64 "\n", (u_int64_t)1);
3601- printf("%" PRIu64 "\n", (u_int64_t)1);
3602- }
3603- ]])
3604- ],
3605- [
3606- AC_MSG_RESULT(yes)
3607- ac_lbl_inttypes_h_defines_formats=yes
3608- ],
3609- [
3610- AC_MSG_RESULT(no)
3611- ac_lbl_inttypes_h_defines_formats=no
3612- ])
3613- ],
3614- [
3615- #
3616- # We don't have inttypes.h, so it obviously can't define those
3617- # macros.
3618- #
3619- ac_lbl_inttypes_h_defines_formats=no
3620- ])
3621-if test "$ac_lbl_inttypes_h_defines_formats" = no; then
3622- AC_LBL_CHECK_64BIT_FORMAT(l,
3623- [
3624- AC_LBL_CHECK_64BIT_FORMAT(ll,
3625- [
3626- AC_LBL_CHECK_64BIT_FORMAT(L,
3627- [
3628- AC_LBL_CHECK_64BIT_FORMAT(q,
3629- [
3630- AC_MSG_ERROR([neither %llx nor %Lx nor %qx worked on a 64-bit integer])
3631- ])
3632- ])
3633- ])
3634- ])
3635-fi
3636-
3637-#
3638-# Check for some headers introduced in later versions of libpcap
3639-# and used by some printers.
3640-#
3641-# Those headers use the {u_}intN_t types, so we must do this after
3642-# we check for what's needed to get them defined.
3643-#
3644-savedcppflags="$CPPFLAGS"
3645-CPPFLAGS="$CPPFLAGS $V_INCLS"
3646-AC_CHECK_HEADERS(pcap/bluetooth.h,,,[#include <tcpdump-stdinc.h>])
3647-AC_CHECK_HEADERS(pcap/usb.h,,,[#include <tcpdump-stdinc.h>])
3648-CPPFLAGS="$savedcppflags"
3649-
3650-AC_PROG_RANLIB
3651-
3652-AC_LBL_DEVEL(V_CCOPT)
3653-
3654-AC_LBL_SOCKADDR_SA_LEN
3655-
3656-AC_LBL_UNALIGNED_ACCESS
3657-
3658-AC_VAR_H_ERRNO
3659-
3660-# Check for SSLeay
3661-AC_MSG_CHECKING(whether to use SSLeay libcrypto)
3662-# Specify location for both includes and libraries.
3663-want_libcrypto=youmama
3664-AC_ARG_WITH(crypto,
3665- AS_HELP_STRING([--with-crypto@<:@=PATH@:>@],
3666- [use SSLeay libcrypto (located in directory PATH, if supplied). @<:@default=yes, if available@:>@]),
3667-[
3668- if test $withval = no
3669- then
3670- want_libcrypto=no
3671- AC_MSG_RESULT(no)
3672- elif test $withval = yes
3673- then
3674- want_libcrypto=yes
3675- AC_MSG_RESULT(yes)
3676- else
3677- want_libcrypto=yes
3678- AC_MSG_RESULT(yes)
3679- crypto_dir=$withval
3680- fi
3681-],[
3682- #
3683- # Use libcrypto if it's present, otherwise don't.
3684- #
3685- want_libcrypto=ifavailable
3686- AC_MSG_RESULT([yes, if available])
3687-])
3688-if test "$want_libcrypto" != "no"; then
3689- ac_cv_ssleay_path=no
3690- incdir=no
3691- if test "x$crypto_dir" = x; then
3692- #
3693- # Location not specified; check the default locations.
3694- #
3695- AC_MSG_CHECKING(where SSLeay is located)
3696- dirs="/usr /usr/local /usr/local/ssl /usr/pkg"
3697- if test "x${host_alias}" != x; then
3698- dirs="/usr/${host_alias} $dirs"
3699- fi
3700- for dir in $dirs; do
3701- AC_LBL_SSLEAY($dir)
3702-
3703- if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
3704- break;
3705- else
3706- ac_cv_ssleay_path=no
3707- incdir=no
3708- fi
3709- done
3710- if test "$ac_cv_ssleay_path" != no; then
3711- AC_MSG_RESULT($ac_cv_ssleay_path)
3712- fi
3713- else
3714- AC_MSG_CHECKING(for SSLeay in $crypto_dir)
3715- AC_LBL_SSLEAY($crypto_dir)
3716- if test "$ac_cv_ssleay_path" != no; then
3717- AC_MSG_RESULT(found)
3718- fi
3719- fi
3720- if test "$ac_cv_ssleay_path" != no; then
3721- V_INCLS="$V_INCLS $incdir"
3722- if test "$dir" != "/usr"; then
3723- LDFLAGS="-L$dir/lib $LDFLAGS"
3724- fi
3725- if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
3726- LIBS="$LIBS -lRSAglue"
3727- fi
3728- if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
3729- LIBS="$LIBS -lrsaref"
3730- fi
3731- AC_CHECK_LIB(crypto, DES_cbc_encrypt)
3732-
3733- savedppflags="$CPPLAGS"
3734- CPPFLAGS="$CPPFLAGS $V_INCLS"
3735- AC_CHECK_HEADERS(openssl/evp.h)
3736- CPPFLAGS="$savedcppflags"
3737- else
3738- #
3739- # Not found. Did the user explicitly ask for it?
3740- #
3741- AC_MSG_RESULT(not found)
3742- if test "$want_libcrypto" = yes; then
3743- AC_MSG_ERROR(SSLeay not found)
3744- fi
3745- fi
3746-fi
3747-
3748-dnl
3749-dnl set additional include path if necessary
3750-if test "$missing_includes" = "yes"; then
3751- CPPFLAGS="$CPPFLAGS -I$srcdir/missing"
3752- V_INCLS="$V_INCLS -I$srcdir/missing"
3753-fi
3754-
3755-AC_SUBST(V_CCOPT)
3756-AC_SUBST(V_DEFS)
3757-AC_SUBST(V_GROUP)
3758-AC_SUBST(V_INCLS)
3759-AC_SUBST(V_PCAPDEP)
3760-AC_SUBST(LOCALSRC)
3761-AC_SUBST(MAN_FILE_FORMATS)
3762-AC_SUBST(MAN_MISC_INFO)
3763-
3764-AC_PROG_INSTALL
3765-
3766-AC_CONFIG_HEADER(config.h)
3767-
3768-AC_OUTPUT_COMMANDS([if test -f .devel; then
3769- echo timestamp > stamp-h
3770- cat Makefile-devel-adds >> Makefile
3771- make depend
3772-fi])
3773-AC_OUTPUT(Makefile tcpdump.1)
3774-exit 0
3775
3776=== removed directory '.pc/50_autotools-dev.diff'
3777=== removed file '.pc/50_autotools-dev.diff/config.guess'
3778--- .pc/50_autotools-dev.diff/config.guess 2010-06-22 12:44:32 +0000
3779+++ .pc/50_autotools-dev.diff/config.guess 1970-01-01 00:00:00 +0000
3780@@ -1,1502 +0,0 @@
3781-#! /bin/sh
3782-# Attempt to guess a canonical system name.
3783-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3784-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
3785-# Free Software Foundation, Inc.
3786-
3787-timestamp='2009-12-30'
3788-
3789-# This file is free software; you can redistribute it and/or modify it
3790-# under the terms of the GNU General Public License as published by
3791-# the Free Software Foundation; either version 2 of the License, or
3792-# (at your option) any later version.
3793-#
3794-# This program is distributed in the hope that it will be useful, but
3795-# WITHOUT ANY WARRANTY; without even the implied warranty of
3796-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3797-# General Public License for more details.
3798-#
3799-# You should have received a copy of the GNU General Public License
3800-# along with this program; if not, write to the Free Software
3801-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
3802-# 02110-1301, USA.
3803-#
3804-# As a special exception to the GNU General Public License, if you
3805-# distribute this file as part of a program that contains a
3806-# configuration script generated by Autoconf, you may include it under
3807-# the same distribution terms that you use for the rest of that program.
3808-
3809-
3810-# Originally written by Per Bothner. Please send patches (context
3811-# diff format) to <config-patches@gnu.org> and include a ChangeLog
3812-# entry.
3813-#
3814-# This script attempts to guess a canonical system name similar to
3815-# config.sub. If it succeeds, it prints the system name on stdout, and
3816-# exits with 0. Otherwise, it exits with 1.
3817-#
3818-# You can get the latest version of this script from:
3819-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
3820-
3821-me=`echo "$0" | sed -e 's,.*/,,'`
3822-
3823-usage="\
3824-Usage: $0 [OPTION]
3825-
3826-Output the configuration name of the system \`$me' is run on.
3827-
3828-Operation modes:
3829- -h, --help print this help, then exit
3830- -t, --time-stamp print date of last modification, then exit
3831- -v, --version print version number, then exit
3832-
3833-Report bugs and patches to <config-patches@gnu.org>."
3834-
3835-version="\
3836-GNU config.guess ($timestamp)
3837-
3838-Originally written by Per Bothner.
3839-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
3840-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
3841-Software Foundation, Inc.
3842-
3843-This is free software; see the source for copying conditions. There is NO
3844-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
3845-
3846-help="
3847-Try \`$me --help' for more information."
3848-
3849-# Parse command line
3850-while test $# -gt 0 ; do
3851- case $1 in
3852- --time-stamp | --time* | -t )
3853- echo "$timestamp" ; exit ;;
3854- --version | -v )
3855- echo "$version" ; exit ;;
3856- --help | --h* | -h )
3857- echo "$usage"; exit ;;
3858- -- ) # Stop option processing
3859- shift; break ;;
3860- - ) # Use stdin as input.
3861- break ;;
3862- -* )
3863- echo "$me: invalid option $1$help" >&2
3864- exit 1 ;;
3865- * )
3866- break ;;
3867- esac
3868-done
3869-
3870-if test $# != 0; then
3871- echo "$me: too many arguments$help" >&2
3872- exit 1
3873-fi
3874-
3875-trap 'exit 1' 1 2 15
3876-
3877-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
3878-# compiler to aid in system detection is discouraged as it requires
3879-# temporary files to be created and, as you can see below, it is a
3880-# headache to deal with in a portable fashion.
3881-
3882-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
3883-# use `HOST_CC' if defined, but it is deprecated.
3884-
3885-# Portable tmp directory creation inspired by the Autoconf team.
3886-
3887-set_cc_for_build='
3888-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
3889-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
3890-: ${TMPDIR=/tmp} ;
3891- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
3892- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
3893- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
3894- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
3895-dummy=$tmp/dummy ;
3896-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
3897-case $CC_FOR_BUILD,$HOST_CC,$CC in
3898- ,,) echo "int x;" > $dummy.c ;
3899- for c in cc gcc c89 c99 ; do
3900- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
3901- CC_FOR_BUILD="$c"; break ;
3902- fi ;
3903- done ;
3904- if test x"$CC_FOR_BUILD" = x ; then
3905- CC_FOR_BUILD=no_compiler_found ;
3906- fi
3907- ;;
3908- ,,*) CC_FOR_BUILD=$CC ;;
3909- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
3910-esac ; set_cc_for_build= ;'
3911-
3912-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
3913-# (ghazi@noc.rutgers.edu 1994-08-24)
3914-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
3915- PATH=$PATH:/.attbin ; export PATH
3916-fi
3917-
3918-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
3919-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
3920-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
3921-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
3922-
3923-# Note: order is significant - the case branches are not exclusive.
3924-
3925-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
3926- *:NetBSD:*:*)
3927- # NetBSD (nbsd) targets should (where applicable) match one or
3928- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
3929- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
3930- # switched to ELF, *-*-netbsd* would select the old
3931- # object file format. This provides both forward
3932- # compatibility and a consistent mechanism for selecting the
3933- # object file format.
3934- #
3935- # Note: NetBSD doesn't particularly care about the vendor
3936- # portion of the name. We always set it to "unknown".
3937- sysctl="sysctl -n hw.machine_arch"
3938- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
3939- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
3940- case "${UNAME_MACHINE_ARCH}" in
3941- armeb) machine=armeb-unknown ;;
3942- arm*) machine=arm-unknown ;;
3943- sh3el) machine=shl-unknown ;;
3944- sh3eb) machine=sh-unknown ;;
3945- sh5el) machine=sh5le-unknown ;;
3946- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
3947- esac
3948- # The Operating System including object format, if it has switched
3949- # to ELF recently, or will in the future.
3950- case "${UNAME_MACHINE_ARCH}" in
3951- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
3952- eval $set_cc_for_build
3953- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
3954- | grep -q __ELF__
3955- then
3956- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
3957- # Return netbsd for either. FIX?
3958- os=netbsd
3959- else
3960- os=netbsdelf
3961- fi
3962- ;;
3963- *)
3964- os=netbsd
3965- ;;
3966- esac
3967- # The OS release
3968- # Debian GNU/NetBSD machines have a different userland, and
3969- # thus, need a distinct triplet. However, they do not need
3970- # kernel version information, so it can be replaced with a
3971- # suitable tag, in the style of linux-gnu.
3972- case "${UNAME_VERSION}" in
3973- Debian*)
3974- release='-gnu'
3975- ;;
3976- *)
3977- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
3978- ;;
3979- esac
3980- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
3981- # contains redundant information, the shorter form:
3982- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
3983- echo "${machine}-${os}${release}"
3984- exit ;;
3985- *:OpenBSD:*:*)
3986- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
3987- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
3988- exit ;;
3989- *:ekkoBSD:*:*)
3990- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
3991- exit ;;
3992- *:SolidBSD:*:*)
3993- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
3994- exit ;;
3995- macppc:MirBSD:*:*)
3996- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
3997- exit ;;
3998- *:MirBSD:*:*)
3999- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
4000- exit ;;
4001- alpha:OSF1:*:*)
4002- case $UNAME_RELEASE in
4003- *4.0)
4004- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
4005- ;;
4006- *5.*)
4007- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
4008- ;;
4009- esac
4010- # According to Compaq, /usr/sbin/psrinfo has been available on
4011- # OSF/1 and Tru64 systems produced since 1995. I hope that
4012- # covers most systems running today. This code pipes the CPU
4013- # types through head -n 1, so we only detect the type of CPU 0.
4014- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
4015- case "$ALPHA_CPU_TYPE" in
4016- "EV4 (21064)")
4017- UNAME_MACHINE="alpha" ;;
4018- "EV4.5 (21064)")
4019- UNAME_MACHINE="alpha" ;;
4020- "LCA4 (21066/21068)")
4021- UNAME_MACHINE="alpha" ;;
4022- "EV5 (21164)")
4023- UNAME_MACHINE="alphaev5" ;;
4024- "EV5.6 (21164A)")
4025- UNAME_MACHINE="alphaev56" ;;
4026- "EV5.6 (21164PC)")
4027- UNAME_MACHINE="alphapca56" ;;
4028- "EV5.7 (21164PC)")
4029- UNAME_MACHINE="alphapca57" ;;
4030- "EV6 (21264)")
4031- UNAME_MACHINE="alphaev6" ;;
4032- "EV6.7 (21264A)")
4033- UNAME_MACHINE="alphaev67" ;;
4034- "EV6.8CB (21264C)")
4035- UNAME_MACHINE="alphaev68" ;;
4036- "EV6.8AL (21264B)")
4037- UNAME_MACHINE="alphaev68" ;;
4038- "EV6.8CX (21264D)")
4039- UNAME_MACHINE="alphaev68" ;;
4040- "EV6.9A (21264/EV69A)")
4041- UNAME_MACHINE="alphaev69" ;;
4042- "EV7 (21364)")
4043- UNAME_MACHINE="alphaev7" ;;
4044- "EV7.9 (21364A)")
4045- UNAME_MACHINE="alphaev79" ;;
4046- esac
4047- # A Pn.n version is a patched version.
4048- # A Vn.n version is a released version.
4049- # A Tn.n version is a released field test version.
4050- # A Xn.n version is an unreleased experimental baselevel.
4051- # 1.2 uses "1.2" for uname -r.
4052- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
4053- exit ;;
4054- Alpha\ *:Windows_NT*:*)
4055- # How do we know it's Interix rather than the generic POSIX subsystem?
4056- # Should we change UNAME_MACHINE based on the output of uname instead
4057- # of the specific Alpha model?
4058- echo alpha-pc-interix
4059- exit ;;
4060- 21064:Windows_NT:50:3)
4061- echo alpha-dec-winnt3.5
4062- exit ;;
4063- Amiga*:UNIX_System_V:4.0:*)
4064- echo m68k-unknown-sysv4
4065- exit ;;
4066- *:[Aa]miga[Oo][Ss]:*:*)
4067- echo ${UNAME_MACHINE}-unknown-amigaos
4068- exit ;;
4069- *:[Mm]orph[Oo][Ss]:*:*)
4070- echo ${UNAME_MACHINE}-unknown-morphos
4071- exit ;;
4072- *:OS/390:*:*)
4073- echo i370-ibm-openedition
4074- exit ;;
4075- *:z/VM:*:*)
4076- echo s390-ibm-zvmoe
4077- exit ;;
4078- *:OS400:*:*)
4079- echo powerpc-ibm-os400
4080- exit ;;
4081- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
4082- echo arm-acorn-riscix${UNAME_RELEASE}
4083- exit ;;
4084- arm:riscos:*:*|arm:RISCOS:*:*)
4085- echo arm-unknown-riscos
4086- exit ;;
4087- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
4088- echo hppa1.1-hitachi-hiuxmpp
4089- exit ;;
4090- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
4091- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
4092- if test "`(/bin/universe) 2>/dev/null`" = att ; then
4093- echo pyramid-pyramid-sysv3
4094- else
4095- echo pyramid-pyramid-bsd
4096- fi
4097- exit ;;
4098- NILE*:*:*:dcosx)
4099- echo pyramid-pyramid-svr4
4100- exit ;;
4101- DRS?6000:unix:4.0:6*)
4102- echo sparc-icl-nx6
4103- exit ;;
4104- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
4105- case `/usr/bin/uname -p` in
4106- sparc) echo sparc-icl-nx7; exit ;;
4107- esac ;;
4108- s390x:SunOS:*:*)
4109- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
4110- exit ;;
4111- sun4H:SunOS:5.*:*)
4112- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
4113- exit ;;
4114- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
4115- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
4116- exit ;;
4117- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
4118- echo i386-pc-auroraux${UNAME_RELEASE}
4119- exit ;;
4120- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
4121- eval $set_cc_for_build
4122- SUN_ARCH="i386"
4123- # If there is a compiler, see if it is configured for 64-bit objects.
4124- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
4125- # This test works for both compilers.
4126- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
4127- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
4128- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
4129- grep IS_64BIT_ARCH >/dev/null
4130- then
4131- SUN_ARCH="x86_64"
4132- fi
4133- fi
4134- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
4135- exit ;;
4136- sun4*:SunOS:6*:*)
4137- # According to config.sub, this is the proper way to canonicalize
4138- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
4139- # it's likely to be more like Solaris than SunOS4.
4140- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
4141- exit ;;
4142- sun4*:SunOS:*:*)
4143- case "`/usr/bin/arch -k`" in
4144- Series*|S4*)
4145- UNAME_RELEASE=`uname -v`
4146- ;;
4147- esac
4148- # Japanese Language versions have a version number like `4.1.3-JL'.
4149- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
4150- exit ;;
4151- sun3*:SunOS:*:*)
4152- echo m68k-sun-sunos${UNAME_RELEASE}
4153- exit ;;
4154- sun*:*:4.2BSD:*)
4155- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
4156- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
4157- case "`/bin/arch`" in
4158- sun3)
4159- echo m68k-sun-sunos${UNAME_RELEASE}
4160- ;;
4161- sun4)
4162- echo sparc-sun-sunos${UNAME_RELEASE}
4163- ;;
4164- esac
4165- exit ;;
4166- aushp:SunOS:*:*)
4167- echo sparc-auspex-sunos${UNAME_RELEASE}
4168- exit ;;
4169- # The situation for MiNT is a little confusing. The machine name
4170- # can be virtually everything (everything which is not
4171- # "atarist" or "atariste" at least should have a processor
4172- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
4173- # to the lowercase version "mint" (or "freemint"). Finally
4174- # the system name "TOS" denotes a system which is actually not
4175- # MiNT. But MiNT is downward compatible to TOS, so this should
4176- # be no problem.
4177- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
4178- echo m68k-atari-mint${UNAME_RELEASE}
4179- exit ;;
4180- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
4181- echo m68k-atari-mint${UNAME_RELEASE}
4182- exit ;;
4183- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
4184- echo m68k-atari-mint${UNAME_RELEASE}
4185- exit ;;
4186- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
4187- echo m68k-milan-mint${UNAME_RELEASE}
4188- exit ;;
4189- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
4190- echo m68k-hades-mint${UNAME_RELEASE}
4191- exit ;;
4192- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
4193- echo m68k-unknown-mint${UNAME_RELEASE}
4194- exit ;;
4195- m68k:machten:*:*)
4196- echo m68k-apple-machten${UNAME_RELEASE}
4197- exit ;;
4198- powerpc:machten:*:*)
4199- echo powerpc-apple-machten${UNAME_RELEASE}
4200- exit ;;
4201- RISC*:Mach:*:*)
4202- echo mips-dec-mach_bsd4.3
4203- exit ;;
4204- RISC*:ULTRIX:*:*)
4205- echo mips-dec-ultrix${UNAME_RELEASE}
4206- exit ;;
4207- VAX*:ULTRIX*:*:*)
4208- echo vax-dec-ultrix${UNAME_RELEASE}
4209- exit ;;
4210- 2020:CLIX:*:* | 2430:CLIX:*:*)
4211- echo clipper-intergraph-clix${UNAME_RELEASE}
4212- exit ;;
4213- mips:*:*:UMIPS | mips:*:*:RISCos)
4214- eval $set_cc_for_build
4215- sed 's/^ //' << EOF >$dummy.c
4216-#ifdef __cplusplus
4217-#include <stdio.h> /* for printf() prototype */
4218- int main (int argc, char *argv[]) {
4219-#else
4220- int main (argc, argv) int argc; char *argv[]; {
4221-#endif
4222- #if defined (host_mips) && defined (MIPSEB)
4223- #if defined (SYSTYPE_SYSV)
4224- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
4225- #endif
4226- #if defined (SYSTYPE_SVR4)
4227- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
4228- #endif
4229- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
4230- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
4231- #endif
4232- #endif
4233- exit (-1);
4234- }
4235-EOF
4236- $CC_FOR_BUILD -o $dummy $dummy.c &&
4237- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
4238- SYSTEM_NAME=`$dummy $dummyarg` &&
4239- { echo "$SYSTEM_NAME"; exit; }
4240- echo mips-mips-riscos${UNAME_RELEASE}
4241- exit ;;
4242- Motorola:PowerMAX_OS:*:*)
4243- echo powerpc-motorola-powermax
4244- exit ;;
4245- Motorola:*:4.3:PL8-*)
4246- echo powerpc-harris-powermax
4247- exit ;;
4248- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
4249- echo powerpc-harris-powermax
4250- exit ;;
4251- Night_Hawk:Power_UNIX:*:*)
4252- echo powerpc-harris-powerunix
4253- exit ;;
4254- m88k:CX/UX:7*:*)
4255- echo m88k-harris-cxux7
4256- exit ;;
4257- m88k:*:4*:R4*)
4258- echo m88k-motorola-sysv4
4259- exit ;;
4260- m88k:*:3*:R3*)
4261- echo m88k-motorola-sysv3
4262- exit ;;
4263- AViiON:dgux:*:*)
4264- # DG/UX returns AViiON for all architectures
4265- UNAME_PROCESSOR=`/usr/bin/uname -p`
4266- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
4267- then
4268- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
4269- [ ${TARGET_BINARY_INTERFACE}x = x ]
4270- then
4271- echo m88k-dg-dgux${UNAME_RELEASE}
4272- else
4273- echo m88k-dg-dguxbcs${UNAME_RELEASE}
4274- fi
4275- else
4276- echo i586-dg-dgux${UNAME_RELEASE}
4277- fi
4278- exit ;;
4279- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
4280- echo m88k-dolphin-sysv3
4281- exit ;;
4282- M88*:*:R3*:*)
4283- # Delta 88k system running SVR3
4284- echo m88k-motorola-sysv3
4285- exit ;;
4286- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
4287- echo m88k-tektronix-sysv3
4288- exit ;;
4289- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
4290- echo m68k-tektronix-bsd
4291- exit ;;
4292- *:IRIX*:*:*)
4293- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
4294- exit ;;
4295- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
4296- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
4297- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
4298- i*86:AIX:*:*)
4299- echo i386-ibm-aix
4300- exit ;;
4301- ia64:AIX:*:*)
4302- if [ -x /usr/bin/oslevel ] ; then
4303- IBM_REV=`/usr/bin/oslevel`
4304- else
4305- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
4306- fi
4307- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
4308- exit ;;
4309- *:AIX:2:3)
4310- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
4311- eval $set_cc_for_build
4312- sed 's/^ //' << EOF >$dummy.c
4313- #include <sys/systemcfg.h>
4314-
4315- main()
4316- {
4317- if (!__power_pc())
4318- exit(1);
4319- puts("powerpc-ibm-aix3.2.5");
4320- exit(0);
4321- }
4322-EOF
4323- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
4324- then
4325- echo "$SYSTEM_NAME"
4326- else
4327- echo rs6000-ibm-aix3.2.5
4328- fi
4329- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
4330- echo rs6000-ibm-aix3.2.4
4331- else
4332- echo rs6000-ibm-aix3.2
4333- fi
4334- exit ;;
4335- *:AIX:*:[456])
4336- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
4337- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
4338- IBM_ARCH=rs6000
4339- else
4340- IBM_ARCH=powerpc
4341- fi
4342- if [ -x /usr/bin/oslevel ] ; then
4343- IBM_REV=`/usr/bin/oslevel`
4344- else
4345- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
4346- fi
4347- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
4348- exit ;;
4349- *:AIX:*:*)
4350- echo rs6000-ibm-aix
4351- exit ;;
4352- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
4353- echo romp-ibm-bsd4.4
4354- exit ;;
4355- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
4356- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
4357- exit ;; # report: romp-ibm BSD 4.3
4358- *:BOSX:*:*)
4359- echo rs6000-bull-bosx
4360- exit ;;
4361- DPX/2?00:B.O.S.:*:*)
4362- echo m68k-bull-sysv3
4363- exit ;;
4364- 9000/[34]??:4.3bsd:1.*:*)
4365- echo m68k-hp-bsd
4366- exit ;;
4367- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
4368- echo m68k-hp-bsd4.4
4369- exit ;;
4370- 9000/[34678]??:HP-UX:*:*)
4371- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
4372- case "${UNAME_MACHINE}" in
4373- 9000/31? ) HP_ARCH=m68000 ;;
4374- 9000/[34]?? ) HP_ARCH=m68k ;;
4375- 9000/[678][0-9][0-9])
4376- if [ -x /usr/bin/getconf ]; then
4377- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
4378- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
4379- case "${sc_cpu_version}" in
4380- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
4381- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
4382- 532) # CPU_PA_RISC2_0
4383- case "${sc_kernel_bits}" in
4384- 32) HP_ARCH="hppa2.0n" ;;
4385- 64) HP_ARCH="hppa2.0w" ;;
4386- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
4387- esac ;;
4388- esac
4389- fi
4390- if [ "${HP_ARCH}" = "" ]; then
4391- eval $set_cc_for_build
4392- sed 's/^ //' << EOF >$dummy.c
4393-
4394- #define _HPUX_SOURCE
4395- #include <stdlib.h>
4396- #include <unistd.h>
4397-
4398- int main ()
4399- {
4400- #if defined(_SC_KERNEL_BITS)
4401- long bits = sysconf(_SC_KERNEL_BITS);
4402- #endif
4403- long cpu = sysconf (_SC_CPU_VERSION);
4404-
4405- switch (cpu)
4406- {
4407- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
4408- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
4409- case CPU_PA_RISC2_0:
4410- #if defined(_SC_KERNEL_BITS)
4411- switch (bits)
4412- {
4413- case 64: puts ("hppa2.0w"); break;
4414- case 32: puts ("hppa2.0n"); break;
4415- default: puts ("hppa2.0"); break;
4416- } break;
4417- #else /* !defined(_SC_KERNEL_BITS) */
4418- puts ("hppa2.0"); break;
4419- #endif
4420- default: puts ("hppa1.0"); break;
4421- }
4422- exit (0);
4423- }
4424-EOF
4425- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
4426- test -z "$HP_ARCH" && HP_ARCH=hppa
4427- fi ;;
4428- esac
4429- if [ ${HP_ARCH} = "hppa2.0w" ]
4430- then
4431- eval $set_cc_for_build
4432-
4433- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
4434- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
4435- # generating 64-bit code. GNU and HP use different nomenclature:
4436- #
4437- # $ CC_FOR_BUILD=cc ./config.guess
4438- # => hppa2.0w-hp-hpux11.23
4439- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
4440- # => hppa64-hp-hpux11.23
4441-
4442- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
4443- grep -q __LP64__
4444- then
4445- HP_ARCH="hppa2.0w"
4446- else
4447- HP_ARCH="hppa64"
4448- fi
4449- fi
4450- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
4451- exit ;;
4452- ia64:HP-UX:*:*)
4453- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
4454- echo ia64-hp-hpux${HPUX_REV}
4455- exit ;;
4456- 3050*:HI-UX:*:*)
4457- eval $set_cc_for_build
4458- sed 's/^ //' << EOF >$dummy.c
4459- #include <unistd.h>
4460- int
4461- main ()
4462- {
4463- long cpu = sysconf (_SC_CPU_VERSION);
4464- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
4465- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
4466- results, however. */
4467- if (CPU_IS_PA_RISC (cpu))
4468- {
4469- switch (cpu)
4470- {
4471- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
4472- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
4473- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
4474- default: puts ("hppa-hitachi-hiuxwe2"); break;
4475- }
4476- }
4477- else if (CPU_IS_HP_MC68K (cpu))
4478- puts ("m68k-hitachi-hiuxwe2");
4479- else puts ("unknown-hitachi-hiuxwe2");
4480- exit (0);
4481- }
4482-EOF
4483- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
4484- { echo "$SYSTEM_NAME"; exit; }
4485- echo unknown-hitachi-hiuxwe2
4486- exit ;;
4487- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
4488- echo hppa1.1-hp-bsd
4489- exit ;;
4490- 9000/8??:4.3bsd:*:*)
4491- echo hppa1.0-hp-bsd
4492- exit ;;
4493- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
4494- echo hppa1.0-hp-mpeix
4495- exit ;;
4496- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
4497- echo hppa1.1-hp-osf
4498- exit ;;
4499- hp8??:OSF1:*:*)
4500- echo hppa1.0-hp-osf
4501- exit ;;
4502- i*86:OSF1:*:*)
4503- if [ -x /usr/sbin/sysversion ] ; then
4504- echo ${UNAME_MACHINE}-unknown-osf1mk
4505- else
4506- echo ${UNAME_MACHINE}-unknown-osf1
4507- fi
4508- exit ;;
4509- parisc*:Lites*:*:*)
4510- echo hppa1.1-hp-lites
4511- exit ;;
4512- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
4513- echo c1-convex-bsd
4514- exit ;;
4515- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
4516- if getsysinfo -f scalar_acc
4517- then echo c32-convex-bsd
4518- else echo c2-convex-bsd
4519- fi
4520- exit ;;
4521- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
4522- echo c34-convex-bsd
4523- exit ;;
4524- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
4525- echo c38-convex-bsd
4526- exit ;;
4527- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
4528- echo c4-convex-bsd
4529- exit ;;
4530- CRAY*Y-MP:*:*:*)
4531- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
4532- exit ;;
4533- CRAY*[A-Z]90:*:*:*)
4534- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
4535- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
4536- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
4537- -e 's/\.[^.]*$/.X/'
4538- exit ;;
4539- CRAY*TS:*:*:*)
4540- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
4541- exit ;;
4542- CRAY*T3E:*:*:*)
4543- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
4544- exit ;;
4545- CRAY*SV1:*:*:*)
4546- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
4547- exit ;;
4548- *:UNICOS/mp:*:*)
4549- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
4550- exit ;;
4551- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
4552- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
4553- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
4554- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
4555- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
4556- exit ;;
4557- 5000:UNIX_System_V:4.*:*)
4558- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
4559- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
4560- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
4561- exit ;;
4562- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
4563- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
4564- exit ;;
4565- sparc*:BSD/OS:*:*)
4566- echo sparc-unknown-bsdi${UNAME_RELEASE}
4567- exit ;;
4568- *:BSD/OS:*:*)
4569- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
4570- exit ;;
4571- *:FreeBSD:*:*)
4572- case ${UNAME_MACHINE} in
4573- pc98)
4574- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
4575- amd64)
4576- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
4577- *)
4578- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
4579- esac
4580- exit ;;
4581- i*:CYGWIN*:*)
4582- echo ${UNAME_MACHINE}-pc-cygwin
4583- exit ;;
4584- *:MINGW*:*)
4585- echo ${UNAME_MACHINE}-pc-mingw32
4586- exit ;;
4587- i*:windows32*:*)
4588- # uname -m includes "-pc" on this system.
4589- echo ${UNAME_MACHINE}-mingw32
4590- exit ;;
4591- i*:PW*:*)
4592- echo ${UNAME_MACHINE}-pc-pw32
4593- exit ;;
4594- *:Interix*:*)
4595- case ${UNAME_MACHINE} in
4596- x86)
4597- echo i586-pc-interix${UNAME_RELEASE}
4598- exit ;;
4599- authenticamd | genuineintel | EM64T)
4600- echo x86_64-unknown-interix${UNAME_RELEASE}
4601- exit ;;
4602- IA64)
4603- echo ia64-unknown-interix${UNAME_RELEASE}
4604- exit ;;
4605- esac ;;
4606- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
4607- echo i${UNAME_MACHINE}-pc-mks
4608- exit ;;
4609- 8664:Windows_NT:*)
4610- echo x86_64-pc-mks
4611- exit ;;
4612- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
4613- # How do we know it's Interix rather than the generic POSIX subsystem?
4614- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
4615- # UNAME_MACHINE based on the output of uname instead of i386?
4616- echo i586-pc-interix
4617- exit ;;
4618- i*:UWIN*:*)
4619- echo ${UNAME_MACHINE}-pc-uwin
4620- exit ;;
4621- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
4622- echo x86_64-unknown-cygwin
4623- exit ;;
4624- p*:CYGWIN*:*)
4625- echo powerpcle-unknown-cygwin
4626- exit ;;
4627- prep*:SunOS:5.*:*)
4628- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
4629- exit ;;
4630- *:GNU:*:*)
4631- # the GNU system
4632- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
4633- exit ;;
4634- *:GNU/*:*:*)
4635- # other systems with GNU libc and userland
4636- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
4637- exit ;;
4638- i*86:Minix:*:*)
4639- echo ${UNAME_MACHINE}-pc-minix
4640- exit ;;
4641- alpha:Linux:*:*)
4642- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
4643- EV5) UNAME_MACHINE=alphaev5 ;;
4644- EV56) UNAME_MACHINE=alphaev56 ;;
4645- PCA56) UNAME_MACHINE=alphapca56 ;;
4646- PCA57) UNAME_MACHINE=alphapca56 ;;
4647- EV6) UNAME_MACHINE=alphaev6 ;;
4648- EV67) UNAME_MACHINE=alphaev67 ;;
4649- EV68*) UNAME_MACHINE=alphaev68 ;;
4650- esac
4651- objdump --private-headers /bin/sh | grep -q ld.so.1
4652- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
4653- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
4654- exit ;;
4655- arm*:Linux:*:*)
4656- eval $set_cc_for_build
4657- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
4658- | grep -q __ARM_EABI__
4659- then
4660- echo ${UNAME_MACHINE}-unknown-linux-gnu
4661- else
4662- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
4663- fi
4664- exit ;;
4665- avr32*:Linux:*:*)
4666- echo ${UNAME_MACHINE}-unknown-linux-gnu
4667- exit ;;
4668- cris:Linux:*:*)
4669- echo cris-axis-linux-gnu
4670- exit ;;
4671- crisv32:Linux:*:*)
4672- echo crisv32-axis-linux-gnu
4673- exit ;;
4674- frv:Linux:*:*)
4675- echo frv-unknown-linux-gnu
4676- exit ;;
4677- i*86:Linux:*:*)
4678- LIBC=gnu
4679- eval $set_cc_for_build
4680- sed 's/^ //' << EOF >$dummy.c
4681- #ifdef __dietlibc__
4682- LIBC=dietlibc
4683- #endif
4684-EOF
4685- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
4686- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
4687- exit ;;
4688- ia64:Linux:*:*)
4689- echo ${UNAME_MACHINE}-unknown-linux-gnu
4690- exit ;;
4691- m32r*:Linux:*:*)
4692- echo ${UNAME_MACHINE}-unknown-linux-gnu
4693- exit ;;
4694- m68*:Linux:*:*)
4695- echo ${UNAME_MACHINE}-unknown-linux-gnu
4696- exit ;;
4697- mips:Linux:*:* | mips64:Linux:*:*)
4698- eval $set_cc_for_build
4699- sed 's/^ //' << EOF >$dummy.c
4700- #undef CPU
4701- #undef ${UNAME_MACHINE}
4702- #undef ${UNAME_MACHINE}el
4703- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
4704- CPU=${UNAME_MACHINE}el
4705- #else
4706- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
4707- CPU=${UNAME_MACHINE}
4708- #else
4709- CPU=
4710- #endif
4711- #endif
4712-EOF
4713- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
4714- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
4715- ;;
4716- or32:Linux:*:*)
4717- echo or32-unknown-linux-gnu
4718- exit ;;
4719- padre:Linux:*:*)
4720- echo sparc-unknown-linux-gnu
4721- exit ;;
4722- parisc64:Linux:*:* | hppa64:Linux:*:*)
4723- echo hppa64-unknown-linux-gnu
4724- exit ;;
4725- parisc:Linux:*:* | hppa:Linux:*:*)
4726- # Look for CPU level
4727- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
4728- PA7*) echo hppa1.1-unknown-linux-gnu ;;
4729- PA8*) echo hppa2.0-unknown-linux-gnu ;;
4730- *) echo hppa-unknown-linux-gnu ;;
4731- esac
4732- exit ;;
4733- ppc64:Linux:*:*)
4734- echo powerpc64-unknown-linux-gnu
4735- exit ;;
4736- ppc:Linux:*:*)
4737- echo powerpc-unknown-linux-gnu
4738- exit ;;
4739- s390:Linux:*:* | s390x:Linux:*:*)
4740- echo ${UNAME_MACHINE}-ibm-linux
4741- exit ;;
4742- sh64*:Linux:*:*)
4743- echo ${UNAME_MACHINE}-unknown-linux-gnu
4744- exit ;;
4745- sh*:Linux:*:*)
4746- echo ${UNAME_MACHINE}-unknown-linux-gnu
4747- exit ;;
4748- sparc:Linux:*:* | sparc64:Linux:*:*)
4749- echo ${UNAME_MACHINE}-unknown-linux-gnu
4750- exit ;;
4751- vax:Linux:*:*)
4752- echo ${UNAME_MACHINE}-dec-linux-gnu
4753- exit ;;
4754- x86_64:Linux:*:*)
4755- echo x86_64-unknown-linux-gnu
4756- exit ;;
4757- xtensa*:Linux:*:*)
4758- echo ${UNAME_MACHINE}-unknown-linux-gnu
4759- exit ;;
4760- i*86:DYNIX/ptx:4*:*)
4761- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
4762- # earlier versions are messed up and put the nodename in both
4763- # sysname and nodename.
4764- echo i386-sequent-sysv4
4765- exit ;;
4766- i*86:UNIX_SV:4.2MP:2.*)
4767- # Unixware is an offshoot of SVR4, but it has its own version
4768- # number series starting with 2...
4769- # I am not positive that other SVR4 systems won't match this,
4770- # I just have to hope. -- rms.
4771- # Use sysv4.2uw... so that sysv4* matches it.
4772- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
4773- exit ;;
4774- i*86:OS/2:*:*)
4775- # If we were able to find `uname', then EMX Unix compatibility
4776- # is probably installed.
4777- echo ${UNAME_MACHINE}-pc-os2-emx
4778- exit ;;
4779- i*86:XTS-300:*:STOP)
4780- echo ${UNAME_MACHINE}-unknown-stop
4781- exit ;;
4782- i*86:atheos:*:*)
4783- echo ${UNAME_MACHINE}-unknown-atheos
4784- exit ;;
4785- i*86:syllable:*:*)
4786- echo ${UNAME_MACHINE}-pc-syllable
4787- exit ;;
4788- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
4789- echo i386-unknown-lynxos${UNAME_RELEASE}
4790- exit ;;
4791- i*86:*DOS:*:*)
4792- echo ${UNAME_MACHINE}-pc-msdosdjgpp
4793- exit ;;
4794- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
4795- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
4796- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
4797- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
4798- else
4799- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
4800- fi
4801- exit ;;
4802- i*86:*:5:[678]*)
4803- # UnixWare 7.x, OpenUNIX and OpenServer 6.
4804- case `/bin/uname -X | grep "^Machine"` in
4805- *486*) UNAME_MACHINE=i486 ;;
4806- *Pentium) UNAME_MACHINE=i586 ;;
4807- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
4808- esac
4809- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
4810- exit ;;
4811- i*86:*:3.2:*)
4812- if test -f /usr/options/cb.name; then
4813- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
4814- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
4815- elif /bin/uname -X 2>/dev/null >/dev/null ; then
4816- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
4817- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
4818- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
4819- && UNAME_MACHINE=i586
4820- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
4821- && UNAME_MACHINE=i686
4822- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
4823- && UNAME_MACHINE=i686
4824- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
4825- else
4826- echo ${UNAME_MACHINE}-pc-sysv32
4827- fi
4828- exit ;;
4829- pc:*:*:*)
4830- # Left here for compatibility:
4831- # uname -m prints for DJGPP always 'pc', but it prints nothing about
4832- # the processor, so we play safe by assuming i586.
4833- # Note: whatever this is, it MUST be the same as what config.sub
4834- # prints for the "djgpp" host, or else GDB configury will decide that
4835- # this is a cross-build.
4836- echo i586-pc-msdosdjgpp
4837- exit ;;
4838- Intel:Mach:3*:*)
4839- echo i386-pc-mach3
4840- exit ;;
4841- paragon:*:*:*)
4842- echo i860-intel-osf1
4843- exit ;;
4844- i860:*:4.*:*) # i860-SVR4
4845- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
4846- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
4847- else # Add other i860-SVR4 vendors below as they are discovered.
4848- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
4849- fi
4850- exit ;;
4851- mini*:CTIX:SYS*5:*)
4852- # "miniframe"
4853- echo m68010-convergent-sysv
4854- exit ;;
4855- mc68k:UNIX:SYSTEM5:3.51m)
4856- echo m68k-convergent-sysv
4857- exit ;;
4858- M680?0:D-NIX:5.3:*)
4859- echo m68k-diab-dnix
4860- exit ;;
4861- M68*:*:R3V[5678]*:*)
4862- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
4863- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
4864- OS_REL=''
4865- test -r /etc/.relid \
4866- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
4867- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
4868- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
4869- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
4870- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
4871- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
4872- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
4873- && { echo i486-ncr-sysv4; exit; } ;;
4874- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
4875- OS_REL='.3'
4876- test -r /etc/.relid \
4877- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
4878- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
4879- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
4880- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
4881- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
4882- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
4883- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
4884- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
4885- echo m68k-unknown-lynxos${UNAME_RELEASE}
4886- exit ;;
4887- mc68030:UNIX_System_V:4.*:*)
4888- echo m68k-atari-sysv4
4889- exit ;;
4890- TSUNAMI:LynxOS:2.*:*)
4891- echo sparc-unknown-lynxos${UNAME_RELEASE}
4892- exit ;;
4893- rs6000:LynxOS:2.*:*)
4894- echo rs6000-unknown-lynxos${UNAME_RELEASE}
4895- exit ;;
4896- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
4897- echo powerpc-unknown-lynxos${UNAME_RELEASE}
4898- exit ;;
4899- SM[BE]S:UNIX_SV:*:*)
4900- echo mips-dde-sysv${UNAME_RELEASE}
4901- exit ;;
4902- RM*:ReliantUNIX-*:*:*)
4903- echo mips-sni-sysv4
4904- exit ;;
4905- RM*:SINIX-*:*:*)
4906- echo mips-sni-sysv4
4907- exit ;;
4908- *:SINIX-*:*:*)
4909- if uname -p 2>/dev/null >/dev/null ; then
4910- UNAME_MACHINE=`(uname -p) 2>/dev/null`
4911- echo ${UNAME_MACHINE}-sni-sysv4
4912- else
4913- echo ns32k-sni-sysv
4914- fi
4915- exit ;;
4916- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
4917- # says <Richard.M.Bartel@ccMail.Census.GOV>
4918- echo i586-unisys-sysv4
4919- exit ;;
4920- *:UNIX_System_V:4*:FTX*)
4921- # From Gerald Hewes <hewes@openmarket.com>.
4922- # How about differentiating between stratus architectures? -djm
4923- echo hppa1.1-stratus-sysv4
4924- exit ;;
4925- *:*:*:FTX*)
4926- # From seanf@swdc.stratus.com.
4927- echo i860-stratus-sysv4
4928- exit ;;
4929- i*86:VOS:*:*)
4930- # From Paul.Green@stratus.com.
4931- echo ${UNAME_MACHINE}-stratus-vos
4932- exit ;;
4933- *:VOS:*:*)
4934- # From Paul.Green@stratus.com.
4935- echo hppa1.1-stratus-vos
4936- exit ;;
4937- mc68*:A/UX:*:*)
4938- echo m68k-apple-aux${UNAME_RELEASE}
4939- exit ;;
4940- news*:NEWS-OS:6*:*)
4941- echo mips-sony-newsos6
4942- exit ;;
4943- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
4944- if [ -d /usr/nec ]; then
4945- echo mips-nec-sysv${UNAME_RELEASE}
4946- else
4947- echo mips-unknown-sysv${UNAME_RELEASE}
4948- fi
4949- exit ;;
4950- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
4951- echo powerpc-be-beos
4952- exit ;;
4953- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
4954- echo powerpc-apple-beos
4955- exit ;;
4956- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
4957- echo i586-pc-beos
4958- exit ;;
4959- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
4960- echo i586-pc-haiku
4961- exit ;;
4962- SX-4:SUPER-UX:*:*)
4963- echo sx4-nec-superux${UNAME_RELEASE}
4964- exit ;;
4965- SX-5:SUPER-UX:*:*)
4966- echo sx5-nec-superux${UNAME_RELEASE}
4967- exit ;;
4968- SX-6:SUPER-UX:*:*)
4969- echo sx6-nec-superux${UNAME_RELEASE}
4970- exit ;;
4971- SX-7:SUPER-UX:*:*)
4972- echo sx7-nec-superux${UNAME_RELEASE}
4973- exit ;;
4974- SX-8:SUPER-UX:*:*)
4975- echo sx8-nec-superux${UNAME_RELEASE}
4976- exit ;;
4977- SX-8R:SUPER-UX:*:*)
4978- echo sx8r-nec-superux${UNAME_RELEASE}
4979- exit ;;
4980- Power*:Rhapsody:*:*)
4981- echo powerpc-apple-rhapsody${UNAME_RELEASE}
4982- exit ;;
4983- *:Rhapsody:*:*)
4984- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
4985- exit ;;
4986- *:Darwin:*:*)
4987- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
4988- case $UNAME_PROCESSOR in
4989- i386)
4990- eval $set_cc_for_build
4991- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
4992- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
4993- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
4994- grep IS_64BIT_ARCH >/dev/null
4995- then
4996- UNAME_PROCESSOR="x86_64"
4997- fi
4998- fi ;;
4999- unknown) UNAME_PROCESSOR=powerpc ;;
5000- esac
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: