aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2015-01-06 19:03:11 +0000
committerXin LI <delphij@FreeBSD.org>2015-01-06 19:03:11 +0000
commite91eac244982a8728f370000c353b16e18174ec9 (patch)
treeb0af675e15d65cc0adac2367c37233a794389c9a
parent05b21c9adf4d7f1b7b616a703b98e4df42633c9f (diff)
downloadsrc-e91eac244982a8728f370000c353b16e18174ec9.tar.gz
src-e91eac244982a8728f370000c353b16e18174ec9.zip
Vendor import of tcpdump 4.6.2.vendor/tcpdump/4.6.2
Notes
Notes: svn path=/vendor/tcpdump/dist/; revision=276761 svn path=/vendor/tcpdump/4.6.2/; revision=276762; tag=vendor/tcpdump/4.6.2
-rw-r--r--CHANGES81
-rw-r--r--CREDITS70
-rw-r--r--INSTALL.txt43
-rw-r--r--Makefile-devel-adds4
-rw-r--r--Makefile.in250
-rw-r--r--README.md (renamed from README)50
-rw-r--r--VERSION2
-rw-r--r--acconfig.h75
-rw-r--r--aclocal.m4528
-rw-r--r--addrtoname.c81
-rw-r--r--addrtoname.h22
-rw-r--r--af.c6
-rw-r--r--af.h2
-rw-r--r--ah.h18
-rw-r--r--aodv.h190
-rw-r--r--appletalk.h62
-rw-r--r--arcnet.h101
-rw-r--r--atm.h2
-rw-r--r--atmuni31.h2
-rwxr-xr-xbgp.h17
-rw-r--r--bootp.h257
-rw-r--r--bpf_dump.c6
-rw-r--r--chdlc.h1
-rw-r--r--checksum.c38
-rwxr-xr-xconfig.guess258
-rw-r--r--config.h.in246
-rwxr-xr-xconfig.sub211
-rwxr-xr-xconfigure2247
-rwxr-xr-xconfigure.in309
-rw-r--r--cpack.c44
-rw-r--r--cpack.h28
-rw-r--r--dccp.h139
-rw-r--r--decnet.h461
-rw-r--r--decode_prefix.h41
-rw-r--r--enc.h47
-rw-r--r--esp.h68
-rw-r--r--ether.h7
-rw-r--r--ethertype.h19
-rw-r--r--extract.h194
-rw-r--r--fddi.h76
-rw-r--r--forces.h679
-rw-r--r--getopt_long.h66
-rw-r--r--gmpls.c26
-rw-r--r--gmpls.h3
-rw-r--r--gmt2local.c6
-rw-r--r--gmt2local.h2
-rw-r--r--icmp6.h473
-rw-r--r--ieee802_11.h347
-rw-r--r--ieee802_11_radio.h291
-rw-r--r--igrp.h33
-rw-r--r--in_cksum.c33
-rwxr-xr-xinstall-sh14
-rw-r--r--interface.h291
-rw-r--r--ip.h36
-rw-r--r--ip6.h73
-rw-r--r--ipfc.h29
-rw-r--r--ipnet.h13
-rwxr-xr-xipproto.c8
-rw-r--r--ipproto.h2
-rw-r--r--ipsec_doi.h151
-rw-r--r--ipx.h31
-rw-r--r--isakmp.h501
-rw-r--r--l2tp.h62
-rwxr-xr-xl2vpn.c30
-rwxr-xr-xl2vpn.h3
-rw-r--r--lane.h41
-rw-r--r--lbl/os-osf4.h2
-rw-r--r--lbl/os-solaris2.h2
-rw-r--r--lbl/os-sunos4.h2
-rw-r--r--lbl/os-ultrix4.h2
-rw-r--r--llc.h3
-rw-r--r--machdep.c10
-rw-r--r--machdep.h2
-rwxr-xr-xmakemib8
-rw-r--r--missing/addrinfo.h2
-rw-r--r--missing/datalinks.c5
-rw-r--r--missing/dlnames.c5
-rw-r--r--missing/getnameinfo.c9
-rw-r--r--missing/getopt_long.c612
-rw-r--r--missing/inet_aton.c7
-rw-r--r--missing/inet_ntop.c13
-rw-r--r--missing/inet_pton.c13
-rw-r--r--missing/snprintf.c7
-rw-r--r--missing/sockstorage.h38
-rw-r--r--missing/strdup.c5
-rw-r--r--missing/strlcat.c7
-rw-r--r--missing/strlcpy.c7
-rw-r--r--missing/strsep.c5
-rwxr-xr-xmkdep10
-rw-r--r--mpls.h2
-rw-r--r--nameser.h35
-rw-r--r--netbios.h16
-rw-r--r--netdissect.h480
-rw-r--r--nfs.h111
-rw-r--r--nfsfh.h10
-rwxr-xr-xnlpid.c8
-rw-r--r--nlpid.h3
-rw-r--r--ntp.h127
-rw-r--r--oakley.h126
-rw-r--r--openflow.h40
-rw-r--r--ospf.h105
-rw-r--r--ospf6.h265
-rw-r--r--oui.c8
-rw-r--r--oui.h3
-rw-r--r--parsenfsfh.c57
-rw-r--r--pcap-missing.h2
-rw-r--r--pcap_dump_ftell.c5
-rw-r--r--pmap_prot.h89
-rw-r--r--ppi.h9
-rw-r--r--ppp.h3
-rw-r--r--print-802_11.c1552
-rw-r--r--print-802_15_4.c27
-rw-r--r--print-ah.c31
-rw-r--r--print-ahcp.c413
-rw-r--r--print-aodv.c423
-rw-r--r--print-aoe.c432
-rw-r--r--print-ap1394.c48
-rw-r--r--print-arcnet.c157
-rw-r--r--print-arp.c81
-rw-r--r--print-ascii.c75
-rw-r--r--print-atalk.c305
-rw-r--r--print-atm.c175
-rw-r--r--print-babel.c354
-rw-r--r--print-beep.c32
-rw-r--r--print-bfd.c123
-rw-r--r--print-bgp.c1131
-rw-r--r--print-bootp.c348
-rw-r--r--print-bt.c27
-rw-r--r--print-calm-fast.c60
-rw-r--r--print-carp.c40
-rw-r--r--print-cdp.c172
-rw-r--r--print-cfm.c231
-rw-r--r--print-chdlc.c95
-rw-r--r--print-cip.c41
-rw-r--r--print-cnfp.c97
-rw-r--r--print-dccp.c646
-rw-r--r--print-decnet.c845
-rw-r--r--print-dhcp6.c653
-rw-r--r--print-domain.c377
-rw-r--r--print-dtp.c43
-rw-r--r--print-dvmrp.c199
-rw-r--r--print-eap.c89
-rw-r--r--print-egp.c174
-rw-r--r--print-eigrp.c290
-rw-r--r--print-enc.c75
-rw-r--r--print-esp.c196
-rw-r--r--print-ether.c103
-rw-r--r--print-fddi.c154
-rw-r--r--print-forces.c1390
-rw-r--r--print-fr.c317
-rw-r--r--print-frag6.c31
-rw-r--r--print-geonet.c247
-rw-r--r--print-gre.c199
-rw-r--r--print-hsrp.c82
-rw-r--r--print-icmp.c213
-rw-r--r--print-icmp6.c1522
-rw-r--r--print-igmp.c228
-rw-r--r--print-igrp.c92
-rw-r--r--print-ip.c291
-rw-r--r--print-ip6.c90
-rw-r--r--print-ip6opts.c202
-rw-r--r--print-ipcomp.c28
-rw-r--r--print-ipfc.c52
-rw-r--r--print-ipnet.c31
-rw-r--r--print-ipx.c153
-rw-r--r--print-isakmp.c1140
-rw-r--r--print-isoclns.c1562
-rw-r--r--print-juniper.c482
-rw-r--r--print-krb.c118
-rw-r--r--print-l2tp.c345
-rw-r--r--print-lane.c41
-rw-r--r--print-ldp.c224
-rw-r--r--print-llc.c166
-rw-r--r--print-lldp.c646
-rw-r--r--print-lmp.c431
-rw-r--r--print-loopback.c136
-rw-r--r--print-lspping.c365
-rw-r--r--print-lwapp.c107
-rw-r--r--print-lwres.c227
-rw-r--r--print-m3ua.c339
-rw-r--r--print-mobile.c46
-rw-r--r--print-mobility.c180
-rw-r--r--print-mpcp.c138
-rw-r--r--print-mpls.c58
-rw-r--r--print-mptcp.c429
-rw-r--r--print-msdp.c52
-rw-r--r--print-msnlb.c22
-rw-r--r--print-netbios.c91
-rw-r--r--print-nflog.c167
-rw-r--r--print-nfs.c1227
-rw-r--r--print-ntp.c305
-rw-r--r--print-null.c54
-rw-r--r--print-olsr.c252
-rw-r--r--print-openflow-1.0.c2078
-rw-r--r--print-openflow.c119
-rw-r--r--print-ospf.c684
-rw-r--r--print-ospf6.c815
-rw-r--r--print-otv.c38
-rw-r--r--print-pflog.c71
-rw-r--r--print-pgm.c469
-rw-r--r--print-pim.c656
-rw-r--r--print-pktap.c169
-rw-r--r--print-ppi.c35
-rw-r--r--print-ppp.c974
-rw-r--r--print-pppoe.c71
-rw-r--r--print-pptp.c1097
-rw-r--r--print-radius.c277
-rw-r--r--print-raw.c19
-rw-r--r--print-rip.c142
-rw-r--r--print-ripng.c108
-rw-r--r--print-rpki-rtr.c68
-rw-r--r--print-rrcp.c27
-rw-r--r--print-rsvp.c629
-rw-r--r--print-rt6.c44
-rw-r--r--print-rx.c1094
-rw-r--r--print-sctp.c687
-rw-r--r--print-sflow.c480
-rw-r--r--print-sip.c30
-rw-r--r--print-sl.c117
-rw-r--r--print-sll.c174
-rw-r--r--print-slow.c275
-rw-r--r--print-smb.c566
-rw-r--r--print-snmp.c669
-rw-r--r--print-stp.c244
-rw-r--r--print-sunatm.c26
-rw-r--r--print-sunrpc.c141
-rw-r--r--print-symantec.c65
-rwxr-xr-xprint-syslog.c78
-rw-r--r--print-tcp.c583
-rw-r--r--print-telnet.c348
-rw-r--r--print-tftp.c102
-rw-r--r--print-timed.c140
-rw-r--r--print-tipc.c95
-rw-r--r--print-token.c139
-rw-r--r--print-udld.c74
-rw-r--r--print-udp.c416
-rw-r--r--print-usb.c47
-rw-r--r--print-vjc.c41
-rw-r--r--print-vqp.c71
-rw-r--r--print-vrrp.c109
-rw-r--r--print-vtp.c121
-rw-r--r--print-vxlan.c36
-rw-r--r--print-wb.c216
-rw-r--r--print-zephyr.c85
-rw-r--r--print-zeromq.c127
-rw-r--r--route6d.h77
-rw-r--r--rpc_auth.h5
-rw-r--r--rpc_msg.h25
-rw-r--r--rpl.h174
-rw-r--r--rx.h113
-rw-r--r--sctpConstants.h571
-rw-r--r--sctpHeader.h323
-rw-r--r--setsignal.c7
-rw-r--r--setsignal.h2
-rw-r--r--signature.c31
-rw-r--r--signature.h7
-rw-r--r--slcompress.h2
-rw-r--r--slip.h34
-rw-r--r--sll.h127
-rw-r--r--smb.h6
-rw-r--r--smbutil.c277
-rw-r--r--strcasecmp.c5
-rw-r--r--tcp.h28
-rw-r--r--tcpdump-stdinc.h184
-rw-r--r--tcpdump.1.in228
-rw-r--r--tcpdump.c783
-rw-r--r--telnet.h348
-rw-r--r--tests/3560_CDP.pcapbin0 -> 1272 bytes
-rw-r--r--tests/802.1D_spanning_tree.pcapbin0 -> 1088 bytes
-rw-r--r--tests/802.1w_rapid_STP.pcapbin0 -> 2304 bytes
-rw-r--r--tests/AoE_Linux.pcapbin0 -> 95288 bytes
-rw-r--r--tests/DECnet_Phone.pcapbin0 -> 7678 bytes
-rw-r--r--tests/DTP.pcapbin0 -> 934 bytes
-rw-r--r--tests/EIGRP_adjacency.pcapbin0 -> 5195 bytes
-rw-r--r--tests/EIGRP_goodbye.pcapbin0 -> 1374 bytes
-rw-r--r--tests/EIGRP_subnet_down.pcapbin0 -> 1884 bytes
-rw-r--r--tests/EIGRP_subnet_up.pcapbin0 -> 1356 bytes
-rw-r--r--tests/HDLC.pcapbin0 -> 3532 bytes
-rw-r--r--tests/HSRP_coup.pcapbin0 -> 3984 bytes
-rw-r--r--tests/HSRP_election.pcapbin0 -> 3832 bytes
-rw-r--r--tests/HSRP_failover.pcapbin0 -> 3056 bytes
-rw-r--r--tests/IGMP_V1.pcapbin0 -> 2062 bytes
-rw-r--r--tests/IGMP_V2.pcapbin0 -> 1364 bytes
-rw-r--r--tests/ISAKMP_sa_setup.pcapbin0 -> 2030 bytes
-rw-r--r--tests/ISIS_external_lsp.pcapbin0 -> 17371 bytes
-rw-r--r--tests/ISIS_level1_adjacency.pcapbin0 -> 28022 bytes
-rw-r--r--tests/ISIS_level2_adjacency.pcapbin0 -> 53091 bytes
-rw-r--r--tests/ISIS_p2p_adjacency.pcapbin0 -> 22260 bytes
-rw-r--r--tests/LACP.pcapbin0 -> 2824 bytes
-rw-r--r--tests/LLDP_and_CDP.pcapbin0 -> 4108 bytes
-rw-r--r--tests/MSTP_Intra-Region_BPDUs.pcapbin0 -> 1714 bytes
-rw-r--r--tests/OSPFv3_NBMA_adjacencies.pcapbin0 -> 13188 bytes
-rw-r--r--tests/OSPFv3_broadcast_adjacency.pcapbin0 -> 5536 bytes
-rw-r--r--tests/OSPFv3_multipoint_adjacencies.pcapbin0 -> 11816 bytes
-rw-r--r--tests/OSPFv3_with_AH.pcapbin0 -> 10974 bytes
-rw-r--r--tests/PIM-DM_pruning.pcapbin0 -> 10436 bytes
-rw-r--r--tests/PIM-SM_join_prune.pcapbin0 -> 3940 bytes
-rw-r--r--tests/PIM_register_register-stop.pcapbin0 -> 258 bytes
-rw-r--r--tests/PIMv2_bootstrap.pcapbin0 -> 712 bytes
-rw-r--r--tests/PIMv2_hellos.pcapbin0 -> 528 bytes
-rw-r--r--tests/RADIUS.pcapbin0 -> 775 bytes
-rw-r--r--tests/TESTLIST203
-rwxr-xr-xtests/TESTonce65
-rwxr-xr-xtests/TESTrun.sh88
-rw-r--r--tests/UDLD.pcapbin0 -> 3426 bytes
-rw-r--r--tests/ahcp-vv.out76
-rw-r--r--tests/ahcp.pcapbin0 -> 1784 bytes
-rw-r--r--tests/aoe_1-v.out888
-rw-r--r--tests/aoe_1.out186
-rw-r--r--tests/babel1.out16
-rw-r--r--tests/babel1v.out78
-rw-r--r--tests/babel_auth.out4
-rw-r--r--tests/babel_pad1.out2
-rw-r--r--tests/babel_pad1.pcapbin0 -> 257 bytes
-rw-r--r--tests/babel_rtt.out25
-rw-r--r--tests/babel_rtt.pcapbin0 -> 902 bytes
-rw-r--r--tests/bgp_infloop-v.out15
-rw-r--r--tests/cdp-v.out57
-rwxr-xr-xtests/crypto.sh23
-rw-r--r--tests/dcb_ets.out1923
-rw-r--r--tests/dcb_ets.pcapbin0 -> 13279 bytes
-rw-r--r--tests/dcb_pfc.out148
-rw-r--r--tests/dcb_pfc.pcapbin0 -> 850 bytes
-rw-r--r--tests/dcb_qcn.out363
-rw-r--r--tests/dcb_qcn.pcapbin0 -> 3730 bytes
-rw-r--r--tests/dccp_partial_csum_v4_longer.out30
-rw-r--r--tests/dccp_partial_csum_v4_longer.pcapbin0 -> 1778 bytes
-rw-r--r--tests/dccp_partial_csum_v4_simple.out14
-rw-r--r--tests/dccp_partial_csum_v4_simple.pcapbin0 -> 642 bytes
-rw-r--r--tests/dccp_partial_csum_v6_longer.out9
-rw-r--r--tests/dccp_partial_csum_v6_longer.pcapbin0 -> 1230 bytes
-rw-r--r--tests/dccp_partial_csum_v6_simple.out7
-rw-r--r--tests/dccp_partial_csum_v6_simple.pcapbin0 -> 782 bytes
-rw-r--r--tests/decnet.out139
-rw-r--r--tests/dhcpv6-domain-list.out1
-rw-r--r--tests/dhcpv6-domain-list.pcapbin0 -> 195 bytes
-rw-r--r--tests/dhcpv6-ntp-server.out1
-rw-r--r--tests/dhcpv6-ntp-server.pcapbin0 -> 207 bytes
-rw-r--r--tests/dhcpv6-sip-server-d.out1
-rw-r--r--tests/dhcpv6-sip-server-d.pcapbin0 -> 208 bytes
-rw-r--r--tests/dio.out1
-rw-r--r--tests/dio.pcapbin120 -> 0 bytes
-rw-r--r--tests/dtp-v.out30
-rw-r--r--tests/dvmrp.out2
-rw-r--r--tests/eigrp1-v.out444
-rw-r--r--tests/eigrp2-v.out120
-rw-r--r--tests/eigrp3-v.out143
-rw-r--r--tests/eigrp4-v.out105
-rw-r--r--tests/empty.uu3
-rw-r--r--tests/epgm_zmtp1.pcapbin0 -> 4355 bytes
-rw-r--r--tests/epgm_zmtp1v.out79
-rw-r--r--tests/epgmv.out30
-rw-r--r--tests/evb.out146
-rw-r--r--tests/evb.pcapbin0 -> 2182 bytes
-rw-r--r--tests/geonet_and_calm_fast.out169
-rw-r--r--tests/geonet_and_calm_fast.pcapbin0 -> 7794 bytes
-rw-r--r--tests/hdlc1.out1
-rw-r--r--tests/hdlc2.out1
-rw-r--r--tests/hdlc3.out38
-rw-r--r--tests/hdlc4.out7
-rw-r--r--tests/hdlc_slarp.pcapbin0 -> 612 bytes
-rw-r--r--tests/hsrp_1-v.out102
-rw-r--r--tests/hsrp_1.out51
-rw-r--r--tests/hsrp_2-v.out98
-rw-r--r--tests/hsrp_3-v.out78
-rw-r--r--tests/icmpv6_opt24-v.out16
-rw-r--r--tests/icmpv6_opt24.pcapbin0 -> 404 bytes
-rw-r--r--tests/ieee802.11_exthdr.out26
-rw-r--r--tests/ieee802.11_exthdr.pcapbin0 -> 4499 bytes
-rw-r--r--tests/ieee802.11_rx-stbc.out3
-rw-r--r--tests/ieee802.11_rx-stbc.pcapbin0 -> 541 bytes
-rw-r--r--tests/igmpv1.out27
-rw-r--r--tests/igmpv2.out18
-rw-r--r--tests/ipv6-bad-version.out4
-rw-r--r--tests/ipv6-bad-version.pcapbin0 -> 416 bytes
-rw-r--r--tests/ipv6-routing-header.out4
-rw-r--r--tests/ipv6-routing-header.pcapbin0 -> 464 bytes
-rw-r--r--tests/isakmp5-v.out44
-rw-r--r--tests/isis_1-v.out270
-rw-r--r--tests/isis_1.out15
-rw-r--r--tests/isis_2-v.out403
-rw-r--r--tests/isis_3-v.out774
-rw-r--r--tests/isis_4-v.out400
-rw-r--r--tests/isis_infloop-v.out40
-rw-r--r--tests/isup.out6
-rw-r--r--tests/isup.pcapbin0 -> 704 bytes
-rw-r--r--tests/isupvv.out30
-rw-r--r--tests/lacp-ev.out200
-rw-r--r--tests/ldp_infloop.out5
-rw-r--r--tests/lldp_cdp-ev.out224
-rw-r--r--tests/lmp-v.out200
-rwxr-xr-xtests/lmp-v.sh14
-rw-r--r--tests/lmp.new36
-rw-r--r--tests/lmp.out54
-rwxr-xr-xtests/lmp.sh12
-rw-r--r--tests/loopback.out6
-rw-r--r--tests/loopback.pcapbin0 -> 592 bytes
-rw-r--r--tests/mptcp-fclose.out11
-rw-r--r--tests/mptcp-fclose.pcapbin0 -> 1016 bytes
-rw-r--r--tests/mptcp.out264
-rw-r--r--tests/mptcp.pcapbin0 -> 39394 bytes
-rw-r--r--tests/mrinfo_query.pcapbin0 -> 182 bytes
-rw-r--r--tests/mstp-v.out130
-rw-r--r--tests/mtrace.out2
-rw-r--r--tests/mtrace.pcapbin0 -> 238 bytes
-rw-r--r--tests/nflog-e.out4
-rwxr-xr-xtests/nflog-e.sh10
-rw-r--r--tests/nflog.pcapbin0 -> 840 bytes
-rw-r--r--tests/of10_7050q-v.out18
-rw-r--r--tests/of10_7050q.pcapbin0 -> 588 bytes
-rw-r--r--tests/of10_p3295-vv.out798
-rw-r--r--tests/of10_p3295.pcapbin0 -> 20028 bytes
-rw-r--r--tests/of10_pf5240-vv.out428
-rw-r--r--tests/of10_pf5240.pcapbin0 -> 9196 bytes
-rw-r--r--tests/of10_s4810-vvvv.out1333
-rw-r--r--tests/of10_s4810.pcapbin0 -> 31208 bytes
-rw-r--r--tests/ospf3_ah-vv.out645
-rw-r--r--tests/ospf3_auth-vv.out10
-rw-r--r--tests/ospf3_auth.pcapbin0 -> 260 bytes
-rw-r--r--tests/ospf3_bc-vv.out335
-rw-r--r--tests/ospf3_mp-vv.out817
-rw-r--r--tests/ospf3_nbma-vv.out912
-rw-r--r--tests/pgm_zmtp1.pcapbin0 -> 4149 bytes
-rw-r--r--tests/pgm_zmtp1v.out76
-rw-r--r--tests/pgmv.out28
-rw-r--r--tests/pimv2_bootstrap-v.out24
-rw-r--r--tests/pimv2_dm-v.out238
-rw-r--r--tests/pimv2_hellos-v.out42
-rw-r--r--tests/pimv2_register-v.out8
-rw-r--r--tests/pimv2_sm-v.out300
-rw-r--r--tests/pppoes.out2
-rw-r--r--tests/pppoes.pcapbin0 -> 124 bytes
-rw-r--r--tests/pppoes_id.out1
-rw-r--r--tests/print-A.out20
-rw-r--r--tests/print-AA.out20
-rw-r--r--tests/print-capX.out20
-rw-r--r--tests/print-capXX.out20
-rwxr-xr-xtests/print-flags.sh29
-rw-r--r--tests/print-x.out20
-rw-r--r--tests/print-xx.out20
-rw-r--r--tests/radius-v.out47
-rw-r--r--tests/rpl-14-dao.pcapbin0 -> 118 bytes
-rw-r--r--tests/rpl-14-daovvv.out1
-rw-r--r--tests/rpl-19-pickdag.out1
-rw-r--r--tests/rpl-19-pickdag.pcapbin0 -> 150 bytes
-rw-r--r--tests/rpl-19-pickdagvvv.out1
-rw-r--r--tests/rpl-26-senddaoack.pcapbin0 -> 118 bytes
-rw-r--r--tests/rpl-26-senddaovv.out1
-rw-r--r--tests/rpvst-v.out68
-rw-r--r--tests/rpvstp-trunk-native-vid5.pcapbin0 -> 1811 bytes
-rw-r--r--tests/rstp-v.out90
-rw-r--r--tests/rsvp_infloop-v.out35
-rw-r--r--tests/sflow_multiple_counter_30_pdus-nv.out30
-rw-r--r--tests/stp-v.out42
-rw-r--r--tests/syslog-v.out16
-rw-r--r--tests/syslog_udp.pcapbin0 -> 515 bytes
-rw-r--r--tests/tfo-5c1fa7f9ae91.pcapbin0 -> 1084 bytes
-rw-r--r--tests/tfo.out14
-rw-r--r--tests/udld-v.out261
-rw-r--r--tests/vrrp-v.out266
-rw-r--r--tests/vrrp.out165
-rw-r--r--tests/vrrp.pcapbin0 -> 16344 bytes
-rw-r--r--tftp.h82
-rw-r--r--timed.h97
-rw-r--r--token.h52
-rw-r--r--udp.h13
-rw-r--r--util.c209
-rw-r--r--vfprintf.c5
-rw-r--r--win32/Include/bittypes.h89
-rw-r--r--win32/Include/errno.h132
-rw-r--r--win32/Include/getopt.h138
-rw-r--r--win32/Src/getopt.c117
-rw-r--r--win32/prj/GNUmakefile2
-rw-r--r--win32/prj/WinDump.dsp10
474 files changed, 47235 insertions, 26177 deletions
diff --git a/CHANGES b/CHANGES
index fbf11db667bf..62e57ebab7ca 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,61 @@
-Thursday February 19, 2013 guy@alum.mit.edu.
+Tuesday Sep. 2, 2014 mcr@sandelman.ca
+ fix out-of-source-tree builds: find libpcap that is out of source
+ better configure check for libsmi
+
+Saturday Jul. 19, 2014 mcr@sandelman.ca
+ Summary for 4.6.1 tcpdump release
+ added FreeBSD capsicum
+ add a short option '#', same as long option '--number'
+
+Wednesday Jul. 2, 2014 mcr@sandelman.ca
+ Summary for 4.6.0 tcpdump release
+ all of tcpdump is now using the new "NDO" code base (Thanks Denis!)
+ nflog, mobile, forces, pptp, AODV, AHCP, IPv6, OSPFv4, RPL, DHCPv6 enhancements/fixes
+ M3UA decode added.
+ many new test cases: 82 in 4.5.1 to 133 in 4.6.0
+ many improvements to travis continuous integration system: OSX, and Coverity options
+ cleaned up some unnecessary header files
+ Added bittok2str().
+ a number of unaligned access faults fixed
+ -A flag does not consider CR to be printable anymore
+ fx.lebail took over coverity baby sitting
+ default snapshot size increased to 256K for accomodate USB captures
+ WARNING: this release contains a lot of very worthwhile code churn.
+
+Wednesday Jan. 15, 2014 guy@alum.mit.edu
+ Summary for 4.5.2 tcpdump release
+ Man page fix
+ Fix crashes on SPARC
+
+Monday Nov. 11, 2013 mcr@sandelman.ca
+ Summary for 4.5.1 tcpdump release
+ CREDITS file fixes
+
+Thursday Nov. 7, 2013 mcr@sandelman.ca and guy@alum.mit.edu.
+ Summary for 4.5.0 tcpdump release
+ some NFSv4 fixes for printing
+ fix printing of unknown TCP options, and tcp fast-open
+ fixes for syslog parser
+ some gcc-version-specific flag tuning
+ adopt MacOS deprecation workarounds for openssl
+ improvements to babel printing
+ add OpenFlow 1.0 (no SSL) and test cases
+ GeoNet printer.
+ added STBC Rx support
+ improvements to DHCPv6 decoder
+ clarify which autoconf is needed
+ Point users to the the-tcpdump-group repository on GitHub rather
+ than the mcr repository
+ Add MSDP printer.
+ Fixed IPv6 check on Solaris and other OSes requiring extra
+ networking libraries.
+ Add support for VXLAN (draft-mahalingam-dutt-dcops-vxlan-03),
+ and add "vxlan" as an option for -T.
+ Add support for OTV (draft-hasmit-otv-04).
+ fixes for DLT_IEEE802_11_RADIO datalink types
+ added MPTCP decoder
+
+Saturday April 6, 2013 guy@alum.mit.edu.
Summary for 4.4.0 tcpdump release
RPKI-RTR (RFC6810) is now official (TCP Port 323)
Fix detection of OpenSSL libcrypto.
@@ -16,6 +73,8 @@ Thursday February 19, 2013 guy@alum.mit.edu.
On Linux systems with cap-ng.h, drop root privileges
using Linux Capabilities.
Add support for reading multiple files.
+ Add MS NLB heartbeat printer.
+ Separate multiple nexthops in BGP.
Wednesday November 28, 2012 guy@alum.mit.edu.
Summary for 4.3.1 tcpdump release
@@ -32,7 +91,7 @@ Wednesday November 28, 2012 guy@alum.mit.edu.
Use the right maximum path length
Don't treat 192_1_2, when passed to -i, as an interface number
-Friday April 3, 2011. mcr@sandelman.ca.
+Friday April 3, 2012. mcr@sandelman.ca.
Summary for 4.3.0 tcpdump release
fixes for forces: SPARSE data (per RFC 5810)
some more test cases added
@@ -113,7 +172,7 @@ Thu. April 1, 2010. guy@alum.mit.edu.
Summary for 4.1.1 tcpdump release
Fix build on systems with PF, such as FreeBSD and OpenBSD.
Don't blow up if a zero-length link-layer address is passed to
- linkaddr_string().
+ linkaddr_string().
Thu. March 11, 2010. ken@netfunctional.ca/guy@alum.mit.edu.
Summary for 4.1.0 tcpdump release
@@ -142,7 +201,7 @@ Thu. March 11, 2010. ken@netfunctional.ca/guy@alum.mit.edu.
Add printer for ForCES
Handle frames with an FCS
Handle 802.11n Control Wrapper, Block Acq Req and Block Ack frames
- Fix TCP sequence number printing
+ Fix TCP sequence number printing
Report 802.2 packets as 802.2 instead of 802.3
Don't include -L/usr/lib in LDFLAGS
On x86_64 Linux, look in lib64 directory too
@@ -178,13 +237,13 @@ Mon. September 10, 2007. ken@xelerance.com. Summary for 3.9.8 tcpdump relea
Converted print-isakmp.c to NETDISSECT
Moved AF specific stuff into af.h
Test subsystem now table driven, and saves outputs and diffs to one place
- Require <net/pfvar.h> for pf definitions - allows reading of pflog formatted
+ Require <net/pfvar.h> for pf definitions - allows reading of pflog formatted
libpcap files on an OS other than where the file was generated
Wed. July 23, 2007. mcr@xelerance.com. Summary for 3.9.7 libpcap release
- NFS: Print unsigned values as such.
+ NFS: Print unsigned values as such.
RX: parse safely.
BGP: fixes for IPv6-less builds.
801.1ag: use standard codepoint.
@@ -194,7 +253,7 @@ Wed. July 23, 2007. mcr@xelerance.com. Summary for 3.9.7 libpcap release
smb: squelch an uninitialized complaint from coverity.
NFS: from NetBSD; don't interpret the reply as a possible NFS reply
if it got MSG_DENIED.
- BGP: don't print TLV values that didn't fit, from www.digit-labs.org.
+ BGP: don't print TLV values that didn't fit, from www.digit-labs.org.
revised INSTALL.txt about libpcap dependancy.
Wed. April 25, 2007. ken@xelerance.com. Summary for 3.9.6 tcpdump release
@@ -212,11 +271,11 @@ Wed. April 25, 2007. ken@xelerance.com. Summary for 3.9.6 tcpdump release
Add support for 802.3ah loopback ctrl msg
Add support for Multiple-STP as per 802.1s
Add support for rapid-SPT as per 802.1w
- Add support for CFM Link-trace msg, Link-trace-Reply msg,
+ Add support for CFM Link-trace msg, Link-trace-Reply msg,
Sender-ID tlv, private tlv, port, interface status
Add support for unidirectional link detection as per
http://www.ietf.org/internet-drafts/draft-foschiano-udld-02.txt
- Add support for the olsr protocol as per RFC 3626 plus the LQ
+ Add support for the olsr protocol as per RFC 3626 plus the LQ
extensions from olsr.org
Add support for variable-length checksum in DCCP, as per section 9 of
RFC 4340.
@@ -228,7 +287,7 @@ Wed. April 25, 2007. ken@xelerance.com. Summary for 3.9.6 tcpdump release
Tue. September 19, 2006. ken@xelerance.com. Summary for 3.9.5 tcpdump release
-
+
Fix compiling on AIX (, at end of ENUM)
Updated list of DNS RR typecodes
Use local Ethernet defs on WIN32
@@ -243,7 +302,7 @@ Tue. September 19, 2006. ken@xelerance.com. Summary for 3.9.5 tcpdump release
Add support for BGP signaled VPLS
Cleanup the bootp printer
Add support for PPP over Frame-Relay
- Add some bounds checking to the IP options code, and clean up
+ Add some bounds checking to the IP options code, and clean up
the options output a bit.
Add additional modp groups to ISAKMP printer
Add support for Address-Withdraw and Label-Withdraw Msgs
diff --git a/CREDITS b/CREDITS
index bdbfd36e80e4..b8ef1e07a93c 100644
--- a/CREDITS
+++ b/CREDITS
@@ -2,18 +2,20 @@ This file lists people who have contributed to tcpdump:
The current maintainers:
Bill Fenner <fenner at research dot att dot com>
- David Young <dyoung at pobox dot com>
+ Denis Ovsienko <infrastation at yandex dot ru>
Fulvio Risso <risso at polito dot it>
Guy Harris <guy at alum dot mit dot edu>
Hannes Gredler <hannes at juniper dot net>
Michael Richardson <mcr at sandelman dot ottawa dot on dot ca>
+ Francois-Xavier Le Bail <fx dot lebail at yahoo dot com>
Additional people who have contributed patches:
- A Costa <agcosta at gis dot net>
Aaron Campbell <aaron at arbor dot net>
- Alfredo Andres <aandres at s21sec dot com>
+ A Costa <agcosta at gis dot net>
Albert Chin <china at thewrittenword dot com>
+ Alexandra Kossovsky <alexandra1975 at sourceforge dot net>
+ Alfredo Andres <aandres at s21sec dot com>
Ananth Suryanarayana <anantha at juniper dot net>
Andrea Bittau <a dot bittau at cs dot ucl dot ac dot uk>
Andrew Brown <atatat at atatdot dot net>
@@ -26,17 +28,19 @@ Additional people who have contributed patches:
Arkadiusz Miskiewicz <misiek at pld dot org dot pl>
Armando L. Caro Jr. <acaro at mail dot eecis dot udel dot edu>
Arnaldo Carvalho de Melo <acme at ghostprotocols dot net>
- Ben Byer <bushing at sourceforge dot net>
Atsushi Onoe <onoe at netbsd dot org>
+ Baptiste Jonglez <baptiste dot jonglez at ens-lyon dot org>
+ Ben Byer <bushing at sourceforge dot net>
Ben Smithurst <ben at scientia dot demon dot co dot uk>
Bert Vermeulen <bert at biot dot com>
Bjoern A. Zeeb <bzeeb at Zabbadoz dot NeT>
+ Bram <tcpdump at mail dot wizbit dot be>
Brent L. Bates <blbates at vigyan dot com>
Brian Ginsbach <ginsbach at cray dot com>
Bruce M. Simpson <bms at spc dot org>
Carles Kishimoto Bisbe <ckishimo at ac dot upc dot es>
- Charlie Lenahan <clenahan at fortresstech dot com>
Charles M. Hannum <mycroft at netbsd dot org>
+ Charlie Lenahan <clenahan at fortresstech dot com>
Chris Cogdon <chris at cogdon dot org>
Chris G. Demetriou <cgd at netbsd dot org>
Chris Jepeway <jepeway at blasted-heath dot com>
@@ -52,7 +56,7 @@ Additional people who have contributed patches:
David Horn <dhorn2000 at gmail dot com>
David Smith <dsmith at redhat dot com>
David Young <dyoung at ojctech dot com>
- Denis Ovsienko <infrastation at yandex dot ru>
+ Dmitrij Tejblum <tejblum at yandex-team dot ru>
Dmitry Eremin-Solenikov <dbaryshkov at gmail dot com>
Don Ebright <Don dot Ebright at compuware dot com>
Eddie Kohler <xexd at sourceforge dot net>
@@ -60,22 +64,24 @@ Additional people who have contributed patches:
Fang Wang <fangwang at sourceforge dot net>
Florent Drouin <Florent dot Drouin at alcatel-lucent dot fr>
Florian Forster <octo at verplant dot org>
- Francis Dupont <Francis dot Dupont at enst-bretagne dot fr>
+ fra <foo at bar dot baz>
+ Francesco Fondelli <francesco dot fondelli at gmail dot com>
Francisco Matias Cuenca-Acuna <mcuenca at george dot rutgers dot edu>
- Francois-Xavier Le Bail <fx dot lebail at yahoo dot com>
+ Francis Dupont <Francis dot Dupont at enst-bretagne dot fr>
Frank Volf <volf at oasis dot IAEhv dot nl>
Fulvio Risso <risso at polito dot it>
George Bakos <gbakos at ists dot dartmouth dot edu>
Gerald Combs <gerald at ethereal dot com>
Gerrit Renker <gerrit at erg dot abdn dot ac dot uk>
Gert Doering <gert at greenie dot muc dot de>
+ Gilbert Ramirez Jr. <gram at xiexie dot org>
+ Gisle Vanem <gvanem at yahoo dot no>
Greg Minshall <minshall at acm dot org>
+ Grégoire Henry <henry at pps dot jussieu dot fr>
+ Gregory Detal <gregory dot detal at uclouvain dot be>
Greg Stark <gsstark at mit dot edu>
- Grégoire Henry <henry@pps.jussieu.fr>
- Gilbert Ramirez Jr. <gram at xiexie dot org>
- Gisle Vanem <gvanem at broadpark dot no>
- Hannes Viertel <hviertel at juniper dot net>
Hank Leininger <tcpdump-workers at progressive-comp dot com>
+ Hannes Viertel <hviertel at juniper dot net>
Harry Raaymakers <harryr at connect dot com dot au>
Heinz-Ado Arnolds <Ado dot Arnolds at dhm-systems dot de>
Hendrik Scholz <hendrik at scholz dot net>
@@ -90,34 +96,37 @@ Additional people who have contributed patches:
Jeffrey Hutzelman <jhutz at cmu dot edu>
Jesper Peterson <jesper at endace dot com>
Jim Hutchins <jim at ca dot sandia dot gov>
- Jonathan Heusser <jonny at drugphish dot ch>
- Tatuya Jinmei <jinmei at kame dot net>
João Medeiros <ignotus21 at sourceforge dot net>
- Joerg Mayer <jmayer@loplof.de>
- Jørgen Thomsen <jth at jth dot net>
+ Joerg Mayer <jmayer at loplof dot de>
+ Jonathan Heusser <jonny at drugphish dot ch>
+ Jorge Boncompte [DTI2] <jorge at dti2 dot net>
+ Jørgen Thomsen <jth at jth dot net>
Julian Cowley <julian at lava dot net>
- Juliusz Chroboczek <jch@pps.jussieu.fr>
+ Juliusz Chroboczek <jch at pps dot jussieu dot fr>
Kaarthik Sivakumar <kaarthik at torrentnet dot com>
Kaladhar Musunuru <kaladharm at sourceforge dot net>
Karl Norby <karl-norby at sourceforge dot net>
Kazushi Sugyo <sugyo at pb dot jp dot nec dot com>
Kelly Carmichael <kcarmich at ipapp dot com>
Ken Hornstein <kenh at cmf dot nrl dot navy dot mil>
- Kevin Steves <stevesk at pobox dot com>
Kenichi Maehashi <webmaster at kenichimaehashi dot com>
+ Kevin Steves <stevesk at pobox dot com>
Klaus Klein <kleink at reziprozitaet dot de>
Kris Kennaway <kris at freebsd dot org>
Krzysztof Halasa <khc at pm dot waw dot pl>
Larry Lile <lile at stdio dot com>
Lennert Buytenhek <buytenh at gnu dot org>
+ Loganaden Velvindron <logan at elandsys dot com>
+ Longinus00 <Longinus00 at gmail dot com>
Loris Degioanni <loris at netgroup-serv dot polito dot it>
Love Hörnquist-Åstrand <lha at stacken dot kth dot se>
Lucas C. Villa Real <lucasvr at us dot ibm dot com>
Luis MartinGarcia <luis dot mgarc at gmail dot com>
Maciej W. Rozycki <macro at ds2 dot pg dot gda dot pl>
Manu Pathak <mapathak at cisco dot com>
- Marc Binderberger <mbind at sourceforge dot net>
+ Marc Abramowitz <marc at marc-abramowitz dot com>
Marc A. Lehmann <pcg at goof dot com>
+ Marc Binderberger <mbind at sourceforge dot net>
Mark Ellzey Thomas <mark at ackers dot net>
Marko Kiiskila <carnil at cs dot tut dot fi>
Markus Schöpflin <schoepflin at sourceforge dot net>
@@ -136,14 +145,16 @@ Additional people who have contributed patches:
Minto Jeyananth <minto at juniper dot net>
Monroe Williams <monroe at pobox dot com>
Motonori Shindo <mshindo at mshindo dot net>
- Nathan J. Williams <nathanw at MIT dot EDU>
Nathaniel Couper-Noles <Nathaniel at isi1 dot tccisi dot com>
+ Nathan J. Williams <nathanw at MIT dot EDU>
Neil T. Spring <bluehal at users dot sourceforge dot net>
- Niels Provos <provos at openbsd dot org>
Nickolai Zeldovich <kolya at MIT dot EDU>
Nicolas Ferrero <toorop at babylo dot net>
+ Niels Provos <provos at openbsd dot org>
Noritoshi Demizu <demizu at users dot sourceforge dot net>
Olaf Kirch <okir at caldera dot de>
+ Ola Martin Lykkja <ola dot lykkja at q-free dot com>
+ Oleksij Rempel <linux at rempel-privat dot de>
Onno van der Linden <onno at simplex dot nl>
Paolo Abeni <paolo dot abeni at email dot it>
Pascal Hennequin <pascal dot hennequin at int-evry dot fr>
@@ -153,11 +164,12 @@ Additional people who have contributed patches:
Paul S. Traina <pst at freebsd dot org>
Pavlin Radoslavov <pavlin at icir dot org>
Pawel Worach <pawel dot worach at gmail dot com>
- Pekka Savola <pekkas at netcore dot fi>
+ Pekka Savola <pekkas at netcore dot fi>
+ Petar Alilovic <petar dot alilovic at gmail dot com>
Peter Fales <peter at fales-lorenz dot net>
Peter Jeremy <peter dot jeremy at alcatel dot com dot au>
- <pfhunt at users dot sourceforge dot net>
Peter Volkov <pva at gentoo dot org>
+ <pfhunt at users dot sourceforge dot net>
Phil Wood <cpw at lanl dot gov>
Rafal Maszkowski <rzm at icm dot edu dot pl>
Randy Sofia <rsofia at users dot sourceforge dot net>
@@ -169,9 +181,10 @@ Additional people who have contributed patches:
Robert Edmonds <stu-42 at sourceforge dot net>
Roderick Schertler <roderick at argon dot org>
Romain Francoise <rfrancoise at debian dot org>
+ Ruben Kerkhof <ruben at rubenkerkhof dot com>
Sagun Shakya <sagun dot shakya at sun dot com>
Sami Farin <safari at iki dot fi>
- Scott Mcmillan <scott.a.mcmillan at intel dot com>
+ Scott Mcmillan <scott dot a dot mcmillan at intel dot com>
Scott Rose <syberpunk at users dot sourceforge dot net>
Sebastian Krahmer <krahmer at cs dot uni-potsdam dot de>
Sebastien Raveau <sebastien dot raveau at epita dot fr>
@@ -181,20 +194,27 @@ Additional people who have contributed patches:
Shinsuke Suzuki <suz at kame dot net>
Simon Ruderich <simon at ruderich dot org>
Steinar Haug <sthaug at nethelp dot no>
+ Stephane Bortzmeyer <stephane+github at bortzmeyer dot org>
Swaminathan Chandrasekaran <chander at juniper dot net>
+ Swaathi Vetrivel <swaathiv at juniper dot net>
Takashi Yamamoto <yamt at mwd dot biglobe dot ne dot jp>
+ Tatuya Jinmei <jinmei at kame dot net>
Terry Kennedy <terry at tmk dot com>
+ Thomas Jacob <jacob at internet24 dot de>
Timo Koskiahde
Tony Li <tli at procket dot com>
Toshihiro Kanda <candy at fct dot kgc dot co dot jp>
+ Udayakumar <udaya011 at gmail dot com>
Uns Lider <unslider at miranda dot org>
Victor Oppleman <oppleman at users dot sourceforge dot net>
+ Vyacheslav Trushkin <dogonthesun at gmail dot com>
Weesan Lee <weesan at juniper dot net>
Wesley Griffin <wgriffin at users dot sourceforge dot net>
Wesley Shields <wxs at FreeBSD dot org>
Wilbert de Graaf <wilbertdg at hetnet dot nl>
Will Drewry <will at alum dot bu dot edu>
William J. Hulley <bill dot hulley at gmail dot com>
+ Wim Torfs <wtorfs at gmail dot com>
Yen Yen Lim
Yoshifumi Nishida
@@ -204,4 +224,4 @@ The original LBL crew:
Van Jacobson
Past maintainers:
- Jun-ichiro itojun Hagino <itojun at iijlab dot net>
+ Jun-ichiro itojun Hagino <itojun at iijlab dot net> Also see: http://www.wide.ad.jp/itojun-award/
diff --git a/INSTALL.txt b/INSTALL.txt
index a03e2c0001b3..6a0e6b8e1437 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -1,5 +1,3 @@
-@(#) $Header: /tcpdump/master/tcpdump/INSTALL.txt,v 1.2 2008-02-06 10:47:53 guy Exp $ (LBL)
-
If you have not built libpcap, and your system does not have libpcap
installed, install libpcap first. Your system might provide a version
of libpcap that can be installed; if so, to compile tcpdump you might
@@ -9,9 +7,7 @@ libpcap; see the README file in this directory for the ftp location.
You will need an ANSI C compiler to build tcpdump. The configure script
will abort if your compiler is not ANSI compliant. If this happens, use
-the GNU C compiler, available via anonymous ftp:
-
- ftp://ftp.gnu.org/pub/gnu/gcc/
+the generally available GNU C compiler (GCC).
After libpcap has been built (either install it with "make install" or
make sure both the libpcap and tcpdump source trees are in the same
@@ -42,25 +38,20 @@ FILES
-----
CHANGES - description of differences between releases
CREDITS - people that have helped tcpdump along
-FILES - list of files exported as part of the distribution
INSTALL.txt - this file
LICENSE - the license under which tcpdump is distributed
Makefile.in - compilation rules (input to the configure script)
README - description of distribution
Readme.Win32 - notes on building tcpdump on Win32 systems (with WinPcap)
VERSION - version of this release
-acconfig.h - autoconf input
aclocal.m4 - autoconf macros
addrtoname.c - address to hostname routines
addrtoname.h - address to hostname definitions
ah.h - IPSEC Authentication Header definitions
-aodv.h - AODV definitions
appletalk.h - AppleTalk definitions
-arcnet.h - ARCNET definitions
atime.awk - TCP ack awk script
atm.h - ATM traffic type definitions
atmuni31.h - ATM Q.2931 definitions
-bgp.h - BGP declarations
bootp.h - BOOTP definitions
bpf_dump.c - BPF program printing routines, in case libpcap doesn't
have them
@@ -72,37 +63,21 @@ config.h.in - autoconf input
config.sub - autoconf support
configure - configure script (run this first)
configure.in - configure script source
-dccp.h - DCCP definitions
-decnet.h - DECnet definitions
-decode_prefix.h - Declarations of "decode_prefix{4,6}()"
-enc.h - OpenBSD IPsec encapsulation BPF layer definitions
-esp.h - IPSEC Encapsulating Security Payload definitions
ether.h - Ethernet definitions
ethertype.h - Ethernet type value definitions
extract.h - alignment definitions
-fddi.h - Fiber Distributed Data Interface definitions
gmpls.c - GMPLS definitions
gmpls.h - GMPLS declarations
gmt2local.c - time conversion routines
gmt2local.h - time conversion prototypes
-icmp6.h - ICMPv6 definitiions
-ieee802_11.h - IEEE 802.11 definitions
-ieee802_11_radio.h - radiotap header definitions
-igrp.h - Interior Gateway Routing Protocol definitions
install-sh - BSD style install script
interface.h - globals, prototypes and definitions
ip.h - IP definitions
ip6.h - IPv6 definitions
-ipfc.h - IP-over-Fibre Channel definitions
ipproto.c - IP protocol type value-to-name table
ipproto.h - IP protocol type value definitions
-ipsec_doi.h - ISAKMP packet definitions - RFC2407
-ipx.h - IPX definitions
-isakmp.h - ISAKMP packet definitions - RFC2408
l2vpn.c - L2VPN encapsulation value-to-name table
l2vpn.h - L2VPN encapsulation definitions
-l2tp.h - Layer Two Tunneling Protocol definitions
-lane.h - ATM LANE definitions
lbl/os-*.h - OS-dependent defines and prototypes
llc.h - LLC definitions
machdep.c - machine dependent routines
@@ -113,23 +88,18 @@ missing/* - replacements for missing library functions
mkdep - construct Makefile dependency list
mpls.h - MPLS definitions
nameser.h - DNS definitions
-netbios.h - NETBIOS definitions
netdissect.h - definitions and declarations for tcpdump-as-library
(under development)
nfs.h - Network File System V2 definitions
nfsfh.h - Network File System file handle definitions
nlpid.c - OSI NLPID value-to-name table
nlpid.h - OSI NLPID definitions
-ntp.h - Network Time Protocol definitions
-oakley.h - ISAKMP packet definitions - RFC2409
ospf.h - Open Shortest Path First definitions
-ospf6.h - IPv6 Open Shortest Path First definitions
packetdat.awk - TCP chunk summary awk script
parsenfsfh.c - Network File System file parser routines
pcap_dump_ftell.c - pcap_dump_ftell() implementation, in case libpcap
doesn't have it
pcap-missing.h - declarations of functions possibly missing from libpcap
-pmap_prot.h - definitions for ONC RPC portmapper protocol
ppp.h - Point to Point Protocol definitions
print-802_11.c - IEEE 802.11 printer routines
print-ap1394.c - Apple IP-over-IEEE 1394 printer routines
@@ -184,7 +154,6 @@ print-mobile.c - IPv4 mobility printer routines
print-mobility.c - IPv6 mobility printer routines
print-mpls.c - Multi-Protocol Label Switching printer routines
print-msdp.c - Multicast Source Discovery Protocol printer routines
-print-netbios.c - NetBIOS frame protocol printer routines
print-nfs.c - Network File System printer routines
print-ntp.c - Network Time Protocol printer routines
print-null.c - BSD loopback device printer routines
@@ -226,18 +195,12 @@ print-vjc.c - PPP Van Jacobson compression (RFC1144) printer routines
print-vrrp.c - Virtual Router Redundancy Protocol
print-wb.c - White Board printer routines
print-zephyr.c - Zephyr printer routines
-route6d.h - packet definition for IPv6 Routing Information Protocol
rpc_auth.h - definitions for ONC RPC authentication
rpc_msg.h - definitions for ONC RPC messages
-rx.h - AFS RX definitions
-sctpConstants.h - Stream Control Transmission Protocol constant definitions
-sctpHeader.h - Stream Control Transmission Protocol packet definitions
send-ack.awk - unidirectional tcp send/ack awk script
setsignal.c - OS-independent signal routines
setsignal.h - OS-independent signal prototypes
slcompress.h - SLIP/PPP Van Jacobson compression (RFC1144) definitions
-slip.h - SLIP definitions
-sll.h - Linux "cooked" capture definitions
smb.h - SMB/CIFS definitions
smbutil.c - SMB/CIFS utility routines
stime.awk - TCP send awk script
@@ -245,10 +208,6 @@ strcasecmp.c - missing routine
tcp.h - TCP definitions
tcpdump.1 - manual entry
tcpdump.c - main program
-telnet.h - Telnet definitions
-tftp.h - TFTP definitions
-timed.h - BSD time daemon protocol definitions
-token.h - Token Ring definitions
udp.h - UDP definitions
util.c - utility routines
vfprintf.c - emulation routine
diff --git a/Makefile-devel-adds b/Makefile-devel-adds
index 512a1199795c..7bf6420c1c82 100644
--- a/Makefile-devel-adds
+++ b/Makefile-devel-adds
@@ -2,12 +2,12 @@
# Auto-regenerate configure script or Makefile when things change.
# From autoconf.info . Works best with GNU Make.
#
-${srcdir}/configure: configure.in
+${srcdir}/configure: configure.in aclocal.m4
cd ${srcdir} && autoconf
# autoheader might not change config.h.in, so touch a stamp file.
${srcdir}/config.h.in: ${srcdir}/stamp-h.in
-${srcdir}/stamp-h.in: configure.in acconfig.h
+${srcdir}/stamp-h.in: configure.in aclocal.m4
cd ${srcdir} && autoheader
echo timestamp > ${srcdir}/stamp-h.in
diff --git a/Makefile.in b/Makefile.in
index dda4eb5e39b6..8c35a45b7a7a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -16,8 +16,6 @@
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.325 2008-11-21 23:17:26 guy Exp $ (LBL)
#
# Various configurable paths (remember to edit Makefile.in, not Makefile)
@@ -41,6 +39,8 @@ VPATH = @srcdir@
#
CC = @CC@
+AR = @AR@
+MKDEP = @MKDEP@
PROG = tcpdump
CCOPT = @V_CCOPT@
INCLS = -I. @V_INCLS@
@@ -61,6 +61,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
RANLIB = @RANLIB@
+DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
+
# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
# Also, gcc does not remove the .o before forking 'as', which can be a
# problem if you don't own the file but can write to the directory.
@@ -68,126 +70,205 @@ RANLIB = @RANLIB@
@rm -f $@
$(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
-CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
- nlpid.c l2vpn.c machdep.c parsenfsfh.c in_cksum.c \
- print-802_11.c print-802_15_4.c print-ap1394.c print-ah.c \
- print-arcnet.c print-aodv.c print-arp.c print-ascii.c print-atalk.c \
- print-atm.c print-beep.c print-bfd.c print-bgp.c \
- print-bootp.c print-bt.c print-carp.c print-cdp.c print-cfm.c \
- print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \
- print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \
- print-eap.c print-eigrp.c\
- print-esp.c print-ether.c print-fddi.c print-forces.c print-fr.c \
- print-gre.c print-hsrp.c print-icmp.c print-igmp.c \
- print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \
- print-ipx.c print-isoclns.c print-juniper.c print-krb.c \
- print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \
- print-lmp.c print-lspping.c print-lwapp.c \
- print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \
- print-msnlb.c print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \
- print-pgm.c print-pim.c \
- print-ppi.c print-ppp.c print-pppoe.c print-pptp.c \
- print-radius.c print-raw.c print-rip.c print-rpki-rtr.c print-rrcp.c print-rsvp.c \
- print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \
- print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \
- print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \
- print-timed.c print-tipc.c print-token.c print-udld.c print-udp.c \
- print-usb.c print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \
- print-wb.c print-zephyr.c print-zeromq.c print-vxlan.c print-otv.c signature.c setsignal.c tcpdump.c util.c
-
-LIBNETDISSECT_SRC=print-isakmp.c
-LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o)
-LIBNETDISSECT=libnetdissect.a
+CSRC = setsignal.c tcpdump.c
+
+LIBNETDISSECT_SRC=\
+ addrtoname.c \
+ af.c \
+ checksum.c \
+ cpack.c \
+ gmpls.c \
+ gmt2local.c \
+ in_cksum.c \
+ ipproto.c \
+ l2vpn.c \
+ machdep.c \
+ nlpid.c \
+ oui.c \
+ parsenfsfh.c \
+ print-802_11.c \
+ print-802_15_4.c \
+ print-ah.c \
+ print-ahcp.c \
+ print-aodv.c \
+ print-aoe.c \
+ print-ap1394.c \
+ print-arcnet.c \
+ print-arp.c \
+ print-ascii.c \
+ print-atalk.c \
+ print-atm.c \
+ print-beep.c \
+ print-bfd.c \
+ print-bgp.c \
+ print-bootp.c \
+ print-bt.c \
+ print-calm-fast.c \
+ print-carp.c \
+ print-cdp.c \
+ print-cfm.c \
+ print-chdlc.c \
+ print-cip.c \
+ print-cnfp.c \
+ print-dccp.c \
+ print-decnet.c \
+ print-domain.c \
+ print-dtp.c \
+ print-dvmrp.c \
+ print-eap.c \
+ print-egp.c \
+ print-eigrp.c \
+ print-enc.c \
+ print-esp.c \
+ print-ether.c \
+ print-fddi.c \
+ print-forces.c \
+ print-fr.c \
+ print-geonet.c \
+ print-gre.c \
+ print-hsrp.c \
+ print-icmp.c \
+ print-igmp.c \
+ print-igrp.c \
+ print-ip.c \
+ print-ipcomp.c \
+ print-ipfc.c \
+ print-ipnet.c \
+ print-ipx.c \
+ print-isakmp.c \
+ print-isoclns.c \
+ print-juniper.c \
+ print-krb.c \
+ print-l2tp.c \
+ print-lane.c \
+ print-ldp.c \
+ print-llc.c \
+ print-lldp.c \
+ print-lmp.c \
+ print-loopback.c \
+ print-lspping.c \
+ print-lwapp.c \
+ print-lwres.c \
+ print-m3ua.c \
+ print-mobile.c \
+ print-mpcp.c \
+ print-mpls.c \
+ print-mptcp.c \
+ print-msdp.c \
+ print-msnlb.c \
+ print-nflog.c \
+ print-nfs.c \
+ print-ntp.c \
+ print-null.c \
+ print-olsr.c \
+ print-openflow-1.0.c \
+ print-openflow.c \
+ print-ospf.c \
+ print-otv.c \
+ print-pgm.c \
+ print-pim.c \
+ print-pktap.c \
+ print-ppi.c \
+ print-ppp.c \
+ print-pppoe.c \
+ print-pptp.c \
+ print-radius.c \
+ print-raw.c \
+ print-rip.c \
+ print-rpki-rtr.c \
+ print-rrcp.c \
+ print-rsvp.c \
+ print-rx.c \
+ print-sctp.c \
+ print-sflow.c \
+ print-sip.c \
+ print-sl.c \
+ print-sll.c \
+ print-slow.c \
+ print-snmp.c \
+ print-stp.c \
+ print-sunatm.c \
+ print-sunrpc.c \
+ print-symantec.c \
+ print-syslog.c \
+ print-tcp.c \
+ print-telnet.c \
+ print-tftp.c \
+ print-timed.c \
+ print-tipc.c \
+ print-token.c \
+ print-udld.c \
+ print-udp.c \
+ print-usb.c \
+ print-vjc.c \
+ print-vqp.c \
+ print-vrrp.c \
+ print-vtp.c \
+ print-vxlan.c \
+ print-wb.c \
+ print-zephyr.c \
+ print-zeromq.c \
+ signature.c \
+ util.c
LOCALSRC = @LOCALSRC@
GENSRC = version.c
LIBOBJS = @LIBOBJS@
+LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS}
+LIBNETDISSECT=libnetdissect.a
+
+
SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LIBNETDISSECT_SRC)
# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
# hack the extra indirection
-OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS) $(LIBNETDISSECT_OBJ)
+OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LIBNETDISSECT_OBJ)
HDR = \
- acconfig.h \
addrtoname.h \
af.h \
ah.h \
- aodv.h \
appletalk.h \
- arcnet.h \
atm.h \
atmuni31.h \
bootp.h \
- bgp.h \
chdlc.h \
cpack.h \
- dccp.h \
- decnet.h \
- decode_prefix.h \
- enc.h \
- esp.h \
ether.h \
ethertype.h \
extract.h \
- fddi.h \
- forces.h \
+ getopt_long.h \
gmpls.h \
gmt2local.h \
- icmp6.h \
- ieee802_11.h \
- ieee802_11_radio.h \
- igrp.h \
interface.h \
interface.h \
ip.h \
ip6.h \
- ipfc.h \
- ipnet.h \
ipproto.h \
- ipsec_doi.h \
- ipx.h \
- isakmp.h \
- l2tp.h \
l2vpn.h \
- lane.h \
llc.h \
machdep.h \
mib.h \
mpls.h \
nameser.h \
- netbios.h \
netdissect.h \
nfs.h \
nfsfh.h \
nlpid.h \
- ntp.h \
- oakley.h \
+ openflow.h \
ospf.h \
- ospf6.h \
oui.h \
pcap-missing.h \
- pmap_prot.h \
- ppi.h \
ppp.h \
- route6d.h \
rpc_auth.h \
rpc_msg.h \
- rx.h \
- sctpConstants.h \
- sctpHeader.h \
+ rpl.h \
setsignal.h \
signature.h \
slcompress.h \
- slip.h \
- sll.h \
smb.h \
tcp.h \
tcpdump-stdinc.h \
- telnet.h \
- tftp.h \
- timed.h \
- token.h \
udp.h
TAGHDR = \
@@ -212,7 +293,7 @@ EXTRA_DIST = \
LICENSE \
Makefile.in \
Makefile-devel-adds \
- README \
+ README.md \
Readme.Win32 \
VERSION \
aclocal.m4 \
@@ -233,11 +314,11 @@ EXTRA_DIST = \
missing/dlnames.c \
missing/datalinks.c \
missing/getnameinfo.c \
+ missing/getopt_long.c \
missing/inet_aton.c \
missing/inet_ntop.c \
missing/inet_pton.c \
missing/snprintf.c \
- missing/sockstorage.h \
missing/strdup.c \
missing/strlcat.c \
missing/strlcpy.c \
@@ -252,7 +333,6 @@ EXTRA_DIST = \
print-ip6.c \
print-ip6opts.c \
print-mobility.c \
- print-netbios.c \
print-ospf6.c \
print-pflog.c \
print-ripng.c \
@@ -264,18 +344,14 @@ EXTRA_DIST = \
strcasecmp.c \
tcpdump.1.in \
vfprintf.c \
- win32/Include/bittypes.h \
- win32/Include/errno.h \
- win32/Include/getopt.h \
win32/Include/w32_fzs.h \
- win32/Src/getopt.c \
win32/prj/GNUmakefile \
win32/prj/WinDump.dsp \
win32/prj/WinDump.dsw
TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print`
-all: $(PROG)
+all: $(PROG) $(LIBNETDISSECT)
$(PROG): $(OBJ) @V_PCAPDEP@
@rm -f $@
@@ -283,7 +359,7 @@ $(PROG): $(OBJ) @V_PCAPDEP@
$(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
@rm -f $@
- $(AR) cr $@ $(LIBNETDISSECT_OBJ)
+ $(AR) cr $@ $(LIBNETDISSECT_OBJ)
$(RANLIB) $@
datalinks.o: $(srcdir)/missing/datalinks.c
@@ -292,8 +368,8 @@ dlnames.o: $(srcdir)/missing/dlnames.c
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
getnameinfo.o: $(srcdir)/missing/getnameinfo.c
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
-getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
- $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
+getopt_long.o: $(srcdir)/missing/getopt_long.c
+ $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c
inet_pton.o: $(srcdir)/missing/inet_pton.c
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
inet_ntop.o: $(srcdir)/missing/inet_ntop.c
@@ -302,6 +378,8 @@ inet_aton.o: $(srcdir)/missing/inet_aton.c
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
snprintf.o: $(srcdir)/missing/snprintf.c
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
+strdup.o: $(srcdir)/missing/strdup.c
+ $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c
strlcat.o: $(srcdir)/missing/strlcat.c
$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
strlcpy.o: $(srcdir)/missing/strlcpy.c
@@ -345,8 +423,10 @@ clean:
distclean:
rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
- config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1
- rm -rf autom4te.cache
+ config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 \
+ libnetdissect.a tests/.failed tests/.passed \
+ tests/failure-outputs.txt
+ rm -rf autom4te.cache tests/DIFF tests/NEW
check: tcpdump
(cd tests && ./TESTrun.sh)
@@ -368,4 +448,4 @@ testlist:
echo $(TEST_DIST)
depend: $(GENSRC)
- ${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
+ $(MKDEP) -c $(CC) -m $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC)
diff --git a/README b/README.md
index e7b5d65c69a0..c83ffab9f7b4 100644
--- a/README
+++ b/README.md
@@ -1,33 +1,35 @@
-@(#) $Header: /tcpdump/master/tcpdump/README,v 1.68 2008-12-15 00:05:27 guy Exp $ (LBL)
+# tcpdump
-TCPDUMP 4.x.y
-Now maintained by "The Tcpdump Group"
-See www.tcpdump.org
+[![Build
+Status](https://travis-ci.org/the-tcpdump-group/tcpdump.png)](https://travis-ci.org/the-tcpdump-group/tcpdump)
+
+TCPDUMP 4.x.y
+Now maintained by "The Tcpdump Group"
+See www.tcpdump.org
Please send inquiries/comments/reports to:
- tcpdump-workers@lists.tcpdump.org
+
+* tcpdump-workers@lists.tcpdump.org
Anonymous Git is available via:
- git clone git://bpf.tcpdump.org/tcpdump
-Version 4.x.y of TCPDUMP can be retrieved with the CVS tag "tcpdump_4_xrely":
- cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout -r tcpdump_4_xrely tcpdump
+ git clone git://bpf.tcpdump.org/tcpdump
-Please submit patches by forking the branch on GitHub at
+Please submit patches by forking the branch on GitHub at:
- http://github.com/mcr/tcpdump/tree/master
+* http://github.com/the-tcpdump-group/tcpdump/tree/master
and issuing a pull request.
-formerly from Lawrence Berkeley National Laboratory
- Network Research Group <tcpdump@ee.lbl.gov>
- ftp://ftp.ee.lbl.gov/tcpdump.tar.Z (3.4)
+formerly from Lawrence Berkeley National Laboratory
+ Network Research Group <tcpdump@ee.lbl.gov>
+ ftp://ftp.ee.lbl.gov/old/tcpdump.tar.Z (3.4)
This directory contains source code for tcpdump, a tool for network
monitoring and data acquisition. This software was originally
developed by the Network Research Group at the Lawrence Berkeley
National Laboratory. The original distribution is available via
-anonymous ftp to ftp.ee.lbl.gov, in tcpdump.tar.Z. More recent
+anonymous ftp to `ftp.ee.lbl.gov`, in `tcpdump.tar.Z`. More recent
development is performed at tcpdump.org, http://www.tcpdump.org/
Tcpdump uses libpcap, a system-independent interface for user-level
@@ -36,7 +38,7 @@ build libpcap, also originally from LBL and now being maintained by
tcpdump.org; see http://www.tcpdump.org/ .
Once libpcap is built (either install it or make sure it's in
-../libpcap), you can build tcpdump using the procedure in the INSTALL
+`../libpcap`), you can build tcpdump using the procedure in the `INSTALL.txt`
file.
The program is loosely based on SMI's "etherfind" although none of the
@@ -50,20 +52,20 @@ manual entry, with no access to the source of tcpdump or etherfind.
Over the past few years, tcpdump has been steadily improved by the
excellent contributions from the Internet community (just browse
-through the CHANGES file). We are grateful for all the input.
+through the `CHANGES` file). We are grateful for all the input.
Richard Stevens gives an excellent treatment of the Internet protocols
-in his book ``TCP/IP Illustrated, Volume 1''. If you want to learn more
+in his book *"TCP/IP Illustrated, Volume 1"*. If you want to learn more
about tcpdump and how to interpret its output, pick up this book.
Some tools for viewing and analyzing tcpdump trace files are available
from the Internet Traffic Archive:
- http://www.acm.org/sigcomm/ITA/
+* http://www.sigcomm.org/ITA/
Another tool that tcpdump users might find useful is tcpslice:
- ftp://ftp.ee.lbl.gov/tcpslice.tar.Z
+* https://github.com/the-tcpdump-group/tcpslice
It is a program that can be used to extract portions of tcpdump binary
trace files. See the above distribution for further details and
@@ -72,14 +74,14 @@ documentation.
Problems, bugs, questions, desirable enhancements, etc. should be sent
to the address "tcpdump-workers@lists.tcpdump.org". Bugs, support
requests, and feature requests may also be submitted on the GitHub issue
-tracker for tcpdump at
+tracker for tcpdump at:
- https://github.com/mcr/tcpdump/issues
+* https://github.com/the-tcpdump-group/tcpdump/issues
Source code contributions, etc. should be sent to the email address
-above or submitted by forking the branch on GitHub at
+above or submitted by forking the branch on GitHub at:
- http://github.com/mcr/tcpdump/tree/master
+* http://github.com/the-tcpdump-group/tcpdump/tree/master
and issuing a pull request.
@@ -90,6 +92,7 @@ Current versions can be found at www.tcpdump.org.
original text by: Steve McCanne, Craig Leres, Van Jacobson
-------------------------------------
+```
This directory also contains some short awk programs intended as
examples of ways to reduce tcpdump data when you're tracking
particular network problems:
@@ -237,3 +240,4 @@ The method was:
- Once a week, tell your funding agent that you're discovering
wonderful things and you'll write up that research report
"real soon now".
+```
diff --git a/VERSION b/VERSION
index fdc6698807a9..c78c4964cac9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.4.0
+4.6.2
diff --git a/acconfig.h b/acconfig.h
deleted file mode 100644
index 9eb54f8b3dfa..000000000000
--- a/acconfig.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* "generated automatically" means DO NOT MAKE CHANGES TO config.h.in --
- * make them to acconfig.h and rerun autoheader */
-@TOP@
-
-/* Define if you enable IPv6 support */
-#undef INET6
-
-/* Define if you enable support for the libsmi. */
-#undef LIBSMI
-
-/* define if you have the addrinfo function. */
-#undef HAVE_ADDRINFO
-
-/* define if you need to include missing/addrinfoh.h. */
-#undef NEED_ADDRINFO_H
-
-/* define ifyou have the h_errno variable. */
-#undef HAVE_H_ERRNO
-
-/* define if you have struct sockaddr_storage */
-#undef HAVE_SOCKADDR_STORAGE
-
-/* define if you have both getipnodebyname() and getipnodebyaddr() */
-#undef USE_GETIPNODEBY
-
-/* define if you have ether_ntohost() and it works */
-#undef USE_ETHER_NTOHOST
-
-/* define if libpcap has pcap_version */
-#undef HAVE_PCAP_VERSION
-
-/* define if libpcap has pcap_debug */
-#undef HAVE_PCAP_DEBUG
-
-/* define if libpcap has yydebug */
-#undef HAVE_YYDEBUG
-
-/* define if libpcap has pcap_list_datalinks() */
-#undef HAVE_PCAP_LIST_DATALINKS
-
-/* define if libpcap has pcap_set_datalink() */
-#undef HAVE_PCAP_SET_DATALINK
-
-/* define if libpcap has pcap_datalink_name_to_val() */
-#undef HAVE_PCAP_DATALINK_NAME_TO_VAL
-
-/* define if libpcap has pcap_datalink_val_to_description() */
-#undef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION
-
-/* define if libpcap has pcap_dump_ftell() */
-#undef HAVE_PCAP_DUMP_FTELL
-
-/* define if you have getrpcbynumber() */
-#undef HAVE_GETRPCBYNUMBER
-
-/* Workaround for missing 64-bit formats */
-#undef PRId64
-#undef PRIo64
-#undef PRIx64
-#undef PRIu64
-
-/* Whether or not to include the possibly-buggy SMB printer */
-#undef TCPDUMP_DO_SMB
-
-/* Define if you have the dnet_htoa function. */
-#undef HAVE_DNET_HTOA
-
-/* Define if you have a dnet_htoa declaration in <netdnet/dnetdb.h>. */
-#undef HAVE_NETDNET_DNETDB_H_DNET_HTOA
-
-/* define if should drop privileges by default */
-#undef WITH_USER
-
-/* define if should chroot when dropping privileges */
-#undef WITH_CHROOT
diff --git a/aclocal.m4 b/aclocal.m4
index 7573fae3be34..80614cf21050 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,5 +1,3 @@
-dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.116 2008-09-25 21:45:50 guy Exp $ (LBL)
-dnl
dnl Copyright (c) 1995, 1996, 1997, 1998
dnl The Regents of the University of California. All rights reserved.
dnl
@@ -38,16 +36,15 @@ dnl AC_LBL_C_INIT. Now, we run AC_LBL_C_INIT_BEFORE_CC, AC_PROG_CC,
dnl and AC_LBL_C_INIT at the top level.
dnl
AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC,
- [AC_PREREQ(2.50)
+[
AC_BEFORE([$0], [AC_LBL_C_INIT])
AC_BEFORE([$0], [AC_PROG_CC])
AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
AC_BEFORE([$0], [AC_LBL_DEVEL])
AC_ARG_WITH(gcc, [ --without-gcc don't use gcc])
- $1="-O"
- $2=""
+ $1=""
if test "${srcdir}" != "." ; then
- $2="-I$srcdir"
+ $1="-I$srcdir"
fi
if test "${CFLAGS+set}" = set; then
LBL_CFLAGS="$CFLAGS"
@@ -73,9 +70,15 @@ AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC,
dnl
dnl Determine which compiler we're using (cc or gcc)
dnl If using gcc, determine the version number
-dnl If using cc, require that it support ansi prototypes
-dnl If using gcc, use -O2 (otherwise use -O)
-dnl If using cc, explicitly specify /usr/local/include
+dnl If using cc:
+dnl require that it support ansi prototypes
+dnl use -O (AC_PROG_CC will use -g -O2 on gcc, so we don't need to
+dnl do that ourselves for gcc)
+dnl add -g flags, as appropriate
+dnl explicitly specify /usr/local/include
+dnl
+dnl NOTE WELL: with newer versions of autoconf, "gcc" means any compiler
+dnl that defines __GNUC__, which means clang, for example, counts as "gcc".
dnl
dnl usage:
dnl
@@ -87,92 +90,82 @@ dnl $1 (copt set)
dnl $2 (incls set)
dnl CC
dnl LDFLAGS
-dnl ac_cv_lbl_gcc_vers
dnl LBL_CFLAGS
dnl
AC_DEFUN(AC_LBL_C_INIT,
- [AC_PREREQ(2.50)
+[
AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
AC_BEFORE([$0], [AC_LBL_DEVEL])
AC_BEFORE([$0], [AC_LBL_SHLIBS_INIT])
if test "$GCC" = yes ; then
- if test "$SHLICC2" = yes ; then
- ac_cv_lbl_gcc_vers=2
- $1="-O2"
- else
- AC_MSG_CHECKING(gcc version)
- AC_CACHE_VAL(ac_cv_lbl_gcc_vers,
- ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \
- sed -e '/^gcc version /!d' \
- -e 's/^gcc version //' \
- -e 's/ .*//' -e 's/^[[[^0-9]]]*//' \
- -e 's/\..*//'`)
- AC_MSG_RESULT($ac_cv_lbl_gcc_vers)
- if test $ac_cv_lbl_gcc_vers -gt 1 ; then
- $1="-O2"
- fi
- fi
+ #
+ # -Werror forces warnings to be errors.
+ #
+ ac_lbl_cc_force_warning_errors=-Werror
+
+ #
+ # Use -ffloat-store so that, on 32-bit x86, we don't
+ # do 80-bit arithmetic with the FPU; that way we should
+ # get the same results for floating-point calculations
+ # on x86-32 and x86-64.
+ #
+ AC_LBL_CHECK_COMPILER_OPT($1, -ffloat-store)
else
- AC_MSG_CHECKING(that $CC handles ansi prototypes)
- AC_CACHE_VAL(ac_cv_lbl_cc_ansi_prototypes,
- AC_TRY_COMPILE(
- [#include <sys/types.h>],
- [int frob(int, char *)],
- ac_cv_lbl_cc_ansi_prototypes=yes,
- ac_cv_lbl_cc_ansi_prototypes=no))
- AC_MSG_RESULT($ac_cv_lbl_cc_ansi_prototypes)
- if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
- case "$host_os" in
-
- hpux*)
- AC_MSG_CHECKING(for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE))
- savedcflags="$CFLAGS"
- CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
- AC_CACHE_VAL(ac_cv_lbl_cc_hpux_cc_aa,
- AC_TRY_COMPILE(
- [#include <sys/types.h>],
- [int frob(int, char *)],
- ac_cv_lbl_cc_hpux_cc_aa=yes,
- ac_cv_lbl_cc_hpux_cc_aa=no))
- AC_MSG_RESULT($ac_cv_lbl_cc_hpux_cc_aa)
- if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
- AC_MSG_ERROR(see the INSTALL doc for more info)
- fi
- CFLAGS="$savedcflags"
- $1="-Aa $$1"
- AC_DEFINE(_HPUX_SOURCE,1,[needed on HP-UX])
- ;;
-
- osf*)
- AC_MSG_CHECKING(for ansi mode in DEC compiler ($CC -std1))
- savedcflags="$CFLAGS"
- CFLAGS="-std1"
- AC_CACHE_VAL(ac_cv_lbl_cc_osf1_cc_std1,
- AC_TRY_COMPILE(
- [#include <sys/types.h>],
- [int frob(int, char *)],
- ac_cv_lbl_cc_osf1_cc_std1=yes,
- ac_cv_lbl_cc_osf1_cc_std1=no))
- AC_MSG_RESULT($ac_cv_lbl_cc_osf1_cc_std1)
- if test $ac_cv_lbl_cc_osf1_cc_std1 = no ; then
- AC_MSG_ERROR(see the INSTALL doc for more info)
- fi
- CFLAGS="$savedcflags"
- $1="-std1 $$1"
- ;;
-
- *)
- AC_MSG_ERROR(see the INSTALL doc for more info)
- ;;
- esac
- fi
$2="$$2 -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
case "$host_os" in
+ darwin*)
+ #
+ # This is assumed either to be GCC or clang, both
+ # of which use -Werror to force warnings to be errors.
+ #
+ ac_lbl_cc_force_warning_errors=-Werror
+ ;;
+
+ hpux*)
+ #
+ # HP C, which is what we presume we're using, doesn't
+ # exit with a non-zero exit status if we hand it an
+ # invalid -W flag, can't be forced to do so even with
+ # +We, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ ;;
+
irix*)
- $1="$$1 -xansi -signed -O"
+ #
+ # MIPS C, which is what we presume we're using, doesn't
+ # necessarily exit with a non-zero exit status if we
+ # hand it an invalid -W flag, can't be forced to do
+ # so, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ #
+ # It also, apparently, defaults to "char" being
+ # unsigned, unlike most other C implementations;
+ # I suppose we could say "signed char" whenever
+ # we want to guarantee a signed "char", but let's
+ # just force signed chars.
+ #
+ # -xansi is normally the default, but the
+ # configure script was setting it; perhaps -cckr
+ # was the default in the Old Days. (Then again,
+ # that would probably be for backwards compatibility
+ # in the days when ANSI C was Shiny and New, i.e.
+ # 1989 and the early '90's, so maybe we can just
+ # drop support for those compilers.)
+ #
+ # -g is equivalent to -g2, which turns off
+ # optimization; we choose -g3, which generates
+ # debugging information but doesn't turn off
+ # optimization (even if the optimization would
+ # cause inaccuracies in debugging).
+ #
+ $1="$$1 -xansi -signed -g3"
;;
osf*)
@@ -180,7 +173,29 @@ AC_DEFUN(AC_LBL_C_INIT,
# Presumed to be DEC OSF/1, Digital UNIX, or
# Tru64 UNIX.
#
- $1="$$1 -O"
+ # The DEC C compiler, which is what we presume we're
+ # using, doesn't exit with a non-zero exit status if we
+ # hand it an invalid -W flag, can't be forced to do
+ # so, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ #
+ # -g is equivalent to -g2, which turns off
+ # optimization; we choose -g3, which generates
+ # debugging information but doesn't turn off
+ # optimization (even if the optimization would
+ # cause inaccuracies in debugging).
+ #
+ $1="$$1 -g3"
+ ;;
+
+ solaris*)
+ #
+ # Assumed to be Sun C, which requires -errwarn to force
+ # warnings to be treated as errors.
+ #
+ ac_lbl_cc_force_warning_errors=-errwarn
;;
ultrix*)
@@ -199,9 +214,148 @@ AC_DEFUN(AC_LBL_C_INIT,
fi
;;
esac
+ $1="$$1 -O"
fi
])
+dnl
+dnl Check whether the compiler option specified as the second argument
+dnl is supported by the compiler and, if so, add it to the macro
+dnl specified as the first argument
+dnl
+AC_DEFUN(AC_LBL_CHECK_COMPILER_OPT,
+ [
+ AC_MSG_CHECKING([whether the compiler supports the $2 option])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors $2"
+ AC_TRY_COMPILE(
+ [],
+ [return 0],
+ [
+ AC_MSG_RESULT([yes])
+ CFLAGS="$save_CFLAGS"
+ $1="$$1 $2"
+ ],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$save_CFLAGS"
+ ])
+ ])
+
+dnl
+dnl Check whether the compiler supports an option to generate
+dnl Makefile-style dependency lines
+dnl
+dnl GCC uses -M for this. Non-GCC compilers that support this
+dnl use a variety of flags, including but not limited to -M.
+dnl
+dnl We test whether the flag in question is supported, as older
+dnl versions of compilers might not support it.
+dnl
+dnl We don't try all the possible flags, just in case some flag means
+dnl "generate dependencies" on one compiler but means something else
+dnl on another compiler.
+dnl
+dnl Most compilers that support this send the output to the standard
+dnl output by default. IBM's XLC, however, supports -M but sends
+dnl the output to {sourcefile-basename}.u, and AIX has no /dev/stdout
+dnl to work around that, so we don't bother with XLC.
+dnl
+AC_DEFUN(AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT,
+ [
+ AC_MSG_CHECKING([whether the compiler supports generating dependencies])
+ if test "$GCC" = yes ; then
+ #
+ # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
+ # though it's not); we assume that, in this case, the flag
+ # would be -M.
+ #
+ ac_lbl_dependency_flag="-M"
+ else
+ #
+ # Not GCC or a compiler deemed to be GCC; what platform is
+ # this? (We're assuming that if the compiler isn't GCC
+ # it's the compiler from the vendor of the OS; that won't
+ # necessarily be true for x86 platforms, where it might be
+ # the Intel C compiler.)
+ #
+ case "$host_os" in
+
+ irix*|osf*|darwin*)
+ #
+ # MIPS C for IRIX, DEC C, and clang all use -M.
+ #
+ ac_lbl_dependency_flag="-M"
+ ;;
+
+ solaris*)
+ #
+ # Sun C uses -xM.
+ #
+ ac_lbl_dependency_flag="-xM"
+ ;;
+
+ hpux*)
+ #
+ # HP's older C compilers don't support this.
+ # HP's newer C compilers support this with
+ # either +M or +Make; the older compilers
+ # interpret +M as something completely
+ # different, so we use +Make so we don't
+ # think it works with the older compilers.
+ #
+ ac_lbl_dependency_flag="+Make"
+ ;;
+
+ *)
+ #
+ # Not one of the above; assume no support for
+ # generating dependencies.
+ #
+ ac_lbl_dependency_flag=""
+ ;;
+ esac
+ fi
+
+ #
+ # Is ac_lbl_dependency_flag defined and, if so, does the compiler
+ # complain about it?
+ #
+ # Note: clang doesn't seem to exit with an error status when handed
+ # an unknown non-warning error, even if you pass it
+ # -Werror=unknown-warning-option. However, it always supports
+ # -M, so the fact that this test always succeeds with clang
+ # isn't an issue.
+ #
+ if test ! -z "$ac_lbl_dependency_flag"; then
+ AC_LANG_CONFTEST(
+ [AC_LANG_SOURCE([[int main(void) { return 0; }]])])
+ echo "$CC" $ac_lbl_dependency_flag conftest.c >&5
+ if "$CC" $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1; then
+ AC_MSG_RESULT([yes, with $ac_lbl_dependency_flag])
+ DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
+ MKDEP='${srcdir}/mkdep'
+ else
+ AC_MSG_RESULT([no])
+ #
+ # We can't run mkdep, so have "make depend" do
+ # nothing.
+ #
+ MKDEP=:
+ fi
+ rm -rf conftest*
+ else
+ AC_MSG_RESULT([no])
+ #
+ # We can't run mkdep, so have "make depend" do
+ # nothing.
+ #
+ MKDEP=:
+ fi
+ AC_SUBST(DEPENDENCY_CFLAG)
+ AC_SUBST(MKDEP)
+ ])
+
#
# Try compiling a sample of the type of code that appears in
# gencode.c with "inline", "__inline__", and "__inline".
@@ -289,7 +443,9 @@ AC_DEFUN(AC_LBL_LIBPCAP,
lastdir=FAIL
places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
egrep '/libpcap-[[0-9]]+\.[[0-9]]+(\.[[0-9]]*)?([[ab]][[0-9]]*|-PRE-GIT)?$'`
- for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
+ places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
+ egrep '/libpcap-[[0-9]]+\.[[0-9]]+(\.[[0-9]]*)?([[ab]][[0-9]]*|-PRE-GIT)?$'`
+ for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
basedir=`echo $dir | sed -e 's/[[ab]][[0-9]]*$//' | \
sed -e 's/-PRE-GIT$//' `
if test $lastdir = $basedir ; then
@@ -372,13 +528,23 @@ AC_DEFUN(AC_LBL_LIBPCAP,
$1=$libpcap
places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
egrep '/libpcap-[[0-9]]*.[[0-9]]*(.[[0-9]]*)?([[ab]][[0-9]]*)?$'`
+ places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
+ egrep '/libpcap-[[0-9]]*.[[0-9]]*(.[[0-9]]*)?([[ab]][[0-9]]*)?$'`
+ pcapH=FAIL
if test -r $d/pcap.h; then
- $2="-I$d $$2"
- elif test -r $places/pcap.h; then
- $2="-I$places $$2"
+ pcapH=$d
else
- AC_MSG_ERROR(cannot find pcap.h, see INSTALL)
+ for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
+ if test -r $dir/pcap.h ; then
+ pcapH=$dir
+ fi
+ done
+ fi
+
+ if test $pcapH = FAIL ; then
+ AC_MSG_ERROR(cannot find pcap.h: see INSTALL)
fi
+ $2="-I$pcapH $$2"
AC_MSG_RESULT($libpcap)
AC_PATH_PROG(PCAP_CONFIG, pcap-config,, $d)
if test -n "$PCAP_CONFIG"; then
@@ -461,17 +627,22 @@ reproduce this problem ourselves.])
dnl if they're not present.
dnl
AC_CHECK_FUNC(pcap_list_datalinks,
- AC_DEFINE(HAVE_PCAP_LIST_DATALINKS),
+ [
+ AC_DEFINE(HAVE_PCAP_LIST_DATALINKS, 1,
+ [define if libpcap has pcap_list_datalinks()])
+ AC_CHECK_FUNCS(pcap_free_datalinks)
+ ],
[
AC_LIBOBJ(datalinks)
])
- AC_CHECK_FUNC(pcap_set_datalink,
- AC_DEFINE(HAVE_PCAP_SET_DATALINK))
+ AC_CHECK_FUNCS(pcap_set_datalink)
AC_CHECK_FUNC(pcap_datalink_name_to_val,
[
- AC_DEFINE(HAVE_PCAP_DATALINK_NAME_TO_VAL)
+ AC_DEFINE(HAVE_PCAP_DATALINK_NAME_TO_VAL, 1,
+ [define if libpcap has pcap_datalink_name_to_val()])
AC_CHECK_FUNC(pcap_datalink_val_to_description,
- AC_DEFINE(HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION),
+ AC_DEFINE(HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION, 1,
+ [define if libpcap has pcap_datalink_val_to_description()]),
[
AC_LIBOBJ(dlnames)
])
@@ -490,8 +661,10 @@ reproduce this problem ourselves.])
dnl
dnl Check for "pcap_dump_ftell()" and use a substitute version
dnl if it's not present.
+ dnl
AC_CHECK_FUNC(pcap_dump_ftell,
- AC_DEFINE(HAVE_PCAP_DUMP_FTELL),
+ AC_DEFINE(HAVE_PCAP_DUMP_FTELL, 1,
+ [define if libpcap has pcap_dump_ftell()]),
[
AC_LIBOBJ(pcap_dump_ftell)
])
@@ -660,15 +833,12 @@ AC_DEFUN(AC_LBL_CHECK_64BIT_FORMAT,
# ifdef HAVE_INTTYPES_H
#include <inttypes.h>
# endif
-# ifdef HAVE_SYS_BITYPES_H
- #include <sys/bitypes.h>
-# endif
#include <stdio.h>
#include <sys/types.h>
main()
{
- u_int64_t t = 1;
+ uint64_t t = 1;
char strbuf[16+1];
sprintf(strbuf, "%016$1x", t << 32);
if (strcmp(strbuf, "0000000100000000") == 0)
@@ -679,10 +849,10 @@ AC_DEFUN(AC_LBL_CHECK_64BIT_FORMAT,
]])
],
[
- AC_DEFINE(PRId64, "$1d")
- AC_DEFINE(PRIo64, "$1o")
- AC_DEFINE(PRIx64, "$1x")
- AC_DEFINE(PRIu64, "$1u")
+ AC_DEFINE(PRId64, "$1d", [define if the platform doesn't define PRId64])
+ AC_DEFINE(PRIo64, "$1o", [define if the platform doesn't define PRIo64])
+ AC_DEFINE(PRIx64, "$1x", [define if the platform doesn't define PRIu64])
+ AC_DEFINE(PRIu64, "$1u", [define if the platform doesn't define PRIx64])
AC_MSG_RESULT(yes)
],
[
@@ -792,10 +962,8 @@ EOF
fi])
dnl
-dnl If using gcc and the file .devel exists:
-dnl Compile with -g (if supported) and -Wall
-dnl If using gcc 2 or later, do extra prototype checking and some other
-dnl checks
+dnl If the file .devel exists:
+dnl Add some warning flags if the compiler supports them
dnl If an os prototype include exists, symlink os-proto.h to it
dnl
dnl usage:
@@ -814,27 +982,26 @@ AC_DEFUN(AC_LBL_DEVEL,
$1="$$1 ${LBL_CFLAGS}"
fi
if test -f .devel ; then
- if test "$GCC" = yes ; then
- if test "${LBL_CFLAGS+set}" != set; then
- if test "$ac_cv_prog_cc_g" = yes ; then
- $1="-g $$1"
- fi
- $1="$$1 -Wall"
- if test $ac_cv_lbl_gcc_vers -gt 1 ; then
- $1="$$1 -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wpointer-arith -W"
- fi
- fi
- else
- case "$host_os" in
-
- irix6*)
- V_CCOPT="$V_CCOPT -n32"
- ;;
-
- *)
- ;;
- esac
+ #
+ # Skip all the warning option stuff on some compilers.
+ #
+ if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wall)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wmissing-prototypes)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wstrict-prototypes)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wwrite-strings)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wpointer-arith)
+ AC_LBL_CHECK_COMPILER_OPT($1, -W)
fi
+ AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT()
+ #
+ # We used to set -n32 for IRIX 6 when not using GCC (presumed
+ # to mean that we're using MIPS C or MIPSpro C); it specified
+ # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
+ # not sure why that would be something to do *only* with a
+ # .devel file; why should the ABI for which we produce code
+ # depend on .devel?
+ #
os=`echo $host_os | sed -e 's/\([[0-9]][[0-9]]*\)[[^0-9]].*$/\1/'`
name="lbl/os-$os.h"
if test -f $name ; then
@@ -977,7 +1144,7 @@ dnl documentation and/or other materials provided with the distribution.
dnl 3. Neither the name of the project nor the names of its contributors
dnl may be used to endorse or promote products derived from this software
dnl without specific prior written permission.
-dnl
+dnl
dnl THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
dnl ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1037,9 +1204,11 @@ AC_DEFUN(AC_STRUCT_ADDRINFO, [
$1=no))
AC_MSG_RESULT($$1)
if test $$1 = yes; then
- AC_DEFINE(HAVE_ADDRINFO)
+ AC_DEFINE(HAVE_ADDRINFO, 1,
+ [define if you have the addrinfo function])
else
- AC_DEFINE(NEED_ADDRINFO_H)
+ AC_DEFINE(NEED_ADDRINFO_H, 1,
+ [define if you need to include missing/addrinfo.h])
fi
])
@@ -1090,7 +1259,8 @@ AC_DEFUN(AC_STRUCT_SA_STORAGE, [
$1=no))
AC_MSG_RESULT($$1)
if test $$1 = yes; then
- AC_DEFINE(HAVE_SOCKADDR_STORAGE)
+ AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1,
+ [define if you have struct sockaddr_storage])
fi
])
@@ -1107,7 +1277,8 @@ AC_DEFUN(AC_VAR_H_ERRNO, [
ac_cv_var_h_errno=no))
AC_MSG_RESULT($ac_cv_var_h_errno)
if test "$ac_cv_var_h_errno" = "yes"; then
- AC_DEFINE(HAVE_H_ERRNO)
+ AC_DEFINE(HAVE_H_ERRNO, 1,
+ [define if you have the h_errno variable])
fi
])
@@ -1140,8 +1311,11 @@ ac_cv___attribute__=yes,
ac_cv___attribute__=no)])
if test "$ac_cv___attribute__" = "yes"; then
AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
- V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
else
+ #
+ # We can't use __attribute__, so we can't use __attribute__((unused)),
+ # so we define _U_ to an empty string.
+ #
V_DEFS="$V_DEFS -D_U_=\"\""
fi
AC_MSG_RESULT($ac_cv___attribute__)
@@ -1149,6 +1323,70 @@ AC_MSG_RESULT($ac_cv___attribute__)
dnl
+dnl Test whether __attribute__((unused)) can be used without warnings
+dnl
+
+AC_DEFUN(AC_C___ATTRIBUTE___UNUSED, [
+AC_MSG_CHECKING([whether __attribute__((unused)) can be used without warnings])
+AC_CACHE_VAL(ac_cv___attribute___unused, [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+AC_COMPILE_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+main(int argc __attribute((unused)), char **argv __attribute((unused)))
+{
+ printf("Hello, world!\n");
+ return 0;
+}
+ ]])],
+ac_cv___attribute___unused=yes,
+ac_cv___attribute___unused=no)])
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___unused" = "yes"; then
+ V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
+else
+ V_DEFS="$V_DEFS -D_U_=\"\""
+fi
+AC_MSG_RESULT($ac_cv___attribute___unused)
+])
+
+dnl
+dnl Test whether __attribute__((format)) can be used without warnings
+dnl
+
+AC_DEFUN(AC_C___ATTRIBUTE___FORMAT, [
+AC_MSG_CHECKING([whether __attribute__((format)) can be used without warnings])
+AC_CACHE_VAL(ac_cv___attribute___format, [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+AC_COMPILE_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdlib.h>
+
+extern int foo(const char *fmt, ...)
+ __attribute__ ((format (printf, 1, 2)));
+
+int
+main(int argc, char **argv)
+{
+ foo("%s", "test");
+}
+ ]])],
+ac_cv___attribute___format=yes,
+ac_cv___attribute___format=no)])
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___format" = "yes"; then
+ AC_DEFINE(__ATTRIBUTE___FORMAT_OK, 1,
+ [define if your compiler allows __attribute__((format)) without a warning])
+fi
+AC_MSG_RESULT($ac_cv___attribute___format)
+])
+
+dnl
dnl Test whether __attribute__((format)) can be applied to function
dnl pointers
dnl
@@ -1178,6 +1416,34 @@ fi
AC_MSG_RESULT($ac_cv___attribute___format_function_pointer)
])
+AC_DEFUN(AC_C___ATTRIBUTE___NORETURN_FUNCTION_POINTER, [
+AC_MSG_CHECKING([whether __attribute__((noreturn)) can be applied to function pointers without warnings])
+AC_CACHE_VAL(ac_cv___attribute___noreturn_function_pointer, [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+AC_COMPILE_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdlib.h>
+
+extern int (*foo)(int i)
+ __attribute__ ((noreturn));
+
+int
+main(int argc, char **argv)
+{
+ (*foo)(1);
+}
+ ]])],
+ac_cv___attribute___noreturn_function_pointer=yes,
+ac_cv___attribute___noreturn_function_pointer=no)])
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___noreturn_function_pointer" = "yes"; then
+ AC_DEFINE(__ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS, 1,
+ [define if your compiler allows __attribute__((noreturn)) to be applied to function pointers])
+fi
+AC_MSG_RESULT($ac_cv___attribute___noreturn_function_pointer)
+])
+
AC_DEFUN(AC_LBL_SSLEAY,
[
#
diff --git a/addrtoname.c b/addrtoname.c
index c92870dc324a..eb0b2aeefe1f 100644
--- a/addrtoname.c
+++ b/addrtoname.c
@@ -21,11 +21,8 @@
* Internet, ethernet, port, and protocol string to address
* and address to string conversion routines
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.119 2007-08-08 14:06:34 hannes Exp $ (LBL)";
-#endif
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -81,7 +78,7 @@ extern int ether_ntohost(char *, const struct ether_addr *);
#define HASHNAMESIZE 4096
struct hnamemem {
- u_int32_t addr;
+ uint32_t addr;
const char *name;
struct hnamemem *nxt;
};
@@ -158,7 +155,7 @@ static struct enamemem nsaptable[HASHNAMESIZE];
static struct enamemem bytestringtable[HASHNAMESIZE];
struct protoidmem {
- u_int32_t p_oui;
+ uint32_t p_oui;
u_short p_proto;
const char *p_name;
struct protoidmem *p_nxt;
@@ -170,7 +167,7 @@ static struct protoidmem protoidtable[HASHNAMESIZE];
* A faster replacement for inet_ntoa().
*/
const char *
-intoa(u_int32_t addr)
+intoa(uint32_t addr)
{
register char *cp;
register u_int byte;
@@ -199,8 +196,8 @@ intoa(u_int32_t addr)
return cp + 1;
}
-static u_int32_t f_netmask;
-static u_int32_t f_localnet;
+static uint32_t f_netmask;
+static uint32_t f_localnet;
/*
* Return a name for the IP address pointed to by ap. This address
@@ -222,10 +219,10 @@ static u_int32_t f_localnet;
* also needs to check whether they're present in the packet buffer.
*/
const char *
-getname(const u_char *ap)
+getname(netdissect_options *ndo, const u_char *ap)
{
register struct hostent *hp;
- u_int32_t addr;
+ uint32_t addr;
static struct hnamemem *p; /* static for longjmp() */
memcpy(&addr, ap, sizeof(addr));
@@ -244,14 +241,14 @@ getname(const u_char *ap)
* given, f_netmask and f_localnet are 0 and the test
* evaluates to true)
*/
- if (!nflag &&
+ if (!ndo->ndo_nflag &&
(addr & f_netmask) == f_localnet) {
hp = gethostbyaddr((char *)&addr, 4, AF_INET);
if (hp) {
char *dotp;
p->name = strdup(hp->h_name);
- if (Nflag) {
+ if (ndo->ndo_Nflag) {
/* Remove domain qualifications */
dotp = strchr(p->name, '.');
if (dotp)
@@ -270,33 +267,39 @@ getname(const u_char *ap)
* is assumed to be in network byte order.
*/
const char *
-getname6(const u_char *ap)
+getname6(netdissect_options *ndo, const u_char *ap)
{
register struct hostent *hp;
- struct in6_addr addr;
+ union {
+ struct in6_addr addr;
+ struct for_hash_addr {
+ char fill[14];
+ uint16_t d;
+ } addra;
+ } addr;
static struct h6namemem *p; /* static for longjmp() */
register const char *cp;
char ntop_buf[INET6_ADDRSTRLEN];
memcpy(&addr, ap, sizeof(addr));
- p = &h6nametable[*(u_int16_t *)&addr.s6_addr[14] & (HASHNAMESIZE-1)];
+ p = &h6nametable[addr.addra.d & (HASHNAMESIZE-1)];
for (; p->nxt; p = p->nxt) {
if (memcmp(&p->addr, &addr, sizeof(addr)) == 0)
return (p->name);
}
- p->addr = addr;
+ p->addr = addr.addr;
p->nxt = newh6namemem();
/*
* Do not print names if -n was given.
*/
- if (!nflag) {
+ if (!ndo->ndo_nflag) {
hp = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET6);
if (hp) {
char *dotp;
p->name = strdup(hp->h_name);
- if (Nflag) {
+ if (ndo->ndo_Nflag) {
/* Remove domain qualifications */
dotp = strchr(p->name, '.');
if (dotp)
@@ -464,7 +467,7 @@ lookup_protoid(const u_char *pi)
}
const char *
-etheraddr_string(register const u_char *ep)
+etheraddr_string(netdissect_options *ndo, register const u_char *ep)
{
register int i;
register char *cp;
@@ -476,7 +479,7 @@ etheraddr_string(register const u_char *ep)
if (tp->e_name)
return (tp->e_name);
#ifdef USE_ETHER_NTOHOST
- if (!nflag) {
+ if (!ndo->ndo_nflag) {
char buf2[BUFSIZE];
/*
@@ -501,7 +504,7 @@ etheraddr_string(register const u_char *ep)
*cp++ = hex[*ep++ & 0xf];
}
- if (!nflag) {
+ if (!ndo->ndo_nflag) {
snprintf(cp, BUFSIZE - (2 + 5*3), " (oui %s)",
tok2str(oui_values, "Unknown", oui));
} else
@@ -539,7 +542,7 @@ le64addr_string(const u_char *ep)
}
const char *
-linkaddr_string(const u_char *ep, const unsigned int type, const unsigned int len)
+linkaddr_string(netdissect_options *ndo, const u_char *ep, const unsigned int type, const unsigned int len)
{
register u_int i;
register char *cp;
@@ -549,7 +552,7 @@ linkaddr_string(const u_char *ep, const unsigned int type, const unsigned int le
return ("<empty>");
if (type == LINKADDR_ETHER && len == ETHER_ADDR_LEN)
- return (etheraddr_string(ep));
+ return (etheraddr_string(ndo, ep));
if (type == LINKADDR_FRELAY)
return (q922_string(ep));
@@ -577,7 +580,7 @@ etherproto_string(u_short port)
{
register char *cp;
register struct hnamemem *tp;
- register u_int32_t i = port;
+ register uint32_t i = port;
char buf[sizeof("0000")];
for (tp = &eprototable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
@@ -660,7 +663,7 @@ const char *
tcpport_string(u_short port)
{
register struct hnamemem *tp;
- register u_int32_t i = port;
+ register uint32_t i = port;
char buf[sizeof("00000")];
for (tp = &tporttable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
@@ -679,7 +682,7 @@ const char *
udpport_string(register u_short port)
{
register struct hnamemem *tp;
- register u_int32_t i = port;
+ register uint32_t i = port;
char buf[sizeof("00000")];
for (tp = &uporttable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
@@ -699,7 +702,7 @@ ipxsap_string(u_short port)
{
register char *cp;
register struct hnamemem *tp;
- register u_int32_t i = port;
+ register uint32_t i = port;
char buf[sizeof("0000")];
for (tp = &ipxsaptable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
@@ -721,7 +724,7 @@ ipxsap_string(u_short port)
}
static void
-init_servarray(void)
+init_servarray(netdissect_options *ndo)
{
struct servent *sv;
register struct hnamemem *table;
@@ -740,7 +743,7 @@ init_servarray(void)
while (table->name)
table = table->nxt;
- if (nflag) {
+ if (ndo->ndo_nflag) {
(void)snprintf(buf, sizeof(buf), "%d", port);
table->name = strdup(buf);
} else
@@ -753,7 +756,7 @@ init_servarray(void)
/* in libpcap.a (nametoaddr.c) */
#if defined(WIN32) && !defined(USE_STATIC_LIBPCAP)
-__declspec(dllimport)
+extern __declspec(dllimport)
#else
extern
#endif
@@ -1129,32 +1132,32 @@ init_ipxsaparray(void)
/*
* Initialize the address to name translation machinery. We map all
- * non-local IP addresses to numeric addresses if fflag is true (i.e.,
- * to prevent blocking on the nameserver). localnet is the IP address
+ * non-local IP addresses to numeric addresses if ndo->ndo_fflag is true
+ * (i.e., to prevent blocking on the nameserver). localnet is the IP address
* of the local network. mask is its subnet mask.
*/
void
-init_addrtoname(u_int32_t localnet, u_int32_t mask)
+init_addrtoname(netdissect_options *ndo, uint32_t localnet, uint32_t mask)
{
- if (fflag) {
+ if (ndo->ndo_fflag) {
f_localnet = localnet;
f_netmask = mask;
}
- if (nflag)
+ if (ndo->ndo_nflag)
/*
* Simplest way to suppress names.
*/
return;
init_etherarray();
- init_servarray();
+ init_servarray(ndo);
init_eprotoarray();
init_protoidarray();
init_ipxsaparray();
}
const char *
-dnaddr_string(u_short dnaddr)
+dnaddr_string(netdissect_options *ndo, u_short dnaddr)
{
register struct hnamemem *tp;
@@ -1165,7 +1168,7 @@ dnaddr_string(u_short dnaddr)
tp->addr = dnaddr;
tp->nxt = newhnamemem();
- if (nflag)
+ if (ndo->ndo_nflag)
tp->name = dnnum_string(dnaddr);
else
tp->name = dnname_string(dnaddr);
diff --git a/addrtoname.h b/addrtoname.h
index cd5c41f4a5ff..252c570e401d 100644
--- a/addrtoname.h
+++ b/addrtoname.h
@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/addrtoname.h,v 1.20 2007-08-08 14:06:34 hannes Exp $ (LBL)
*/
/* Name to address translation routines. */
@@ -32,25 +30,29 @@ enum {
#define BUFSIZE 128
-extern const char *linkaddr_string(const u_char *, const unsigned int, const unsigned int);
-extern const char *etheraddr_string(const u_char *);
+extern const char *linkaddr_string(netdissect_options *, const u_char *, const unsigned int, const unsigned int);
+extern const char *etheraddr_string(netdissect_options *, const u_char *);
extern const char *le64addr_string(const u_char *);
extern const char *etherproto_string(u_short);
extern const char *tcpport_string(u_short);
extern const char *udpport_string(u_short);
-extern const char *getname(const u_char *);
+extern const char *isonsap_string(const u_char *, register u_int);
+extern const char *dnaddr_string(netdissect_options *, u_short);
+extern const char *protoid_string(const u_char *);
+extern const char *ipxsap_string(u_short);
+extern const char *getname(netdissect_options *, const u_char *);
#ifdef INET6
-extern const char *getname6(const u_char *);
+extern const char *getname6(netdissect_options *, const u_char *);
#endif
-extern const char *intoa(u_int32_t);
+extern const char *intoa(uint32_t);
-extern void init_addrtoname(u_int32_t, u_int32_t);
+extern void init_addrtoname(netdissect_options *, uint32_t, uint32_t);
extern struct hnamemem *newhnamemem(void);
#ifdef INET6
extern struct h6namemem *newh6namemem(void);
#endif
-#define ipaddr_string(p) getname((const u_char *)(p))
+#define ipaddr_string(ndo, p) getname(ndo, (const u_char *)(p))
#ifdef INET6
-#define ip6addr_string(p) getname6((const u_char *)(p))
+#define ip6addr_string(ndo, p) getname6(ndo, (const u_char *)(p))
#endif
diff --git a/af.c b/af.c
index 2c8a928e02ad..bea6d977763f 100644
--- a/af.c
+++ b/af.c
@@ -15,11 +15,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/af.c,v 1.3 2006-03-23 14:58:44 hannes Exp $ (LBL)";
-#endif
-
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/af.h b/af.h
index 679cc8e5fa18..bbe1a16f4f94 100644
--- a/af.h
+++ b/af.h
@@ -1,5 +1,3 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/af.h,v 1.3 2006-03-23 14:58:44 hannes Exp $ (LBL) */
-
/*
* Copyright (c) 1998-2006 The TCPDUMP project
*
diff --git a/ah.h b/ah.h
index c22806afe850..d87a087e1a89 100644
--- a/ah.h
+++ b/ah.h
@@ -38,19 +38,19 @@
#define _NETINET6_AH_H_
struct ah {
- u_int8_t ah_nxt; /* Next Header */
- u_int8_t ah_len; /* Length of data, in 32bit */
- u_int16_t ah_reserve; /* Reserved for future use */
- u_int32_t ah_spi; /* Security parameter index */
+ uint8_t ah_nxt; /* Next Header */
+ uint8_t ah_len; /* Length of data, in 32bit */
+ uint16_t ah_reserve; /* Reserved for future use */
+ uint32_t ah_spi; /* Security parameter index */
/* variable size, 32bit bound*/ /* Authentication data */
};
struct newah {
- u_int8_t ah_nxt; /* Next Header */
- u_int8_t ah_len; /* Length of data + 1, in 32bit */
- u_int16_t ah_reserve; /* Reserved for future use */
- u_int32_t ah_spi; /* Security parameter index */
- u_int32_t ah_seq; /* Sequence number field */
+ uint8_t ah_nxt; /* Next Header */
+ uint8_t ah_len; /* Length of data + 1, in 32bit */
+ uint16_t ah_reserve; /* Reserved for future use */
+ uint32_t ah_spi; /* Security parameter index */
+ uint32_t ah_seq; /* Sequence number field */
/* variable size, 32bit bound*/ /* Authentication data */
};
diff --git a/aodv.h b/aodv.h
deleted file mode 100644
index 456ec8b309ed..000000000000
--- a/aodv.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/aodv.h,v 1.3 2003-09-13 01:34:42 guy Exp $ (LBL) */
-/*
- * Copyright (c) 2003 Bruce M. Simpson <bms@spc.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Bruce M. Simpson.
- * 4. Neither the name of Bruce M. Simpson nor the names of co-
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY Bruce M. Simpson AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Bruce M. Simpson OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef _AODV_H_
-#define _AODV_H_
-
-struct aodv_rreq {
- u_int8_t rreq_type; /* AODV message type (1) */
- u_int8_t rreq_flags; /* various flags */
- u_int8_t rreq_zero0; /* reserved, set to zero */
- u_int8_t rreq_hops; /* number of hops from originator */
- u_int32_t rreq_id; /* request ID */
- u_int32_t rreq_da; /* destination IPv4 address */
- u_int32_t rreq_ds; /* destination sequence number */
- u_int32_t rreq_oa; /* originator IPv4 address */
- u_int32_t rreq_os; /* originator sequence number */
-};
-#ifdef INET6
-struct aodv_rreq6 {
- u_int8_t rreq_type; /* AODV message type (1) */
- u_int8_t rreq_flags; /* various flags */
- u_int8_t rreq_zero0; /* reserved, set to zero */
- u_int8_t rreq_hops; /* number of hops from originator */
- u_int32_t rreq_id; /* request ID */
- struct in6_addr rreq_da; /* destination IPv6 address */
- u_int32_t rreq_ds; /* destination sequence number */
- struct in6_addr rreq_oa; /* originator IPv6 address */
- u_int32_t rreq_os; /* originator sequence number */
-};
-struct aodv_rreq6_draft_01 {
- u_int8_t rreq_type; /* AODV message type (16) */
- u_int8_t rreq_flags; /* various flags */
- u_int8_t rreq_zero0; /* reserved, set to zero */
- u_int8_t rreq_hops; /* number of hops from originator */
- u_int32_t rreq_id; /* request ID */
- u_int32_t rreq_ds; /* destination sequence number */
- u_int32_t rreq_os; /* originator sequence number */
- struct in6_addr rreq_da; /* destination IPv6 address */
- struct in6_addr rreq_oa; /* originator IPv6 address */
-};
-#endif
-
-#define RREQ_JOIN 0x80 /* join (reserved for multicast */
-#define RREQ_REPAIR 0x40 /* repair (reserved for multicast */
-#define RREQ_GRAT 0x20 /* gratuitous RREP */
-#define RREQ_DEST 0x10 /* destination only */
-#define RREQ_UNKNOWN 0x08 /* unknown destination sequence num */
-#define RREQ_FLAGS_MASK 0xF8 /* mask for rreq_flags */
-
-struct aodv_rrep {
- u_int8_t rrep_type; /* AODV message type (2) */
- u_int8_t rrep_flags; /* various flags */
- u_int8_t rrep_ps; /* prefix size */
- u_int8_t rrep_hops; /* number of hops from o to d */
- u_int32_t rrep_da; /* destination IPv4 address */
- u_int32_t rrep_ds; /* destination sequence number */
- u_int32_t rrep_oa; /* originator IPv4 address */
- u_int32_t rrep_life; /* lifetime of this route */
-};
-#ifdef INET6
-struct aodv_rrep6 {
- u_int8_t rrep_type; /* AODV message type (2) */
- u_int8_t rrep_flags; /* various flags */
- u_int8_t rrep_ps; /* prefix size */
- u_int8_t rrep_hops; /* number of hops from o to d */
- struct in6_addr rrep_da; /* destination IPv6 address */
- u_int32_t rrep_ds; /* destination sequence number */
- struct in6_addr rrep_oa; /* originator IPv6 address */
- u_int32_t rrep_life; /* lifetime of this route */
-};
-struct aodv_rrep6_draft_01 {
- u_int8_t rrep_type; /* AODV message type (17) */
- u_int8_t rrep_flags; /* various flags */
- u_int8_t rrep_ps; /* prefix size */
- u_int8_t rrep_hops; /* number of hops from o to d */
- u_int32_t rrep_ds; /* destination sequence number */
- struct in6_addr rrep_da; /* destination IPv6 address */
- struct in6_addr rrep_oa; /* originator IPv6 address */
- u_int32_t rrep_life; /* lifetime of this route */
-};
-#endif
-
-#define RREP_REPAIR 0x80 /* repair (reserved for multicast */
-#define RREP_ACK 0x40 /* acknowledgement required */
-#define RREP_FLAGS_MASK 0xC0 /* mask for rrep_flags */
-#define RREP_PREFIX_MASK 0x1F /* mask for prefix size */
-
-struct rerr_unreach {
- u_int32_t u_da; /* IPv4 address */
- u_int32_t u_ds; /* sequence number */
-};
-#ifdef INET6
-struct rerr_unreach6 {
- struct in6_addr u_da; /* IPv6 address */
- u_int32_t u_ds; /* sequence number */
-};
-struct rerr_unreach6_draft_01 {
- struct in6_addr u_da; /* IPv6 address */
- u_int32_t u_ds; /* sequence number */
-};
-#endif
-
-struct aodv_rerr {
- u_int8_t rerr_type; /* AODV message type (3 or 18) */
- u_int8_t rerr_flags; /* various flags */
- u_int8_t rerr_zero0; /* reserved, set to zero */
- u_int8_t rerr_dc; /* destination count */
- union {
- struct rerr_unreach dest[1];
-#ifdef INET6
- struct rerr_unreach6 dest6[1];
- struct rerr_unreach6_draft_01 dest6_draft_01[1];
-#endif
- } r;
-};
-
-#define RERR_NODELETE 0x80 /* don't delete the link */
-#define RERR_FLAGS_MASK 0x80 /* mask for rerr_flags */
-
-struct aodv_rrep_ack {
- u_int8_t ra_type;
- u_int8_t ra_zero0;
-};
-
-union aodv {
- struct aodv_rreq rreq;
- struct aodv_rrep rrep;
- struct aodv_rerr rerr;
- struct aodv_rrep_ack rrep_ack;
-#ifdef INET6
- struct aodv_rreq6 rreq6;
- struct aodv_rreq6_draft_01 rreq6_draft_01;
- struct aodv_rrep6 rrep6;
- struct aodv_rrep6_draft_01 rrep6_draft_01;
-#endif
-};
-
-#define AODV_RREQ 1 /* route request */
-#define AODV_RREP 2 /* route response */
-#define AODV_RERR 3 /* error report */
-#define AODV_RREP_ACK 4 /* route response acknowledgement */
-
-#define AODV_V6_DRAFT_01_RREQ 16 /* IPv6 route request */
-#define AODV_V6_DRAFT_01_RREP 17 /* IPv6 route response */
-#define AODV_V6_DRAFT_01_RERR 18 /* IPv6 error report */
-#define AODV_V6_DRAFT_01_RREP_ACK 19 /* IPV6 route response acknowledgment */
-
-struct aodv_ext {
- u_int8_t type; /* extension type */
- u_int8_t length; /* extension length */
-};
-
-struct aodv_hello {
- struct aodv_ext eh; /* extension header */
- u_int32_t interval; /* expect my next hello in
- * (n) ms */
-};
-
-#define AODV_EXT_HELLO 1
-
-#endif /* _AODV_H_ */
diff --git a/appletalk.h b/appletalk.h
index ff972f65bfa9..3fbcbce00e13 100644
--- a/appletalk.h
+++ b/appletalk.h
@@ -19,14 +19,12 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* AppleTalk protocol formats (courtesy Bill Croft of Stanford/SUMEX).
- *
- * @(#) $Header: /tcpdump/master/tcpdump/appletalk.h,v 1.16 2004-05-01 09:41:50 hannes Exp $ (LBL)
*/
struct LAP {
- u_int8_t dst;
- u_int8_t src;
- u_int8_t type;
+ uint8_t dst;
+ uint8_t src;
+ uint8_t type;
};
#define lapShortDDP 1 /* short DDP type */
#define lapDDP 2 /* DDP type */
@@ -35,22 +33,22 @@ struct LAP {
/* Datagram Delivery Protocol */
struct atDDP {
- u_int16_t length;
- u_int16_t checksum;
- u_int16_t dstNet;
- u_int16_t srcNet;
- u_int8_t dstNode;
- u_int8_t srcNode;
- u_int8_t dstSkt;
- u_int8_t srcSkt;
- u_int8_t type;
+ uint16_t length;
+ uint16_t checksum;
+ uint16_t dstNet;
+ uint16_t srcNet;
+ uint8_t dstNode;
+ uint8_t srcNode;
+ uint8_t dstSkt;
+ uint8_t srcSkt;
+ uint8_t type;
};
struct atShortDDP {
- u_int16_t length;
- u_int8_t dstSkt;
- u_int8_t srcSkt;
- u_int8_t type;
+ uint16_t length;
+ uint8_t dstSkt;
+ uint8_t srcSkt;
+ uint8_t type;
};
#define ddpMaxWKS 0x7F
@@ -74,10 +72,10 @@ struct atShortDDP {
/* AppleTalk Transaction Protocol */
struct atATP {
- u_int8_t control;
- u_int8_t bitmap;
- u_int16_t transID;
- int32_t userData;
+ uint8_t control;
+ uint8_t bitmap;
+ uint16_t transID;
+ int32_t userData;
};
#define atpReqCode 0x40
@@ -95,8 +93,8 @@ struct atATP {
/* AppleTalk Echo Protocol */
struct atEcho {
- u_int8_t echoFunction;
- u_int8_t *echoData;
+ uint8_t echoFunction;
+ uint8_t *echoData;
};
#define echoSkt 4 /* the echoer socket */
@@ -108,15 +106,15 @@ struct atEcho {
/* Name Binding Protocol */
struct atNBP {
- u_int8_t control;
- u_int8_t id;
+ uint8_t control;
+ uint8_t id;
};
struct atNBPtuple {
- u_int16_t net;
- u_int8_t node;
- u_int8_t skt;
- u_int8_t enumerator;
+ uint16_t net;
+ uint8_t node;
+ uint8_t skt;
+ uint8_t enumerator;
};
#define nbpBrRq 0x10
@@ -142,8 +140,8 @@ struct atNBPtuple {
/* Zone Information Protocol */
struct zipHeader {
- u_int8_t command;
- u_int8_t netcount;
+ uint8_t command;
+ uint8_t netcount;
};
#define zipHeaderSize 2
diff --git a/arcnet.h b/arcnet.h
deleted file mode 100644
index 3b609566ff81..000000000000
--- a/arcnet.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#) $Id: arcnet.h,v 1.3 2003-01-23 09:05:37 guy Exp $ (LBL)
- *
- * from: NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp
- */
-
-/*
- * Structure of a 2.5MB/s Arcnet header on the BSDs,
- * as given to interface code.
- */
-struct arc_header {
- u_int8_t arc_shost;
- u_int8_t arc_dhost;
- u_int8_t arc_type;
- /*
- * only present for newstyle encoding with LL fragmentation.
- * Don't use sizeof(anything), use ARC_HDR{,NEW}LEN instead.
- */
- u_int8_t arc_flag;
- u_int16_t arc_seqid;
-
- /*
- * only present in exception packets (arc_flag == 0xff)
- */
- u_int8_t arc_type2; /* same as arc_type */
- u_int8_t arc_flag2; /* real flag value */
- u_int16_t arc_seqid2; /* real seqid value */
-};
-
-#define ARC_HDRLEN 3
-#define ARC_HDRNEWLEN 6
-#define ARC_HDRNEWLEN_EXC 10
-
-/* RFC 1051 */
-#define ARCTYPE_IP_OLD 240 /* IP protocol */
-#define ARCTYPE_ARP_OLD 241 /* address resolution protocol */
-
-/* RFC 1201 */
-#define ARCTYPE_IP 212 /* IP protocol */
-#define ARCTYPE_ARP 213 /* address resolution protocol */
-#define ARCTYPE_REVARP 214 /* reverse addr resolution protocol */
-
-#define ARCTYPE_ATALK 221 /* Appletalk */
-#define ARCTYPE_BANIAN 247 /* Banyan Vines */
-#define ARCTYPE_IPX 250 /* Novell IPX */
-
-#define ARCTYPE_INET6 0xc4 /* IPng */
-#define ARCTYPE_DIAGNOSE 0x80 /* as per ANSI/ATA 878.1 */
-
-/*
- * Structure of a 2.5MB/s Arcnet header on Linux. Linux has
- * an extra "offset" field when given to interface code, and
- * never presents packets that look like exception frames.
- */
-struct arc_linux_header {
- u_int8_t arc_shost;
- u_int8_t arc_dhost;
- u_int16_t arc_offset;
- u_int8_t arc_type;
- /*
- * only present for newstyle encoding with LL fragmentation.
- * Don't use sizeof(anything), use ARC_LINUX_HDR{,NEW}LEN
- * instead.
- */
- u_int8_t arc_flag;
- u_int16_t arc_seqid;
-};
-
-#define ARC_LINUX_HDRLEN 5
-#define ARC_LINUX_HDRNEWLEN 8
diff --git a/atm.h b/atm.h
index 65ac5c17e514..8d1737ed31cf 100644
--- a/atm.h
+++ b/atm.h
@@ -13,8 +13,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/atm.h,v 1.3 2006-02-08 01:43:00 hannes Exp $
*/
/*
diff --git a/atmuni31.h b/atmuni31.h
index ab7a03ddf54c..0f85430098ce 100644
--- a/atmuni31.h
+++ b/atmuni31.h
@@ -28,8 +28,6 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/atmuni31.h,v 1.3 2007-10-22 19:37:51 guy Exp $ (LBL)
*/
/* Based on UNI3.1 standard by ATM Forum */
diff --git a/bgp.h b/bgp.h
deleted file mode 100755
index 508159601437..000000000000
--- a/bgp.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/bgp.h,v 1.3 2004-06-16 08:45:15 hannes Exp $ (LBL) */
-/*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code
- * distributions retain the above copyright notice and this paragraph
- * in its entirety, and (2) distributions including binary code include
- * the above copyright notice and this paragraph in its entirety in
- * the documentation or other materials provided with the distribution.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
- * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
- * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * Original code by Hannes Gredler (hannes@juniper.net)
- */
-
-extern char *bgp_vpn_rd_print (const u_char *);
diff --git a/bootp.h b/bootp.h
index b1b81dce9084..b6aac4c3c439 100644
--- a/bootp.h
+++ b/bootp.h
@@ -1,4 +1,3 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.19 2008-04-22 09:46:03 hannes Exp $ (LBL) */
/*
* Bootstrap Protocol (BOOTP). RFC951 and RFC1048.
*
@@ -21,22 +20,22 @@
struct bootp {
- u_int8_t bp_op; /* packet opcode type */
- u_int8_t bp_htype; /* hardware addr type */
- u_int8_t bp_hlen; /* hardware addr length */
- u_int8_t bp_hops; /* gateway hops */
- u_int32_t bp_xid; /* transaction ID */
- u_int16_t bp_secs; /* seconds since boot began */
- u_int16_t bp_flags; /* flags - see bootp_flag_values[]
+ uint8_t bp_op; /* packet opcode type */
+ uint8_t bp_htype; /* hardware addr type */
+ uint8_t bp_hlen; /* hardware addr length */
+ uint8_t bp_hops; /* gateway hops */
+ uint32_t bp_xid; /* transaction ID */
+ uint16_t bp_secs; /* seconds since boot began */
+ uint16_t bp_flags; /* flags - see bootp_flag_values[]
in print-bootp.c */
struct in_addr bp_ciaddr; /* client IP address */
struct in_addr bp_yiaddr; /* 'your' IP address */
struct in_addr bp_siaddr; /* server IP address */
struct in_addr bp_giaddr; /* gateway IP address */
- u_int8_t bp_chaddr[16]; /* client hardware address */
- u_int8_t bp_sname[64]; /* server host name */
- u_int8_t bp_file[128]; /* boot file name */
- u_int8_t bp_vend[64]; /* vendor-specific area */
+ uint8_t bp_chaddr[16]; /* client hardware address */
+ uint8_t bp_sname[64]; /* server host name */
+ uint8_t bp_file[128]; /* boot file name */
+ uint8_t bp_vend[64]; /* vendor-specific area */
} UNALIGNED;
/*
@@ -65,132 +64,132 @@ struct bootp {
* the vendor field of the packet.
*/
-#define TAG_PAD ((u_int8_t) 0)
-#define TAG_SUBNET_MASK ((u_int8_t) 1)
-#define TAG_TIME_OFFSET ((u_int8_t) 2)
-#define TAG_GATEWAY ((u_int8_t) 3)
-#define TAG_TIME_SERVER ((u_int8_t) 4)
-#define TAG_NAME_SERVER ((u_int8_t) 5)
-#define TAG_DOMAIN_SERVER ((u_int8_t) 6)
-#define TAG_LOG_SERVER ((u_int8_t) 7)
-#define TAG_COOKIE_SERVER ((u_int8_t) 8)
-#define TAG_LPR_SERVER ((u_int8_t) 9)
-#define TAG_IMPRESS_SERVER ((u_int8_t) 10)
-#define TAG_RLP_SERVER ((u_int8_t) 11)
-#define TAG_HOSTNAME ((u_int8_t) 12)
-#define TAG_BOOTSIZE ((u_int8_t) 13)
-#define TAG_END ((u_int8_t) 255)
+#define TAG_PAD ((uint8_t) 0)
+#define TAG_SUBNET_MASK ((uint8_t) 1)
+#define TAG_TIME_OFFSET ((uint8_t) 2)
+#define TAG_GATEWAY ((uint8_t) 3)
+#define TAG_TIME_SERVER ((uint8_t) 4)
+#define TAG_NAME_SERVER ((uint8_t) 5)
+#define TAG_DOMAIN_SERVER ((uint8_t) 6)
+#define TAG_LOG_SERVER ((uint8_t) 7)
+#define TAG_COOKIE_SERVER ((uint8_t) 8)
+#define TAG_LPR_SERVER ((uint8_t) 9)
+#define TAG_IMPRESS_SERVER ((uint8_t) 10)
+#define TAG_RLP_SERVER ((uint8_t) 11)
+#define TAG_HOSTNAME ((uint8_t) 12)
+#define TAG_BOOTSIZE ((uint8_t) 13)
+#define TAG_END ((uint8_t) 255)
/* RFC1497 tags */
-#define TAG_DUMPPATH ((u_int8_t) 14)
-#define TAG_DOMAINNAME ((u_int8_t) 15)
-#define TAG_SWAP_SERVER ((u_int8_t) 16)
-#define TAG_ROOTPATH ((u_int8_t) 17)
-#define TAG_EXTPATH ((u_int8_t) 18)
+#define TAG_DUMPPATH ((uint8_t) 14)
+#define TAG_DOMAINNAME ((uint8_t) 15)
+#define TAG_SWAP_SERVER ((uint8_t) 16)
+#define TAG_ROOTPATH ((uint8_t) 17)
+#define TAG_EXTPATH ((uint8_t) 18)
/* RFC2132 */
-#define TAG_IP_FORWARD ((u_int8_t) 19)
-#define TAG_NL_SRCRT ((u_int8_t) 20)
-#define TAG_PFILTERS ((u_int8_t) 21)
-#define TAG_REASS_SIZE ((u_int8_t) 22)
-#define TAG_DEF_TTL ((u_int8_t) 23)
-#define TAG_MTU_TIMEOUT ((u_int8_t) 24)
-#define TAG_MTU_TABLE ((u_int8_t) 25)
-#define TAG_INT_MTU ((u_int8_t) 26)
-#define TAG_LOCAL_SUBNETS ((u_int8_t) 27)
-#define TAG_BROAD_ADDR ((u_int8_t) 28)
-#define TAG_DO_MASK_DISC ((u_int8_t) 29)
-#define TAG_SUPPLY_MASK ((u_int8_t) 30)
-#define TAG_DO_RDISC ((u_int8_t) 31)
-#define TAG_RTR_SOL_ADDR ((u_int8_t) 32)
-#define TAG_STATIC_ROUTE ((u_int8_t) 33)
-#define TAG_USE_TRAILERS ((u_int8_t) 34)
-#define TAG_ARP_TIMEOUT ((u_int8_t) 35)
-#define TAG_ETH_ENCAP ((u_int8_t) 36)
-#define TAG_TCP_TTL ((u_int8_t) 37)
-#define TAG_TCP_KEEPALIVE ((u_int8_t) 38)
-#define TAG_KEEPALIVE_GO ((u_int8_t) 39)
-#define TAG_NIS_DOMAIN ((u_int8_t) 40)
-#define TAG_NIS_SERVERS ((u_int8_t) 41)
-#define TAG_NTP_SERVERS ((u_int8_t) 42)
-#define TAG_VENDOR_OPTS ((u_int8_t) 43)
-#define TAG_NETBIOS_NS ((u_int8_t) 44)
-#define TAG_NETBIOS_DDS ((u_int8_t) 45)
-#define TAG_NETBIOS_NODE ((u_int8_t) 46)
-#define TAG_NETBIOS_SCOPE ((u_int8_t) 47)
-#define TAG_XWIN_FS ((u_int8_t) 48)
-#define TAG_XWIN_DM ((u_int8_t) 49)
-#define TAG_NIS_P_DOMAIN ((u_int8_t) 64)
-#define TAG_NIS_P_SERVERS ((u_int8_t) 65)
-#define TAG_MOBILE_HOME ((u_int8_t) 68)
-#define TAG_SMPT_SERVER ((u_int8_t) 69)
-#define TAG_POP3_SERVER ((u_int8_t) 70)
-#define TAG_NNTP_SERVER ((u_int8_t) 71)
-#define TAG_WWW_SERVER ((u_int8_t) 72)
-#define TAG_FINGER_SERVER ((u_int8_t) 73)
-#define TAG_IRC_SERVER ((u_int8_t) 74)
-#define TAG_STREETTALK_SRVR ((u_int8_t) 75)
-#define TAG_STREETTALK_STDA ((u_int8_t) 76)
+#define TAG_IP_FORWARD ((uint8_t) 19)
+#define TAG_NL_SRCRT ((uint8_t) 20)
+#define TAG_PFILTERS ((uint8_t) 21)
+#define TAG_REASS_SIZE ((uint8_t) 22)
+#define TAG_DEF_TTL ((uint8_t) 23)
+#define TAG_MTU_TIMEOUT ((uint8_t) 24)
+#define TAG_MTU_TABLE ((uint8_t) 25)
+#define TAG_INT_MTU ((uint8_t) 26)
+#define TAG_LOCAL_SUBNETS ((uint8_t) 27)
+#define TAG_BROAD_ADDR ((uint8_t) 28)
+#define TAG_DO_MASK_DISC ((uint8_t) 29)
+#define TAG_SUPPLY_MASK ((uint8_t) 30)
+#define TAG_DO_RDISC ((uint8_t) 31)
+#define TAG_RTR_SOL_ADDR ((uint8_t) 32)
+#define TAG_STATIC_ROUTE ((uint8_t) 33)
+#define TAG_USE_TRAILERS ((uint8_t) 34)
+#define TAG_ARP_TIMEOUT ((uint8_t) 35)
+#define TAG_ETH_ENCAP ((uint8_t) 36)
+#define TAG_TCP_TTL ((uint8_t) 37)
+#define TAG_TCP_KEEPALIVE ((uint8_t) 38)
+#define TAG_KEEPALIVE_GO ((uint8_t) 39)
+#define TAG_NIS_DOMAIN ((uint8_t) 40)
+#define TAG_NIS_SERVERS ((uint8_t) 41)
+#define TAG_NTP_SERVERS ((uint8_t) 42)
+#define TAG_VENDOR_OPTS ((uint8_t) 43)
+#define TAG_NETBIOS_NS ((uint8_t) 44)
+#define TAG_NETBIOS_DDS ((uint8_t) 45)
+#define TAG_NETBIOS_NODE ((uint8_t) 46)
+#define TAG_NETBIOS_SCOPE ((uint8_t) 47)
+#define TAG_XWIN_FS ((uint8_t) 48)
+#define TAG_XWIN_DM ((uint8_t) 49)
+#define TAG_NIS_P_DOMAIN ((uint8_t) 64)
+#define TAG_NIS_P_SERVERS ((uint8_t) 65)
+#define TAG_MOBILE_HOME ((uint8_t) 68)
+#define TAG_SMPT_SERVER ((uint8_t) 69)
+#define TAG_POP3_SERVER ((uint8_t) 70)
+#define TAG_NNTP_SERVER ((uint8_t) 71)
+#define TAG_WWW_SERVER ((uint8_t) 72)
+#define TAG_FINGER_SERVER ((uint8_t) 73)
+#define TAG_IRC_SERVER ((uint8_t) 74)
+#define TAG_STREETTALK_SRVR ((uint8_t) 75)
+#define TAG_STREETTALK_STDA ((uint8_t) 76)
/* DHCP options */
-#define TAG_REQUESTED_IP ((u_int8_t) 50)
-#define TAG_IP_LEASE ((u_int8_t) 51)
-#define TAG_OPT_OVERLOAD ((u_int8_t) 52)
-#define TAG_TFTP_SERVER ((u_int8_t) 66)
-#define TAG_BOOTFILENAME ((u_int8_t) 67)
-#define TAG_DHCP_MESSAGE ((u_int8_t) 53)
-#define TAG_SERVER_ID ((u_int8_t) 54)
-#define TAG_PARM_REQUEST ((u_int8_t) 55)
-#define TAG_MESSAGE ((u_int8_t) 56)
-#define TAG_MAX_MSG_SIZE ((u_int8_t) 57)
-#define TAG_RENEWAL_TIME ((u_int8_t) 58)
-#define TAG_REBIND_TIME ((u_int8_t) 59)
-#define TAG_VENDOR_CLASS ((u_int8_t) 60)
-#define TAG_CLIENT_ID ((u_int8_t) 61)
+#define TAG_REQUESTED_IP ((uint8_t) 50)
+#define TAG_IP_LEASE ((uint8_t) 51)
+#define TAG_OPT_OVERLOAD ((uint8_t) 52)
+#define TAG_TFTP_SERVER ((uint8_t) 66)
+#define TAG_BOOTFILENAME ((uint8_t) 67)
+#define TAG_DHCP_MESSAGE ((uint8_t) 53)
+#define TAG_SERVER_ID ((uint8_t) 54)
+#define TAG_PARM_REQUEST ((uint8_t) 55)
+#define TAG_MESSAGE ((uint8_t) 56)
+#define TAG_MAX_MSG_SIZE ((uint8_t) 57)
+#define TAG_RENEWAL_TIME ((uint8_t) 58)
+#define TAG_REBIND_TIME ((uint8_t) 59)
+#define TAG_VENDOR_CLASS ((uint8_t) 60)
+#define TAG_CLIENT_ID ((uint8_t) 61)
/* RFC 2241 */
-#define TAG_NDS_SERVERS ((u_int8_t) 85)
-#define TAG_NDS_TREE_NAME ((u_int8_t) 86)
-#define TAG_NDS_CONTEXT ((u_int8_t) 87)
+#define TAG_NDS_SERVERS ((uint8_t) 85)
+#define TAG_NDS_TREE_NAME ((uint8_t) 86)
+#define TAG_NDS_CONTEXT ((uint8_t) 87)
/* RFC 2242 */
-#define TAG_NDS_IPDOMAIN ((u_int8_t) 62)
-#define TAG_NDS_IPINFO ((u_int8_t) 63)
+#define TAG_NDS_IPDOMAIN ((uint8_t) 62)
+#define TAG_NDS_IPINFO ((uint8_t) 63)
/* RFC 2485 */
-#define TAG_OPEN_GROUP_UAP ((u_int8_t) 98)
+#define TAG_OPEN_GROUP_UAP ((uint8_t) 98)
/* RFC 2563 */
-#define TAG_DISABLE_AUTOCONF ((u_int8_t) 116)
+#define TAG_DISABLE_AUTOCONF ((uint8_t) 116)
/* RFC 2610 */
-#define TAG_SLP_DA ((u_int8_t) 78)
-#define TAG_SLP_SCOPE ((u_int8_t) 79)
+#define TAG_SLP_DA ((uint8_t) 78)
+#define TAG_SLP_SCOPE ((uint8_t) 79)
/* RFC 2937 */
-#define TAG_NS_SEARCH ((u_int8_t) 117)
+#define TAG_NS_SEARCH ((uint8_t) 117)
/* RFC 3011 */
-#define TAG_IP4_SUBNET_SELECT ((u_int8_t) 118)
+#define TAG_IP4_SUBNET_SELECT ((uint8_t) 118)
/* RFC 3442 */
-#define TAG_CLASSLESS_STATIC_RT ((u_int8_t) 121)
-#define TAG_CLASSLESS_STA_RT_MS ((u_int8_t) 249)
+#define TAG_CLASSLESS_STATIC_RT ((uint8_t) 121)
+#define TAG_CLASSLESS_STA_RT_MS ((uint8_t) 249)
/* ftp://ftp.isi.edu/.../assignments/bootp-dhcp-extensions */
-#define TAG_USER_CLASS ((u_int8_t) 77)
-#define TAG_SLP_NAMING_AUTH ((u_int8_t) 80)
-#define TAG_CLIENT_FQDN ((u_int8_t) 81)
-#define TAG_AGENT_CIRCUIT ((u_int8_t) 82)
-#define TAG_AGENT_REMOTE ((u_int8_t) 83)
-#define TAG_AGENT_MASK ((u_int8_t) 84)
-#define TAG_TZ_STRING ((u_int8_t) 88)
-#define TAG_FQDN_OPTION ((u_int8_t) 89)
-#define TAG_AUTH ((u_int8_t) 90)
-#define TAG_VINES_SERVERS ((u_int8_t) 91)
-#define TAG_SERVER_RANK ((u_int8_t) 92)
-#define TAG_CLIENT_ARCH ((u_int8_t) 93)
-#define TAG_CLIENT_NDI ((u_int8_t) 94)
-#define TAG_CLIENT_GUID ((u_int8_t) 97)
-#define TAG_LDAP_URL ((u_int8_t) 95)
-#define TAG_6OVER4 ((u_int8_t) 96)
-#define TAG_PRINTER_NAME ((u_int8_t) 100)
-#define TAG_MDHCP_SERVER ((u_int8_t) 101)
-#define TAG_IPX_COMPAT ((u_int8_t) 110)
-#define TAG_NETINFO_PARENT ((u_int8_t) 112)
-#define TAG_NETINFO_PARENT_TAG ((u_int8_t) 113)
-#define TAG_URL ((u_int8_t) 114)
-#define TAG_FAILOVER ((u_int8_t) 115)
-#define TAG_EXTENDED_REQUEST ((u_int8_t) 126)
-#define TAG_EXTENDED_OPTION ((u_int8_t) 127)
+#define TAG_USER_CLASS ((uint8_t) 77)
+#define TAG_SLP_NAMING_AUTH ((uint8_t) 80)
+#define TAG_CLIENT_FQDN ((uint8_t) 81)
+#define TAG_AGENT_CIRCUIT ((uint8_t) 82)
+#define TAG_AGENT_REMOTE ((uint8_t) 83)
+#define TAG_AGENT_MASK ((uint8_t) 84)
+#define TAG_TZ_STRING ((uint8_t) 88)
+#define TAG_FQDN_OPTION ((uint8_t) 89)
+#define TAG_AUTH ((uint8_t) 90)
+#define TAG_VINES_SERVERS ((uint8_t) 91)
+#define TAG_SERVER_RANK ((uint8_t) 92)
+#define TAG_CLIENT_ARCH ((uint8_t) 93)
+#define TAG_CLIENT_NDI ((uint8_t) 94)
+#define TAG_CLIENT_GUID ((uint8_t) 97)
+#define TAG_LDAP_URL ((uint8_t) 95)
+#define TAG_6OVER4 ((uint8_t) 96)
+#define TAG_PRINTER_NAME ((uint8_t) 100)
+#define TAG_MDHCP_SERVER ((uint8_t) 101)
+#define TAG_IPX_COMPAT ((uint8_t) 110)
+#define TAG_NETINFO_PARENT ((uint8_t) 112)
+#define TAG_NETINFO_PARENT_TAG ((uint8_t) 113)
+#define TAG_URL ((uint8_t) 114)
+#define TAG_FAILOVER ((uint8_t) 115)
+#define TAG_EXTENDED_REQUEST ((uint8_t) 126)
+#define TAG_EXTENDED_OPTION ((uint8_t) 127)
/* DHCP Message types (values for TAG_DHCP_MESSAGE option) */
@@ -209,14 +208,14 @@ struct bootp {
*/
struct cmu_vend {
- u_int8_t v_magic[4]; /* magic number */
- u_int32_t v_flags; /* flags/opcodes, etc. */
+ uint8_t v_magic[4]; /* magic number */
+ uint32_t v_flags; /* flags/opcodes, etc. */
struct in_addr v_smask; /* Subnet mask */
struct in_addr v_dgate; /* Default gateway */
struct in_addr v_dns1, v_dns2; /* Domain name servers */
struct in_addr v_ins1, v_ins2; /* IEN-116 name servers */
struct in_addr v_ts1, v_ts2; /* Time servers */
- u_int8_t v_unused[24]; /* currently unused */
+ uint8_t v_unused[24]; /* currently unused */
} UNALIGNED;
diff --git a/bpf_dump.c b/bpf_dump.c
index b50d7e7b6639..2ef852834085 100644
--- a/bpf_dump.c
+++ b/bpf_dump.c
@@ -18,18 +18,14 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/bpf_dump.c,v 1.17 2008-02-14 20:53:49 guy Exp $ (LBL)";
-#endif
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <tcpdump-stdinc.h>
-#include <pcap.h>
#include <stdio.h>
#include "interface.h"
diff --git a/chdlc.h b/chdlc.h
index d11726336ee0..d5a2d915eada 100644
--- a/chdlc.h
+++ b/chdlc.h
@@ -1,4 +1,3 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/chdlc.h,v 1.1 2000-09-18 05:11:43 guy Exp $ (LBL) */
/*
* Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
* The Regents of the University of California. All rights reserved.
diff --git a/checksum.c b/checksum.c
index 57c02bd1e057..d8263c7a244a 100644
--- a/checksum.c
+++ b/checksum.c
@@ -17,11 +17,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/checksum.c,v 1.4 2006-09-25 09:23:32 hannes Exp $";
-#endif
-
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -55,7 +51,7 @@ for i in range(len(crc_table)/8):
sys.stdout.write("\n")
*/
-static const u_int16_t crc10_table[256] =
+static const uint16_t crc10_table[256] =
{
0x0000, 0x0233, 0x0255, 0x0066, 0x0299, 0x00aa, 0x00cc, 0x02ff,
0x0301, 0x0132, 0x0154, 0x0367, 0x0198, 0x03ab, 0x03cd, 0x01fe,
@@ -93,12 +89,12 @@ static const u_int16_t crc10_table[256] =
static void
init_crc10_table(void)
-{
+{
#define CRC10_POLYNOMIAL 0x633
register int i, j;
- register u_int16_t accum;
- u_int16_t verify_crc10_table[256];
-
+ register uint16_t accum;
+ uint16_t verify_crc10_table[256];
+
for ( i = 0; i < 256; i++ )
{
accum = ((unsigned short) i << 2);
@@ -114,8 +110,8 @@ init_crc10_table(void)
#undef CRC10_POLYNOMIAL
}
-u_int16_t
-verify_crc10_cksum(u_int16_t accum, const u_char *p, int length)
+uint16_t
+verify_crc10_cksum(uint16_t accum, const u_char *p, int length)
{
register int i;
@@ -140,16 +136,16 @@ init_checksum(void) {
* Creates the OSI Fletcher checksum. See 8473-1, Appendix C, section C.3.
* The checksum field of the passed PDU does not need to be reset to zero.
*/
-u_int16_t
-create_osi_cksum (const u_int8_t *pptr, int checksum_offset, int length)
+uint16_t
+create_osi_cksum (const uint8_t *pptr, int checksum_offset, int length)
{
int x;
int y;
- u_int32_t mul;
- u_int32_t c0;
- u_int32_t c1;
- u_int16_t checksum;
+ uint32_t mul;
+ uint32_t c0;
+ uint32_t c1;
+ uint16_t checksum;
int index;
c0 = 0;
@@ -166,14 +162,14 @@ create_osi_cksum (const u_int8_t *pptr, int checksum_offset, int length)
} else {
c0 = c0 + *(pptr++);
c1 += c0;
- }
+ }
}
c0 = c0 % 255;
c1 = c1 % 255;
mul = (length - checksum_offset)*(c0);
-
+
x = mul - c0 - c1;
y = c1 - mul - 1;
@@ -189,6 +185,6 @@ create_osi_cksum (const u_int8_t *pptr, int checksum_offset, int length)
y &= 0x00FF;
checksum = ((x << 8) | y);
-
+
return checksum;
}
diff --git a/config.guess b/config.guess
index c2246a4f7f4c..d622a44e551f 100755
--- a/config.guess
+++ b/config.guess
@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2009-12-30'
+timestamp='2012-02-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ timestamp='2009-12-30'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -57,8 +55,8 @@ GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -181,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
- os=netbsd
+ os=netbsd
;;
esac
# The OS release
@@ -224,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -270,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@@ -296,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
- echo powerpc-ibm-os400
+ echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
@@ -395,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
@@ -481,8 +482,8 @@ EOF
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -495,7 +496,7 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
@@ -552,7 +553,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[456])
+ *:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@@ -595,52 +596,52 @@ EOF
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
+ esac ;;
+ esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >$dummy.c
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -731,22 +732,22 @@ EOF
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
@@ -770,14 +771,14 @@ EOF
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -789,13 +790,12 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
@@ -804,15 +804,18 @@ EOF
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:*)
- case ${UNAME_MACHINE} in
+ case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
@@ -858,6 +861,13 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -867,7 +877,7 @@ EOF
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
+ esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
@@ -879,20 +889,29 @@ EOF
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
@@ -934,7 +953,7 @@ EOF
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
@@ -960,7 +979,7 @@ EOF
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -968,14 +987,17 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -984,11 +1006,11 @@ EOF
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
+ # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
@@ -1020,7 +1042,7 @@ EOF
fi
exit ;;
i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
@@ -1048,13 +1070,13 @@ EOF
exit ;;
pc:*:*:*)
# Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
- exit ;;
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
@@ -1089,8 +1111,8 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
@@ -1133,10 +1155,10 @@ EOF
echo ns32k-sni-sysv
fi
exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
@@ -1162,11 +1184,11 @@ EOF
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv${UNAME_RELEASE}
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
@@ -1231,6 +1253,9 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
@@ -1276,13 +1301,13 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
@@ -1300,6 +1325,9 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1322,11 +1350,11 @@ main ()
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
- "4"
+ "4"
#else
- ""
+ ""
#endif
- ); exit (0);
+ ); exit (0);
#endif
#endif
diff --git a/config.h.in b/config.h.in
index 9ee068be14fe..0342e6101a4d 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,89 +1,36 @@
/* config.h.in. Generated from configure.in by autoheader. */
-/* "generated automatically" means DO NOT MAKE CHANGES TO config.h.in --
- * make them to acconfig.h and rerun autoheader */
-/* Define if you enable IPv6 support */
-#undef INET6
-
-/* Define if you enable support for the libsmi. */
-#undef LIBSMI
-
-/* define if you have the addrinfo function. */
+/* define if you have the addrinfo function */
#undef HAVE_ADDRINFO
-/* define if you need to include missing/addrinfoh.h. */
-#undef NEED_ADDRINFO_H
-
-/* define ifyou have the h_errno variable. */
-#undef HAVE_H_ERRNO
-
-/* define if you have struct sockaddr_storage */
-#undef HAVE_SOCKADDR_STORAGE
-
-/* define if you have both getipnodebyname() and getipnodebyaddr() */
-#undef USE_GETIPNODEBY
-
-/* define if you have ether_ntohost() and it works */
-#undef USE_ETHER_NTOHOST
-
-/* define if libpcap has pcap_version */
-#undef HAVE_PCAP_VERSION
-
-/* define if libpcap has pcap_debug */
-#undef HAVE_PCAP_DEBUG
-
-/* define if libpcap has yydebug */
-#undef HAVE_YYDEBUG
-
-/* define if libpcap has pcap_list_datalinks() */
-#undef HAVE_PCAP_LIST_DATALINKS
-
-/* define if libpcap has pcap_set_datalink() */
-#undef HAVE_PCAP_SET_DATALINK
-
-/* define if libpcap has pcap_datalink_name_to_val() */
-#undef HAVE_PCAP_DATALINK_NAME_TO_VAL
-
-/* define if libpcap has pcap_datalink_val_to_description() */
-#undef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION
-
-/* define if libpcap has pcap_dump_ftell() */
-#undef HAVE_PCAP_DUMP_FTELL
-
-/* define if you have getrpcbynumber() */
-#undef HAVE_GETRPCBYNUMBER
-
-/* Workaround for missing 64-bit formats */
-#undef PRId64
-#undef PRIo64
-#undef PRIx64
-#undef PRIu64
-
-/* Whether or not to include the possibly-buggy SMB printer */
-#undef TCPDUMP_DO_SMB
+/* Define to 1 if you have the `alarm' function. */
+#undef HAVE_ALARM
-/* Define if you have the dnet_htoa function. */
-#undef HAVE_DNET_HTOA
+/* Define to 1 if you have the `bpf_dump' function. */
+#undef HAVE_BPF_DUMP
-/* Define if you have a dnet_htoa declaration in <netdnet/dnetdb.h>. */
-#undef HAVE_NETDNET_DNETDB_H_DNET_HTOA
+/* capsicum support available */
+#undef HAVE_CAPSICUM
-/* define if should drop privileges by default */
-#undef WITH_USER
+/* Define to 1 if you have the `cap_enter' function. */
+#undef HAVE_CAP_ENTER
-/* define if should chroot when dropping privileges */
-#undef WITH_CHROOT
+/* Define to 1 if you have the `cap_ioctls_limit' function. */
+#undef HAVE_CAP_IOCTLS_LIMIT
-/* Define to 1 if you have the `alarm' function. */
-#undef HAVE_ALARM
+/* Define to 1 if you have the `cap_rights_init' function. */
+#undef HAVE_CAP_RIGHTS_INIT
-/* Define to 1 if you have the `bpf_dump' function. */
-#undef HAVE_BPF_DUMP
+/* Define to 1 if you have the `cap_rights_limit' function. */
+#undef HAVE_CAP_RIGHTS_LIMIT
/* Define to 1 if you have the declaration of `ether_ntohost', and to 0 if you
don't. */
#undef HAVE_DECL_ETHER_NTOHOST
+/* define if you have the dnet_htoa function */
+#undef HAVE_DNET_HTOA
+
/* Define to 1 if you have the `ether_ntohost' function. */
#undef HAVE_ETHER_NTOHOST
@@ -96,6 +43,15 @@
/* Define to 1 if you have the `getnameinfo' function. */
#undef HAVE_GETNAMEINFO
+/* Define to 1 if you have the `getopt_long' function. */
+#undef HAVE_GETOPT_LONG
+
+/* define if you have getrpcbynumber() */
+#undef HAVE_GETRPCBYNUMBER
+
+/* define if you have the h_errno variable */
+#undef HAVE_H_ERRNO
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -105,15 +61,15 @@
/* Define to 1 if you have the `rpc' library (-lrpc). */
#undef HAVE_LIBRPC
-/* Define to 1 if you have the `smi' library (-lsmi). */
-#undef HAVE_LIBSMI
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <netdnet/dnetdb.h> header file. */
#undef HAVE_NETDNET_DNETDB_H
+/* define if you have a dnet_htoa declaration in <netdnet/dnetdb.h> */
+#undef HAVE_NETDNET_DNETDB_H_DNET_HTOA
+
/* Define to 1 if you have the <netinet/ether.h> header file. */
#undef HAVE_NETINET_ETHER_H
@@ -123,6 +79,9 @@
/* Define to 1 if you have the <net/pfvar.h> header file. */
#undef HAVE_NET_PFVAR_H
+/* Define to 1 if you have the `openat' function. */
+#undef HAVE_OPENAT
+
/* Define to 1 if you have the <openssl/evp.h> header file. */
#undef HAVE_OPENSSL_EVP_H
@@ -138,24 +97,57 @@
/* Define to 1 if you have the `pcap_create' function. */
#undef HAVE_PCAP_CREATE
+/* define if libpcap has pcap_datalink_name_to_val() */
+#undef HAVE_PCAP_DATALINK_NAME_TO_VAL
+
+/* define if libpcap has pcap_datalink_val_to_description() */
+#undef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION
+
+/* define if libpcap has pcap_debug */
+#undef HAVE_PCAP_DEBUG
+
/* Define to 1 if you have the `pcap_dump_flush' function. */
#undef HAVE_PCAP_DUMP_FLUSH
+/* define if libpcap has pcap_dump_ftell() */
+#undef HAVE_PCAP_DUMP_FTELL
+
/* Define to 1 if you have the `pcap_findalldevs' function. */
#undef HAVE_PCAP_FINDALLDEVS
+/* Define to 1 if you have the `pcap_free_datalinks' function. */
+#undef HAVE_PCAP_FREE_DATALINKS
+
/* Define to 1 if the system has the type `pcap_if_t'. */
#undef HAVE_PCAP_IF_T
/* Define to 1 if you have the `pcap_lib_version' function. */
#undef HAVE_PCAP_LIB_VERSION
+/* define if libpcap has pcap_list_datalinks() */
+#undef HAVE_PCAP_LIST_DATALINKS
+
+/* Define to 1 if you have the <pcap/nflog.h> header file. */
+#undef HAVE_PCAP_NFLOG_H
+
+/* Define to 1 if you have the `pcap_setdirection' function. */
+#undef HAVE_PCAP_SETDIRECTION
+
+/* Define to 1 if you have the `pcap_set_datalink' function. */
+#undef HAVE_PCAP_SET_DATALINK
+
+/* Define to 1 if you have the `pcap_set_tstamp_precision' function. */
+#undef HAVE_PCAP_SET_TSTAMP_PRECISION
+
/* Define to 1 if you have the `pcap_set_tstamp_type' function. */
#undef HAVE_PCAP_SET_TSTAMP_TYPE
/* Define to 1 if you have the <pcap/usb.h> header file. */
#undef HAVE_PCAP_USB_H
+/* define if libpcap has pcap_version */
+#undef HAVE_PCAP_VERSION
+
/* Define to 1 if you have the `pfopen' function. */
#undef HAVE_PFOPEN
@@ -174,9 +166,6 @@
/* Define to 1 if you have the `sigset' function. */
#undef HAVE_SIGSET
-/* Define to 1 if you have the <smi.h> header file. */
-#undef HAVE_SMI_H
-
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
@@ -216,9 +205,6 @@
/* Define to 1 if the system has the type `struct ether_addr'. */
#undef HAVE_STRUCT_ETHER_ADDR
-/* Define to 1 if you have the <sys/bitypes.h> header file. */
-#undef HAVE_SYS_BITYPES_H
-
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
@@ -237,12 +223,21 @@
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
+/* define if libpcap has yydebug */
+#undef HAVE_YYDEBUG
+
/* define if your compiler has __attribute__ */
#undef HAVE___ATTRIBUTE__
+/* Define if you enable IPv6 support */
+#undef INET6
+
/* if unaligned access fails */
#undef LBL_ALIGN
+/* define if you need to include missing/addrinfo.h */
+#undef NEED_ADDRINFO_H
+
/* Define to 1 if netinet/ether.h declares `ether_ntohost' */
#undef NETINET_ETHER_H_DECLARES_ETHER_NTOHOST
@@ -261,9 +256,24 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* define if the platform doesn't define PRId64 */
+#undef PRId64
+
+/* define if the platform doesn't define PRIo64 */
+#undef PRIo64
+
+/* define if the platform doesn't define PRIx64 */
+#undef PRIu64
+
+/* define if the platform doesn't define PRIu64 */
+#undef PRIx64
+
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
@@ -273,48 +283,102 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* define if you want to build the possibly-buggy SMB printer */
+#undef TCPDUMP_DO_SMB
+
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
+/* define if you have ether_ntohost() and it works */
+#undef USE_ETHER_NTOHOST
+
+/* Define if you enable support for libsmi */
+#undef USE_LIBSMI
+
+/* define if should chroot when dropping privileges */
+#undef WITH_CHROOT
+
+/* define if should drop privileges by default */
+#undef WITH_USER
+
/* get BSD semantics on Irix */
#undef _BSD_SIGNALS
-/* needed on HP-UX */
-#undef _HPUX_SOURCE
-
/* define on AIX to get certain functions */
#undef _SUN
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#undef _UINT32_T
+
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#undef _UINT64_T
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#undef _UINT8_T
+
+/* define if your compiler allows __attribute__((format)) without a warning */
+#undef __ATTRIBUTE___FORMAT_OK
+
/* define if your compiler allows __attribute__((format)) to be applied to
function pointers */
#undef __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS
+/* define if your compiler allows __attribute__((noreturn)) to be applied to
+ function pointers */
+#undef __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS
+
/* to handle Ultrix compilers that don't support const in prototypes */
#undef const
/* Define as token for inline if inlining supported */
#undef inline
-/* Define to `short' if int16_t not defined. */
+/* Define to the type of a signed integer type of width exactly 16 bits if
+ such a type exists and the standard includes do not define it. */
#undef int16_t
-/* Define to `int' if int32_t not defined. */
+/* Define to the type of a signed integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
#undef int32_t
-/* Define to `long long' if int64_t not defined. */
+/* Define to the type of a signed integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
#undef int64_t
-/* Define to `signed char' if int8_t not defined. */
+/* Define to the type of a signed integer type of width exactly 8 bits if such
+ a type exists and the standard includes do not define it. */
#undef int8_t
-/* Define to `unsigned short' if u_int16_t not defined. */
+/* Define to `uint16_t' if u_int16_t not defined. */
#undef u_int16_t
-/* Define to `unsigned int' if u_int32_t not defined. */
+/* Define to `uint32_t' if u_int32_t not defined. */
#undef u_int32_t
-/* Define to `unsigned long long' if u_int64_t not defined. */
+/* Define to `uint64_t' if u_int64_t not defined. */
#undef u_int64_t
-/* Define to `unsigned char' if u_int8_t not defined. */
+/* Define to `uint8_t' if u_int8_t not defined. */
#undef u_int8_t
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint16_t
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint32_t
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint64_t
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint8_t
diff --git a/config.sub b/config.sub
index 85186096a9e1..59bb593f109c 100755
--- a/config.sub
+++ b/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2009-12-31'
+timestamp='2012-04-18'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@ timestamp='2009-12-31'
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -76,8 +74,8 @@ version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -124,13 +122,18 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -157,8 +160,8 @@ case $os in
os=
basic_machine=$1
;;
- -bluegene*)
- os=-cnk
+ -bluegene*)
+ os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
@@ -174,10 +177,10 @@ case $os in
os=-chorusos
basic_machine=$1
;;
- -chorusrdb)
- os=-chorusrdb
+ -chorusrdb)
+ os=-chorusrdb
basic_machine=$1
- ;;
+ ;;
-hiux*)
os=-hiuxwe2
;;
@@ -222,6 +225,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
@@ -246,17 +255,22 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
+ | epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
@@ -282,29 +296,39 @@ case $basic_machine in
| moxie \
| mt \
| msp430 \
+ | nds32 | nds32le | nds32be \
| nios | nios2 \
| ns16k | ns32k \
+ | open8 \
| or32 \
| pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
- | rx \
+ | rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
- | v850 | v850e \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
- # Motorola 68HC11/12.
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -314,6 +338,21 @@ case $basic_machine in
basic_machine=mt-unknown
;;
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
@@ -328,21 +367,25 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | be32-* | be64-* \
| bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
@@ -368,25 +411,29 @@ case $basic_machine in
| mmix-* \
| mt-* \
| msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
- | romp-* | rs6000-* | rx-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
| tron-* \
| ubicom32-* \
- | v850-* | v850e-* | vax-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
@@ -411,7 +458,7 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
- abacus)
+ abacus)
basic_machine=abacus-unknown
;;
adobe68k)
@@ -481,11 +528,20 @@ case $basic_machine in
basic_machine=powerpc-ibm
os=-cnk
;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
- cegcc)
+ cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
@@ -517,7 +573,7 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16)
+ cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
@@ -675,7 +731,6 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@@ -733,7 +788,7 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze)
basic_machine=microblaze-xilinx
;;
mingw32)
@@ -772,10 +827,18 @@ case $basic_machine in
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@@ -840,6 +903,12 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -922,9 +991,10 @@ case $basic_machine in
;;
power) basic_machine=power-ibm
;;
- ppc) basic_machine=powerpc-unknown
+ ppc | ppcbe) basic_machine=powerpc-unknown
;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
@@ -1018,6 +1088,9 @@ case $basic_machine in
basic_machine=i860-stratus
os=-sysv4
;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
sun2)
basic_machine=m68000-sun
;;
@@ -1074,20 +1147,8 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
tile*)
- basic_machine=tile-unknown
+ basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
@@ -1157,6 +1218,9 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
ymp)
basic_machine=ymp-cray
os=-unicos
@@ -1254,11 +1318,11 @@ esac
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
+ # First match some system type aliases
+ # that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
+ -auroraux)
+ os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1294,8 +1358,9 @@ case $os in
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1342,7 +1407,7 @@ case $os in
-opened*)
os=-openedition
;;
- -os400*)
+ -os400*)
os=-os400
;;
-wince*)
@@ -1391,7 +1456,7 @@ case $os in
-sinix*)
os=-sysv4
;;
- -tpf*)
+ -tpf*)
os=-tpf
;;
-triton*)
@@ -1436,8 +1501,8 @@ case $os in
-dicos*)
os=-dicos
;;
- -nacl*)
- ;;
+ -nacl*)
+ ;;
-none)
;;
*)
@@ -1460,10 +1525,10 @@ else
# system, and we'll never get to this point.
case $basic_machine in
- score-*)
+ score-*)
os=-elf
;;
- spu-*)
+ spu-*)
os=-elf
;;
*-acorn)
@@ -1475,8 +1540,17 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
@@ -1496,14 +1570,11 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
;;
m68*-cisco)
os=-aout
;;
- mep-*)
+ mep-*)
os=-elf
;;
mips*-cisco)
@@ -1530,7 +1601,7 @@ case $basic_machine in
*-ibm)
os=-aix
;;
- *-knuth)
+ *-knuth)
os=-mmixware
;;
*-wec)
diff --git a/configure b/configure
index c217f1398e26..83a07eff6c5f 100755
--- a/configure
+++ b/configure
@@ -1,12 +1,9 @@
#! /bin/sh
-# From configure.in Revision: 1.204 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -135,6 +132,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -168,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -213,21 +236,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -329,6 +356,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -450,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -484,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -505,28 +544,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -612,6 +631,9 @@ V_INCLS
V_GROUP
V_DEFS
V_CCOPT
+MKDEP
+DEPENDENCY_CFLAG
+AR
RANLIB
PCAP_CONFIG
LIBOBJS
@@ -681,6 +703,7 @@ with_smi
enable_smb
with_user
with_chroot
+with_sandbox_capsicum
enable_ipv6
with_crypto
'
@@ -1148,8 +1171,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1320,6 +1341,7 @@ Optional Packages:
--without-smi don't link with libsmi
--with-user=USERNAME drop privileges by default to USERNAME
--with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY
+ --with-sandbox-capsicum
--with-crypto use OpenSSL libcrypto [default=yes, if available]
Some influential environment variables:
@@ -1399,9 +1421,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
configure
-generated by GNU Autoconf 2.68
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1674,7 +1696,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1859,12 +1881,142 @@ $as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
+
+# ac_fn_c_find_intX_t LINENO BITS VAR
+# -----------------------------------
+# Finds a signed integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_intX_t ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
+$as_echo_n "checking for int$2_t... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ # Order is important - never check a type that is potentially smaller
+ # than half of the expected target width.
+ for ac_type in int$2_t 'int' 'long int' \
+ 'long long int' 'short int' 'signed char'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ enum { N = $2 / 2 - 1 };
+int
+main ()
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ enum { N = $2 / 2 - 1 };
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
+ < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ case $ac_type in #(
+ int$2_t) :
+ eval "$3=yes" ;; #(
+ *) :
+ eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if eval test \"x\$"$3"\" = x"no"; then :
+
+else
+ break
+fi
+ done
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_find_intX_t
+
+# ac_fn_c_find_uintX_t LINENO BITS VAR
+# ------------------------------------
+# Finds an unsigned integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_uintX_t ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+$as_echo_n "checking for uint$2_t... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ # Order is important - never check a type that is potentially smaller
+ # than half of the expected target width.
+ for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
+ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ case $ac_type in #(
+ uint$2_t) :
+ eval "$3=yes" ;; #(
+ *) :
+ eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if eval test \"x\$"$3"\" = x"no"; then :
+
+else
+ break
+fi
+ done
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_find_uintX_t
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2324,7 +2476,6 @@ if test "${with_gcc+set}" = set; then :
withval=$with_gcc;
fi
- V_CCOPT="-O"
V_INCLS=""
if test "${srcdir}" != "." ; then
V_INCLS="-I$srcdir"
@@ -2352,7 +2503,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_SHLICC2="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2408,7 +2559,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2448,7 +2599,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2501,7 +2652,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2542,7 +2693,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2600,7 +2751,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2644,7 +2795,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3090,8 +3241,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3180,147 +3330,107 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test "$GCC" = yes ; then
- if test "$SHLICC2" = yes ; then
- ac_cv_lbl_gcc_vers=2
- V_CCOPT="-O2"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5
-$as_echo_n "checking gcc version... " >&6; }
- if ${ac_cv_lbl_gcc_vers+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \
- sed -e '/^gcc version /!d' \
- -e 's/^gcc version //' \
- -e 's/ .*//' -e 's/^[^0-9]*//' \
- -e 's/\..*//'`
-fi
+ #
+ # -Werror forces warnings to be errors.
+ #
+ ac_lbl_cc_force_warning_errors=-Werror
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_vers" >&5
-$as_echo "$ac_cv_lbl_gcc_vers" >&6; }
- if test $ac_cv_lbl_gcc_vers -gt 1 ; then
- V_CCOPT="-O2"
- fi
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking that $CC handles ansi prototypes" >&5
-$as_echo_n "checking that $CC handles ansi prototypes... " >&6; }
- if ${ac_cv_lbl_cc_ansi_prototypes+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ #
+ # Use -ffloat-store so that, on 32-bit x86, we don't
+ # do 80-bit arithmetic with the FPU; that way we should
+ # get the same results for floating-point calculations
+ # on x86-32 and x86-64.
+ #
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -ffloat-store option" >&5
+$as_echo_n "checking whether the compiler supports the -ffloat-store option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -ffloat-store"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-int
-main ()
-{
-int frob(int, char *)
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_lbl_cc_ansi_prototypes=yes
-else
- ac_cv_lbl_cc_ansi_prototypes=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_ansi_prototypes" >&5
-$as_echo "$ac_cv_lbl_cc_ansi_prototypes" >&6; }
- if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
- case "$host_os" in
- hpux*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
-$as_echo_n "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)... " >&6; }
- savedcflags="$CFLAGS"
- CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
- if ${ac_cv_lbl_cc_hpux_cc_aa+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
int
main ()
{
-int frob(int, char *)
+return 0
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_lbl_cc_hpux_cc_aa=yes
-else
- ac_cv_lbl_cc_hpux_cc_aa=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_hpux_cc_aa" >&5
-$as_echo "$ac_cv_lbl_cc_hpux_cc_aa" >&6; }
- if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
- as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
- fi
- CFLAGS="$savedcflags"
- V_CCOPT="-Aa $V_CCOPT"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -ffloat-store"
-$as_echo "#define _HPUX_SOURCE 1" >>confdefs.h
+else
- ;;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
- osf*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ansi mode in DEC compiler ($CC -std1)" >&5
-$as_echo_n "checking for ansi mode in DEC compiler ($CC -std1)... " >&6; }
- savedcflags="$CFLAGS"
- CFLAGS="-std1"
- if ${ac_cv_lbl_cc_osf1_cc_std1+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-int
-main ()
-{
-int frob(int, char *)
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_lbl_cc_osf1_cc_std1=yes
-else
- ac_cv_lbl_cc_osf1_cc_std1=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_osf1_cc_std1" >&5
-$as_echo "$ac_cv_lbl_cc_osf1_cc_std1" >&6; }
- if test $ac_cv_lbl_cc_osf1_cc_std1 = no ; then
- as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
- fi
- CFLAGS="$savedcflags"
- V_CCOPT="-std1 $V_CCOPT"
- ;;
-
- *)
- as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
- ;;
- esac
- fi
+ else
V_INCLS="$V_INCLS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
case "$host_os" in
+ darwin*)
+ #
+ # This is assumed either to be GCC or clang, both
+ # of which use -Werror to force warnings to be errors.
+ #
+ ac_lbl_cc_force_warning_errors=-Werror
+ ;;
+
+ hpux*)
+ #
+ # HP C, which is what we presume we're using, doesn't
+ # exit with a non-zero exit status if we hand it an
+ # invalid -W flag, can't be forced to do so even with
+ # +We, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ ;;
+
irix*)
- V_CCOPT="$V_CCOPT -xansi -signed -O"
+ #
+ # MIPS C, which is what we presume we're using, doesn't
+ # necessarily exit with a non-zero exit status if we
+ # hand it an invalid -W flag, can't be forced to do
+ # so, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ #
+ # It also, apparently, defaults to "char" being
+ # unsigned, unlike most other C implementations;
+ # I suppose we could say "signed char" whenever
+ # we want to guarantee a signed "char", but let's
+ # just force signed chars.
+ #
+ # -xansi is normally the default, but the
+ # configure script was setting it; perhaps -cckr
+ # was the default in the Old Days. (Then again,
+ # that would probably be for backwards compatibility
+ # in the days when ANSI C was Shiny and New, i.e.
+ # 1989 and the early '90's, so maybe we can just
+ # drop support for those compilers.)
+ #
+ # -g is equivalent to -g2, which turns off
+ # optimization; we choose -g3, which generates
+ # debugging information but doesn't turn off
+ # optimization (even if the optimization would
+ # cause inaccuracies in debugging).
+ #
+ V_CCOPT="$V_CCOPT -xansi -signed -g3"
;;
osf*)
@@ -3328,7 +3438,29 @@ $as_echo "$ac_cv_lbl_cc_osf1_cc_std1" >&6; }
# Presumed to be DEC OSF/1, Digital UNIX, or
# Tru64 UNIX.
#
- V_CCOPT="$V_CCOPT -O"
+ # The DEC C compiler, which is what we presume we're
+ # using, doesn't exit with a non-zero exit status if we
+ # hand it an invalid -W flag, can't be forced to do
+ # so, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ #
+ # -g is equivalent to -g2, which turns off
+ # optimization; we choose -g3, which generates
+ # debugging information but doesn't turn off
+ # optimization (even if the optimization would
+ # cause inaccuracies in debugging).
+ #
+ V_CCOPT="$V_CCOPT -g3"
+ ;;
+
+ solaris*)
+ #
+ # Assumed to be Sun C, which requires -errwarn to force
+ # warnings to be treated as errors.
+ #
+ ac_lbl_cc_force_warning_errors=-errwarn
;;
ultrix*)
@@ -3366,6 +3498,7 @@ $as_echo "#define const /**/" >>confdefs.h
fi
;;
esac
+ V_CCOPT="$V_CCOPT -O"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
@@ -3470,8 +3603,11 @@ if test "$ac_cv___attribute__" = "yes"; then
$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h
- V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
else
+ #
+ # We can't use __attribute__, so we can't use __attribute__((unused)),
+ # so we define _U_ to an empty string.
+ #
V_DEFS="$V_DEFS -D_U_=\"\""
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute__" >&5
@@ -3479,6 +3615,132 @@ $as_echo "$ac_cv___attribute__" >&6; }
if test "$ac_cv___attribute__" = "yes"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) can be used without warnings" >&5
+$as_echo_n "checking whether __attribute__((unused)) can be used without warnings... " >&6; }
+if ${ac_cv___attribute___unused+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+main(int argc __attribute((unused)), char **argv __attribute((unused)))
+{
+ printf("Hello, world!\n");
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv___attribute___unused=yes
+else
+ ac_cv___attribute___unused=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___unused" = "yes"; then
+ V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
+else
+ V_DEFS="$V_DEFS -D_U_=\"\""
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___unused" >&5
+$as_echo "$ac_cv___attribute___unused" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((noreturn)) can be applied to function pointers without warnings" >&5
+$as_echo_n "checking whether __attribute__((noreturn)) can be applied to function pointers without warnings... " >&6; }
+if ${ac_cv___attribute___noreturn_function_pointer+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdlib.h>
+
+extern int (*foo)(int i)
+ __attribute__ ((noreturn));
+
+int
+main(int argc, char **argv)
+{
+ (*foo)(1);
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv___attribute___noreturn_function_pointer=yes
+else
+ ac_cv___attribute___noreturn_function_pointer=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___noreturn_function_pointer" = "yes"; then
+
+$as_echo "#define __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___noreturn_function_pointer" >&5
+$as_echo "$ac_cv___attribute___noreturn_function_pointer" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((format)) can be used without warnings" >&5
+$as_echo_n "checking whether __attribute__((format)) can be used without warnings... " >&6; }
+if ${ac_cv___attribute___format+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdlib.h>
+
+extern int foo(const char *fmt, ...)
+ __attribute__ ((format (printf, 1, 2)));
+
+int
+main(int argc, char **argv)
+{
+ foo("%s", "test");
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv___attribute___format=yes
+else
+ ac_cv___attribute___format=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___format" = "yes"; then
+
+$as_echo "#define __ATTRIBUTE___FORMAT_OK 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___format" >&5
+$as_echo "$ac_cv___attribute___format" >&6; }
+
+ if test "$ac_cv___attribute___format" = "yes"; then
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((format)) can be applied to function pointers" >&5
$as_echo_n "checking whether __attribute__((format)) can be applied to function pointers... " >&6; }
if ${ac_cv___attribute___format_function_pointer+:} false; then :
@@ -3517,7 +3779,9 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___format_function_pointer" >&5
$as_echo "$ac_cv___attribute___format_function_pointer" >&6; }
+ fi
fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3672,7 +3936,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -3738,7 +4002,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4058,38 +4322,6 @@ fi
esac
fi
;;
-
-linux*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux kernel version" >&5
-$as_echo_n "checking Linux kernel version... " >&6; }
- if test "$cross_compiling" = yes; then
- if ${ac_cv_linux_vers+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_linux_vers=unknown
-fi
-
- else
- if ${ac_cv_linux_vers+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_linux_vers=`uname -r 2>&1 | \
- sed -n -e '$s/.* //' -e '$s/\..*//p'`
-fi
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_linux_vers" >&5
-$as_echo "$ac_cv_linux_vers" >&6; }
- if test $ac_cv_linux_vers = unknown ; then
- as_fn_error $? "cannot determine linux version when cross-compiling" "$LINENO" 5
- fi
- if test $ac_cv_linux_vers -lt 2 ; then
- as_fn_error $? "version 2 or higher required; see the INSTALL doc for more info" "$LINENO" 5
- fi
- ;;
-
-*)
- ;;
esac
@@ -4103,19 +4335,13 @@ fi
if test "x$with_smi" != "xno" ; then
-for ac_header in smi.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "smi.h" "ac_cv_header_smi_h" "$ac_includes_default"
+ ac_fn_c_check_header_mongrel "$LINENO" "smi.h" "ac_cv_header_smi_h" "$ac_includes_default"
if test "x$ac_cv_header_smi_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SMI_H 1
-_ACEOF
-
-fi
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for smiInit in -lsmi" >&5
+ #
+ # OK, we found smi.h. Do we have libsmi with smiInit?
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for smiInit in -lsmi" >&5
$as_echo_n "checking for smiInit in -lsmi... " >&6; }
if ${ac_cv_lib_smi_smiInit+:} false; then :
$as_echo_n "(cached) " >&6
@@ -4152,27 +4378,26 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smi_smiInit" >&5
$as_echo "$ac_cv_lib_smi_smiInit" >&6; }
if test "x$ac_cv_lib_smi_smiInit" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSMI 1
-_ACEOF
-
- LIBS="-lsmi $LIBS"
-fi
-
-if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes
-then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libsmi" >&5
+ #
+ # OK, we have libsmi with smiInit. Can we use it?
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libsmi" >&5
$as_echo_n "checking whether to enable libsmi... " >&6; }
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not when cross-compiling" >&5
+ savedlibs="$LIBS"
+ LIBS="-lsmi $LIBS"
+ if test "$cross_compiling" = yes; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not when cross-compiling" >&5
$as_echo "not when cross-compiling" >&6; }
- libsmi=no
+ LIBS="$savedlibs"
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- /* libsmi available check */
+
+/* libsmi available check */
#include <smi.h>
main()
{
@@ -4192,31 +4417,41 @@ main()
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- $as_echo "#define LIBSMI 1" >>confdefs.h
- libsmi=yes
+$as_echo "#define USE_LIBSMI 1" >>confdefs.h
+
+
else
- case $? in
- 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - smiInit failed" >&5
+
+ case $? in
+ 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - smiInit failed" >&5
$as_echo "no - smiInit failed" >&6; } ;;
- 2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - header/library version mismatch" >&5
+ 2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - header/library version mismatch" >&5
$as_echo "no - header/library version mismatch" >&6; } ;;
- 3) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - can't determine library version" >&5
+ 3) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - can't determine library version" >&5
$as_echo "no - can't determine library version" >&6; } ;;
- 4) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - too old" >&5
+ 4) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - too old" >&5
$as_echo "no - too old" >&6; } ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; } ;;
- esac
- libsmi=no
+ esac
+ LIBS="$savedlibs"
+
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
+
+
+fi
+
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the possibly-buggy SMB printer" >&5
@@ -4233,7 +4468,8 @@ yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&5
$as_echo "$as_me: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&2;}
- $as_echo "#define TCPDUMP_DO_SMB 1" >>confdefs.h
+
+$as_echo "#define TCPDUMP_DO_SMB 1" >>confdefs.h
LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
;;
@@ -4251,7 +4487,8 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to drop root privileges by default" >&5
$as_echo_n "checking whether to drop root privileges by default... " >&6; }
if test ! -z "$with_user" ; then
- cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
#define WITH_USER "$withval"
_ACEOF
@@ -4271,7 +4508,8 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to chroot" >&5
$as_echo_n "checking whether to chroot... " >&6; }
if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then
- cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
#define WITH_CHROOT "$withval"
_ACEOF
@@ -4282,6 +4520,315 @@ else
$as_echo "no" >&6; }
fi
+
+# Check whether --with-sandbox-capsicum was given.
+if test "${with_sandbox_capsicum+set}" = set; then :
+ withval=$with_sandbox_capsicum;
+fi
+
+#
+# Check whether various functions are available. If any are, set
+# ac_lbl_capsicum_function_seen to yes; if any are not, set
+# ac_lbl_capsicum_function_not_seen to yes.
+#
+# All of them must be available in order to enable capsicum sandboxing.
+#
+if test ! -z "$with_sandbox-capsicum" && test "$with_sandbox-capsicum" != "no" ; then
+ for ac_func in cap_enter cap_rights_init cap_rights_limit cap_ioctls_limit openat
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ ac_lbl_capsicum_function_seen=yes
+else
+ ac_lbl_capsicum_function_not_seen=yes
+fi
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to sandbox using capsicum" >&5
+$as_echo_n "checking whether to sandbox using capsicum... " >&6; }
+if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then
+
+$as_echo "#define HAVE_CAPSICUM 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+#
+# We must check this before checking whether to enable IPv6, because,
+# on some platforms (such as SunOS 5.x), the test program requires
+# the extra networking libraries.
+#
+
+ # Most operating systems have gethostbyname() in the default searched
+ # libraries (i.e. libc):
+ # Some OSes (eg. Solaris) place it in libnsl
+ # Some strange OSes (SINIX) have it in libsocket:
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
+$as_echo_n "checking for library containing gethostbyname... " >&6; }
+if ${ac_cv_search_gethostbyname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' nsl socket resolv; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_gethostbyname=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_gethostbyname+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_gethostbyname+:} false; then :
+
+else
+ ac_cv_search_gethostbyname=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
+$as_echo "$ac_cv_search_gethostbyname" >&6; }
+ac_res=$ac_cv_search_gethostbyname
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ # Unfortunately libsocket sometimes depends on libnsl and
+ # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
+ if test "$ac_cv_search_gethostbyname" = "no"
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
+$as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_gethostbyname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket -lnsl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_socket_gethostbyname=yes
+else
+ ac_cv_lib_socket_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5
+$as_echo "$ac_cv_lib_socket_gethostbyname" >&6; }
+if test "x$ac_cv_lib_socket_gethostbyname" = xyes; then :
+ LIBS="-lsocket -lnsl $LIBS"
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
+$as_echo_n "checking for library containing socket... " >&6; }
+if ${ac_cv_search_socket+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char socket ();
+int
+main ()
+{
+return socket ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' socket; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_socket=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_socket+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_socket+:} false; then :
+
+else
+ ac_cv_search_socket=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
+$as_echo "$ac_cv_search_socket" >&6; }
+ac_res=$ac_cv_search_socket
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
+$as_echo_n "checking for socket in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socket+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket -lnsl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char socket ();
+int
+main ()
+{
+return socket ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_socket_socket=yes
+else
+ ac_cv_lib_socket_socket=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
+$as_echo "$ac_cv_lib_socket_socket" >&6; }
+if test "x$ac_cv_lib_socket_socket" = xyes; then :
+ LIBS="-lsocket -lnsl $LIBS"
+fi
+
+fi
+
+ # DLPI needs putmsg under HPUX so test for -lstr while we're at it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
+$as_echo_n "checking for library containing putmsg... " >&6; }
+if ${ac_cv_search_putmsg+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char putmsg ();
+int
+main ()
+{
+return putmsg ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' str; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_putmsg=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_putmsg+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_putmsg+:} false; then :
+
+else
+ ac_cv_search_putmsg=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
+$as_echo "$ac_cv_search_putmsg" >&6; }
+ac_res=$ac_cv_search_putmsg
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable ipv6" >&5
$as_echo_n "checking whether to enable ipv6... " >&6; }
# Check whether --enable-ipv6 was given.
@@ -4290,7 +4837,8 @@ if test "${enable_ipv6+set}" = set; then :
yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
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"
- $as_echo "#define INET6 1" >>confdefs.h
+
+$as_echo "#define INET6 1" >>confdefs.h
ipv6=yes
;;
@@ -4301,31 +4849,31 @@ $as_echo "no" >&6; }
;;
esac
else
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ipv6=no
-
-else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- /* AF_INET6 available check */
+
+ /* AF_INET6 available check */
#include <sys/types.h>
#include <sys/socket.h>
-main()
+#include <netinet/in.h>
+#ifdef AF_INET6
+void
+foo(struct in6_addr *addr)
{
- if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
- exit(1);
- else
- exit(0);
+ memset(addr, 0, sizeof (struct in6_addr));
}
+#else
+#error "AF_INET6 not defined"
+#endif
+
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
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"
- $as_echo "#define INET6 1" >>confdefs.h
+
+$as_echo "#define INET6 1" >>confdefs.h
ipv6=yes
else
@@ -4333,10 +4881,7 @@ else
$as_echo "no" >&6; }
ipv6=no
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
@@ -4740,7 +5285,8 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $td_cv_decl_netdnet_dnetdb_h_dnet_htoa" >&5
$as_echo "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" >&6; }
if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then
- $as_echo "#define HAVE_NETDNET_DNETDB_H_DNET_HTOA 1" >>confdefs.h
+
+$as_echo "#define HAVE_NETDNET_DNETDB_H_DNET_HTOA 1" >>confdefs.h
fi
@@ -4773,10 +5319,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_addrinfo" >&5
$as_echo "$ac_cv_addrinfo" >&6; }
if test $ac_cv_addrinfo = yes; then
- $as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
+
+$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
else
- $as_echo "#define NEED_ADDRINFO_H 1" >>confdefs.h
+
+$as_echo "#define NEED_ADDRINFO_H 1" >>confdefs.h
fi
@@ -4852,44 +5400,6 @@ if test "$ac_cv_namereqd" = no; then
missing_includes=yes
fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
-$as_echo_n "checking for sockaddr_storage... " >&6; }
- if ${ac_cv_sa_storage+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# include <sys/types.h>
-# include <sys/socket.h>
-int
-main ()
-{
-struct sockaddr_storage s
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_sa_storage=yes
-else
- ac_cv_sa_storage=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sa_storage" >&5
-$as_echo "$ac_cv_sa_storage" >&6; }
- if test $ac_cv_sa_storage = yes; then
- $as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
-
- fi
-
-if test "$ac_cv_sa_storage" = no; then
- missing_includes=yes
-fi
-
ac_fn_c_check_func "$LINENO" "vfprintf" "ac_cv_func_vfprintf"
if test "x$ac_cv_func_vfprintf" = xyes; then :
$as_echo "#define HAVE_VFPRINTF 1" >>confdefs.h
@@ -4968,6 +5478,19 @@ esac
fi
+ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
+if test "x$ac_cv_func_getopt_long" = xyes; then :
+ $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
+
+else
+ case " $LIBOBJS " in
+ *" getopt_long.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
+ ;;
+esac
+
+fi
+
for ac_func in fork vfork strftime
do :
@@ -5150,7 +5673,8 @@ $as_echo "$ac_cv_search_dnet_htoa" >&6; }
ac_res=$ac_cv_search_dnet_htoa
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- $as_echo "#define HAVE_DNET_HTOA 1" >>confdefs.h
+
+$as_echo "#define HAVE_DNET_HTOA 1" >>confdefs.h
fi
@@ -5247,271 +5771,11 @@ $as_echo "$ac_cv_search_getrpcbynumber" >&6; }
ac_res=$ac_cv_search_getrpcbynumber
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- $as_echo "#define HAVE_GETRPCBYNUMBER 1" >>confdefs.h
-
-fi
-
-
-
-
- # Most operating systems have gethostbyname() in the default searched
- # libraries (i.e. libc):
- # Some OSes (eg. Solaris) place it in libnsl
- # Some strange OSes (SINIX) have it in libsocket:
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
-$as_echo_n "checking for library containing gethostbyname... " >&6; }
-if ${ac_cv_search_gethostbyname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' nsl socket resolv; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_gethostbyname=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_gethostbyname+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_gethostbyname+:} false; then :
-
-else
- ac_cv_search_gethostbyname=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
-$as_echo "$ac_cv_search_gethostbyname" >&6; }
-ac_res=$ac_cv_search_gethostbyname
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
- # Unfortunately libsocket sometimes depends on libnsl and
- # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
- if test "$ac_cv_search_gethostbyname" = "no"
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
-$as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_gethostbyname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket -lnsl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_socket_gethostbyname=yes
-else
- ac_cv_lib_socket_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5
-$as_echo "$ac_cv_lib_socket_gethostbyname" >&6; }
-if test "x$ac_cv_lib_socket_gethostbyname" = xyes; then :
- LIBS="-lsocket -lnsl $LIBS"
-fi
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
-$as_echo_n "checking for library containing socket... " >&6; }
-if ${ac_cv_search_socket+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char socket ();
-int
-main ()
-{
-return socket ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' socket; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_socket=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_socket+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_socket+:} false; then :
-
-else
- ac_cv_search_socket=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
-$as_echo "$ac_cv_search_socket" >&6; }
-ac_res=$ac_cv_search_socket
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
-$as_echo_n "checking for socket in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_socket+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket -lnsl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char socket ();
-int
-main ()
-{
-return socket ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_socket_socket=yes
-else
- ac_cv_lib_socket_socket=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
-$as_echo "$ac_cv_lib_socket_socket" >&6; }
-if test "x$ac_cv_lib_socket_socket" = xyes; then :
- LIBS="-lsocket -lnsl $LIBS"
-fi
+$as_echo "#define HAVE_GETRPCBYNUMBER 1" >>confdefs.h
fi
- # DLPI needs putmsg under HPUX so test for -lstr while we're at it
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
-$as_echo_n "checking for library containing putmsg... " >&6; }
-if ${ac_cv_search_putmsg+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char putmsg ();
-int
-main ()
-{
-return putmsg ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' str; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_putmsg=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_putmsg+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_putmsg+:} false; then :
-
-else
- ac_cv_search_putmsg=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
-$as_echo "$ac_cv_search_putmsg" >&6; }
-ac_res=$ac_cv_search_putmsg
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
@@ -5541,7 +5805,9 @@ $as_echo_n "checking for local pcap library... " >&6; }
lastdir=FAIL
places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'`
- for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
+ places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
+ egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'`
+ for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
sed -e 's/-PRE-GIT$//' `
if test $lastdir = $basedir ; then
@@ -5579,7 +5845,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5622,7 +5888,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5737,13 +6003,23 @@ $as_echo "found -- -I$d added" >&6; }
V_PCAPDEP=$libpcap
places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
+ places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
+ egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
+ pcapH=FAIL
if test -r $d/pcap.h; then
- V_INCLS="-I$d $V_INCLS"
- elif test -r $places/pcap.h; then
- V_INCLS="-I$places $V_INCLS"
+ pcapH=$d
else
- as_fn_error see INSTALL "cannot find pcap.h" "$LINENO" 5
+ for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
+ if test -r $dir/pcap.h ; then
+ pcapH=$dir
+ fi
+ done
+ fi
+
+ if test $pcapH = FAIL ; then
+ as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5
fi
+ V_INCLS="-I$pcapH $V_INCLS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
$as_echo "$libpcap" >&6; }
# Extract the first word of "pcap-config", so it can be a program name with args.
@@ -5764,7 +6040,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5860,7 +6136,21 @@ fi
ac_fn_c_check_func "$LINENO" "pcap_list_datalinks" "ac_cv_func_pcap_list_datalinks"
if test "x$ac_cv_func_pcap_list_datalinks" = xyes; then :
- $as_echo "#define HAVE_PCAP_LIST_DATALINKS 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_PCAP_LIST_DATALINKS 1" >>confdefs.h
+
+ for ac_func in pcap_free_datalinks
+do :
+ ac_fn_c_check_func "$LINENO" "pcap_free_datalinks" "ac_cv_func_pcap_free_datalinks"
+if test "x$ac_cv_func_pcap_free_datalinks" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_FREE_DATALINKS 1
+_ACEOF
+
+fi
+done
+
else
@@ -5873,20 +6163,27 @@ esac
fi
- ac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink"
+ for ac_func in pcap_set_datalink
+do :
+ ac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink"
if test "x$ac_cv_func_pcap_set_datalink" = xyes; then :
- $as_echo "#define HAVE_PCAP_SET_DATALINK 1" >>confdefs.h
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_SET_DATALINK 1
+_ACEOF
fi
+done
ac_fn_c_check_func "$LINENO" "pcap_datalink_name_to_val" "ac_cv_func_pcap_datalink_name_to_val"
if test "x$ac_cv_func_pcap_datalink_name_to_val" = xyes; then :
- $as_echo "#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1" >>confdefs.h
+
+$as_echo "#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1" >>confdefs.h
ac_fn_c_check_func "$LINENO" "pcap_datalink_val_to_description" "ac_cv_func_pcap_datalink_val_to_description"
if test "x$ac_cv_func_pcap_datalink_val_to_description" = xyes; then :
- $as_echo "#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1" >>confdefs.h
+
+$as_echo "#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1" >>confdefs.h
else
@@ -5924,9 +6221,10 @@ fi
done
- ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell"
+ ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell"
if test "x$ac_cv_func_pcap_dump_ftell" = xyes; then :
- $as_echo "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h
+
+$as_echo "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h
else
@@ -6112,7 +6410,8 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_ether_ntohost" >&5
$as_echo "$ac_cv_buggy_ether_ntohost" >&6; }
if test "$ac_cv_buggy_ether_ntohost" = "no"; then
- $as_echo "#define USE_ETHER_NTOHOST 1" >>confdefs.h
+
+$as_echo "#define USE_ETHER_NTOHOST 1" >>confdefs.h
fi
@@ -6339,9 +6638,24 @@ _ACEOF
fi
done
+ #
+ # And do we have pcap_set_tstamp_precision? If so, we assume
+ # we also have pcap_open_offline_with_tstamp_precision.
+ #
+ for ac_func in pcap_set_tstamp_precision
+do :
+ ac_fn_c_check_func "$LINENO" "pcap_set_tstamp_precision" "ac_cv_func_pcap_set_tstamp_precision"
+if test "x$ac_cv_func_pcap_set_tstamp_precision" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_SET_TSTAMP_PRECISION 1
+_ACEOF
+
+fi
+done
+
fi
-for ac_func in pcap_findalldevs pcap_dump_flush pcap_lib_version
+for ac_func in pcap_findalldevs pcap_dump_flush pcap_lib_version pcap_setdirection
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -6398,7 +6712,8 @@ rm -f core conftest.err conftest.$ac_objext \
if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- $as_echo "#define HAVE_PCAP_VERSION 1" >>confdefs.h
+
+$as_echo "#define HAVE_PCAP_VERSION 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -6432,7 +6747,8 @@ rm -f core conftest.err conftest.$ac_objext \
if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- $as_echo "#define HAVE_PCAP_DEBUG 1" >>confdefs.h
+
+$as_echo "#define HAVE_PCAP_DEBUG 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -6467,7 +6783,8 @@ rm -f core conftest.err conftest.$ac_objext \
if test "$ac_lbl_cv_yydebug_defined" = yes ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- $as_echo "#define HAVE_YYDEBUG 1" >>confdefs.h
+
+$as_echo "#define HAVE_YYDEBUG 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -6549,127 +6866,164 @@ if test -f /dev/bpf0 ; then
V_GROUP=bpf
fi
-for ac_header in sys/bitypes.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_bitypes_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_BITYPES_H 1
+#
+# Make sure we have definitions for all the C99 specified-width types
+# (regardless of whether the environment is a C99 environment or not).
+#
+ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
+case $ac_cv_c_int8_t in #(
+ no|yes) ;; #(
+ *)
+
+cat >>confdefs.h <<_ACEOF
+#define int8_t $ac_cv_c_int8_t
_ACEOF
+;;
+esac
-fi
+ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
+case $ac_cv_c_int16_t in #(
+ no|yes) ;; #(
+ *)
-done
+cat >>confdefs.h <<_ACEOF
+#define int16_t $ac_cv_c_int16_t
+_ACEOF
+;;
+esac
+ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
+case $ac_cv_c_int32_t in #(
+ no|yes) ;; #(
+ *)
-ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-"
-if test "x$ac_cv_type_int8_t" = xyes; then :
+cat >>confdefs.h <<_ACEOF
+#define int32_t $ac_cv_c_int32_t
+_ACEOF
+;;
+esac
-else
+ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
+case $ac_cv_c_int64_t in #(
+ no|yes) ;; #(
+ *)
-$as_echo "#define int8_t signed char" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define int64_t $ac_cv_c_int64_t
+_ACEOF
+;;
+esac
-fi
+ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
+case $ac_cv_c_uint8_t in #(
+ no|yes) ;; #(
+ *)
-ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-"
-if test "x$ac_cv_type_u_int8_t" = xyes; then :
+$as_echo "#define _UINT8_T 1" >>confdefs.h
-else
-$as_echo "#define u_int8_t unsigned char" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define uint8_t $ac_cv_c_uint8_t
+_ACEOF
+;;
+ esac
-fi
+ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
+case $ac_cv_c_uint16_t in #(
+ no|yes) ;; #(
+ *)
-ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
-if test "x$ac_cv_type_int16_t" = xyes; then :
-else
+cat >>confdefs.h <<_ACEOF
+#define uint16_t $ac_cv_c_uint16_t
+_ACEOF
+;;
+ esac
+
+ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
+case $ac_cv_c_uint32_t in #(
+ no|yes) ;; #(
+ *)
-$as_echo "#define int16_t short" >>confdefs.h
+$as_echo "#define _UINT32_T 1" >>confdefs.h
- $ac_includes_default
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-fi
-ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-"
-if test "x$ac_cv_type_u_int16_t" = xyes; then :
+cat >>confdefs.h <<_ACEOF
+#define uint32_t $ac_cv_c_uint32_t
+_ACEOF
+;;
+ esac
-else
+ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
+case $ac_cv_c_uint64_t in #(
+ no|yes) ;; #(
+ *)
-$as_echo "#define u_int16_t unsigned short" >>confdefs.h
+$as_echo "#define _UINT64_T 1" >>confdefs.h
-fi
-ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
+cat >>confdefs.h <<_ACEOF
+#define uint64_t $ac_cv_c_uint64_t
+_ACEOF
+;;
+ esac
+
+
+#
+# Define the old BSD specified-width types in terms of the C99 types;
+# we may need them with libpcap include files.
+#
+ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default
+#include <sys/types.h>
+
"
-if test "x$ac_cv_type_int32_t" = xyes; then :
+if test "x$ac_cv_type_u_int8_t" = xyes; then :
else
-$as_echo "#define int32_t int" >>confdefs.h
+$as_echo "#define u_int8_t uint8_t" >>confdefs.h
fi
-ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
+ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default
+#include <sys/types.h>
+
"
-if test "x$ac_cv_type_u_int32_t" = xyes; then :
+if test "x$ac_cv_type_u_int16_t" = xyes; then :
else
-$as_echo "#define u_int32_t unsigned int" >>confdefs.h
+$as_echo "#define u_int16_t uint16_t" >>confdefs.h
fi
-ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
+ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default
+#include <sys/types.h>
+
"
-if test "x$ac_cv_type_int64_t" = xyes; then :
+if test "x$ac_cv_type_u_int32_t" = xyes; then :
else
-$as_echo "#define int64_t long long" >>confdefs.h
+$as_echo "#define u_int32_t uint32_t" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
+#include <sys/types.h>
+
"
if test "x$ac_cv_type_u_int64_t" = xyes; then :
else
-$as_echo "#define u_int64_t unsigned long long" >>confdefs.h
+$as_echo "#define u_int64_t uint64_t" >>confdefs.h
fi
#
-# We can't just check for <inttypes.h> - some systems have one that
-# doesn't define all the PRI[doxu]64 macros.
+# Check for <inttypes.h>
#
for ac_header in inttypes.h
do :
@@ -6680,7 +7034,8 @@ if test "x$ac_cv_header_inttypes_h" = xyes; then :
_ACEOF
#
- # OK, we have inttypes.h, but does it define those macros?
+ # OK, we have inttypes.h, but does it define all the PRI[doxu]64 macros?
+ # Some systems have an inttypes.h that doesn't define all of them.
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h defines the PRI[doxu]64 macros" >&5
$as_echo_n "checking whether inttypes.h defines the PRI[doxu]64 macros... " >&6; }
@@ -6691,16 +7046,13 @@ $as_echo_n "checking whether inttypes.h defines the PRI[doxu]64 macros... " >&6;
#include <inttypes.h>
#include <stdio.h>
#include <sys/types.h>
- #ifdef HAVE_SYS_BITYPES_H
- #include <sys/bitypes.h>
- #endif
main()
{
- printf("%" PRId64 "\n", (u_int64_t)1);
- printf("%" PRIo64 "\n", (u_int64_t)1);
- printf("%" PRIx64 "\n", (u_int64_t)1);
- printf("%" PRIu64 "\n", (u_int64_t)1);
+ printf("%" PRId64 "\n", (uint64_t)1);
+ printf("%" PRIo64 "\n", (uint64_t)1);
+ printf("%" PRIx64 "\n", (uint64_t)1);
+ printf("%" PRIu64 "\n", (uint64_t)1);
}
@@ -6749,15 +7101,12 @@ else
# ifdef HAVE_INTTYPES_H
#include <inttypes.h>
# endif
-# ifdef HAVE_SYS_BITYPES_H
- #include <sys/bitypes.h>
-# endif
#include <stdio.h>
#include <sys/types.h>
main()
{
- u_int64_t t = 1;
+ uint64_t t = 1;
char strbuf[16+1];
sprintf(strbuf, "%016lx", t << 32);
if (strcmp(strbuf, "0000000100000000") == 0)
@@ -6770,13 +7119,17 @@ else
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- $as_echo "#define PRId64 \"ld\"" >>confdefs.h
- $as_echo "#define PRIo64 \"lo\"" >>confdefs.h
+$as_echo "#define PRId64 \"ld\"" >>confdefs.h
+
- $as_echo "#define PRIx64 \"lx\"" >>confdefs.h
+$as_echo "#define PRIo64 \"lo\"" >>confdefs.h
- $as_echo "#define PRIu64 \"lu\"" >>confdefs.h
+
+$as_echo "#define PRIx64 \"lx\"" >>confdefs.h
+
+
+$as_echo "#define PRIu64 \"lu\"" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -6802,15 +7155,12 @@ else
# ifdef HAVE_INTTYPES_H
#include <inttypes.h>
# endif
-# ifdef HAVE_SYS_BITYPES_H
- #include <sys/bitypes.h>
-# endif
#include <stdio.h>
#include <sys/types.h>
main()
{
- u_int64_t t = 1;
+ uint64_t t = 1;
char strbuf[16+1];
sprintf(strbuf, "%016llx", t << 32);
if (strcmp(strbuf, "0000000100000000") == 0)
@@ -6823,13 +7173,17 @@ else
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- $as_echo "#define PRId64 \"lld\"" >>confdefs.h
- $as_echo "#define PRIo64 \"llo\"" >>confdefs.h
+$as_echo "#define PRId64 \"lld\"" >>confdefs.h
+
+
+$as_echo "#define PRIo64 \"llo\"" >>confdefs.h
- $as_echo "#define PRIx64 \"llx\"" >>confdefs.h
- $as_echo "#define PRIu64 \"llu\"" >>confdefs.h
+$as_echo "#define PRIx64 \"llx\"" >>confdefs.h
+
+
+$as_echo "#define PRIu64 \"llu\"" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -6855,15 +7209,12 @@ else
# ifdef HAVE_INTTYPES_H
#include <inttypes.h>
# endif
-# ifdef HAVE_SYS_BITYPES_H
- #include <sys/bitypes.h>
-# endif
#include <stdio.h>
#include <sys/types.h>
main()
{
- u_int64_t t = 1;
+ uint64_t t = 1;
char strbuf[16+1];
sprintf(strbuf, "%016Lx", t << 32);
if (strcmp(strbuf, "0000000100000000") == 0)
@@ -6876,13 +7227,17 @@ else
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- $as_echo "#define PRId64 \"Ld\"" >>confdefs.h
- $as_echo "#define PRIo64 \"Lo\"" >>confdefs.h
+$as_echo "#define PRId64 \"Ld\"" >>confdefs.h
+
+
+$as_echo "#define PRIo64 \"Lo\"" >>confdefs.h
- $as_echo "#define PRIx64 \"Lx\"" >>confdefs.h
- $as_echo "#define PRIu64 \"Lu\"" >>confdefs.h
+$as_echo "#define PRIx64 \"Lx\"" >>confdefs.h
+
+
+$as_echo "#define PRIu64 \"Lu\"" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -6908,15 +7263,12 @@ else
# ifdef HAVE_INTTYPES_H
#include <inttypes.h>
# endif
-# ifdef HAVE_SYS_BITYPES_H
- #include <sys/bitypes.h>
-# endif
#include <stdio.h>
#include <sys/types.h>
main()
{
- u_int64_t t = 1;
+ uint64_t t = 1;
char strbuf[16+1];
sprintf(strbuf, "%016qx", t << 32);
if (strcmp(strbuf, "0000000100000000") == 0)
@@ -6929,13 +7281,17 @@ else
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- $as_echo "#define PRId64 \"qd\"" >>confdefs.h
- $as_echo "#define PRIo64 \"qo\"" >>confdefs.h
+$as_echo "#define PRId64 \"qd\"" >>confdefs.h
+
+
+$as_echo "#define PRIo64 \"qo\"" >>confdefs.h
- $as_echo "#define PRIx64 \"qx\"" >>confdefs.h
- $as_echo "#define PRIu64 \"qu\"" >>confdefs.h
+$as_echo "#define PRIx64 \"qx\"" >>confdefs.h
+
+
+$as_echo "#define PRIu64 \"qu\"" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -6991,7 +7347,7 @@ savedcppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $V_INCLS"
for ac_header in pcap/bluetooth.h
do :
- ac_fn_c_check_header_compile "$LINENO" "pcap/bluetooth.h" "ac_cv_header_pcap_bluetooth_h" "#include <tcpdump-stdinc.h>
+ ac_fn_c_check_header_compile "$LINENO" "pcap/bluetooth.h" "ac_cv_header_pcap_bluetooth_h" "#include \"tcpdump-stdinc.h\"
"
if test "x$ac_cv_header_pcap_bluetooth_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
@@ -7002,9 +7358,22 @@ fi
done
+for ac_header in pcap/nflog.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "pcap/nflog.h" "ac_cv_header_pcap_nflog_h" "#include \"tcpdump-stdinc.h\"
+"
+if test "x$ac_cv_header_pcap_nflog_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_NFLOG_H 1
+_ACEOF
+
+fi
+
+done
+
for ac_header in pcap/usb.h
do :
- ac_fn_c_check_header_compile "$LINENO" "pcap/usb.h" "ac_cv_header_pcap_usb_h" "#include <tcpdump-stdinc.h>
+ ac_fn_c_check_header_compile "$LINENO" "pcap/usb.h" "ac_cv_header_pcap_usb_h" "#include \"tcpdump-stdinc.h\"
"
if test "x$ac_cv_header_pcap_usb_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
@@ -7034,7 +7403,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7074,7 +7443,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7109,33 +7478,408 @@ else
RANLIB="$ac_cv_prog_RANLIB"
fi
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
rm -f os-proto.h
if test "${LBL_CFLAGS+set}" = set; then
V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
fi
if test -f .devel ; then
- if test "$GCC" = yes ; then
- if test "${LBL_CFLAGS+set}" != set; then
- if test "$ac_cv_prog_cc_g" = yes ; then
- V_CCOPT="-g $V_CCOPT"
- fi
- V_CCOPT="$V_CCOPT -Wall"
- if test $ac_cv_lbl_gcc_vers -gt 1 ; then
- V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wpointer-arith -W"
- fi
- fi
- else
- case "$host_os" in
+ #
+ # Skip all the warning option stuff on some compilers.
+ #
+ if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
+$as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wall"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wall"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
+$as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wmissing-prototypes"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wmissing-prototypes"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
+$as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wstrict-prototypes"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wstrict-prototypes"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
- irix6*)
- V_CCOPT="$V_CCOPT -n32"
- ;;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wwrite-strings option" >&5
+$as_echo_n "checking whether the compiler supports the -Wwrite-strings option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wwrite-strings"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wwrite-strings"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
+$as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wpointer-arith"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wpointer-arith"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
+$as_echo_n "checking whether the compiler supports the -W option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -W"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -W"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- *)
- ;;
- esac
fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
+$as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
+ if test "$GCC" = yes ; then
+ #
+ # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
+ # though it's not); we assume that, in this case, the flag
+ # would be -M.
+ #
+ ac_lbl_dependency_flag="-M"
+ else
+ #
+ # Not GCC or a compiler deemed to be GCC; what platform is
+ # this? (We're assuming that if the compiler isn't GCC
+ # it's the compiler from the vendor of the OS; that won't
+ # necessarily be true for x86 platforms, where it might be
+ # the Intel C compiler.)
+ #
+ case "$host_os" in
+
+ irix*|osf*|darwin*)
+ #
+ # MIPS C for IRIX, DEC C, and clang all use -M.
+ #
+ ac_lbl_dependency_flag="-M"
+ ;;
+
+ solaris*)
+ #
+ # Sun C uses -xM.
+ #
+ ac_lbl_dependency_flag="-xM"
+ ;;
+
+ hpux*)
+ #
+ # HP's older C compilers don't support this.
+ # HP's newer C compilers support this with
+ # either +M or +Make; the older compilers
+ # interpret +M as something completely
+ # different, so we use +Make so we don't
+ # think it works with the older compilers.
+ #
+ ac_lbl_dependency_flag="+Make"
+ ;;
+
+ *)
+ #
+ # Not one of the above; assume no support for
+ # generating dependencies.
+ #
+ ac_lbl_dependency_flag=""
+ ;;
+ esac
+ fi
+
+ #
+ # Is ac_lbl_dependency_flag defined and, if so, does the compiler
+ # complain about it?
+ #
+ # Note: clang doesn't seem to exit with an error status when handed
+ # an unknown non-warning error, even if you pass it
+ # -Werror=unknown-warning-option. However, it always supports
+ # -M, so the fact that this test always succeeds with clang
+ # isn't an issue.
+ #
+ if test ! -z "$ac_lbl_dependency_flag"; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void) { return 0; }
+_ACEOF
+ echo "$CC" $ac_lbl_dependency_flag conftest.c >&5
+ if "$CC" $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
+$as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
+ DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
+ MKDEP='${srcdir}/mkdep'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ #
+ # We can't run mkdep, so have "make depend" do
+ # nothing.
+ #
+ MKDEP=:
+ fi
+ rm -rf conftest*
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ #
+ # We can't run mkdep, so have "make depend" do
+ # nothing.
+ #
+ MKDEP=:
+ fi
+
+
+
+ #
+ # We used to set -n32 for IRIX 6 when not using GCC (presumed
+ # to mean that we're using MIPS C or MIPSpro C); it specified
+ # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
+ # not sure why that would be something to do *only* with a
+ # .devel file; why should the ABI for which we produce code
+ # depend on .devel?
+ #
os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
name="lbl/os-$os.h"
if test -f $name ; then
@@ -7308,7 +8052,8 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_h_errno" >&5
$as_echo "$ac_cv_var_h_errno" >&6; }
if test "$ac_cv_var_h_errno" = "yes"; then
- $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
+
+$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
fi
@@ -7456,7 +8201,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -7927,16 +8672,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -7996,28 +8741,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -8039,7 +8772,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -8105,10 +8838,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.68,
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -8197,7 +8930,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
diff --git a/configure.in b/configure.in
index 14a60e185e31..5d0f771b3753 100755
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,3 @@
-dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.204 2008-11-18 07:39:20 guy Exp $ (LBL)
-dnl
dnl Copyright (c) 1994, 1995, 1996, 1997
dnl The Regents of the University of California. All rights reserved.
dnl
@@ -15,20 +13,25 @@ dnl
# config.sub.
#
-AC_REVISION($Revision: 1.204 $)
-AC_PREREQ(2.50)
+AC_PREREQ(2.61)
AC_INIT(tcpdump.c)
AC_CANONICAL_HOST
-AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS)
+AC_LBL_C_INIT_BEFORE_CC(V_INCLS)
AC_PROG_CC
AC_LBL_C_INIT(V_CCOPT, V_INCLS)
AC_LBL_C_INLINE
AC_C___ATTRIBUTE__
if test "$ac_cv___attribute__" = "yes"; then
- AC_C___ATTRIBUTE___FORMAT_FUNCTION_POINTER
+ AC_C___ATTRIBUTE___UNUSED
+ AC_C___ATTRIBUTE___NORETURN_FUNCTION_POINTER
+ AC_C___ATTRIBUTE___FORMAT
+ if test "$ac_cv___attribute___format" = "yes"; then
+ AC_C___ATTRIBUTE___FORMAT_FUNCTION_POINTER
+ fi
fi
+
AC_CHECK_HEADERS(fcntl.h rpc/rpc.h rpc/rpcent.h netdnet/dnetdb.h)
AC_CHECK_HEADERS(net/pfvar.h, , , [#include <sys/types.h>
#include <sys/socket.h>
@@ -86,28 +89,6 @@ darwin*)
esac
fi
;;
-
-linux*)
- AC_MSG_CHECKING(Linux kernel version)
- if test "$cross_compiling" = yes; then
- AC_CACHE_VAL(ac_cv_linux_vers,
- ac_cv_linux_vers=unknown)
- else
- AC_CACHE_VAL(ac_cv_linux_vers,
- ac_cv_linux_vers=`uname -r 2>&1 | \
- sed -n -e '$s/.* //' -e '$s/\..*//p'`)
- fi
- AC_MSG_RESULT($ac_cv_linux_vers)
- if test $ac_cv_linux_vers = unknown ; then
- AC_MSG_ERROR(cannot determine linux version when cross-compiling)
- fi
- if test $ac_cv_linux_vers -lt 2 ; then
- AC_MSG_ERROR(version 2 or higher required; see the INSTALL doc for more info)
- fi
- ;;
-
-*)
- ;;
esac
@@ -117,18 +98,28 @@ AC_ARG_WITH(smi,
with_smi=yes)
if test "x$with_smi" != "xno" ; then
-AC_CHECK_HEADERS(smi.h)
-AC_CHECK_LIB(smi, smiInit)
-if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes
-then
-AC_MSG_CHECKING([whether to enable libsmi])
- AC_TRY_RUN([ /* libsmi available check */
+ AC_CHECK_HEADER(smi.h,
+ [
+ #
+ # OK, we found smi.h. Do we have libsmi with smiInit?
+ #
+ AC_CHECK_LIB(smi, smiInit,
+ [
+ #
+ # OK, we have libsmi with smiInit. Can we use it?
+ #
+ AC_MSG_CHECKING([whether to enable libsmi])
+ savedlibs="$LIBS"
+ LIBS="-lsmi $LIBS"
+ AC_TRY_RUN(
+ [
+/* libsmi available check */
#include <smi.h>
main()
{
int current, revision, age, n;
const int required = 2;
- if (smiInit(""))
+ if (smiInit(""))
exit(1);
if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
exit(2);
@@ -139,25 +130,35 @@ main()
exit(4);
exit(0);
}
-],
-[ AC_MSG_RESULT(yes)
- AC_DEFINE(LIBSMI)
- libsmi=yes],
-dnl autoconf documentation says that $? contains the exit value.
-dnl reality is that it does not. We leave this in just in case
-dnl autoconf ever comes back to match the documentation.
-[ case $? in
- 1) AC_MSG_RESULT(no - smiInit failed) ;;
- 2) AC_MSG_RESULT(no - header/library version mismatch) ;;
- 3) AC_MSG_RESULT(no - can't determine library version) ;;
- 4) AC_MSG_RESULT(no - too old) ;;
- *) AC_MSG_RESULT(no) ;;
- esac
- libsmi=no],
-[ AC_MSG_RESULT(not when cross-compiling)
- libsmi=no]
-)
-fi
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_LIBSMI, 1,
+ [Define if you enable support for libsmi])
+ ],
+ [
+ dnl autoconf documentation says that
+ dnl $? contains the exit value.
+ dnl reality is that it does not.
+ dnl We leave this in just in case
+ dnl autoconf ever comes back to
+ dnl match the documentation.
+ case $? in
+ 1) AC_MSG_RESULT(no - smiInit failed) ;;
+ 2) AC_MSG_RESULT(no - header/library version mismatch) ;;
+ 3) AC_MSG_RESULT(no - can't determine library version) ;;
+ 4) AC_MSG_RESULT(no - too old) ;;
+ *) AC_MSG_RESULT(no) ;;
+ esac
+ LIBS="$savedlibs"
+ ],
+ [
+ AC_MSG_RESULT(not when cross-compiling)
+ LIBS="$savedlibs"
+ ]
+ )
+ ])
+ ])
fi
AC_MSG_CHECKING([whether to enable the possibly-buggy SMB printer])
@@ -168,7 +169,8 @@ AC_ARG_ENABLE(smb,
case "$enableval" in
yes) AC_MSG_RESULT(yes)
AC_WARN([The SMB printer may have exploitable buffer overflows!!!])
- AC_DEFINE(TCPDUMP_DO_SMB)
+ AC_DEFINE(TCPDUMP_DO_SMB, 1,
+ [define if you want to build the possibly-buggy SMB printer])
LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
;;
*) AC_MSG_RESULT(no)
@@ -178,7 +180,8 @@ esac
AC_ARG_WITH(user, [ --with-user=USERNAME drop privileges by default to USERNAME])
AC_MSG_CHECKING([whether to drop root privileges by default])
if test ! -z "$with_user" ; then
- AC_DEFINE_UNQUOTED(WITH_USER, "$withval")
+ AC_DEFINE_UNQUOTED(WITH_USER, "$withval",
+ [define if should drop privileges by default])
AC_MSG_RESULT(to \"$withval\")
else
AC_MSG_RESULT(no)
@@ -187,12 +190,41 @@ fi
AC_ARG_WITH(chroot, [ --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY])
AC_MSG_CHECKING([whether to chroot])
if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then
- AC_DEFINE_UNQUOTED(WITH_CHROOT, "$withval")
+ AC_DEFINE_UNQUOTED(WITH_CHROOT, "$withval",
+ [define if should chroot when dropping privileges])
AC_MSG_RESULT(to \"$withval\")
else
AC_MSG_RESULT(no)
fi
+AC_ARG_WITH(sandbox-capsicum, [ --with-sandbox-capsicum ])
+#
+# Check whether various functions are available. If any are, set
+# ac_lbl_capsicum_function_seen to yes; if any are not, set
+# ac_lbl_capsicum_function_not_seen to yes.
+#
+# All of them must be available in order to enable capsicum sandboxing.
+#
+if test ! -z "$with_sandbox-capsicum" && test "$with_sandbox-capsicum" != "no" ; then
+ AC_CHECK_FUNCS(cap_enter cap_rights_init cap_rights_limit cap_ioctls_limit openat,
+ ac_lbl_capsicum_function_seen=yes,
+ ac_lbl_capsicum_function_not_seen=yes)
+fi
+AC_MSG_CHECKING([whether to sandbox using capsicum])
+if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then
+ AC_DEFINE(HAVE_CAPSICUM, 1, [capsicum support available])
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
+#
+# We must check this before checking whether to enable IPv6, because,
+# on some platforms (such as SunOS 5.x), the test program requires
+# the extra networking libraries.
+#
+AC_LBL_LIBRARY_NET
+
AC_MSG_CHECKING([whether to enable ipv6])
AC_ARG_ENABLE(ipv6,
[ --enable-ipv6 enable ipv6 (with ipv4) support
@@ -200,7 +232,7 @@ AC_ARG_ENABLE(ipv6,
[ case "$enableval" in
yes) AC_MSG_RESULT(yes)
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"
- AC_DEFINE(INET6)
+ AC_DEFINE(INET6, 1, [Define if you enable IPv6 support])
ipv6=yes
;;
*)
@@ -209,20 +241,27 @@ yes) AC_MSG_RESULT(yes)
;;
esac ],
- AC_TRY_RUN([ /* AF_INET6 available check */
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[/* AF_INET6 available check */
#include <sys/types.h>
#include <sys/socket.h>
-main()
+#include <netinet/in.h>
+#ifdef AF_INET6
+void
+foo(struct in6_addr *addr)
{
- if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
- exit(1);
- else
- exit(0);
+ memset(addr, 0, sizeof (struct in6_addr));
}
-],
+#else
+#error "AF_INET6 not defined"
+#endif
+ ]])
+ ],
[ AC_MSG_RESULT(yes)
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"
- AC_DEFINE(INET6)
+ AC_DEFINE(INET6, 1, [Define if you enable IPv6 support])
ipv6=yes],
[ AC_MSG_RESULT(no)
ipv6=no],
@@ -491,7 +530,8 @@ AC_CACHE_CHECK([for dnet_htoa declaration in netdnet/dnetdb.h],
td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes,
td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no)])
if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then
- AC_DEFINE(HAVE_NETDNET_DNETDB_H_DNET_HTOA)
+ AC_DEFINE(HAVE_NETDNET_DNETDB_H_DNET_HTOA, 1,
+ [define if you have a dnet_htoa declaration in <netdnet/dnetdb.h>])
fi
dnl
@@ -515,14 +555,7 @@ if test "$ac_cv_namereqd" = no; then
missing_includes=yes
fi
-dnl
-dnl Checks for sockaddr_storage structure
-AC_STRUCT_SA_STORAGE(ac_cv_sa_storage)
-if test "$ac_cv_sa_storage" = no; then
- missing_includes=yes
-fi
-
-AC_REPLACE_FUNCS(vfprintf strcasecmp strlcat strlcpy strdup strsep)
+AC_REPLACE_FUNCS(vfprintf strcasecmp strlcat strlcpy strdup strsep getopt_long)
AC_CHECK_FUNCS(fork vfork strftime)
AC_CHECK_FUNCS(setlinebuf alarm)
@@ -535,12 +568,14 @@ fi
AC_LBL_TYPE_SIGNAL
-AC_SEARCH_LIBS(dnet_htoa, dnet, AC_DEFINE(HAVE_DNET_HTOA))
+AC_SEARCH_LIBS(dnet_htoa, dnet,
+ AC_DEFINE(HAVE_DNET_HTOA, 1, [define if you have the dnet_htoa function]))
AC_CHECK_LIB(rpc, main) dnl It's unclear why we might need -lrpc
dnl Some platforms may need -lnsl for getrpcbynumber.
-AC_SEARCH_LIBS(getrpcbynumber, nsl, AC_DEFINE(HAVE_GETRPCBYNUMBER))
+AC_SEARCH_LIBS(getrpcbynumber, nsl,
+ AC_DEFINE(HAVE_GETRPCBYNUMBER, 1, [define if you have getrpcbynumber()]))
dnl AC_CHECK_LIB(z, uncompress)
dnl AC_CHECK_HEADERS(zlib.h)
@@ -619,7 +654,8 @@ AC_CHECK_FUNCS(ether_ntohost, [
[ac_cv_buggy_ether_ntohost=yes],
[ac_cv_buggy_ether_ntohost="not while cross-compiling"])])
if test "$ac_cv_buggy_ether_ntohost" = "no"; then
- AC_DEFINE(USE_ETHER_NTOHOST)
+ AC_DEFINE(USE_ETHER_NTOHOST, 1,
+ [define if you have ether_ntohost() and it works])
fi
])
if test "$ac_cv_func_ether_ntohost" = yes -a \
@@ -725,9 +761,14 @@ if test $ac_cv_func_pcap_create = "yes" ; then
# pcap_list_tstamp_types and pcap_free_tstamp_types as well.
#
AC_CHECK_FUNCS(pcap_set_tstamp_type)
+ #
+ # And do we have pcap_set_tstamp_precision? If so, we assume
+ # we also have pcap_open_offline_with_tstamp_precision.
+ #
+ AC_CHECK_FUNCS(pcap_set_tstamp_precision)
fi
-AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version)
+AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version pcap_setdirection)
if test $ac_cv_func_pcap_findalldevs = "yes" ; then
dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may
dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't
@@ -750,7 +791,7 @@ if test $ac_cv_func_pcap_lib_version = "no" ; then
ac_lbl_cv_pcap_version_defined=no)
if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_PCAP_VERSION)
+ AC_DEFINE(HAVE_PCAP_VERSION, 1, [define if libpcap has pcap_version])
else
AC_MSG_RESULT(no)
fi
@@ -766,7 +807,7 @@ AC_TRY_LINK([],
ac_lbl_cv_pcap_debug_defined=no)
if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_PCAP_DEBUG)
+ AC_DEFINE(HAVE_PCAP_DEBUG, 1, [define if libpcap has pcap_debug])
else
AC_MSG_RESULT(no)
#
@@ -783,7 +824,7 @@ else
ac_lbl_cv_yydebug_defined=no)
if test "$ac_lbl_cv_yydebug_defined" = yes ; then
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_YYDEBUG)
+ AC_DEFINE(HAVE_YYDEBUG, 1, [define if libpcap has yydebug])
else
AC_MSG_RESULT(no)
fi
@@ -850,73 +891,56 @@ if test -f /dev/bpf0 ; then
V_GROUP=bpf
fi
-AC_CHECK_HEADERS(sys/bitypes.h)
+#
+# Make sure we have definitions for all the C99 specified-width types
+# (regardless of whether the environment is a C99 environment or not).
+#
+AC_TYPE_INT8_T
+AC_TYPE_INT16_T
+AC_TYPE_INT32_T
+AC_TYPE_INT64_T
+AC_TYPE_UINT8_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT64_T
-AC_CHECK_TYPE([int8_t], ,
- [AC_DEFINE([int8_t], [signed char],
- [Define to `signed char' if int8_t not defined.])],
- [AC_INCLUDES_DEFAULT
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif])
+#
+# Define the old BSD specified-width types in terms of the C99 types;
+# we may need them with libpcap include files.
+#
AC_CHECK_TYPE([u_int8_t], ,
- [AC_DEFINE([u_int8_t], [unsigned char],
- [Define to `unsigned char' if u_int8_t not defined.])],
- [AC_INCLUDES_DEFAULT
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif])
-AC_CHECK_TYPE([int16_t], ,
- [AC_DEFINE([int16_t], [short],
- [Define to `short' if int16_t not defined.])]
+ [AC_DEFINE([u_int8_t], [uint8_t],
+ [Define to `uint8_t' if u_int8_t not defined.])],
[AC_INCLUDES_DEFAULT
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif])
+#include <sys/types.h>
+])
AC_CHECK_TYPE([u_int16_t], ,
- [AC_DEFINE([u_int16_t], [unsigned short],
- [Define to `unsigned short' if u_int16_t not defined.])],
- [AC_INCLUDES_DEFAULT
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif])
-AC_CHECK_TYPE([int32_t], ,
- [AC_DEFINE([int32_t], [int],
- [Define to `int' if int32_t not defined.])],
+ [AC_DEFINE([u_int16_t], [uint16_t],
+ [Define to `uint16_t' if u_int16_t not defined.])],
[AC_INCLUDES_DEFAULT
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif])
+#include <sys/types.h>
+])
AC_CHECK_TYPE([u_int32_t], ,
- [AC_DEFINE([u_int32_t], [unsigned int],
- [Define to `unsigned int' if u_int32_t not defined.])],
+ [AC_DEFINE([u_int32_t], [uint32_t],
+ [Define to `uint32_t' if u_int32_t not defined.])],
[AC_INCLUDES_DEFAULT
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif])
-AC_CHECK_TYPE([int64_t], ,
- [AC_DEFINE([int64_t], [long long],
- [Define to `long long' if int64_t not defined.])],
- [AC_INCLUDES_DEFAULT
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif])
+#include <sys/types.h>
+])
AC_CHECK_TYPE([u_int64_t], ,
- [AC_DEFINE([u_int64_t], [unsigned long long],
- [Define to `unsigned long long' if u_int64_t not defined.])],
+ [AC_DEFINE([u_int64_t], [uint64_t],
+ [Define to `uint64_t' if u_int64_t not defined.])],
[AC_INCLUDES_DEFAULT
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif])
+#include <sys/types.h>
+])
#
-# We can't just check for <inttypes.h> - some systems have one that
-# doesn't define all the PRI[doxu]64 macros.
+# Check for <inttypes.h>
#
AC_CHECK_HEADERS(inttypes.h,
[
#
- # OK, we have inttypes.h, but does it define those macros?
+ # OK, we have inttypes.h, but does it define all the PRI[doxu]64 macros?
+ # Some systems have an inttypes.h that doesn't define all of them.
#
AC_MSG_CHECKING([[whether inttypes.h defines the PRI[doxu]64 macros]])
AC_COMPILE_IFELSE(
@@ -926,16 +950,13 @@ AC_CHECK_HEADERS(inttypes.h,
#include <inttypes.h>
#include <stdio.h>
#include <sys/types.h>
- #ifdef HAVE_SYS_BITYPES_H
- #include <sys/bitypes.h>
- #endif
main()
{
- printf("%" PRId64 "\n", (u_int64_t)1);
- printf("%" PRIo64 "\n", (u_int64_t)1);
- printf("%" PRIx64 "\n", (u_int64_t)1);
- printf("%" PRIu64 "\n", (u_int64_t)1);
+ printf("%" PRId64 "\n", (uint64_t)1);
+ printf("%" PRIo64 "\n", (uint64_t)1);
+ printf("%" PRIx64 "\n", (uint64_t)1);
+ printf("%" PRIu64 "\n", (uint64_t)1);
}
]])
],
@@ -980,11 +1001,13 @@ fi
#
savedcppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $V_INCLS"
-AC_CHECK_HEADERS(pcap/bluetooth.h,,,[#include <tcpdump-stdinc.h>])
-AC_CHECK_HEADERS(pcap/usb.h,,,[#include <tcpdump-stdinc.h>])
+AC_CHECK_HEADERS(pcap/bluetooth.h,,,[#include "tcpdump-stdinc.h"])
+AC_CHECK_HEADERS(pcap/nflog.h,,,[#include "tcpdump-stdinc.h"])
+AC_CHECK_HEADERS(pcap/usb.h,,,[#include "tcpdump-stdinc.h"])
CPPFLAGS="$savedcppflags"
AC_PROG_RANLIB
+AC_CHECK_TOOL([AR], [ar])
AC_LBL_DEVEL(V_CCOPT)
diff --git a/cpack.c b/cpack.c
index c921b3905918..16bfd151698e 100644
--- a/cpack.c
+++ b/cpack.c
@@ -27,6 +27,7 @@
* OF SUCH DAMAGE.
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -38,8 +39,8 @@
#include "cpack.h"
#include "extract.h"
-u_int8_t *
-cpack_next_boundary(u_int8_t *buf, u_int8_t *p, size_t alignment)
+uint8_t *
+cpack_next_boundary(uint8_t *buf, uint8_t *p, size_t alignment)
{
size_t misalignment = (size_t)(p - buf) % alignment;
@@ -53,10 +54,10 @@ cpack_next_boundary(u_int8_t *buf, u_int8_t *p, size_t alignment)
* wordsize bytes remain in the buffer after the boundary. Otherwise,
* return a pointer to the boundary.
*/
-u_int8_t *
+uint8_t *
cpack_align_and_reserve(struct cpack_state *cs, size_t wordsize)
{
- u_int8_t *next;
+ uint8_t *next;
/* Ensure alignment. */
next = cpack_next_boundary(cs->c_buf, cs->c_next, wordsize);
@@ -68,8 +69,19 @@ cpack_align_and_reserve(struct cpack_state *cs, size_t wordsize)
return next;
}
+/* Advance by N bytes without returning them. */
int
-cpack_init(struct cpack_state *cs, u_int8_t *buf, size_t buflen)
+cpack_advance(struct cpack_state *cs, const size_t toskip)
+{
+ /* No space left? */
+ if (cs->c_next - cs->c_buf + toskip > cs->c_len)
+ return -1;
+ cs->c_next += toskip;
+ return 0;
+}
+
+int
+cpack_init(struct cpack_state *cs, uint8_t *buf, size_t buflen)
{
memset(cs, 0, sizeof(*cs));
@@ -82,55 +94,55 @@ cpack_init(struct cpack_state *cs, u_int8_t *buf, size_t buflen)
/* Unpack a 64-bit unsigned integer. */
int
-cpack_uint64(struct cpack_state *cs, u_int64_t *u)
+cpack_uint64(struct cpack_state *cs, uint64_t *u)
{
- u_int8_t *next;
+ uint8_t *next;
if ((next = cpack_align_and_reserve(cs, sizeof(*u))) == NULL)
return -1;
*u = EXTRACT_LE_64BITS(next);
- /* Move pointer past the u_int64_t. */
+ /* Move pointer past the uint64_t. */
cs->c_next = next + sizeof(*u);
return 0;
}
/* Unpack a 32-bit unsigned integer. */
int
-cpack_uint32(struct cpack_state *cs, u_int32_t *u)
+cpack_uint32(struct cpack_state *cs, uint32_t *u)
{
- u_int8_t *next;
+ uint8_t *next;
if ((next = cpack_align_and_reserve(cs, sizeof(*u))) == NULL)
return -1;
*u = EXTRACT_LE_32BITS(next);
- /* Move pointer past the u_int32_t. */
+ /* Move pointer past the uint32_t. */
cs->c_next = next + sizeof(*u);
return 0;
}
/* Unpack a 16-bit unsigned integer. */
int
-cpack_uint16(struct cpack_state *cs, u_int16_t *u)
+cpack_uint16(struct cpack_state *cs, uint16_t *u)
{
- u_int8_t *next;
+ uint8_t *next;
if ((next = cpack_align_and_reserve(cs, sizeof(*u))) == NULL)
return -1;
*u = EXTRACT_LE_16BITS(next);
- /* Move pointer past the u_int16_t. */
+ /* Move pointer past the uint16_t. */
cs->c_next = next + sizeof(*u);
return 0;
}
/* Unpack an 8-bit unsigned integer. */
int
-cpack_uint8(struct cpack_state *cs, u_int8_t *u)
+cpack_uint8(struct cpack_state *cs, uint8_t *u)
{
/* No space left? */
if ((size_t)(cs->c_next - cs->c_buf) >= cs->c_len)
@@ -138,7 +150,7 @@ cpack_uint8(struct cpack_state *cs, u_int8_t *u)
*u = *cs->c_next;
- /* Move pointer past the u_int8_t. */
+ /* Move pointer past the uint8_t. */
cs->c_next++;
return 0;
}
diff --git a/cpack.h b/cpack.h
index 74f97960adb8..a7eb6d611d6b 100644
--- a/cpack.h
+++ b/cpack.h
@@ -31,24 +31,26 @@
#define _CPACK_H
struct cpack_state {
- u_int8_t *c_buf;
- u_int8_t *c_next;
+ uint8_t *c_buf;
+ uint8_t *c_next;
size_t c_len;
};
-int cpack_init(struct cpack_state *, u_int8_t *, size_t);
+int cpack_init(struct cpack_state *, uint8_t *, size_t);
-int cpack_uint8(struct cpack_state *, u_int8_t *);
-int cpack_uint16(struct cpack_state *, u_int16_t *);
-int cpack_uint32(struct cpack_state *, u_int32_t *);
-int cpack_uint64(struct cpack_state *, u_int64_t *);
+int cpack_uint8(struct cpack_state *, uint8_t *);
+int cpack_uint16(struct cpack_state *, uint16_t *);
+int cpack_uint32(struct cpack_state *, uint32_t *);
+int cpack_uint64(struct cpack_state *, uint64_t *);
-u_int8_t *cpack_next_boundary(u_int8_t *buf, u_int8_t *p, size_t alignment);
-u_int8_t *cpack_align_and_reserve(struct cpack_state *cs, size_t wordsize);
+uint8_t *cpack_next_boundary(uint8_t *buf, uint8_t *p, size_t alignment);
+uint8_t *cpack_align_and_reserve(struct cpack_state *cs, size_t wordsize);
-#define cpack_int8(__s, __p) cpack_uint8((__s), (u_int8_t*)(__p))
-#define cpack_int16(__s, __p) cpack_uint16((__s), (u_int16_t*)(__p))
-#define cpack_int32(__s, __p) cpack_uint32((__s), (u_int32_t*)(__p))
-#define cpack_int64(__s, __p) cpack_uint64((__s), (u_int64_t*)(__p))
+#define cpack_int8(__s, __p) cpack_uint8((__s), (uint8_t*)(__p))
+#define cpack_int16(__s, __p) cpack_uint16((__s), (uint16_t*)(__p))
+#define cpack_int32(__s, __p) cpack_uint32((__s), (uint32_t*)(__p))
+#define cpack_int64(__s, __p) cpack_uint64((__s), (uint64_t*)(__p))
+
+extern int cpack_advance(struct cpack_state *, const size_t);
#endif /* _CPACK_H */
diff --git a/dccp.h b/dccp.h
deleted file mode 100644
index 5c66e23cd860..000000000000
--- a/dccp.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/dccp.h,v 1.5 2006-11-02 09:05:23 hannes Exp $ (LBL) */
-/*
- * Copyright (C) Arnaldo Carvalho de Melo 2004
- * Copyright (C) Ian McDonald 2005 <iam4@cs.waikato.ac.nz>
- * Copyright (C) Yoshifumi Nishida 2005
- *
- * This software may be distributed either under the terms of the
- * BSD-style license that accompanies tcpdump or the GNU GPL version 2
- */
-
-#ifndef __DCCP_HDR__
-#define __DCCP_HDR__
-
-/**
- * struct dccp_hdr - generic part of DCCP packet header
- *
- * @dccph_sport - Relevant port on the endpoint that sent this packet
- * @dccph_dport - Relevant port on the other endpoint
- * @dccph_doff - Data Offset from the start of the DCCP header, in 32-bit words
- * @dccph_ccval - Used by the HC-Sender CCID
- * @dccph_cscov - Parts of the packet that are covered by the Checksum field
- * @dccph_checksum - Internet checksum, depends on dccph_cscov
- * @dccph_x - 0 = 24 bit sequence number, 1 = 48
- * @dccph_type - packet type, see DCCP_PKT_ prefixed macros
- * @dccph_seq - sequence number high or low order 24 bits, depends on dccph_x
- */
-struct dccp_hdr {
- u_int16_t dccph_sport,
- dccph_dport;
- u_int8_t dccph_doff;
- u_int8_t dccph_ccval_cscov;
- u_int16_t dccph_checksum;
- union {
- u_int8_t dccph_xtr;
- u_int32_t dccph_seq;
- } dccph_xtrs;
-};
-
-#define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov >> 4) & 0xF)
-#define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov) & 0xF)
-
-#define DCCPH_X(dh) ((dh)->dccph_xtrs.dccph_xtr & 1)
-#define DCCPH_TYPE(dh) (((dh)->dccph_xtrs.dccph_xtr >> 1) & 0xF)
-#define DCCPH_SEQ(dh) (((dh)->dccph_xtrs.dccph_seq) >> 8)
-
-/**
- * struct dccp_hdr_ext - the low bits of a 48 bit seq packet
- *
- * @dccph_seq_low - low 24 bits of a 48 bit seq packet
- */
-struct dccp_hdr_ext {
- u_int32_t dccph_seq_low;
-};
-
-/**
- * struct dccp_hdr_request - Conection initiation request header
- *
- * @dccph_req_service - Service to which the client app wants to connect
- */
-struct dccp_hdr_request {
- u_int32_t dccph_req_service;
-};
-
-/**
- * struct dccp_hdr_ack_bits - acknowledgment bits common to most packets
- *
- * @dccph_resp_ack_nr_high - 48 bit ack number high order bits, contains GSR
- * @dccph_resp_ack_nr_low - 48 bit ack number low order bits, contains GSR
- */
-struct dccp_hdr_ack_bits {
- u_int32_t dccph_ra;
- u_int32_t dccph_ack_nr_low;
-};
-
-#define DCCPH_ACK(dh_ack) ((dh_ack)->dccph_ra >> 8)
-
-/**
- * struct dccp_hdr_response - Conection initiation response header
- *
- * @dccph_resp_ack_nr_high - 48 bit ack number high order bits, contains GSR
- * @dccph_resp_ack_nr_low - 48 bit ack number low order bits, contains GSR
- * @dccph_resp_service - Echoes the Service Code on a received DCCP-Request
- */
-struct dccp_hdr_response {
- struct dccp_hdr_ack_bits dccph_resp_ack;
- u_int32_t dccph_resp_service;
-};
-
-#if 0
-static inline struct dccp_hdr_data *dccp_hdr_data(struct dccp_hdr *hdrg)
-{
- const int ext = DCCPH_X(hdrg) ? sizeof(struct dccp_hdr_ext) : 0;
-
- return (struct dccp_hdr_data *)(((u_char *)hdrg) + sizeof(hdrg) + ext);
-}
-#endif
-
-/**
- * struct dccp_hdr_reset - Unconditionally shut down a connection
- *
- * @dccph_reset_service - Echoes the Service Code on a received DCCP-Request
- */
-struct dccp_hdr_reset {
- struct dccp_hdr_ack_bits dccph_reset_ack;
- u_int8_t dccph_reset_code,
- dccph_reset_data[3];
-};
-
-enum dccp_pkt_type {
- DCCP_PKT_REQUEST = 0,
- DCCP_PKT_RESPONSE,
- DCCP_PKT_DATA,
- DCCP_PKT_ACK,
- DCCP_PKT_DATAACK,
- DCCP_PKT_CLOSEREQ,
- DCCP_PKT_CLOSE,
- DCCP_PKT_RESET,
- DCCP_PKT_SYNC,
- DCCP_PKT_SYNCACK,
- DCCP_PKT_INVALID
-};
-
-enum dccp_reset_codes {
- DCCP_RESET_CODE_UNSPECIFIED = 0,
- DCCP_RESET_CODE_CLOSED,
- DCCP_RESET_CODE_ABORTED,
- DCCP_RESET_CODE_NO_CONNECTION,
- DCCP_RESET_CODE_PACKET_ERROR,
- DCCP_RESET_CODE_OPTION_ERROR,
- DCCP_RESET_CODE_MANDATORY_ERROR,
- DCCP_RESET_CODE_CONNECTION_REFUSED,
- DCCP_RESET_CODE_BAD_SERVICE_CODE,
- DCCP_RESET_CODE_TOO_BUSY,
- DCCP_RESET_CODE_BAD_INIT_COOKIE,
- DCCP_RESET_CODE_AGGRESSION_PENALTY,
- __DCCP_RESET_CODE_LAST
-};
-
-#endif /* __DCCP_HDR__ */
diff --git a/decnet.h b/decnet.h
deleted file mode 100644
index d25d157d4270..000000000000
--- a/decnet.h
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * Copyright (c) 1992, 1994, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/decnet.h,v 1.11 2002-12-11 07:13:50 guy Exp $ (LBL)
- */
-
-#ifndef WIN32
-typedef u_int8_t byte[1]; /* single byte field */
-#else
-/*
- * the keyword 'byte' generates conflicts in Windows
- */
-typedef unsigned char Byte[1]; /* single byte field */
-#define byte Byte
-#endif /* WIN32 */
-typedef u_int8_t word[2]; /* 2 byte field */
-typedef u_int8_t longword[4]; /* 4 bytes field */
-
-/*
- * Definitions for DECNET Phase IV protocol headers
- */
-union etheraddress {
- u_int8_t dne_addr[6]; /* full ethernet address */
- struct {
- u_int8_t dne_hiord[4]; /* DECnet HIORD prefix */
- u_int8_t dne_nodeaddr[2]; /* DECnet node address */
- } dne_remote;
-};
-
-typedef union etheraddress etheraddr; /* Ethernet address */
-
-#define HIORD 0x000400aa /* high 32-bits of address (swapped) */
-
-#define AREAMASK 0176000 /* mask for area field */
-#define AREASHIFT 10 /* bit-offset for area field */
-#define NODEMASK 01777 /* mask for node address field */
-
-#define DN_MAXADDL 20 /* max size of DECnet address */
-struct dn_naddr {
- u_int16_t a_len; /* length of address */
- u_int8_t a_addr[DN_MAXADDL]; /* address as bytes */
-};
-
-/*
- * Define long and short header formats.
- */
-struct shorthdr
- {
- byte sh_flags; /* route flags */
- word sh_dst; /* destination node address */
- word sh_src; /* source node address */
- byte sh_visits; /* visit count */
- };
-
-struct longhdr
- {
- byte lg_flags; /* route flags */
- byte lg_darea; /* destination area (reserved) */
- byte lg_dsarea; /* destination subarea (reserved) */
- etheraddr lg_dst; /* destination id */
- byte lg_sarea; /* source area (reserved) */
- byte lg_ssarea; /* source subarea (reserved) */
- etheraddr lg_src; /* source id */
- byte lg_nextl2; /* next level 2 router (reserved) */
- byte lg_visits; /* visit count */
- byte lg_service; /* service class (reserved) */
- byte lg_pt; /* protocol type (reserved) */
- };
-
-union routehdr
- {
- struct shorthdr rh_short; /* short route header */
- struct longhdr rh_long; /* long route header */
- };
-
-/*
- * Define the values of various fields in the protocol messages.
- *
- * 1. Data packet formats.
- */
-#define RMF_MASK 7 /* mask for message type */
-#define RMF_SHORT 2 /* short message format */
-#define RMF_LONG 6 /* long message format */
-#ifndef RMF_RQR
-#define RMF_RQR 010 /* request return to sender */
-#define RMF_RTS 020 /* returning to sender */
-#define RMF_IE 040 /* intra-ethernet packet */
-#endif /* RMR_RQR */
-#define RMF_FVER 0100 /* future version flag */
-#define RMF_PAD 0200 /* pad field */
-#define RMF_PADMASK 0177 /* pad field mask */
-
-#define VIS_MASK 077 /* visit field mask */
-
-/*
- * 2. Control packet formats.
- */
-#define RMF_CTLMASK 017 /* mask for message type */
-#define RMF_CTLMSG 01 /* control message indicator */
-#define RMF_INIT 01 /* initialization message */
-#define RMF_VER 03 /* verification message */
-#define RMF_TEST 05 /* hello and test message */
-#define RMF_L1ROUT 07 /* level 1 routing message */
-#define RMF_L2ROUT 011 /* level 2 routing message */
-#define RMF_RHELLO 013 /* router hello message */
-#define RMF_EHELLO 015 /* endnode hello message */
-
-#define TI_L2ROUT 01 /* level 2 router */
-#define TI_L1ROUT 02 /* level 1 router */
-#define TI_ENDNODE 03 /* endnode */
-#define TI_VERIF 04 /* verification required */
-#define TI_BLOCK 010 /* blocking requested */
-
-#define VE_VERS 2 /* version number (2) */
-#define VE_ECO 0 /* ECO number */
-#define VE_UECO 0 /* user ECO number (0) */
-
-#define P3_VERS 1 /* phase III version number (1) */
-#define P3_ECO 3 /* ECO number (3) */
-#define P3_UECO 0 /* user ECO number (0) */
-
-#define II_L2ROUT 01 /* level 2 router */
-#define II_L1ROUT 02 /* level 1 router */
-#define II_ENDNODE 03 /* endnode */
-#define II_VERIF 04 /* verification required */
-#define II_NOMCAST 040 /* no multicast traffic accepted */
-#define II_BLOCK 0100 /* blocking requested */
-#define II_TYPEMASK 03 /* mask for node type */
-
-#define TESTDATA 0252 /* test data bytes */
-#define TESTLEN 1 /* length of transmitted test data */
-
-/*
- * Define control message formats.
- */
-struct initmsgIII /* phase III initialization message */
- {
- byte inIII_flags; /* route flags */
- word inIII_src; /* source node address */
- byte inIII_info; /* routing layer information */
- word inIII_blksize; /* maximum data link block size */
- byte inIII_vers; /* version number */
- byte inIII_eco; /* ECO number */
- byte inIII_ueco; /* user ECO number */
- byte inIII_rsvd; /* reserved image field */
- };
-
-struct initmsg /* initialization message */
- {
- byte in_flags; /* route flags */
- word in_src; /* source node address */
- byte in_info; /* routing layer information */
- word in_blksize; /* maximum data link block size */
- byte in_vers; /* version number */
- byte in_eco; /* ECO number */
- byte in_ueco; /* user ECO number */
- word in_hello; /* hello timer */
- byte in_rsvd; /* reserved image field */
- };
-
-struct verifmsg /* verification message */
- {
- byte ve_flags; /* route flags */
- word ve_src; /* source node address */
- byte ve_fcnval; /* function value image field */
- };
-
-struct testmsg /* hello and test message */
- {
- byte te_flags; /* route flags */
- word te_src; /* source node address */
- byte te_data; /* test data image field */
- };
-
-struct l1rout /* level 1 routing message */
- {
- byte r1_flags; /* route flags */
- word r1_src; /* source node address */
- byte r1_rsvd; /* reserved field */
- };
-
-struct l2rout /* level 2 routing message */
- {
- byte r2_flags; /* route flags */
- word r2_src; /* source node address */
- byte r2_rsvd; /* reserved field */
- };
-
-struct rhellomsg /* router hello message */
- {
- byte rh_flags; /* route flags */
- byte rh_vers; /* version number */
- byte rh_eco; /* ECO number */
- byte rh_ueco; /* user ECO number */
- etheraddr rh_src; /* source id */
- byte rh_info; /* routing layer information */
- word rh_blksize; /* maximum data link block size */
- byte rh_priority; /* router's priority */
- byte rh_area; /* reserved */
- word rh_hello; /* hello timer */
- byte rh_mpd; /* reserved */
- };
-
-struct ehellomsg /* endnode hello message */
- {
- byte eh_flags; /* route flags */
- byte eh_vers; /* version number */
- byte eh_eco; /* ECO number */
- byte eh_ueco; /* user ECO number */
- etheraddr eh_src; /* source id */
- byte eh_info; /* routing layer information */
- word eh_blksize; /* maximum data link block size */
- byte eh_area; /* area (reserved) */
- byte eh_seed[8]; /* verification seed */
- etheraddr eh_router; /* designated router */
- word eh_hello; /* hello timer */
- byte eh_mpd; /* (reserved) */
- byte eh_data; /* test data image field */
- };
-
-union controlmsg
- {
- struct initmsg cm_init; /* initialization message */
- struct verifmsg cm_ver; /* verification message */
- struct testmsg cm_test; /* hello and test message */
- struct l1rout cm_l1rou; /* level 1 routing message */
- struct l2rout cm_l2rout; /* level 2 routing message */
- struct rhellomsg cm_rhello; /* router hello message */
- struct ehellomsg cm_ehello; /* endnode hello message */
- };
-
-/* Macros for decoding routing-info fields */
-#define RI_COST(x) ((x)&0777)
-#define RI_HOPS(x) (((x)>>10)&037)
-
-/*
- * NSP protocol fields and values.
- */
-
-#define NSP_TYPEMASK 014 /* mask to isolate type code */
-#define NSP_SUBMASK 0160 /* mask to isolate subtype code */
-#define NSP_SUBSHFT 4 /* shift to move subtype code */
-
-#define MFT_DATA 0 /* data message */
-#define MFT_ACK 04 /* acknowledgement message */
-#define MFT_CTL 010 /* control message */
-
-#define MFS_ILS 020 /* data or I/LS indicator */
-#define MFS_BOM 040 /* beginning of message (data) */
-#define MFS_MOM 0 /* middle of message (data) */
-#define MFS_EOM 0100 /* end of message (data) */
-#define MFS_INT 040 /* interrupt message */
-
-#define MFS_DACK 0 /* data acknowledgement */
-#define MFS_IACK 020 /* I/LS acknowledgement */
-#define MFS_CACK 040 /* connect acknowledgement */
-
-#define MFS_NOP 0 /* no operation */
-#define MFS_CI 020 /* connect initiate */
-#define MFS_CC 040 /* connect confirm */
-#define MFS_DI 060 /* disconnect initiate */
-#define MFS_DC 0100 /* disconnect confirm */
-#define MFS_RCI 0140 /* retransmitted connect initiate */
-
-#define SGQ_ACK 0100000 /* ack */
-#define SGQ_NAK 0110000 /* negative ack */
-#define SGQ_OACK 0120000 /* other channel ack */
-#define SGQ_ONAK 0130000 /* other channel negative ack */
-#define SGQ_MASK 07777 /* mask to isolate seq # */
-#define SGQ_OTHER 020000 /* other channel qualifier */
-#define SGQ_DELAY 010000 /* ack delay flag */
-
-#define SGQ_EOM 0100000 /* pseudo flag for end-of-message */
-
-#define LSM_MASK 03 /* mask for modifier field */
-#define LSM_NOCHANGE 0 /* no change */
-#define LSM_DONOTSEND 1 /* do not send data */
-#define LSM_SEND 2 /* send data */
-
-#define LSI_MASK 014 /* mask for interpretation field */
-#define LSI_DATA 0 /* data segment or message count */
-#define LSI_INTR 4 /* interrupt request count */
-#define LSI_INTM 0377 /* funny marker for int. message */
-
-#define COS_MASK 014 /* mask for flow control field */
-#define COS_NONE 0 /* no flow control */
-#define COS_SEGMENT 04 /* segment flow control */
-#define COS_MESSAGE 010 /* message flow control */
-#define COS_CRYPTSER 020 /* cryptographic services requested */
-#define COS_DEFAULT 1 /* default value for field */
-
-#define COI_MASK 3 /* mask for version field */
-#define COI_32 0 /* version 3.2 */
-#define COI_31 1 /* version 3.1 */
-#define COI_40 2 /* version 4.0 */
-#define COI_41 3 /* version 4.1 */
-
-#define MNU_MASK 140 /* mask for session control version */
-#define MNU_10 000 /* session V1.0 */
-#define MNU_20 040 /* session V2.0 */
-#define MNU_ACCESS 1 /* access control present */
-#define MNU_USRDATA 2 /* user data field present */
-#define MNU_INVKPROXY 4 /* invoke proxy field present */
-#define MNU_UICPROXY 8 /* use uic-based proxy */
-
-#define DC_NORESOURCES 1 /* no resource reason code */
-#define DC_NOLINK 41 /* no link terminate reason code */
-#define DC_COMPLETE 42 /* disconnect complete reason code */
-
-#define DI_NOERROR 0 /* user disconnect */
-#define DI_SHUT 3 /* node is shutting down */
-#define DI_NOUSER 4 /* destination end user does not exist */
-#define DI_INVDEST 5 /* invalid end user destination */
-#define DI_REMRESRC 6 /* insufficient remote resources */
-#define DI_TPA 8 /* third party abort */
-#define DI_PROTOCOL 7 /* protocol error discovered */
-#define DI_ABORT 9 /* user abort */
-#define DI_LOCALRESRC 32 /* insufficient local resources */
-#define DI_REMUSERRESRC 33 /* insufficient remote user resources */
-#define DI_BADACCESS 34 /* bad access control information */
-#define DI_BADACCNT 36 /* bad ACCOUNT information */
-#define DI_CONNECTABORT 38 /* connect request cancelled */
-#define DI_TIMEDOUT 38 /* remote node or user crashed */
-#define DI_UNREACHABLE 39 /* local timers expired due to ... */
-#define DI_BADIMAGE 43 /* bad image data in connect */
-#define DI_SERVMISMATCH 54 /* cryptographic service mismatch */
-
-#define UC_OBJREJECT 0 /* object rejected connect */
-#define UC_USERDISCONNECT 0 /* user disconnect */
-#define UC_RESOURCES 1 /* insufficient resources (local or remote) */
-#define UC_NOSUCHNODE 2 /* unrecognized node name */
-#define UC_REMOTESHUT 3 /* remote node shutting down */
-#define UC_NOSUCHOBJ 4 /* unrecognized object */
-#define UC_INVOBJFORMAT 5 /* invalid object name format */
-#define UC_OBJTOOBUSY 6 /* object too busy */
-#define UC_NETWORKABORT 8 /* network abort */
-#define UC_USERABORT 9 /* user abort */
-#define UC_INVNODEFORMAT 10 /* invalid node name format */
-#define UC_LOCALSHUT 11 /* local node shutting down */
-#define UC_ACCESSREJECT 34 /* invalid access control information */
-#define UC_NORESPONSE 38 /* no response from object */
-#define UC_UNREACHABLE 39 /* node unreachable */
-
-/*
- * NSP message formats.
- */
-struct nsphdr /* general nsp header */
- {
- byte nh_flags; /* message flags */
- word nh_dst; /* destination link address */
- word nh_src; /* source link address */
- };
-
-struct seghdr /* data segment header */
- {
- byte sh_flags; /* message flags */
- word sh_dst; /* destination link address */
- word sh_src; /* source link address */
- word sh_seq[3]; /* sequence numbers */
- };
-
-struct minseghdr /* minimum data segment header */
- {
- byte ms_flags; /* message flags */
- word ms_dst; /* destination link address */
- word ms_src; /* source link address */
- word ms_seq; /* sequence number */
- };
-
-struct lsmsg /* link service message (after hdr) */
- {
- byte ls_lsflags; /* link service flags */
- byte ls_fcval; /* flow control value */
- };
-
-struct ackmsg /* acknowledgement message */
- {
- byte ak_flags; /* message flags */
- word ak_dst; /* destination link address */
- word ak_src; /* source link address */
- word ak_acknum[2]; /* acknowledgement numbers */
- };
-
-struct minackmsg /* minimum acknowledgement message */
- {
- byte mk_flags; /* message flags */
- word mk_dst; /* destination link address */
- word mk_src; /* source link address */
- word mk_acknum; /* acknowledgement number */
- };
-
-struct ciackmsg /* connect acknowledgement message */
- {
- byte ck_flags; /* message flags */
- word ck_dst; /* destination link address */
- };
-
-struct cimsg /* connect initiate message */
- {
- byte ci_flags; /* message flags */
- word ci_dst; /* destination link address (0) */
- word ci_src; /* source link address */
- byte ci_services; /* requested services */
- byte ci_info; /* information */
- word ci_segsize; /* maximum segment size */
- };
-
-struct ccmsg /* connect confirm message */
- {
- byte cc_flags; /* message flags */
- word cc_dst; /* destination link address */
- word cc_src; /* source link address */
- byte cc_services; /* requested services */
- byte cc_info; /* information */
- word cc_segsize; /* maximum segment size */
- byte cc_optlen; /* optional data length */
- };
-
-struct cnmsg /* generic connect message */
- {
- byte cn_flags; /* message flags */
- word cn_dst; /* destination link address */
- word cn_src; /* source link address */
- byte cn_services; /* requested services */
- byte cn_info; /* information */
- word cn_segsize; /* maximum segment size */
- };
-
-struct dimsg /* disconnect initiate message */
- {
- byte di_flags; /* message flags */
- word di_dst; /* destination link address */
- word di_src; /* source link address */
- word di_reason; /* reason code */
- byte di_optlen; /* optional data length */
- };
-
-struct dcmsg /* disconnect confirm message */
- {
- byte dc_flags; /* message flags */
- word dc_dst; /* destination link address */
- word dc_src; /* source link address */
- word dc_reason; /* reason code */
- };
diff --git a/decode_prefix.h b/decode_prefix.h
deleted file mode 100644
index 8bb4a76750a5..000000000000
--- a/decode_prefix.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Extensively modified by Hannes Gredler (hannes@juniper.net) for more
- * complete BGP support.
- */
-
-#ifndef tcpdump_decode_prefix_h
-#define tcpdump_decode_prefix_h
-
-extern int decode_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen);
-#ifdef INET6
-extern int decode_prefix6(const u_char *pd, u_int itemlen, char *buf, u_int buflen);
-#endif
-
-#endif
diff --git a/enc.h b/enc.h
deleted file mode 100644
index 2d57e2b8df16..000000000000
--- a/enc.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/enc.h,v 1.1 2003-03-08 08:55:33 guy Exp $ (LBL) */
-/* From $OpenBSD: if_enc.h,v 1.8 2001/06/25 05:14:00 angelos Exp $ */
-/*
- * The authors of this code are John Ioannidis (ji@tla.org),
- * Angelos D. Keromytis (kermit@csd.uch.gr) and
- * Niels Provos (provos@physnet.uni-hamburg.de).
- *
- * This code was written by John Ioannidis for BSD/OS in Athens, Greece,
- * in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis.
- *
- * Additional transforms and features in 1997 and 1998 by Angelos D. Keromytis
- * and Niels Provos.
- *
- * Copyright (C) 1995, 1996, 1997, 1998 by John Ioannidis, Angelos D. Keromytis
- * and Niels Provos.
- * Copyright (c) 2001, Angelos D. Keromytis.
- *
- * Permission to use, copy, and modify this software with or without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- * You may use this code under the GNU public license if you so wish. Please
- * contribute changes back to the authors under this freer than GPL license
- * so that we may further the use of strong encryption without limitations to
- * all.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
- */
-
-#define ENC_HDRLEN 12
-
-/* From $OpenBSD: mbuf.h,v 1.56 2002/01/25 15:50:23 art Exp $ */
-#define M_CONF 0x0400 /* packet was encrypted (ESP-transport) */
-#define M_AUTH 0x0800 /* packet was authenticated (AH) */
-
-struct enchdr {
- u_int32_t af;
- u_int32_t spi;
- u_int32_t flags;
-};
diff --git a/esp.h b/esp.h
deleted file mode 100644
index 56cdada01e2d..000000000000
--- a/esp.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* $NetBSD: esp.h,v 1.13 2000/09/26 08:37:38 itojun Exp $ */
-/* $KAME: esp.h,v 1.15 2000/09/20 18:15:22 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * RFC1827/2406 Encapsulated Security Payload.
- */
-
-#ifndef _NETINET6_ESP_H_
-#define _NETINET6_ESP_H_
-
-struct esp {
- u_int32_t esp_spi; /* ESP */
- /*variable size, 32bit bound*/ /* Initialization Vector */
- /*variable size*/ /* Payload data */
- /*variable size*/ /* padding */
- /*8bit*/ /* pad size */
- /*8bit*/ /* next header */
- /*8bit*/ /* next header */
- /*variable size, 32bit bound*/ /* Authentication data (new IPsec) */
-};
-
-struct newesp {
- u_int32_t esp_spi; /* ESP */
- u_int32_t esp_seq; /* Sequence number */
- /*variable size*/ /* (IV and) Payload data */
- /*variable size*/ /* padding */
- /*8bit*/ /* pad size */
- /*8bit*/ /* next header */
- /*8bit*/ /* next header */
- /*variable size, 32bit bound*/ /* Authentication data */
-};
-
-struct esptail {
- u_int8_t esp_padlen; /* pad length */
- u_int8_t esp_nxt; /* Next header */
- /*variable size, 32bit bound*/ /* Authentication data (new IPsec)*/
-};
-
-#endif /*_NETINET6_ESP_H_*/
diff --git a/ether.h b/ether.h
index e8b3a7138dd5..58b92de52a03 100644
--- a/ether.h
+++ b/ether.h
@@ -1,4 +1,3 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.8 2002-12-11 07:13:51 guy Exp $ (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
@@ -45,9 +44,9 @@
* Structure of a DEC/Intel/Xerox or 802.3 Ethernet header.
*/
struct ether_header {
- u_int8_t ether_dhost[ETHER_ADDR_LEN];
- u_int8_t ether_shost[ETHER_ADDR_LEN];
- u_int16_t ether_type;
+ uint8_t ether_dhost[ETHER_ADDR_LEN];
+ uint8_t ether_shost[ETHER_ADDR_LEN];
+ uint16_t ether_type;
};
/*
diff --git a/ethertype.h b/ethertype.h
index 385da5d7169d..803991735eb2 100644
--- a/ethertype.h
+++ b/ethertype.h
@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/ethertype.h,v 1.30 2008-02-06 10:47:53 guy Exp $ (LBL)
*/
/*
@@ -168,11 +166,14 @@
#ifndef ETHERTYPE_RRCP
#define ETHERTYPE_RRCP 0x8899
#endif
+#ifndef ETHERTYPE_AOE
+#define ETHERTYPE_AOE 0x88a2
+#endif
#ifndef ETHERTYPE_LOOPBACK
#define ETHERTYPE_LOOPBACK 0x9000
#endif
#ifndef ETHERTYPE_VMAN
-#define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */
+#define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */
#endif
#ifndef ETHERTYPE_CFM_OLD
#define ETHERTYPE_CFM_OLD 0xabcd /* 802.1ag depreciated */
@@ -180,8 +181,20 @@
#ifndef ETHERTYPE_CFM
#define ETHERTYPE_CFM 0x8902 /* 802.1ag */
#endif
+#ifndef ETHERTYPE_IEEE1905_1
+#define ETHERTYPE_IEEE1905_1 0x893a /* IEEE 1905.1 */
+#endif
#ifndef ETHERTYPE_ISO
#define ETHERTYPE_ISO 0xfefe /* nonstandard - used in Cisco HDLC encapsulation */
#endif
+#ifndef ETHERTYPE_CALM_FAST
+#define ETHERTYPE_CALM_FAST 0x1111 /* ISO CALM FAST */
+#endif
+#ifndef ETHERTYPE_GEONET_OLD
+#define ETHERTYPE_GEONET_OLD 0x0707 /* ETSI GeoNetworking (before Jan 2013) */
+#endif
+#ifndef ETHERTYPE_GEONET
+#define ETHERTYPE_GEONET 0x8947 /* ETSI GeoNetworking (Official IEEE registration from Jan 2013) */
+#endif
extern const struct tok ethertype_values[];
diff --git a/extract.h b/extract.h
index 60ecd680363a..d2174ba2c542 100644
--- a/extract.h
+++ b/extract.h
@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/extract.h,v 1.25 2006-01-30 16:20:07 hannes Exp $ (LBL)
*/
/*
@@ -28,104 +26,168 @@
/*
* The processor doesn't natively handle unaligned loads.
*/
-#ifdef HAVE___ATTRIBUTE__
+#if defined(__GNUC__) && defined(HAVE___ATTRIBUTE__) && \
+ (defined(__alpha) || defined(__alpha__) || \
+ defined(__mips) || defined(__mips__))
+
/*
- * We have __attribute__; we assume that means we have __attribute__((packed)).
- * Declare packed structures containing a u_int16_t and a u_int32_t,
+ * This is a GCC-compatible compiler and we have __attribute__, which
+ * we assume that mean we have __attribute__((packed)), and this is
+ * MIPS or Alpha, which has instructions that can help when doing
+ * unaligned loads.
+ *
+ * Declare packed structures containing a uint16_t and a uint32_t,
* cast the pointer to point to one of those, and fetch through it;
* the GCC manual doesn't appear to explicitly say that
* __attribute__((packed)) causes the compiler to generate unaligned-safe
* code, but it apppears to do so.
*
- * We do this in case the compiler can generate, for this instruction set,
- * better code to do an unaligned load and pass stuff to "ntohs()" or
- * "ntohl()" than the code to fetch the bytes one at a time and
- * assemble them. (That might not be the case on a little-endian platform,
- * where "ntohs()" and "ntohl()" might not be done inline.)
+ * We do this in case the compiler can generate code using those
+ * instructions to do an unaligned load and pass stuff to "ntohs()" or
+ * "ntohl()", which might be better than than the code to fetch the
+ * bytes one at a time and assemble them. (That might not be the
+ * case on a little-endian platform, such as DEC's MIPS machines and
+ * Alpha machines, where "ntohs()" and "ntohl()" might not be done
+ * inline.)
+ *
+ * We do this only for specific architectures because, for example,
+ * at least some versions of GCC, when compiling for 64-bit SPARC,
+ * generate code that assumes alignment if we do this.
+ *
+ * XXX - add other architectures and compilers as possible and
+ * appropriate.
+ *
+ * HP's C compiler, indicated by __HP_cc being defined, supports
+ * "#pragma unaligned N" in version A.05.50 and later, where "N"
+ * specifies a number of bytes at which the typedef on the next
+ * line is aligned, e.g.
+ *
+ * #pragma unalign 1
+ * typedef uint16_t unaligned_uint16_t;
+ *
+ * to define unaligned_uint16_t as a 16-bit unaligned data type.
+ * This could be presumably used, in sufficiently recent versions of
+ * the compiler, with macros similar to those below. This would be
+ * useful only if that compiler could generate better code for PA-RISC
+ * or Itanium than would be generated by a bunch of shifts-and-ORs.
+ *
+ * DEC C, indicated by __DECC being defined, has, at least on Alpha,
+ * an __unaligned qualifier that can be applied to pointers to get the
+ * compiler to generate code that does unaligned loads and stores when
+ * dereferencing the pointer in question.
+ *
+ * XXX - what if the native C compiler doesn't support
+ * __attribute__((packed))? How can we get it to generate unaligned
+ * accesses for *specific* items?
*/
typedef struct {
- u_int16_t val;
-} __attribute__((packed)) unaligned_u_int16_t;
+ uint16_t val;
+} __attribute__((packed)) unaligned_uint16_t;
typedef struct {
- u_int32_t val;
-} __attribute__((packed)) unaligned_u_int32_t;
+ uint32_t val;
+} __attribute__((packed)) unaligned_uint32_t;
-static inline u_int16_t
+static inline uint16_t
EXTRACT_16BITS(const void *p)
{
- return ((u_int16_t)ntohs(((const unaligned_u_int16_t *)(p))->val));
+ return ((uint16_t)ntohs(((const unaligned_uint16_t *)(p))->val));
}
-static inline u_int32_t
+static inline uint32_t
EXTRACT_32BITS(const void *p)
{
- return ((u_int32_t)ntohl(((const unaligned_u_int32_t *)(p))->val));
+ return ((uint32_t)ntohl(((const unaligned_uint32_t *)(p))->val));
}
-static inline u_int64_t
+static inline uint64_t
EXTRACT_64BITS(const void *p)
{
- return ((u_int64_t)(((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 0)->val)) << 32 | \
- ((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 1)->val)) << 0));
-
+ return ((uint64_t)(((uint64_t)ntohl(((const unaligned_uint32_t *)(p) + 0)->val)) << 32 | \
+ ((uint64_t)ntohl(((const unaligned_uint32_t *)(p) + 1)->val)) << 0));
}
-#else /* HAVE___ATTRIBUTE__ */
+#else /* have to do it a byte at a time */
/*
- * We don't have __attribute__, so do unaligned loads of big-endian
+ * This isn't a GCC-compatible compiler, we don't have __attribute__,
+ * or we do but we don't know of any better way with this instruction
+ * set to do unaligned loads, so do unaligned loads of big-endian
* quantities the hard way - fetch the bytes one at a time and
* assemble them.
*/
#define EXTRACT_16BITS(p) \
- ((u_int16_t)((u_int16_t)*((const u_int8_t *)(p) + 0) << 8 | \
- (u_int16_t)*((const u_int8_t *)(p) + 1)))
+ ((uint16_t)((uint16_t)*((const uint8_t *)(p) + 0) << 8 | \
+ (uint16_t)*((const uint8_t *)(p) + 1)))
#define EXTRACT_32BITS(p) \
- ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 0) << 24 | \
- (u_int32_t)*((const u_int8_t *)(p) + 1) << 16 | \
- (u_int32_t)*((const u_int8_t *)(p) + 2) << 8 | \
- (u_int32_t)*((const u_int8_t *)(p) + 3)))
+ ((uint32_t)((uint32_t)*((const uint8_t *)(p) + 0) << 24 | \
+ (uint32_t)*((const uint8_t *)(p) + 1) << 16 | \
+ (uint32_t)*((const uint8_t *)(p) + 2) << 8 | \
+ (uint32_t)*((const uint8_t *)(p) + 3)))
#define EXTRACT_64BITS(p) \
- ((u_int64_t)((u_int64_t)*((const u_int8_t *)(p) + 0) << 56 | \
- (u_int64_t)*((const u_int8_t *)(p) + 1) << 48 | \
- (u_int64_t)*((const u_int8_t *)(p) + 2) << 40 | \
- (u_int64_t)*((const u_int8_t *)(p) + 3) << 32 | \
- (u_int64_t)*((const u_int8_t *)(p) + 4) << 24 | \
- (u_int64_t)*((const u_int8_t *)(p) + 5) << 16 | \
- (u_int64_t)*((const u_int8_t *)(p) + 6) << 8 | \
- (u_int64_t)*((const u_int8_t *)(p) + 7)))
-#endif /* HAVE___ATTRIBUTE__ */
+ ((uint64_t)((uint64_t)*((const uint8_t *)(p) + 0) << 56 | \
+ (uint64_t)*((const uint8_t *)(p) + 1) << 48 | \
+ (uint64_t)*((const uint8_t *)(p) + 2) << 40 | \
+ (uint64_t)*((const uint8_t *)(p) + 3) << 32 | \
+ (uint64_t)*((const uint8_t *)(p) + 4) << 24 | \
+ (uint64_t)*((const uint8_t *)(p) + 5) << 16 | \
+ (uint64_t)*((const uint8_t *)(p) + 6) << 8 | \
+ (uint64_t)*((const uint8_t *)(p) + 7)))
+#endif /* must special-case unaligned accesses */
#else /* LBL_ALIGN */
/*
* The processor natively handles unaligned loads, so we can just
* cast the pointer and fetch through it.
*/
-static inline u_int16_t
+static inline uint16_t
EXTRACT_16BITS(const void *p)
{
- return ((u_int16_t)ntohs(*(const u_int16_t *)(p)));
+ return ((uint16_t)ntohs(*(const uint16_t *)(p)));
}
-static inline u_int32_t
+static inline uint32_t
EXTRACT_32BITS(const void *p)
{
- return ((u_int32_t)ntohl(*(const u_int32_t *)(p)));
+ return ((uint32_t)ntohl(*(const uint32_t *)(p)));
}
-static inline u_int64_t
+static inline uint64_t
EXTRACT_64BITS(const void *p)
{
- return ((u_int64_t)(((u_int64_t)ntohl(*((const u_int32_t *)(p) + 0))) << 32 | \
- ((u_int64_t)ntohl(*((const u_int32_t *)(p) + 1))) << 0));
+ return ((uint64_t)(((uint64_t)ntohl(*((const uint32_t *)(p) + 0))) << 32 | \
+ ((uint64_t)ntohl(*((const uint32_t *)(p) + 1))) << 0));
}
#endif /* LBL_ALIGN */
#define EXTRACT_24BITS(p) \
- ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 0) << 16 | \
- (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \
- (u_int32_t)*((const u_int8_t *)(p) + 2)))
+ ((uint32_t)((uint32_t)*((const uint8_t *)(p) + 0) << 16 | \
+ (uint32_t)*((const uint8_t *)(p) + 1) << 8 | \
+ (uint32_t)*((const uint8_t *)(p) + 2)))
+
+#define EXTRACT_40BITS(p) \
+ ((uint64_t)((uint64_t)*((const uint8_t *)(p) + 0) << 32 | \
+ (uint64_t)*((const uint8_t *)(p) + 1) << 24 | \
+ (uint64_t)*((const uint8_t *)(p) + 2) << 16 | \
+ (uint64_t)*((const uint8_t *)(p) + 3) << 8 | \
+ (uint64_t)*((const uint8_t *)(p) + 4)))
+
+#define EXTRACT_48BITS(p) \
+ ((uint64_t)((uint64_t)*((const uint8_t *)(p) + 0) << 40 | \
+ (uint64_t)*((const uint8_t *)(p) + 1) << 32 | \
+ (uint64_t)*((const uint8_t *)(p) + 2) << 24 | \
+ (uint64_t)*((const uint8_t *)(p) + 3) << 16 | \
+ (uint64_t)*((const uint8_t *)(p) + 4) << 8 | \
+ (uint64_t)*((const uint8_t *)(p) + 5)))
+
+#define EXTRACT_56BITS(p) \
+ ((uint64_t)((uint64_t)*((const uint8_t *)(p) + 0) << 48 | \
+ (uint64_t)*((const uint8_t *)(p) + 1) << 40 | \
+ (uint64_t)*((const uint8_t *)(p) + 2) << 32 | \
+ (uint64_t)*((const uint8_t *)(p) + 3) << 24 | \
+ (uint64_t)*((const uint8_t *)(p) + 4) << 16 | \
+ (uint64_t)*((const uint8_t *)(p) + 5) << 8 | \
+ (uint64_t)*((const uint8_t *)(p) + 6)))
/*
* Macros to extract possibly-unaligned little-endian integral values.
@@ -133,23 +195,23 @@ EXTRACT_64BITS(const void *p)
*/
#define EXTRACT_LE_8BITS(p) (*(p))
#define EXTRACT_LE_16BITS(p) \
- ((u_int16_t)((u_int16_t)*((const u_int8_t *)(p) + 1) << 8 | \
- (u_int16_t)*((const u_int8_t *)(p) + 0)))
+ ((uint16_t)((uint16_t)*((const uint8_t *)(p) + 1) << 8 | \
+ (uint16_t)*((const uint8_t *)(p) + 0)))
#define EXTRACT_LE_32BITS(p) \
- ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 3) << 24 | \
- (u_int32_t)*((const u_int8_t *)(p) + 2) << 16 | \
- (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \
- (u_int32_t)*((const u_int8_t *)(p) + 0)))
+ ((uint32_t)((uint32_t)*((const uint8_t *)(p) + 3) << 24 | \
+ (uint32_t)*((const uint8_t *)(p) + 2) << 16 | \
+ (uint32_t)*((const uint8_t *)(p) + 1) << 8 | \
+ (uint32_t)*((const uint8_t *)(p) + 0)))
#define EXTRACT_LE_24BITS(p) \
- ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 2) << 16 | \
- (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \
- (u_int32_t)*((const u_int8_t *)(p) + 0)))
+ ((uint32_t)((uint32_t)*((const uint8_t *)(p) + 2) << 16 | \
+ (uint32_t)*((const uint8_t *)(p) + 1) << 8 | \
+ (uint32_t)*((const uint8_t *)(p) + 0)))
#define EXTRACT_LE_64BITS(p) \
- ((u_int64_t)((u_int64_t)*((const u_int8_t *)(p) + 7) << 56 | \
- (u_int64_t)*((const u_int8_t *)(p) + 6) << 48 | \
- (u_int64_t)*((const u_int8_t *)(p) + 5) << 40 | \
- (u_int64_t)*((const u_int8_t *)(p) + 4) << 32 | \
- (u_int64_t)*((const u_int8_t *)(p) + 3) << 24 | \
- (u_int64_t)*((const u_int8_t *)(p) + 2) << 16 | \
- (u_int64_t)*((const u_int8_t *)(p) + 1) << 8 | \
- (u_int64_t)*((const u_int8_t *)(p) + 0)))
+ ((uint64_t)((uint64_t)*((const uint8_t *)(p) + 7) << 56 | \
+ (uint64_t)*((const uint8_t *)(p) + 6) << 48 | \
+ (uint64_t)*((const uint8_t *)(p) + 5) << 40 | \
+ (uint64_t)*((const uint8_t *)(p) + 4) << 32 | \
+ (uint64_t)*((const uint8_t *)(p) + 3) << 24 | \
+ (uint64_t)*((const uint8_t *)(p) + 2) << 16 | \
+ (uint64_t)*((const uint8_t *)(p) + 1) << 8 | \
+ (uint64_t)*((const uint8_t *)(p) + 0)))
diff --git a/fddi.h b/fddi.h
deleted file mode 100644
index df38c8e9a870..000000000000
--- a/fddi.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1992, 1993, 1994, 1995, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/fddi.h,v 1.11 2002-12-11 07:13:51 guy Exp $ (LBL)
- */
-
-/*
- * Based on Ultrix if_fddi.h
- */
-
-/*
- * This stuff should come from a system header file, but there's no
- * obviously portable way to do that and it's not really going
- * to change from system to system (except for the padding business).
- */
-
-struct fddi_header {
- u_char fddi_fc; /* frame control */
- u_char fddi_dhost[6];
- u_char fddi_shost[6];
-};
-
-/*
- * Length of an FDDI header; note that some compilers may pad
- * "struct fddi_header" to a multiple of 4 bytes, for example, so
- * "sizeof (struct fddi_header)" may not give the right
- * answer.
- */
-#define FDDI_HDRLEN 13
-
-/* Useful values for fddi_fc (frame control) field */
-
-/*
- * FDDI Frame Control bits
- */
-#define FDDIFC_C 0x80 /* Class bit */
-#define FDDIFC_L 0x40 /* Address length bit */
-#define FDDIFC_F 0x30 /* Frame format bits */
-#define FDDIFC_Z 0x0f /* Control bits */
-
-/*
- * FDDI Frame Control values. (48-bit addressing only).
- */
-#define FDDIFC_VOID 0x40 /* Void frame */
-#define FDDIFC_NRT 0x80 /* Nonrestricted token */
-#define FDDIFC_RT 0xc0 /* Restricted token */
-#define FDDIFC_SMT_INFO 0x41 /* SMT Info */
-#define FDDIFC_SMT_NSA 0x4F /* SMT Next station adrs */
-#define FDDIFC_MAC_BEACON 0xc2 /* MAC Beacon frame */
-#define FDDIFC_MAC_CLAIM 0xc3 /* MAC Claim frame */
-#define FDDIFC_LLC_ASYNC 0x50 /* Async. LLC frame */
-#define FDDIFC_LLC_SYNC 0xd0 /* Sync. LLC frame */
-#define FDDIFC_IMP_ASYNC 0x60 /* Implementor Async. */
-#define FDDIFC_IMP_SYNC 0xe0 /* Implementor Synch. */
-#define FDDIFC_SMT 0x40 /* SMT frame */
-#define FDDIFC_MAC 0xc0 /* MAC frame */
-
-#define FDDIFC_CLFF 0xF0 /* Class/Length/Format bits */
-#define FDDIFC_ZZZZ 0x0F /* Control bits */
diff --git a/forces.h b/forces.h
deleted file mode 100644
index d41475f908ae..000000000000
--- a/forces.h
+++ /dev/null
@@ -1,679 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Copyright (c) 2009 Mojatatu Networks, Inc
- *
- */
-
-/*
- * Per draft-ietf-forces-protocol-22
-*/
-#define ForCES_VERS 1
-#define ForCES_HDRL 24
-#define ForCES_ALNL 4U
-#define TLV_HDRL 4
-#define ILV_HDRL 8
-
-#define TOM_RSVD 0x0
-#define TOM_ASSNSETUP 0x1
-#define TOM_ASSNTEARD 0x2
-#define TOM_CONFIG 0x3
-#define TOM_QUERY 0x4
-#define TOM_EVENTNOT 0x5
-#define TOM_PKTREDIR 0x6
-#define TOM_HEARTBT 0x0F
-#define TOM_ASSNSETREP 0x11
-#define TOM_CONFIGREP 0x13
-#define TOM_QUERYREP 0x14
-
-/*
- * tom_h Flags: resv1(8b):maxtlvs(4b):resv2(2b):mintlv(2b)
-*/
-#define ZERO_TTLV 0x01
-#define ZERO_MORE_TTLV 0x02
-#define ONE_MORE_TTLV 0x04
-#define ZERO_TLV 0x00
-#define ONE_TLV 0x10
-#define TWO_TLV 0x20
-#define MAX_TLV 0xF0
-
-#define TTLV_T1 (ONE_MORE_TTLV|ONE_TLV)
-#define TTLV_T2 (ONE_MORE_TTLV|MAX_TLV)
-
-struct tom_h {
- u_int32_t v;
- u_int16_t flags;
- u_int16_t op_msk;
- const char *s;
- int (*print) (register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-};
-
-enum {
- TOM_RSV_I,
- TOM_ASS_I,
- TOM_AST_I,
- TOM_CFG_I,
- TOM_QRY_I,
- TOM_EVN_I,
- TOM_RED_I,
- TOM_HBT_I,
- TOM_ASR_I,
- TOM_CNR_I,
- TOM_QRR_I,
- _TOM_RSV_MAX
-};
-#define TOM_MAX_IND (_TOM_RSV_MAX - 1)
-
-int lfbselect_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int redirect_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int asrtlv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int asttlv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int gentltlv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int print_metailv(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int print_metatlv(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int print_reddata(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-
-static inline int tom_valid(u_int8_t tom)
-{
- if (tom > 0) {
- if (tom >= 0x7 && tom <= 0xe)
- return 0;
- if (tom == 0x10)
- return 0;
- if (tom > 0x14)
- return 0;
- return 1;
- } else
- return 0;
-}
-
-static inline const char *ForCES_node(u_int32_t node)
-{
- if (node <= 0x3FFFFFFF)
- return "FE";
- if (node >= 0x40000000 && node <= 0x7FFFFFFF)
- return "CE";
- if (node >= 0xC0000000 && node <= 0xFFFFFFEF)
- return "AllMulticast";
- if (node == 0xFFFFFFFD)
- return "AllCEsBroadcast";
- if (node == 0xFFFFFFFE)
- return "AllFEsBroadcast";
- if (node == 0xFFFFFFFF)
- return "AllBroadcast";
-
- return "ForCESreserved";
-
-}
-
-static inline const char *ForCES_ACKp(u_int32_t flg)
-{
- if (flg == 0x0)
- return "NoACK";
- if (flg == 0x1)
- return "SuccessACK";
- if (flg == 0x2)
- return "FailureACK";
- if (flg == 0x3)
- return "AlwaysACK";
- return "ACKUnknown";
-}
-
-static inline const char *ForCES_EMp(u_int32_t flg)
-{
- if (flg == 0x0)
- return "EMReserved";
- if (flg == 0x1)
- return "execute-all-or-none";
- if (flg == 0x2)
- return "execute-until-failure";
- if (flg == 0x3)
- return "continue-execute-on-failure";
- return "EMUnknown";
-}
-
-static inline const char *ForCES_ATp(u_int32_t flg)
-{
- if (flg == 0x0)
- return "Standalone";
- if (flg == 0x1)
- return "2PCtransaction";
- return "ATUnknown";
-}
-
-static inline const char *ForCES_TPp(u_int32_t flg)
-{
- if (flg == 0x0)
- return "StartofTransaction";
- if (flg == 0x1)
- return "MiddleofTransaction";
- if (flg == 0x2)
- return "EndofTransaction";
- if (flg == 0x3)
- return "abort";
- return "TPUnknown";
-}
-
-/*
- * Structure of forces header, naked of TLVs.
- */
-struct forcesh {
- u_int8_t fm_vrsvd; /* version and reserved */
-#define ForCES_V(forcesh) ((forcesh)->fm_vrsvd >> 4)
- u_int8_t fm_tom; /* type of message */
- u_int16_t fm_len; /* total length * 4 bytes */
-#define ForCES_BLN(forcesh) ((u_int32_t)(EXTRACT_16BITS(&(forcesh)->fm_len) << 2))
- u_int32_t fm_sid; /* Source ID */
-#define ForCES_SID(forcesh) EXTRACT_32BITS(&(forcesh)->fm_sid)
- u_int32_t fm_did; /* Destination ID */
-#define ForCES_DID(forcesh) EXTRACT_32BITS(&(forcesh)->fm_did)
- u_int8_t fm_cor[8]; /* correlator */
- u_int32_t fm_flags; /* flags */
-#define ForCES_ACK(forcesh) ((EXTRACT_32BITS(&(forcesh)->fm_flags)&0xC0000000) >> 30)
-#define ForCES_PRI(forcesh) ((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x38000000) >> 27)
-#define ForCES_RS1(forcesh) ((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x07000000) >> 24)
-#define ForCES_EM(forcesh) ((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x00C00000) >> 22)
-#define ForCES_AT(forcesh) ((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x00200000) >> 21)
-#define ForCES_TP(forcesh) ((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x00180000) >> 19)
-#define ForCES_RS2(forcesh) ((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x0007FFFF) >> 0)
-};
-
-#define ForCES_HLN_VALID(fhl,tlen) ((tlen) >= ForCES_HDRL && \
- (fhl) >= ForCES_HDRL && \
- (fhl) == (tlen))
-
-#define F_LFB_RSVD 0x0
-#define F_LFB_FEO 0x1
-#define F_LFB_FEPO 0x2
-const struct tok ForCES_LFBs[] = {
- {F_LFB_RSVD, "Invalid TLV"},
- {F_LFB_FEO, "FEObj LFB"},
- {F_LFB_FEPO, "FEProtoObj LFB"},
- {0, NULL}
-};
-
-int forces_type_print(register const u_char * pptr, const struct forcesh *fhdr,
- register u_int mlen, const struct tom_h *tops);
-
-enum {
- F_OP_RSV,
- F_OP_SET,
- F_OP_SETPROP,
- F_OP_SETRESP,
- F_OP_SETPRESP,
- F_OP_DEL,
- F_OP_DELRESP,
- F_OP_GET,
- F_OP_GETPROP,
- F_OP_GETRESP,
- F_OP_GETPRESP,
- F_OP_REPORT,
- F_OP_COMMIT,
- F_OP_RCOMMIT,
- F_OP_RTRCOMP,
- _F_OP_MAX
-};
-
-#define F_OP_MAX (_F_OP_MAX - 1)
-enum {
- B_OP_SET = 1 << (F_OP_SET - 1),
- B_OP_SETPROP = 1 << (F_OP_SETPROP - 1),
- B_OP_SETRESP = 1 << (F_OP_SETRESP - 1),
- B_OP_SETPRESP = 1 << (F_OP_SETPRESP - 1),
- B_OP_DEL = 1 << (F_OP_DEL - 1),
- B_OP_DELRESP = 1 << (F_OP_DELRESP - 1),
- B_OP_GET = 1 << (F_OP_GET - 1),
- B_OP_GETPROP = 1 << (F_OP_GETPROP - 1),
- B_OP_GETRESP = 1 << (F_OP_GETRESP - 1),
- B_OP_GETPRESP = 1 << (F_OP_GETPRESP - 1),
- B_OP_REPORT = 1 << (F_OP_REPORT - 1),
- B_OP_COMMIT = 1 << (F_OP_COMMIT - 1),
- B_OP_RCOMMIT = 1 << (F_OP_RCOMMIT - 1),
- B_OP_RTRCOMP = 1 << (F_OP_RTRCOMP - 1),
-};
-
-struct optlv_h {
- u_int16_t flags;
- u_int16_t op_msk;
- const char *s;
- int (*print) (register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-};
-
-int genoptlv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int recpdoptlv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int invoptlv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-
-#define OP_MIN_SIZ 8
-struct pathdata_h {
- u_int16_t pflags;
- u_int16_t pIDcnt;
-};
-
-#define B_FULLD 0x1
-#define B_SPARD 0x2
-#define B_RESTV 0x4
-#define B_KEYIN 0x8
-
-static const struct optlv_h OPTLV_msg[F_OP_MAX + 1] = {
- /* F_OP_RSV */ {ZERO_TTLV, 0, "Invalid OPTLV", invoptlv_print},
- /* F_OP_SET */ {TTLV_T2, B_FULLD | B_SPARD, " Set", recpdoptlv_print},
- /* F_OP_SETPROP */
- {TTLV_T2, B_FULLD | B_SPARD, " SetProp", recpdoptlv_print},
- /* F_OP_SETRESP */ {TTLV_T2, B_RESTV, " SetResp", recpdoptlv_print},
- /* F_OP_SETPRESP */ {TTLV_T2, B_RESTV, " SetPropResp", recpdoptlv_print},
- /* F_OP_DEL */ {ZERO_TTLV, 0, " Del", recpdoptlv_print},
- /* F_OP_DELRESP */ {TTLV_T2, B_RESTV, " DelResp", recpdoptlv_print},
- /* F_OP_GET */ {ZERO_TTLV, 0, " Get", recpdoptlv_print},
- /* F_OP_GETPROP */ {ZERO_TTLV, 0, " GetProp", recpdoptlv_print},
- /* F_OP_GETRESP */
- {TTLV_T2, B_FULLD | B_SPARD | B_RESTV, " GetResp", recpdoptlv_print},
- /* F_OP_GETPRESP */
- {TTLV_T2, B_FULLD | B_RESTV, " GetPropResp", recpdoptlv_print},
- /* F_OP_REPORT */
- {TTLV_T2, B_FULLD | B_SPARD, " Report", recpdoptlv_print},
- /* F_OP_COMMIT */ {ZERO_TTLV, 0, " Commit", NULL},
- /* F_OP_RCOMMIT */ {TTLV_T1, B_RESTV, " RCommit", genoptlv_print},
- /* F_OP_RTRCOMP */ {ZERO_TTLV, 0, " RTRCOMP", NULL},
-};
-
-static inline const struct optlv_h *get_forces_optlv_h(u_int16_t opt)
-{
- if (opt > F_OP_MAX || opt <= F_OP_RSV)
- return &OPTLV_msg[F_OP_RSV];
-
- return &OPTLV_msg[opt];
-}
-
-#define IND_SIZE 256
-#define IND_CHR ' '
-#define IND_PREF '\n'
-#define IND_SUF 0x0
-char ind_buf[IND_SIZE];
-
-static inline char *indent_pr(int indent, int nlpref)
-{
- int i = 0;
- char *r = ind_buf;
-
- if (indent > (IND_SIZE - 1))
- indent = IND_SIZE - 1;
-
- if (nlpref) {
- r[i] = IND_PREF;
- i++;
- indent--;
- }
-
- while (--indent >= 0)
- r[i++] = IND_CHR;
-
- r[i] = IND_SUF;
- return r;
-}
-
-static inline int op_valid(u_int16_t op, u_int16_t mask)
-{
- int opb = 1 << (op - 1);
-
- if (op == 0)
- return 0;
- if (opb & mask)
- return 1;
- /* I guess we should allow vendor operations? */
- if (op >= 0x8000)
- return 1;
- return 0;
-}
-
-#define F_TLV_RSVD 0x0000
-#define F_TLV_REDR 0x0001
-#define F_TLV_ASRS 0x0010
-#define F_TLV_ASRT 0x0011
-#define F_TLV_LFBS 0x1000
-#define F_TLV_PDAT 0x0110
-#define F_TLV_KEYI 0x0111
-#define F_TLV_FULD 0x0112
-#define F_TLV_SPAD 0x0113
-#define F_TLV_REST 0x0114
-#define F_TLV_METD 0x0115
-#define F_TLV_REDD 0x0116
-#define F_TLV_VNST 0x8000
-
-static const struct tok ForCES_TLV[] = {
- {F_TLV_RSVD, "Invalid TLV"},
- {F_TLV_REDR, "REDIRECT TLV"},
- {F_TLV_ASRS, "ASResult TLV"},
- {F_TLV_ASRT, "ASTreason TLV"},
- {F_TLV_LFBS, "LFBselect TLV"},
- {F_TLV_PDAT, "PATH-DATA TLV"},
- {F_TLV_KEYI, "KEYINFO TLV"},
- {F_TLV_FULD, "FULLDATA TLV"},
- {F_TLV_SPAD, "SPARSEDATA TLV"},
- {F_TLV_REST, "RESULT TLV"},
- {F_TLV_METD, "METADATA TLV"},
- {F_TLV_REDD, "REDIRECTDATA TLV"},
- {0, NULL}
-};
-
-#define TLV_HLN 4
-static inline int ttlv_valid(u_int16_t ttlv)
-{
- if (ttlv > 0) {
- if (ttlv == 1 || ttlv == 0x1000)
- return 1;
- if (ttlv >= 0x10 && ttlv <= 0x11)
- return 1;
- if (ttlv >= 0x110 && ttlv <= 0x116)
- return 1;
- if (ttlv >= 0x8000)
- return 0; /* XXX: */
- }
-
- return 0;
-}
-
-struct forces_ilv {
- u_int32_t type;
- u_int32_t length;
-};
-
-struct forces_tlv {
- u_int16_t type;
- u_int16_t length;
-};
-
-int otlv_print(const struct forces_tlv *otlv, u_int16_t op_msk, int indent);
-
-#define F_ALN_LEN(len) ( ((len)+ForCES_ALNL-1) & ~(ForCES_ALNL-1) )
-#define GET_TOP_TLV(fhdr) ((struct forces_tlv *)((fhdr) + sizeof (struct forcesh)))
-#define TLV_SET_LEN(len) (F_ALN_LEN(TLV_HDRL) + (len))
-#define TLV_ALN_LEN(len) F_ALN_LEN(TLV_SET_LEN(len))
-#define TLV_RDAT_LEN(tlv) ((int)(EXTRACT_16BITS(&(tlv)->length) - TLV_SET_LEN(0))
-#define TLV_DATA(tlvp) ((void*)(((char*)(tlvp)) + TLV_SET_LEN(0)))
-#define GO_NXT_TLV(tlv,rlen) ((rlen) -= F_ALN_LEN(EXTRACT_16BITS(&(tlv)->length)), \
- (struct forces_tlv*)(((char*)(tlv)) \
- + F_ALN_LEN(EXTRACT_16BITS(&(tlv)->length))))
-#define ILV_SET_LEN(len) (F_ALN_LEN(ILV_HDRL) + (len))
-#define ILV_ALN_LEN(len) F_ALN_LEN(ILV_SET_LEN(len))
-#define ILV_RDAT_LEN(ilv) ((int)(EXTRACT_32BITS(&(ilv)->length)) - ILV_SET_LEN(0))
-#define ILV_DATA(ilvp) ((void*)(((char*)(ilvp)) + ILV_SET_LEN(0)))
-#define GO_NXT_ILV(ilv,rlen) ((rlen) -= F_ALN_LEN(EXTRACT_32BITS(&(ilv)->length)), \
- (struct forces_ilv *)(((char*)(ilv)) \
- + F_ALN_LEN(EXTRACT_32BITS(&(ilv)->length))))
-#define INVALID_RLEN -1
-#define INVALID_STLN -2
-#define INVALID_LTLN -3
-#define INVALID_ALEN -4
-
-static const struct tok ForCES_TLV_err[] = {
- {INVALID_RLEN, "Invalid total length"},
- {INVALID_STLN, "xLV too short"},
- {INVALID_LTLN, "xLV too long"},
- {INVALID_ALEN, "data padding missing"},
- {0, NULL}
-};
-
-static inline int tlv_valid(const struct forces_tlv *tlv, u_int rlen)
-{
- if (rlen < TLV_HDRL)
- return INVALID_RLEN;
- if (EXTRACT_16BITS(&tlv->length) < TLV_HDRL)
- return INVALID_STLN;
- if (EXTRACT_16BITS(&tlv->length) > rlen)
- return INVALID_LTLN;
- if (rlen < F_ALN_LEN(EXTRACT_16BITS(&tlv->length)))
- return INVALID_ALEN;
-
- return 0;
-}
-
-static inline int ilv_valid(const struct forces_ilv *ilv, u_int rlen)
-{
- if (rlen < ILV_HDRL)
- return INVALID_RLEN;
- if (EXTRACT_32BITS(&ilv->length) < ILV_HDRL)
- return INVALID_STLN;
- if (EXTRACT_32BITS(&ilv->length) > rlen)
- return INVALID_LTLN;
- if (rlen < F_ALN_LEN(EXTRACT_32BITS(&ilv->length)))
- return INVALID_ALEN;
-
- return 0;
-}
-
-struct forces_lfbsh {
- u_int32_t class;
- u_int32_t instance;
-};
-
-#define ASSNS_OPS (B_OP_REPORT)
-#define CFG_OPS (B_OP_SET|B_OP_SETPROP|B_OP_DEL|B_OP_COMMIT|B_OP_RTRCOMP)
-#define CFG_ROPS (B_OP_SETRESP|B_OP_SETPRESP|B_OP_DELRESP|B_OP_RCOMMIT)
-#define CFG_QY (B_OP_GET|B_OP_GETPROP)
-#define CFG_QYR (B_OP_GETRESP|B_OP_GETPRESP)
-#define CFG_EVN (B_OP_REPORT)
-
-static const struct tom_h ForCES_msg[TOM_MAX_IND + 1] = {
- /* TOM_RSV_I */ {TOM_RSVD, ZERO_TTLV, 0, "Invalid message", NULL},
- /* TOM_ASS_I */ {TOM_ASSNSETUP, ZERO_MORE_TTLV | TWO_TLV, ASSNS_OPS,
- "Association Setup", lfbselect_print},
- /* TOM_AST_I */
- {TOM_ASSNTEARD, TTLV_T1, 0, "Association TearDown", asttlv_print},
- /* TOM_CFG_I */ {TOM_CONFIG, TTLV_T2, CFG_OPS, "Config", lfbselect_print},
- /* TOM_QRY_I */ {TOM_QUERY, TTLV_T2, CFG_QY, "Query", lfbselect_print},
- /* TOM_EVN_I */ {TOM_EVENTNOT, TTLV_T1, CFG_EVN, "Event Notification",
- lfbselect_print},
- /* TOM_RED_I */
- {TOM_PKTREDIR, TTLV_T2, 0, "Packet Redirect", redirect_print},
- /* TOM_HBT_I */ {TOM_HEARTBT, ZERO_TTLV, 0, "HeartBeat", NULL},
- /* TOM_ASR_I */
- {TOM_ASSNSETREP, TTLV_T1, 0, "Association Response", asrtlv_print},
- /* TOM_CNR_I */ {TOM_CONFIGREP, TTLV_T2, CFG_ROPS, "Config Response",
- lfbselect_print},
- /* TOM_QRR_I */
- {TOM_QUERYREP, TTLV_T2, CFG_QYR, "Query Response", lfbselect_print},
-};
-
-static inline const struct tom_h *get_forces_tom(u_int8_t tom)
-{
- int i;
- for (i = TOM_RSV_I; i <= TOM_MAX_IND; i++) {
- const struct tom_h *th = &ForCES_msg[i];
- if (th->v == tom)
- return th;
- }
- return &ForCES_msg[TOM_RSV_I];
-}
-
-struct pdata_ops {
- u_int32_t v;
- u_int16_t flags;
- u_int16_t op_msk;
- const char *s;
- int (*print) (register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-};
-
-enum {
- PD_RSV_I,
- PD_SEL_I,
- PD_FDT_I,
- PD_SDT_I,
- PD_RES_I,
- PD_PDT_I,
- _PD_RSV_MAX
-};
-#define PD_MAX_IND (_TOM_RSV_MAX - 1)
-
-static inline int pd_valid(u_int16_t pd)
-{
- if (pd >= F_TLV_PDAT && pd <= F_TLV_REST)
- return 1;
- return 0;
-}
-
-static inline void chk_op_type(u_int16_t type, u_int16_t msk, u_int16_t omsk)
-{
- if (type != F_TLV_PDAT) {
- if (msk & B_KEYIN) {
- if (type != F_TLV_KEYI) {
- printf
- ("Based on flags expected KEYINFO TLV!\n");
- }
- } else {
- if (!(msk & omsk)) {
- printf
- ("Illegal DATA encoding for type 0x%x programmed %x got %x \n",
- type, omsk, msk);
- }
- }
- }
-
-}
-
-int fdatatlv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int sdatailv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int sdatatlv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int pdatatlv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-int pkeyitlv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-
-int pdatacnt_print(register const u_char * pptr, register u_int len,
- u_int16_t IDcnt, u_int16_t op_msk, int indent);
-int pdata_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-
-int prestlv_print(register const u_char * pptr, register u_int len,
- u_int16_t op_msk, int indent);
-#define F_SELKEY 1
-
-struct res_val {
- u_int8_t result;
- u_int8_t resv1;
- u_int16_t resv2;
-};
-
-static const struct pdata_ops ForCES_pdata[PD_MAX_IND + 1] = {
- /* PD_RSV_I */ {0, 0, 0, "Invalid message", NULL},
- /* PD_SEL_I */ {F_TLV_KEYI, 0, 0, "KEYINFO TLV", pkeyitlv_print},
- /* PD_FDT_I */ {F_TLV_FULD, 0, B_FULLD, "FULLDATA TLV", fdatatlv_print},
- /* PD_SDT_I */ {F_TLV_SPAD, 0, B_SPARD, "SPARSEDATA TLV", sdatatlv_print},
- /* PD_RES_I */ {F_TLV_REST, 0, B_RESTV, "RESULT TLV", prestlv_print},
- /* PD_PDT_I */
- {F_TLV_PDAT, 0, 0, "Inner PATH-DATA TLV", recpdoptlv_print},
-};
-
-static inline const struct pdata_ops *get_forces_pd(u_int16_t pd)
-{
- int i;
- for (i = PD_RSV_I + 1; i <= PD_MAX_IND; i++) {
- const struct pdata_ops *pdo = &ForCES_pdata[i];
- if (pdo->v == pd)
- return pdo;
- }
- return &ForCES_pdata[TOM_RSV_I];
-}
-
-enum {
- E_SUCCESS,
- E_INVALID_HEADER,
- E_LENGTH_MISMATCH,
- E_VERSION_MISMATCH,
- E_INVALID_DESTINATION_PID,
- E_LFB_UNKNOWN,
- E_LFB_NOT_FOUND,
- E_LFB_INSTANCE_ID_NOT_FOUND,
- E_INVALID_PATH,
- E_COMPONENT_DOES_NOT_EXIST,
- E_EXISTS,
- E_NOT_FOUND,
- E_READ_ONLY,
- E_INVALID_ARRAY_CREATION,
- E_VALUE_OUT_OF_RANGE,
- E_CONTENTS_TOO_LONG,
- E_INVALID_PARAMETERS,
- E_INVALID_MESSAGE_TYPE,
- E_INVALID_FLAGS,
- E_INVALID_TLV,
- E_EVENT_ERROR,
- E_NOT_SUPPORTED,
- E_MEMORY_ERROR,
- E_INTERNAL_ERROR,
- /* 0x18-0xFE are reserved .. */
- E_UNSPECIFIED_ERROR = 0XFF
-};
-
-const struct tok ForCES_errs[] = {
- {E_SUCCESS, "SUCCESS"},
- {E_INVALID_HEADER, "INVALID HEADER"},
- {E_LENGTH_MISMATCH, "LENGTH MISMATCH"},
- {E_VERSION_MISMATCH, "VERSION MISMATCH"},
- {E_INVALID_DESTINATION_PID, "INVALID DESTINATION PID"},
- {E_LFB_UNKNOWN, "LFB UNKNOWN"},
- {E_LFB_NOT_FOUND, "LFB NOT FOUND"},
- {E_LFB_INSTANCE_ID_NOT_FOUND, "LFB INSTANCE ID NOT FOUND"},
- {E_INVALID_PATH, "INVALID PATH"},
- {E_COMPONENT_DOES_NOT_EXIST, "COMPONENT DOES NOT EXIST"},
- {E_EXISTS, "EXISTS ALREADY"},
- {E_NOT_FOUND, "NOT FOUND"},
- {E_READ_ONLY, "READ ONLY"},
- {E_INVALID_ARRAY_CREATION, "INVALID ARRAY CREATION"},
- {E_VALUE_OUT_OF_RANGE, "VALUE OUT OF RANGE"},
- {E_CONTENTS_TOO_LONG, "CONTENTS TOO LONG"},
- {E_INVALID_PARAMETERS, "INVALID PARAMETERS"},
- {E_INVALID_MESSAGE_TYPE, "INVALID MESSAGE TYPE"},
- {E_INVALID_FLAGS, "INVALID FLAGS"},
- {E_INVALID_TLV, "INVALID TLV"},
- {E_EVENT_ERROR, "EVENT ERROR"},
- {E_NOT_SUPPORTED, "NOT SUPPORTED"},
- {E_MEMORY_ERROR, "MEMORY ERROR"},
- {E_INTERNAL_ERROR, "INTERNAL ERROR"},
- {E_UNSPECIFIED_ERROR, "UNSPECIFIED ERROR"},
- {0, NULL}
-};
diff --git a/getopt_long.h b/getopt_long.h
new file mode 100644
index 000000000000..fbb94e6bff77
--- /dev/null
+++ b/getopt_long.h
@@ -0,0 +1,66 @@
+/* $NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $ */
+/* $FreeBSD$ */
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _GETOPT_LONG_H_
+#define _GETOPT_LONG_H_
+
+/*
+ * GNU-like getopt_long()/getopt_long_only() with 4.4BSD optreset extension.
+ * getopt() is declared here too for GNU programs.
+ */
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
+
+struct option {
+ /* name of long option */
+ const char *name;
+ /*
+ * one of no_argument, required_argument, and optional_argument:
+ * whether option takes an argument
+ */
+ int has_arg;
+ /* if not NULL, set *flag to val when option found */
+ int *flag;
+ /* if flag not NULL, value to set *flag to; else return value */
+ int val;
+};
+
+int getopt_long(int, char * const *, const char *,
+ const struct option *, int *);
+int getopt_long_only(int, char * const *, const char *,
+ const struct option *, int *);
+
+extern char *optarg; /* getopt(3) external variables */
+extern int optind, opterr, optopt;
+
+#endif /* !_GETOPT_LONG_H_ */
diff --git a/gmpls.c b/gmpls.c
index 739176798cde..c9fd9bb8ac6c 100644
--- a/gmpls.c
+++ b/gmpls.c
@@ -1,4 +1,4 @@
-/*
+/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
* distributions retain the above copyright notice and this paragraph
@@ -13,11 +13,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.7 2006-04-14 07:11:59 hannes Exp $ (LBL)";
-#endif
-
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -141,8 +137,8 @@ const struct tok gmpls_payload_values[] = {
{ 0, NULL }
};
-/*
- * Link Type values used by LMP Service Discovery (specifically, the Client
+/*
+ * Link Type values used by LMP Service Discovery (specifically, the Client
* Port Service Attributes Object). See UNI 1.0 section 9.4.2 for details.
*/
const struct tok lmp_sd_service_config_cpsa_link_type_values[] = {
@@ -151,9 +147,9 @@ const struct tok lmp_sd_service_config_cpsa_link_type_values[] = {
{ 0, NULL}
};
-/*
- * Signal Type values for SDH links used by LMP Service Discovery (specifically,
- * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for
+/*
+ * Signal Type values for SDH links used by LMP Service Discovery (specifically,
+ * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for
* details.
*/
const struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[] = {
@@ -168,9 +164,9 @@ const struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[] = {
{ 0, NULL}
};
-/*
- * Signal Type values for SONET links used by LMP Service Discovery (specifically,
- * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for
+/*
+ * Signal Type values for SONET links used by LMP Service Discovery (specifically,
+ * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for
* details.
*/
const struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[] = {
@@ -186,7 +182,7 @@ const struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[] = {
};
#define DIFFSERV_BC_MODEL_RDM 0 /* draft-ietf-tewg-diff-te-proto-07 */
-#define DIFFSERV_BC_MODEL_MAM 1 /* draft-ietf-tewg-diff-te-proto-07 */
+#define DIFFSERV_BC_MODEL_MAM 1 /* draft-ietf-tewg-diff-te-proto-07 */
#define DIFFSERV_BC_MODEL_EXTD_MAM 254 /* experimental */
const struct tok diffserv_te_bc_values[] = {
diff --git a/gmpls.h b/gmpls.h
index 8db99deac8c6..8b44f9491e9f 100644
--- a/gmpls.h
+++ b/gmpls.h
@@ -1,5 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/gmpls.h,v 1.5 2006-04-14 07:11:59 hannes Exp $ (LBL) */
-/*
+/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
* distributions retain the above copyright notice and this paragraph
diff --git a/gmt2local.c b/gmt2local.c
index 1fe0e8a955f3..6958f66a4640 100644
--- a/gmt2local.c
+++ b/gmt2local.c
@@ -19,11 +19,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/gmt2local.c,v 1.9 2003-11-16 09:36:09 guy Exp $ (LBL)";
-#endif
-
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/gmt2local.h b/gmt2local.h
index f7b3841e6aef..89254df9fe48 100644
--- a/gmt2local.h
+++ b/gmt2local.h
@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/gmt2local.h,v 1.2 1999-10-07 23:47:10 mcr Exp $ (LBL)
*/
#ifndef gmt2local_h
#define gmt2local_h
diff --git a/icmp6.h b/icmp6.h
deleted file mode 100644
index c4d292e5966a..000000000000
--- a/icmp6.h
+++ /dev/null
@@ -1,473 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/icmp6.h,v 1.18 2007-08-29 02:31:44 mcr Exp $ (LBL) */
-/* NetBSD: icmp6.h,v 1.13 2000/08/03 16:30:37 itojun Exp */
-/* $KAME: icmp6.h,v 1.22 2000/08/03 15:25:16 jinmei Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET_ICMP6_H_
-#define _NETINET_ICMP6_H_
-
-struct icmp6_hdr {
- u_int8_t icmp6_type; /* type field */
- u_int8_t icmp6_code; /* code field */
- u_int16_t icmp6_cksum; /* checksum field */
- union {
- u_int32_t icmp6_un_data32[1]; /* type-specific field */
- u_int16_t icmp6_un_data16[2]; /* type-specific field */
- u_int8_t icmp6_un_data8[4]; /* type-specific field */
- } icmp6_dataun;
-};
-
-#define icmp6_data32 icmp6_dataun.icmp6_un_data32
-#define icmp6_data16 icmp6_dataun.icmp6_un_data16
-#define icmp6_data8 icmp6_dataun.icmp6_un_data8
-#define icmp6_pptr icmp6_data32[0] /* parameter prob */
-#define icmp6_mtu icmp6_data32[0] /* packet too big */
-#define icmp6_id icmp6_data16[0] /* echo request/reply */
-#define icmp6_seq icmp6_data16[1] /* echo request/reply */
-#define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */
-
-#define ICMP6_DST_UNREACH 1 /* dest unreachable, codes: */
-#define ICMP6_PACKET_TOO_BIG 2 /* packet too big */
-#define ICMP6_TIME_EXCEEDED 3 /* time exceeded, code: */
-#define ICMP6_PARAM_PROB 4 /* ip6 header bad */
-
-#define ICMP6_ECHO_REQUEST 128 /* echo service */
-#define ICMP6_ECHO_REPLY 129 /* echo reply */
-#define ICMP6_MEMBERSHIP_QUERY 130 /* group membership query */
-#define MLD6_LISTENER_QUERY 130 /* multicast listener query */
-#define ICMP6_MEMBERSHIP_REPORT 131 /* group membership report */
-#define MLD6_LISTENER_REPORT 131 /* multicast listener report */
-#define ICMP6_MEMBERSHIP_REDUCTION 132 /* group membership termination */
-#define MLD6_LISTENER_DONE 132 /* multicast listener done */
-
-#define ND_ROUTER_SOLICIT 133 /* router solicitation */
-#define ND_ROUTER_ADVERT 134 /* router advertisement */
-#define ND_NEIGHBOR_SOLICIT 135 /* neighbor solicitation */
-#define ND_NEIGHBOR_ADVERT 136 /* neighbor advertisement */
-#define ND_REDIRECT 137 /* redirect */
-
-#define ICMP6_ROUTER_RENUMBERING 138 /* router renumbering */
-
-#define ICMP6_WRUREQUEST 139 /* who are you request */
-#define ICMP6_WRUREPLY 140 /* who are you reply */
-#define ICMP6_FQDN_QUERY 139 /* FQDN query */
-#define ICMP6_FQDN_REPLY 140 /* FQDN reply */
-#define ICMP6_NI_QUERY 139 /* node information request */
-#define ICMP6_NI_REPLY 140 /* node information reply */
-#define IND_SOLICIT 141 /* inverse neighbor solicitation */
-#define IND_ADVERT 142 /* inverse neighbor advertisement */
-
-#define ICMP6_V2_MEMBERSHIP_REPORT 143 /* v2 membership report */
-#define MLDV2_LISTENER_REPORT 143 /* v2 multicast listener report */
-#define ICMP6_HADISCOV_REQUEST 144
-#define ICMP6_HADISCOV_REPLY 145
-#define ICMP6_MOBILEPREFIX_SOLICIT 146
-#define ICMP6_MOBILEPREFIX_ADVERT 147
-
-#define MLD6_MTRACE_RESP 200 /* mtrace response(to sender) */
-#define MLD6_MTRACE 201 /* mtrace messages */
-
-#define ICMP6_MAXTYPE 201
-
-#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
-#define ICMP6_DST_UNREACH_ADMIN 1 /* administratively prohibited */
-#define ICMP6_DST_UNREACH_NOTNEIGHBOR 2 /* not a neighbor(obsolete) */
-#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */
-#define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */
-#define ICMP6_DST_UNREACH_NOPORT 4 /* port unreachable */
-
-#define ICMP6_TIME_EXCEED_TRANSIT 0 /* ttl==0 in transit */
-#define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* ttl==0 in reass */
-
-#define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */
-#define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized next header */
-#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized option */
-
-#define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */
-
-#define ICMP6_NI_SUBJ_IPV6 0 /* Query Subject is an IPv6 address */
-#define ICMP6_NI_SUBJ_FQDN 1 /* Query Subject is a Domain name */
-#define ICMP6_NI_SUBJ_IPV4 2 /* Query Subject is an IPv4 address */
-
-#define ICMP6_NI_SUCCESS 0 /* node information successful reply */
-#define ICMP6_NI_REFUSED 1 /* node information request is refused */
-#define ICMP6_NI_UNKNOWN 2 /* unknown Qtype */
-
-#define ICMP6_ROUTER_RENUMBERING_COMMAND 0 /* rr command */
-#define ICMP6_ROUTER_RENUMBERING_RESULT 1 /* rr result */
-#define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET 255 /* rr seq num reset */
-
-/* Used in kernel only */
-#define ND_REDIRECT_ONLINK 0 /* redirect to an on-link node */
-#define ND_REDIRECT_ROUTER 1 /* redirect to a better router */
-
-/*
- * Multicast Listener Discovery
- */
-struct mld6_hdr {
- struct icmp6_hdr mld6_hdr;
- struct in6_addr mld6_addr; /* multicast address */
-};
-
-#define mld6_type mld6_hdr.icmp6_type
-#define mld6_code mld6_hdr.icmp6_code
-#define mld6_cksum mld6_hdr.icmp6_cksum
-#define mld6_maxdelay mld6_hdr.icmp6_data16[0]
-#define mld6_reserved mld6_hdr.icmp6_data16[1]
-
-#define MLD_MINLEN 24
-#define MLDV2_MINLEN 28
-
-/*
- * Neighbor Discovery
- */
-
-struct nd_router_solicit { /* router solicitation */
- struct icmp6_hdr nd_rs_hdr;
- /* could be followed by options */
-};
-
-#define nd_rs_type nd_rs_hdr.icmp6_type
-#define nd_rs_code nd_rs_hdr.icmp6_code
-#define nd_rs_cksum nd_rs_hdr.icmp6_cksum
-#define nd_rs_reserved nd_rs_hdr.icmp6_data32[0]
-
-struct nd_router_advert { /* router advertisement */
- struct icmp6_hdr nd_ra_hdr;
- u_int32_t nd_ra_reachable; /* reachable time */
- u_int32_t nd_ra_retransmit; /* retransmit timer */
- /* could be followed by options */
-};
-
-#define nd_ra_type nd_ra_hdr.icmp6_type
-#define nd_ra_code nd_ra_hdr.icmp6_code
-#define nd_ra_cksum nd_ra_hdr.icmp6_cksum
-#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0]
-#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1]
-#define ND_RA_FLAG_MANAGED 0x80
-#define ND_RA_FLAG_OTHER 0x40
-#define ND_RA_FLAG_HOME_AGENT 0x20
-
-/*
- * Router preference values based on draft-draves-ipngwg-router-selection-01.
- * These are non-standard definitions.
- */
-#define ND_RA_FLAG_RTPREF_MASK 0x18 /* 00011000 */
-
-#define ND_RA_FLAG_RTPREF_HIGH 0x08 /* 00001000 */
-#define ND_RA_FLAG_RTPREF_MEDIUM 0x00 /* 00000000 */
-#define ND_RA_FLAG_RTPREF_LOW 0x18 /* 00011000 */
-#define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */
-
-#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1]
-
-struct nd_neighbor_solicit { /* neighbor solicitation */
- struct icmp6_hdr nd_ns_hdr;
- struct in6_addr nd_ns_target; /*target address */
- /* could be followed by options */
-};
-
-#define nd_ns_type nd_ns_hdr.icmp6_type
-#define nd_ns_code nd_ns_hdr.icmp6_code
-#define nd_ns_cksum nd_ns_hdr.icmp6_cksum
-#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0]
-
-struct nd_neighbor_advert { /* neighbor advertisement */
- struct icmp6_hdr nd_na_hdr;
- struct in6_addr nd_na_target; /* target address */
- /* could be followed by options */
-};
-
-#define nd_na_type nd_na_hdr.icmp6_type
-#define nd_na_code nd_na_hdr.icmp6_code
-#define nd_na_cksum nd_na_hdr.icmp6_cksum
-#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0]
-
-#define ND_NA_FLAG_ROUTER 0x80000000
-#define ND_NA_FLAG_SOLICITED 0x40000000
-#define ND_NA_FLAG_OVERRIDE 0x20000000
-
-struct nd_redirect { /* redirect */
- struct icmp6_hdr nd_rd_hdr;
- struct in6_addr nd_rd_target; /* target address */
- struct in6_addr nd_rd_dst; /* destination address */
- /* could be followed by options */
-};
-
-#define nd_rd_type nd_rd_hdr.icmp6_type
-#define nd_rd_code nd_rd_hdr.icmp6_code
-#define nd_rd_cksum nd_rd_hdr.icmp6_cksum
-#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
-
-struct nd_opt_hdr { /* Neighbor discovery option header */
- u_int8_t nd_opt_type;
- u_int8_t nd_opt_len;
- /* followed by option specific data*/
-};
-
-#define ND_OPT_SOURCE_LINKADDR 1
-#define ND_OPT_TARGET_LINKADDR 2
-#define ND_OPT_PREFIX_INFORMATION 3
-#define ND_OPT_REDIRECTED_HEADER 4
-#define ND_OPT_MTU 5
-#define ND_OPT_ADVINTERVAL 7
-#define ND_OPT_HOMEAGENT_INFO 8
-#define ND_OPT_ROUTE_INFO 9 /* draft-ietf-ipngwg-router-preference, not officially assigned yet */
-#define ND_OPT_RDNSS 25
-#define ND_OPT_DNSSL 31
-
-struct nd_opt_prefix_info { /* prefix information */
- u_int8_t nd_opt_pi_type;
- u_int8_t nd_opt_pi_len;
- u_int8_t nd_opt_pi_prefix_len;
- u_int8_t nd_opt_pi_flags_reserved;
- u_int8_t nd_opt_pi_valid_time[4];
- u_int8_t nd_opt_pi_preferred_time[4];
- u_int8_t nd_opt_pi_reserved2[4];
- struct in6_addr nd_opt_pi_prefix;
-};
-
-#define ND_OPT_PI_FLAG_ONLINK 0x80
-#define ND_OPT_PI_FLAG_AUTO 0x40
-#define ND_OPT_PI_FLAG_ROUTER 0x20 /*2292bis*/
-
-struct nd_opt_rd_hdr { /* redirected header */
- u_int8_t nd_opt_rh_type;
- u_int8_t nd_opt_rh_len;
- u_int16_t nd_opt_rh_reserved1;
- u_int32_t nd_opt_rh_reserved2;
- /* followed by IP header and data */
-};
-
-struct nd_opt_mtu { /* MTU option */
- u_int8_t nd_opt_mtu_type;
- u_int8_t nd_opt_mtu_len;
- u_int16_t nd_opt_mtu_reserved;
- u_int32_t nd_opt_mtu_mtu;
-};
-
-struct nd_opt_rdnss { /* RDNSS RFC 6106 5.1 */
- u_int8_t nd_opt_rdnss_type;
- u_int8_t nd_opt_rdnss_len;
- u_int16_t nd_opt_rdnss_reserved;
- u_int32_t nd_opt_rdnss_lifetime;
- struct in6_addr nd_opt_rdnss_addr[1]; /* variable-length */
-};
-
-struct nd_opt_dnssl { /* DNSSL RFC 6106 5.2 */
- u_int8_t nd_opt_dnssl_type;
- u_int8_t nd_opt_dnssl_len;
- u_int16_t nd_opt_dnssl_reserved;
- u_int32_t nd_opt_dnssl_lifetime;
- /* followed by list of DNS search domains, variable-length */
-};
-
-struct nd_opt_advinterval { /* Advertisement interval option */
- u_int8_t nd_opt_adv_type;
- u_int8_t nd_opt_adv_len;
- u_int16_t nd_opt_adv_reserved;
- u_int32_t nd_opt_adv_interval;
-};
-
-struct nd_opt_homeagent_info { /* Home Agent info */
- u_int8_t nd_opt_hai_type;
- u_int8_t nd_opt_hai_len;
- u_int16_t nd_opt_hai_reserved;
- int16_t nd_opt_hai_preference;
- u_int16_t nd_opt_hai_lifetime;
-};
-
-struct nd_opt_route_info { /* route info */
- u_int8_t nd_opt_rti_type;
- u_int8_t nd_opt_rti_len;
- u_int8_t nd_opt_rti_prefixlen;
- u_int8_t nd_opt_rti_flags;
- u_int32_t nd_opt_rti_lifetime;
- /* prefix follows */
-};
-
-/*
- * icmp6 namelookup
- */
-
-struct icmp6_namelookup {
- struct icmp6_hdr icmp6_nl_hdr;
- u_int8_t icmp6_nl_nonce[8];
- int32_t icmp6_nl_ttl;
-#if 0
- u_int8_t icmp6_nl_len;
- u_int8_t icmp6_nl_name[3];
-#endif
- /* could be followed by options */
-};
-
-/*
- * icmp6 node information
- */
-struct icmp6_nodeinfo {
- struct icmp6_hdr icmp6_ni_hdr;
- u_int8_t icmp6_ni_nonce[8];
- /* could be followed by reply data */
-};
-
-#define ni_type icmp6_ni_hdr.icmp6_type
-#define ni_code icmp6_ni_hdr.icmp6_code
-#define ni_cksum icmp6_ni_hdr.icmp6_cksum
-#define ni_qtype icmp6_ni_hdr.icmp6_data16[0]
-#define ni_flags icmp6_ni_hdr.icmp6_data16[1]
-
-#define NI_QTYPE_NOOP 0 /* NOOP */
-#define NI_QTYPE_SUPTYPES 1 /* Supported Qtypes */
-#define NI_QTYPE_FQDN 2 /* FQDN (draft 04) */
-#define NI_QTYPE_DNSNAME 2 /* DNS Name */
-#define NI_QTYPE_NODEADDR 3 /* Node Addresses */
-#define NI_QTYPE_IPV4ADDR 4 /* IPv4 Addresses */
-
-/* network endian */
-#define NI_SUPTYPE_FLAG_COMPRESS ((u_int16_t)htons(0x1))
-#define NI_FQDN_FLAG_VALIDTTL ((u_int16_t)htons(0x1))
-
-/* network endian */
-#define NI_NODEADDR_FLAG_TRUNCATE ((u_int16_t)htons(0x1))
-#define NI_NODEADDR_FLAG_ALL ((u_int16_t)htons(0x2))
-#define NI_NODEADDR_FLAG_COMPAT ((u_int16_t)htons(0x4))
-#define NI_NODEADDR_FLAG_LINKLOCAL ((u_int16_t)htons(0x8))
-#define NI_NODEADDR_FLAG_SITELOCAL ((u_int16_t)htons(0x10))
-#define NI_NODEADDR_FLAG_GLOBAL ((u_int16_t)htons(0x20))
-#define NI_NODEADDR_FLAG_ANYCAST ((u_int16_t)htons(0x40)) /* just experimental. not in spec */
-
-struct ni_reply_fqdn {
- u_int32_t ni_fqdn_ttl; /* TTL */
- u_int8_t ni_fqdn_namelen; /* length in octets of the FQDN */
- u_int8_t ni_fqdn_name[3]; /* XXX: alignment */
-};
-
-/*
- * Router Renumbering. as router-renum-08.txt
- */
-struct icmp6_router_renum { /* router renumbering header */
- struct icmp6_hdr rr_hdr;
- u_int8_t rr_segnum;
- u_int8_t rr_flags;
- u_int16_t rr_maxdelay;
- u_int32_t rr_reserved;
-};
-#define ICMP6_RR_FLAGS_TEST 0x80
-#define ICMP6_RR_FLAGS_REQRESULT 0x40
-#define ICMP6_RR_FLAGS_FORCEAPPLY 0x20
-#define ICMP6_RR_FLAGS_SPECSITE 0x10
-#define ICMP6_RR_FLAGS_PREVDONE 0x08
-
-#define rr_type rr_hdr.icmp6_type
-#define rr_code rr_hdr.icmp6_code
-#define rr_cksum rr_hdr.icmp6_cksum
-#define rr_seqnum rr_hdr.icmp6_data32[0]
-
-struct rr_pco_match { /* match prefix part */
- u_int8_t rpm_code;
- u_int8_t rpm_len;
- u_int8_t rpm_ordinal;
- u_int8_t rpm_matchlen;
- u_int8_t rpm_minlen;
- u_int8_t rpm_maxlen;
- u_int16_t rpm_reserved;
- struct in6_addr rpm_prefix;
-};
-
-#define RPM_PCO_ADD 1
-#define RPM_PCO_CHANGE 2
-#define RPM_PCO_SETGLOBAL 3
-#define RPM_PCO_MAX 4
-
-struct rr_pco_use { /* use prefix part */
- u_int8_t rpu_uselen;
- u_int8_t rpu_keeplen;
- u_int8_t rpu_ramask;
- u_int8_t rpu_raflags;
- u_int32_t rpu_vltime;
- u_int32_t rpu_pltime;
- u_int32_t rpu_flags;
- struct in6_addr rpu_prefix;
-};
-#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x80
-#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x40
-
-/* network endian */
-#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME ((u_int32_t)htonl(0x80000000))
-#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME ((u_int32_t)htonl(0x40000000))
-
-struct rr_result { /* router renumbering result message */
- u_int16_t rrr_flags;
- u_int8_t rrr_ordinal;
- u_int8_t rrr_matchedlen;
- u_int32_t rrr_ifid;
- struct in6_addr rrr_prefix;
-};
-/* network endian */
-#define ICMP6_RR_RESULT_FLAGS_OOB ((u_int16_t)htons(0x0002))
-#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN ((u_int16_t)htons(0x0001))
-
-#endif /* not _NETINET_ICMP6_H_ */
diff --git a/ieee802_11.h b/ieee802_11.h
deleted file mode 100644
index 2aa1345038a2..000000000000
--- a/ieee802_11.h
+++ /dev/null
@@ -1,347 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ieee802_11.h,v 1.12 2007-07-22 19:59:06 guy Exp $ (LBL) */
-/*
- * Copyright (c) 2001
- * Fortress Technologies
- * Charlie Lenahan ( clenahan@fortresstech.com )
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/* Lengths of 802.11 header components. */
-#define IEEE802_11_FC_LEN 2
-#define IEEE802_11_DUR_LEN 2
-#define IEEE802_11_DA_LEN 6
-#define IEEE802_11_SA_LEN 6
-#define IEEE802_11_BSSID_LEN 6
-#define IEEE802_11_RA_LEN 6
-#define IEEE802_11_TA_LEN 6
-#define IEEE802_11_SEQ_LEN 2
-#define IEEE802_11_CTL_LEN 2
-#define IEEE802_11_IV_LEN 3
-#define IEEE802_11_KID_LEN 1
-
-/* Frame check sequence length. */
-#define IEEE802_11_FCS_LEN 4
-
-/* Lengths of beacon components. */
-#define IEEE802_11_TSTAMP_LEN 8
-#define IEEE802_11_BCNINT_LEN 2
-#define IEEE802_11_CAPINFO_LEN 2
-#define IEEE802_11_LISTENINT_LEN 2
-
-#define IEEE802_11_AID_LEN 2
-#define IEEE802_11_STATUS_LEN 2
-#define IEEE802_11_REASON_LEN 2
-
-/* Length of previous AP in reassocation frame */
-#define IEEE802_11_AP_LEN 6
-
-#define T_MGMT 0x0 /* management */
-#define T_CTRL 0x1 /* control */
-#define T_DATA 0x2 /* data */
-#define T_RESV 0x3 /* reserved */
-
-#define ST_ASSOC_REQUEST 0x0
-#define ST_ASSOC_RESPONSE 0x1
-#define ST_REASSOC_REQUEST 0x2
-#define ST_REASSOC_RESPONSE 0x3
-#define ST_PROBE_REQUEST 0x4
-#define ST_PROBE_RESPONSE 0x5
-/* RESERVED 0x6 */
-/* RESERVED 0x7 */
-#define ST_BEACON 0x8
-#define ST_ATIM 0x9
-#define ST_DISASSOC 0xA
-#define ST_AUTH 0xB
-#define ST_DEAUTH 0xC
-#define ST_ACTION 0xD
-/* RESERVED 0xE */
-/* RESERVED 0xF */
-
-
-#define CTRL_CONTROL_WRAPPER 0x7
-#define CTRL_BAR 0x8
-#define CTRL_BA 0x9
-#define CTRL_PS_POLL 0xA
-#define CTRL_RTS 0xB
-#define CTRL_CTS 0xC
-#define CTRL_ACK 0xD
-#define CTRL_CF_END 0xE
-#define CTRL_END_ACK 0xF
-
-#define DATA_DATA 0x0
-#define DATA_DATA_CF_ACK 0x1
-#define DATA_DATA_CF_POLL 0x2
-#define DATA_DATA_CF_ACK_POLL 0x3
-#define DATA_NODATA 0x4
-#define DATA_NODATA_CF_ACK 0x5
-#define DATA_NODATA_CF_POLL 0x6
-#define DATA_NODATA_CF_ACK_POLL 0x7
-
-#define DATA_QOS_DATA 0x8
-#define DATA_QOS_DATA_CF_ACK 0x9
-#define DATA_QOS_DATA_CF_POLL 0xA
-#define DATA_QOS_DATA_CF_ACK_POLL 0xB
-#define DATA_QOS_NODATA 0xC
-#define DATA_QOS_CF_POLL_NODATA 0xE
-#define DATA_QOS_CF_ACK_POLL_NODATA 0xF
-
-/*
- * The subtype field of a data frame is, in effect, composed of 4 flag
- * bits - CF-Ack, CF-Poll, Null (means the frame doesn't actually have
- * any data), and QoS.
- */
-#define DATA_FRAME_IS_CF_ACK(x) ((x) & 0x01)
-#define DATA_FRAME_IS_CF_POLL(x) ((x) & 0x02)
-#define DATA_FRAME_IS_NULL(x) ((x) & 0x04)
-#define DATA_FRAME_IS_QOS(x) ((x) & 0x08)
-
-/*
- * Bits in the frame control field.
- */
-#define FC_VERSION(fc) ((fc) & 0x3)
-#define FC_TYPE(fc) (((fc) >> 2) & 0x3)
-#define FC_SUBTYPE(fc) (((fc) >> 4) & 0xF)
-#define FC_TO_DS(fc) ((fc) & 0x0100)
-#define FC_FROM_DS(fc) ((fc) & 0x0200)
-#define FC_MORE_FLAG(fc) ((fc) & 0x0400)
-#define FC_RETRY(fc) ((fc) & 0x0800)
-#define FC_POWER_MGMT(fc) ((fc) & 0x1000)
-#define FC_MORE_DATA(fc) ((fc) & 0x2000)
-#define FC_WEP(fc) ((fc) & 0x4000)
-#define FC_ORDER(fc) ((fc) & 0x8000)
-
-struct mgmt_header_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t da[6];
- u_int8_t sa[6];
- u_int8_t bssid[6];
- u_int16_t seq_ctrl;
-};
-
-#define MGMT_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
- IEEE802_11_DA_LEN+IEEE802_11_SA_LEN+\
- IEEE802_11_BSSID_LEN+IEEE802_11_SEQ_LEN)
-
-#define CAPABILITY_ESS(cap) ((cap) & 0x0001)
-#define CAPABILITY_IBSS(cap) ((cap) & 0x0002)
-#define CAPABILITY_CFP(cap) ((cap) & 0x0004)
-#define CAPABILITY_CFP_REQ(cap) ((cap) & 0x0008)
-#define CAPABILITY_PRIVACY(cap) ((cap) & 0x0010)
-
-struct ssid_t {
- u_int8_t element_id;
- u_int8_t length;
- u_char ssid[33]; /* 32 + 1 for null */
-};
-
-struct rates_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int8_t rate[16];
-};
-
-struct challenge_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int8_t text[254]; /* 1-253 + 1 for null */
-};
-
-struct fh_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int16_t dwell_time;
- u_int8_t hop_set;
- u_int8_t hop_pattern;
- u_int8_t hop_index;
-};
-
-struct ds_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int8_t channel;
-};
-
-struct cf_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int8_t count;
- u_int8_t period;
- u_int16_t max_duration;
- u_int16_t dur_remaing;
-};
-
-struct tim_t {
- u_int8_t element_id;
- u_int8_t length;
- u_int8_t count;
- u_int8_t period;
- u_int8_t bitmap_control;
- u_int8_t bitmap[251];
-};
-
-#define E_SSID 0
-#define E_RATES 1
-#define E_FH 2
-#define E_DS 3
-#define E_CF 4
-#define E_TIM 5
-#define E_IBSS 6
-/* reserved 7 */
-/* reserved 8 */
-/* reserved 9 */
-/* reserved 10 */
-/* reserved 11 */
-/* reserved 12 */
-/* reserved 13 */
-/* reserved 14 */
-/* reserved 15 */
-/* reserved 16 */
-
-#define E_CHALLENGE 16
-/* reserved 17 */
-/* reserved 18 */
-/* reserved 19 */
-/* reserved 16 */
-/* reserved 16 */
-
-
-struct mgmt_body_t {
- u_int8_t timestamp[IEEE802_11_TSTAMP_LEN];
- u_int16_t beacon_interval;
- u_int16_t listen_interval;
- u_int16_t status_code;
- u_int16_t aid;
- u_char ap[IEEE802_11_AP_LEN];
- u_int16_t reason_code;
- u_int16_t auth_alg;
- u_int16_t auth_trans_seq_num;
- int challenge_present;
- struct challenge_t challenge;
- u_int16_t capability_info;
- int ssid_present;
- struct ssid_t ssid;
- int rates_present;
- struct rates_t rates;
- int ds_present;
- struct ds_t ds;
- int cf_present;
- struct cf_t cf;
- int fh_present;
- struct fh_t fh;
- int tim_present;
- struct tim_t tim;
-};
-
-struct ctrl_rts_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t ra[6];
- u_int8_t ta[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_RTS_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
- IEEE802_11_RA_LEN+IEEE802_11_TA_LEN)
-
-struct ctrl_cts_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t ra[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_CTS_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
-
-struct ctrl_ack_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t ra[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
-
-struct ctrl_ps_poll_t {
- u_int16_t fc;
- u_int16_t aid;
- u_int8_t bssid[6];
- u_int8_t ta[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_PS_POLL_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_AID_LEN+\
- IEEE802_11_BSSID_LEN+IEEE802_11_TA_LEN)
-
-struct ctrl_end_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t ra[6];
- u_int8_t bssid[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_END_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
- IEEE802_11_RA_LEN+IEEE802_11_BSSID_LEN)
-
-struct ctrl_end_ack_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t ra[6];
- u_int8_t bssid[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_END_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
- IEEE802_11_RA_LEN+IEEE802_11_BSSID_LEN)
-
-struct ctrl_ba_t {
- u_int16_t fc;
- u_int16_t duration;
- u_int8_t ra[6];
- u_int8_t fcs[4];
-};
-
-#define CTRL_BA_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
-
-struct ctrl_bar_t {
- u_int16_t fc;
- u_int16_t dur;
- u_int8_t ra[6];
- u_int8_t ta[6];
- u_int16_t ctl;
- u_int16_t seq;
- u_int8_t fcs[4];
-};
-
-#define CTRL_BAR_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
- IEEE802_11_RA_LEN+IEEE802_11_TA_LEN+\
- IEEE802_11_CTL_LEN+IEEE802_11_SEQ_LEN)
-
-struct meshcntl_t {
- u_int8_t flags;
- u_int8_t ttl;
- u_int8_t seq[4];
- u_int8_t addr4[6];
- u_int8_t addr5[6];
- u_int8_t addr6[6];
-};
-
-#define IV_IV(iv) ((iv) & 0xFFFFFF)
-#define IV_PAD(iv) (((iv) >> 24) & 0x3F)
-#define IV_KEYID(iv) (((iv) >> 30) & 0x03)
diff --git a/ieee802_11_radio.h b/ieee802_11_radio.h
deleted file mode 100644
index 5aff13786a6a..000000000000
--- a/ieee802_11_radio.h
+++ /dev/null
@@ -1,291 +0,0 @@
-/* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.5 2005/01/22 20:12:05 sam Exp $ */
-/* NetBSD: ieee802_11_radio.h,v 1.2 2006/02/26 03:04:03 dyoung Exp */
-/* $Header: /tcpdump/master/tcpdump/ieee802_11_radio.h,v 1.3 2007-08-29 02:31:44 mcr Exp $ */
-
-/*-
- * Copyright (c) 2003, 2004 David Young. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of David Young may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY DAVID YOUNG ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID
- * YOUNG BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- */
-#ifndef _NET_IF_IEEE80211RADIOTAP_H_
-#define _NET_IF_IEEE80211RADIOTAP_H_
-
-/* A generic radio capture format is desirable. It must be
- * rigidly defined (e.g., units for fields should be given),
- * and easily extensible.
- *
- * The following is an extensible radio capture format. It is
- * based on a bitmap indicating which fields are present.
- *
- * I am trying to describe precisely what the application programmer
- * should expect in the following, and for that reason I tell the
- * units and origin of each measurement (where it applies), or else I
- * use sufficiently weaselly language ("is a monotonically nondecreasing
- * function of...") that I cannot set false expectations for lawyerly
- * readers.
- */
-
-/*
- * The radio capture header precedes the 802.11 header.
- *
- * Note well: all radiotap fields are little-endian.
- */
-struct ieee80211_radiotap_header {
- u_int8_t it_version; /* Version 0. Only increases
- * for drastic changes,
- * introduction of compatible
- * new fields does not count.
- */
- u_int8_t it_pad;
- u_int16_t it_len; /* length of the whole
- * header in bytes, including
- * it_version, it_pad,
- * it_len, and data fields.
- */
- u_int32_t it_present; /* A bitmap telling which
- * fields are present. Set bit 31
- * (0x80000000) to extend the
- * bitmap by another 32 bits.
- * Additional extensions are made
- * by setting bit 31.
- */
-};
-
-/* Name Data type Units
- * ---- --------- -----
- *
- * IEEE80211_RADIOTAP_TSFT u_int64_t microseconds
- *
- * Value in microseconds of the MAC's 64-bit 802.11 Time
- * Synchronization Function timer when the first bit of the
- * MPDU arrived at the MAC. For received frames, only.
- *
- * IEEE80211_RADIOTAP_CHANNEL 2 x u_int16_t MHz, bitmap
- *
- * Tx/Rx frequency in MHz, followed by flags (see below).
- * Note that IEEE80211_RADIOTAP_XCHANNEL must be used to
- * represent an HT channel as there is not enough room in
- * the flags word.
- *
- * IEEE80211_RADIOTAP_FHSS u_int16_t see below
- *
- * For frequency-hopping radios, the hop set (first byte)
- * and pattern (second byte).
- *
- * IEEE80211_RADIOTAP_RATE u_int8_t 500kb/s or index
- *
- * Tx/Rx data rate. If bit 0x80 is set then it represents an
- * an MCS index and not an IEEE rate.
- *
- * IEEE80211_RADIOTAP_DBM_ANTSIGNAL int8_t decibels from
- * one milliwatt (dBm)
- *
- * RF signal power at the antenna, decibel difference from
- * one milliwatt.
- *
- * IEEE80211_RADIOTAP_DBM_ANTNOISE int8_t decibels from
- * one milliwatt (dBm)
- *
- * RF noise power at the antenna, decibel difference from one
- * milliwatt.
- *
- * IEEE80211_RADIOTAP_DB_ANTSIGNAL u_int8_t decibel (dB)
- *
- * RF signal power at the antenna, decibel difference from an
- * arbitrary, fixed reference.
- *
- * IEEE80211_RADIOTAP_DB_ANTNOISE u_int8_t decibel (dB)
- *
- * RF noise power at the antenna, decibel difference from an
- * arbitrary, fixed reference point.
- *
- * IEEE80211_RADIOTAP_LOCK_QUALITY u_int16_t unitless
- *
- * Quality of Barker code lock. Unitless. Monotonically
- * nondecreasing with "better" lock strength. Called "Signal
- * Quality" in datasheets. (Is there a standard way to measure
- * this?)
- *
- * IEEE80211_RADIOTAP_TX_ATTENUATION u_int16_t unitless
- *
- * Transmit power expressed as unitless distance from max
- * power set at factory calibration. 0 is max power.
- * Monotonically nondecreasing with lower power levels.
- *
- * IEEE80211_RADIOTAP_DB_TX_ATTENUATION u_int16_t decibels (dB)
- *
- * Transmit power expressed as decibel distance from max power
- * set at factory calibration. 0 is max power. Monotonically
- * nondecreasing with lower power levels.
- *
- * IEEE80211_RADIOTAP_DBM_TX_POWER int8_t decibels from
- * one milliwatt (dBm)
- *
- * Transmit power expressed as dBm (decibels from a 1 milliwatt
- * reference). This is the absolute power level measured at
- * the antenna port.
- *
- * IEEE80211_RADIOTAP_FLAGS u_int8_t bitmap
- *
- * Properties of transmitted and received frames. See flags
- * defined below.
- *
- * IEEE80211_RADIOTAP_ANTENNA u_int8_t antenna index
- *
- * Unitless indication of the Rx/Tx antenna for this packet.
- * The first antenna is antenna 0.
- *
- * IEEE80211_RADIOTAP_RX_FLAGS u_int16_t bitmap
- *
- * Properties of received frames. See flags defined below.
- *
- * IEEE80211_RADIOTAP_XCHANNEL u_int32_t bitmap
- * u_int16_t MHz
- * u_int8_t channel number
- * u_int8_t .5 dBm
- *
- * Extended channel specification: flags (see below) followed by
- * frequency in MHz, the corresponding IEEE channel number, and
- * finally the maximum regulatory transmit power cap in .5 dBm
- * units. This property supersedes IEEE80211_RADIOTAP_CHANNEL
- * and only one of the two should be present.
- *
- * IEEE80211_RADIOTAP_MCS u_int8_t known
- * u_int8_t flags
- * u_int8_t mcs
- *
- * Bitset indicating which fields have known values, followed
- * by bitset of flag values, followed by the MCS rate index as
- * in IEEE 802.11n.
- *
- * IEEE80211_RADIOTAP_VENDOR_NAMESPACE
- * u_int8_t OUI[3]
- * u_int8_t subspace
- * u_int16_t length
- *
- * The Vendor Namespace Field contains three sub-fields. The first
- * sub-field is 3 bytes long. It contains the vendor's IEEE 802
- * Organizationally Unique Identifier (OUI). The fourth byte is a
- * vendor-specific "namespace selector."
- *
- */
-enum ieee80211_radiotap_type {
- IEEE80211_RADIOTAP_TSFT = 0,
- IEEE80211_RADIOTAP_FLAGS = 1,
- IEEE80211_RADIOTAP_RATE = 2,
- IEEE80211_RADIOTAP_CHANNEL = 3,
- IEEE80211_RADIOTAP_FHSS = 4,
- IEEE80211_RADIOTAP_DBM_ANTSIGNAL = 5,
- IEEE80211_RADIOTAP_DBM_ANTNOISE = 6,
- IEEE80211_RADIOTAP_LOCK_QUALITY = 7,
- IEEE80211_RADIOTAP_TX_ATTENUATION = 8,
- IEEE80211_RADIOTAP_DB_TX_ATTENUATION = 9,
- IEEE80211_RADIOTAP_DBM_TX_POWER = 10,
- IEEE80211_RADIOTAP_ANTENNA = 11,
- IEEE80211_RADIOTAP_DB_ANTSIGNAL = 12,
- IEEE80211_RADIOTAP_DB_ANTNOISE = 13,
- IEEE80211_RADIOTAP_RX_FLAGS = 14,
- /* NB: gap for netbsd definitions */
- IEEE80211_RADIOTAP_XCHANNEL = 18,
- IEEE80211_RADIOTAP_MCS = 19,
- IEEE80211_RADIOTAP_NAMESPACE = 29,
- IEEE80211_RADIOTAP_VENDOR_NAMESPACE = 30,
- IEEE80211_RADIOTAP_EXT = 31
-};
-
-/* channel attributes */
-#define IEEE80211_CHAN_TURBO 0x00010 /* Turbo channel */
-#define IEEE80211_CHAN_CCK 0x00020 /* CCK channel */
-#define IEEE80211_CHAN_OFDM 0x00040 /* OFDM channel */
-#define IEEE80211_CHAN_2GHZ 0x00080 /* 2 GHz spectrum channel. */
-#define IEEE80211_CHAN_5GHZ 0x00100 /* 5 GHz spectrum channel */
-#define IEEE80211_CHAN_PASSIVE 0x00200 /* Only passive scan allowed */
-#define IEEE80211_CHAN_DYN 0x00400 /* Dynamic CCK-OFDM channel */
-#define IEEE80211_CHAN_GFSK 0x00800 /* GFSK channel (FHSS PHY) */
-#define IEEE80211_CHAN_GSM 0x01000 /* 900 MHz spectrum channel */
-#define IEEE80211_CHAN_STURBO 0x02000 /* 11a static turbo channel only */
-#define IEEE80211_CHAN_HALF 0x04000 /* Half rate channel */
-#define IEEE80211_CHAN_QUARTER 0x08000 /* Quarter rate channel */
-#define IEEE80211_CHAN_HT20 0x10000 /* HT 20 channel */
-#define IEEE80211_CHAN_HT40U 0x20000 /* HT 40 channel w/ ext above */
-#define IEEE80211_CHAN_HT40D 0x40000 /* HT 40 channel w/ ext below */
-
-/* Useful combinations of channel characteristics, borrowed from Ethereal */
-#define IEEE80211_CHAN_A \
- (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)
-#define IEEE80211_CHAN_B \
- (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK)
-#define IEEE80211_CHAN_G \
- (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN)
-#define IEEE80211_CHAN_TA \
- (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)
-#define IEEE80211_CHAN_TG \
- (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN | IEEE80211_CHAN_TURBO)
-
-
-/* For IEEE80211_RADIOTAP_FLAGS */
-#define IEEE80211_RADIOTAP_F_CFP 0x01 /* sent/received
- * during CFP
- */
-#define IEEE80211_RADIOTAP_F_SHORTPRE 0x02 /* sent/received
- * with short
- * preamble
- */
-#define IEEE80211_RADIOTAP_F_WEP 0x04 /* sent/received
- * with WEP encryption
- */
-#define IEEE80211_RADIOTAP_F_FRAG 0x08 /* sent/received
- * with fragmentation
- */
-#define IEEE80211_RADIOTAP_F_FCS 0x10 /* frame includes FCS */
-#define IEEE80211_RADIOTAP_F_DATAPAD 0x20 /* frame has padding between
- * 802.11 header and payload
- * (to 32-bit boundary)
- */
-#define IEEE80211_RADIOTAP_F_BADFCS 0x40 /* does not pass FCS check */
-
-/* For IEEE80211_RADIOTAP_RX_FLAGS */
-#define IEEE80211_RADIOTAP_F_RX_BADFCS 0x0001 /* frame failed crc check */
-#define IEEE80211_RADIOTAP_F_RX_PLCP_CRC 0x0002 /* frame failed PLCP CRC check */
-
-/* For IEEE80211_RADIOTAP_MCS known */
-#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_KNOWN 0x01
-#define IEEE80211_RADIOTAP_MCS_MCS_INDEX_KNOWN 0x02 /* MCS index field */
-#define IEEE80211_RADIOTAP_MCS_GUARD_INTERVAL_KNOWN 0x04
-#define IEEE80211_RADIOTAP_MCS_HT_FORMAT_KNOWN 0x08
-#define IEEE80211_RADIOTAP_MCS_FEC_TYPE_KNOWN 0x10
-
-/* For IEEE80211_RADIOTAP_MCS flags */
-#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_MASK 0x03
-#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_20 0
-#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_40 1
-#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_20L 2
-#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_20U 3
-#define IEEE80211_RADIOTAP_MCS_SHORT_GI 0x04 /* short guard interval */
-#define IEEE80211_RADIOTAP_MCS_HT_GREENFIELD 0x08
-#define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10
-
-#endif /* _NET_IF_IEEE80211RADIOTAP_H_ */
diff --git a/igrp.h b/igrp.h
deleted file mode 100644
index b5f133bcb3cd..000000000000
--- a/igrp.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/igrp.h,v 1.6 2002-12-11 07:13:52 guy Exp $ (LBL) */
-/* Cisco IGRP definitions */
-
-/* IGRP Header */
-
-struct igrphdr {
- u_int8_t ig_vop; /* protocol version number / opcode */
-#define IGRP_V(x) (((x) & 0xf0) >> 4)
-#define IGRP_OP(x) ((x) & 0x0f)
- u_int8_t ig_ed; /* edition number */
- u_int16_t ig_as; /* autonomous system number */
- u_int16_t ig_ni; /* number of subnet in local net */
- u_int16_t ig_ns; /* number of networks in AS */
- u_int16_t ig_nx; /* number of networks ouside AS */
- u_int16_t ig_sum; /* checksum of IGRP header & data */
-};
-
-#define IGRP_UPDATE 1
-#define IGRP_REQUEST 2
-
-/* IGRP routing entry */
-
-struct igrprte {
- u_int8_t igr_net[3]; /* 3 significant octets of IP address */
- u_int8_t igr_dly[3]; /* delay in tens of microseconds */
- u_int8_t igr_bw[3]; /* bandwidth in units of 1 kb/s */
- u_int8_t igr_mtu[2]; /* MTU in octets */
- u_int8_t igr_rel; /* percent packets successfully tx/rx */
- u_int8_t igr_ld; /* percent of channel occupied */
- u_int8_t igr_hct; /* hop count */
-};
-
-#define IGRP_RTE_SIZE 14 /* don't believe sizeof ! */
diff --git a/in_cksum.c b/in_cksum.c
index 93cdfc9aad98..171728a88ceb 100644
--- a/in_cksum.c
+++ b/in_cksum.c
@@ -35,6 +35,7 @@
* @(#)in_cksum.c 8.1 (Berkeley) 6/10/93
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -53,27 +54,27 @@
#define ADDCARRY(x) {if ((x) > 65535) (x) -= 65535;}
#define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);}
-u_int16_t
+uint16_t
in_cksum(const struct cksum_vec *vec, int veclen)
{
- register const u_int16_t *w;
+ register const uint16_t *w;
register int sum = 0;
register int mlen = 0;
int byte_swapped = 0;
union {
- u_int8_t c[2];
- u_int16_t s;
+ uint8_t c[2];
+ uint16_t s;
} s_util;
union {
- u_int16_t s[2];
- u_int32_t l;
+ uint16_t s[2];
+ uint32_t l;
} l_util;
for (; veclen != 0; vec++, veclen--) {
if (vec->len == 0)
continue;
- w = (const u_int16_t *)(void *)vec->ptr;
+ w = (const uint16_t *)(void *)vec->ptr;
if (mlen == -1) {
/*
* The first byte of this chunk is the continuation
@@ -83,9 +84,9 @@ in_cksum(const struct cksum_vec *vec, int veclen)
* s_util.c[0] is already saved when scanning previous
* chunk.
*/
- s_util.c[1] = *(const u_int8_t *)w;
+ s_util.c[1] = *(const uint8_t *)w;
sum += s_util.s;
- w = (const u_int16_t *)(void *)((const u_int8_t *)w + 1);
+ w = (const uint16_t *)(void *)((const uint8_t *)w + 1);
mlen = vec->len - 1;
} else
mlen = vec->len;
@@ -95,8 +96,8 @@ in_cksum(const struct cksum_vec *vec, int veclen)
if ((1 & (unsigned long) w) && (mlen > 0)) {
REDUCE;
sum <<= 8;
- s_util.c[0] = *(const u_int8_t *)w;
- w = (const u_int16_t *)(void *)((const u_int8_t *)w + 1);
+ s_util.c[0] = *(const uint8_t *)w;
+ w = (const uint16_t *)(void *)((const uint8_t *)w + 1);
mlen--;
byte_swapped = 1;
}
@@ -128,13 +129,13 @@ in_cksum(const struct cksum_vec *vec, int veclen)
sum <<= 8;
byte_swapped = 0;
if (mlen == -1) {
- s_util.c[1] = *(const u_int8_t *)w;
+ s_util.c[1] = *(const uint8_t *)w;
sum += s_util.s;
mlen = 0;
} else
mlen = -1;
} else if (mlen == -1)
- s_util.c[0] = *(const u_int8_t *)w;
+ s_util.c[0] = *(const uint8_t *)w;
}
if (mlen == -1) {
/* The last mbuf has odd # of bytes. Follow the
@@ -153,10 +154,10 @@ in_cksum(const struct cksum_vec *vec, int veclen)
* that the checksum covers (including the checksum itself), compute
* what the checksum field *should* have been.
*/
-u_int16_t
-in_cksum_shouldbe(u_int16_t sum, u_int16_t computed_sum)
+uint16_t
+in_cksum_shouldbe(uint16_t sum, uint16_t computed_sum)
{
- u_int32_t shouldbe;
+ uint32_t shouldbe;
/*
* The value that should have gone into the checksum field
diff --git a/install-sh b/install-sh
index ebc66913e940..b44de0989d2f 100755
--- a/install-sh
+++ b/install-sh
@@ -115,7 +115,7 @@ fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
-
+
if [ -d $dst ]; then
instcmd=:
else
@@ -124,7 +124,7 @@ if [ x"$dir_arg" != x ]; then
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
+# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
@@ -134,7 +134,7 @@ else
echo "install: $src does not exist"
exit 1
fi
-
+
if [ x"$dst" = x ]
then
echo "install: no destination specified"
@@ -201,17 +201,17 @@ else
# If we're going to rename the final executable, determine the name now.
- if [ x"$transformarg" = x ]
+ if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
- dstfile=`basename $dst $transformbasename |
+ dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
- if [ x"$dstfile" = x ]
+ if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
@@ -242,7 +242,7 @@ else
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
diff --git a/interface.h b/interface.h
index 2dff9d81b77e..299d010ea279 100644
--- a/interface.h
+++ b/interface.h
@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.285 2008-08-16 11:36:20 hannes Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
@@ -38,13 +36,19 @@
#if !defined(HAVE_SNPRINTF)
int snprintf(char *, size_t, const char *, ...)
- __attribute__((format(printf, 3, 4)));
-#endif
+#ifdef __ATTRIBUTE___FORMAT_OK
+ __attribute__((format(printf, 3, 4)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+ ;
+#endif /* !defined(HAVE_SNPRINTF) */
#if !defined(HAVE_VSNPRINTF)
int vsnprintf(char *, size_t, const char *, va_list)
- __attribute__((format(printf, 3, 0)));
-#endif
+#ifdef __ATTRIBUTE___FORMAT_OK
+ __attribute__((format(printf, 3, 0)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+ ;
+#endif /* !defined(HAVE_VSNPRINTF) */
#ifndef HAVE_STRLCAT
extern size_t strlcat(char *, const char *, size_t);
@@ -74,13 +78,9 @@ extern char *strsep(char **, const char *);
#define PT_RADIUS 11 /* RADIUS authentication Protocol */
#define PT_ZMTP1 12 /* ZeroMQ Message Transport Protocol 1.0 */
#define PT_VXLAN 13 /* Virtual eXtensible Local Area Network */
-
-#ifndef min
-#define min(a,b) ((a)>(b)?(b):(a))
-#endif
-#ifndef max
-#define max(a,b) ((b)>(a)?(b):(a))
-#endif
+#define PT_PGM 14 /* [UDP-encapsulated] Pragmatic General Multicast */
+#define PT_PGM_ZMTP1 15 /* ZMTP/1.0 inside PGM (native or UDP-encapsulated) */
+#define PT_LMP 16 /* Link Management Protocol */
#define ESRC(ep) ((ep)->ether_shost)
#define EDST(ep) ((ep)->ether_dhost)
@@ -93,10 +93,6 @@ extern char *strsep(char **, const char *);
#endif
#endif
-#ifndef MIN
-#define MIN(a,b) ((a)<(b)?(a):(b))
-#endif
-
extern char *program_name; /* used to generate self-identifying messages */
extern int32_t thiszone; /* seconds offset from gmt to local time */
@@ -121,228 +117,51 @@ extern int32_t thiszone; /* seconds offset from gmt to local time */
/* Bail if "var" was not captured */
#define TCHECK(var) TCHECK2(var, sizeof(var))
-extern void ts_print(const struct timeval *);
-extern void relts_print(int);
-
-extern int fn_print(const u_char *, const u_char *);
-extern int fn_printn(const u_char *, u_int, const u_char *);
-extern int fn_printzp(const u_char *, u_int, const u_char *);
-extern int mask2plen(u_int32_t);
+extern int mask2plen(uint32_t);
extern const char *tok2strary_internal(const char **, int, const char *, int);
#define tok2strary(a,f,i) tok2strary_internal(a, sizeof(a)/sizeof(a[0]),f,i)
-extern const char *dnaddr_string(u_short);
-
extern void error(const char *, ...)
- __attribute__((noreturn, format (printf, 1, 2)));
-extern void warning(const char *, ...) __attribute__ ((format (printf, 1, 2)));
+ __attribute__((noreturn))
+#ifdef __ATTRIBUTE___FORMAT_OK
+ __attribute__((format (printf, 1, 2)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+ ;
+extern void warning(const char *, ...)
+#ifdef __ATTRIBUTE___FORMAT_OK
+ __attribute__((format (printf, 1, 2)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+ ;
extern char *read_infile(char *);
extern char *copy_argv(char **);
-extern void safeputchar(int);
-extern void safeputs(const char *, int);
-
-extern const char *isonsap_string(const u_char *, register u_int);
-extern const char *protoid_string(const u_char *);
-extern const char *ipxsap_string(u_short);
extern const char *dnname_string(u_short);
extern const char *dnnum_string(u_short);
/* checksum routines */
extern void init_checksum(void);
-extern u_int16_t verify_crc10_cksum(u_int16_t, const u_char *, int);
-extern u_int16_t create_osi_cksum(const u_int8_t *, int, int);
+extern uint16_t verify_crc10_cksum(uint16_t, const u_char *, int);
+extern uint16_t create_osi_cksum(const uint8_t *, int, int);
/* The printer routines. */
#include <pcap.h>
-extern int print_unknown_data(const u_char *, const char *,int);
-extern void ascii_print(const u_char *, u_int);
-extern void hex_and_ascii_print_with_offset(const char *, const u_char *,
- u_int, u_int);
-extern void hex_and_ascii_print(const char *, const u_char *, u_int);
-extern void hex_print_with_offset(const char *, const u_char *, u_int, u_int);
-extern void hex_print(const char *, const u_char *, u_int);
-extern void telnet_print(const u_char *, u_int);
-extern int llc_print(const u_char *, u_int, u_int, const u_char *,
- const u_char *, u_short *);
-extern int snap_print(const u_char *, u_int, u_int, u_int);
-extern void aarp_print(const u_char *, u_int);
-extern void aodv_print(const u_char *, u_int, int);
-extern void atalk_print(const u_char *, u_int);
-extern void atm_print(u_int, u_int, u_int, const u_char *, u_int, u_int);
-extern u_int atm_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int sunatm_if_print(const struct pcap_pkthdr *, const u_char *);
-extern int oam_print(const u_char *, u_int, u_int);
-extern void bootp_print(const u_char *, u_int);
-extern void bgp_print(const u_char *, int);
-extern void beep_print(const u_char *, u_int);
-extern void cnfp_print(const u_char *, const u_char *);
-extern void decnet_print(const u_char *, u_int, u_int);
-extern void default_print(const u_char *, u_int);
-extern void dvmrp_print(const u_char *, u_int);
-extern void egp_print(const u_char *, u_int);
-extern u_int enc_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int pflog_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int arcnet_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int arcnet_linux_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int token_print(const u_char *, u_int, u_int);
-extern u_int token_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void fddi_print(const u_char *, u_int, u_int);
-extern u_int fddi_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int fr_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int mfr_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int fr_print(register const u_char *, u_int);
-extern u_int mfr_print(register const u_char *, u_int);
extern char *q922_string(const u_char *);
-extern u_int ieee802_11_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int ieee802_11_radio_if_print(const struct pcap_pkthdr *,
- const u_char *);
-extern u_int ap1394_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int ieee802_11_radio_avs_if_print(const struct pcap_pkthdr *,
- const u_char *);
-extern void gre_print(const u_char *, u_int);
-extern void icmp_print(const u_char *, u_int, const u_char *, int);
-extern void igmp_print(const u_char *, u_int);
-extern void igrp_print(const u_char *, u_int, const u_char *);
-extern void ipN_print(const u_char *, u_int);
-extern u_int ipfc_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void ipx_print(const u_char *, u_int);
-extern void isoclns_print(const u_char *, u_int, u_int);
-extern void krb_print(const u_char *);
-extern u_int llap_print(const u_char *, u_int);
-extern u_int ltalk_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void msdp_print(const unsigned char *, u_int);
-extern void nfsreply_print(const u_char *, u_int, const u_char *);
-extern void nfsreq_print(const u_char *, u_int, const u_char *);
-extern void ns_print(const u_char *, u_int, int);
-extern const u_char * ns_nprint (register const u_char *, register const u_char *);
-extern void ntp_print(const u_char *, u_int);
-extern u_int null_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void ospf_print(const u_char *, u_int, const u_char *);
-extern void olsr_print (const u_char *, u_int, int);
-extern void pimv1_print(const u_char *, u_int);
-extern void cisco_autorp_print(const u_char *, u_int);
-extern void rsvp_print(const u_char *, u_int);
-extern void ldp_print(const u_char *, u_int);
-extern void lldp_print(const u_char *, u_int);
-extern void rpki_rtr_print(const u_char *, u_int);
-extern void lmp_print(const u_char *, u_int);
-extern void lspping_print(const u_char *, u_int);
-extern void lwapp_control_print(const u_char *, u_int, int);
-extern void lwapp_data_print(const u_char *, u_int);
-extern void eigrp_print(const u_char *, u_int);
-extern void mobile_print(const u_char *, u_int);
-extern void pim_print(const u_char *, u_int, u_int);
-extern u_int pppoe_print(const u_char *, u_int);
-extern u_int ppp_print(register const u_char *, u_int);
-extern u_int ppp_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int ppp_hdlc_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int ppp_bsdos_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int pppoe_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int prism_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void q933_print(const u_char *, u_int);
-extern int vjc_print(register const char *, u_short);
-extern void vqp_print(register const u_char *, register u_int);
-extern u_int raw_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void rip_print(const u_char *, u_int);
-extern u_int sl_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void lane_print(const u_char *, u_int, u_int);
-extern u_int lane_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int cip_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int sl_bsdos_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int chdlc_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int chdlc_print(register const u_char *, u_int);
-extern u_int juniper_atm1_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_atm2_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_mfr_print(const struct pcap_pkthdr *, register const u_char *);
-extern u_int juniper_mlfr_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_mlppp_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_pppoe_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_pppoe_atm_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_ggsn_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_es_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_monitor_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_services_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_ether_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_ppp_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_frelay_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int juniper_chdlc_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int sll_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void snmp_print(const u_char *, u_int);
-extern void sunrpcrequest_print(const u_char *, u_int, const u_char *);
-extern u_int symantec_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void tcp_print(const u_char *, u_int, const u_char *, int);
-extern void tftp_print(const u_char *, u_int);
-extern void timed_print(const u_char *);
-extern void udld_print(const u_char *, u_int);
-extern void udp_print(const u_char *, u_int, const u_char *, int);
-extern void vtp_print(const u_char *, u_int);
-extern void wb_print(const void *, u_int);
-extern int ah_print(register const u_char *);
-extern int ipcomp_print(register const u_char *, int *);
-extern void rx_print(register const u_char *, int, int, int, u_char *);
-extern void netbeui_print(u_short, const u_char *, int);
-extern void ipx_netbios_print(const u_char *, u_int);
-extern void nbt_tcp_print(const u_char *, int);
-extern void nbt_udp137_print(const u_char *, int);
-extern void nbt_udp138_print(const u_char *, int);
-extern void smb_tcp_print(const u_char *, int);
extern char *smb_errstr(int, int);
-extern const char *nt_errstr(u_int32_t);
-extern void print_data(const unsigned char *, int);
-extern void l2tp_print(const u_char *, u_int);
-extern void vrrp_print(const u_char *, u_int, int);
-extern void carp_print(const u_char *, u_int, int);
-extern void slow_print(const u_char *, u_int);
-extern void sflow_print(const u_char *, u_int);
-extern void mpcp_print(const u_char *, u_int);
-extern void cfm_print(const u_char *, u_int);
-extern void pgm_print(const u_char *, u_int, const u_char *);
-extern void cdp_print(const u_char *, u_int, u_int);
-extern void dtp_print(const u_char *, u_int);
-extern void stp_print(const u_char *, u_int);
-extern void radius_print(const u_char *, u_int);
-extern void lwres_print(const u_char *, u_int);
-extern void pptp_print(const u_char *);
-extern void dccp_print(const u_char *, const u_char *, u_int);
-extern void sctp_print(const u_char *, const u_char *, u_int);
-extern void forces_print(const u_char *, u_int);
-extern void mpls_print(const u_char *, u_int);
-extern void mpls_lsp_ping_print(const u_char *, u_int);
-extern void zephyr_print(const u_char *, int);
-extern void zmtp1_print(const u_char *, u_int);
-extern void hsrp_print(const u_char *, u_int);
-extern void bfd_print(const u_char *, u_int, u_int);
-extern void sip_print(const u_char *, u_int);
-extern void syslog_print(const u_char *, u_int);
-extern u_int bt_if_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int usb_linux_48_byte_print(const struct pcap_pkthdr *, const u_char *);
-extern u_int usb_linux_64_byte_print(const struct pcap_pkthdr *, const u_char *);
-
+extern const char *nt_errstr(uint32_t);
#ifdef INET6
-extern void ip6_opt_print(const u_char *, int);
-extern int hbhopt_print(const u_char *);
-extern int dstopt_print(const u_char *);
-extern int frag6_print(const u_char *, const u_char *);
-extern int mobility_print(const u_char *, const u_char *);
-extern void ripng_print(const u_char *, unsigned int);
-extern int rt6_print(const u_char *, const u_char *);
-extern void ospf6_print(const u_char *, u_int);
-extern void dhcp6_print(const u_char *, u_int);
-extern void babel_print(const u_char *, u_int);
extern int mask62plen(const u_char *);
#endif /*INET6*/
struct cksum_vec {
- const u_int8_t *ptr;
+ const uint8_t *ptr;
int len;
};
-extern u_int16_t in_cksum(const struct cksum_vec *, int);
-extern u_int16_t in_cksum_shouldbe(u_int16_t, u_int16_t);
+extern uint16_t in_cksum(const struct cksum_vec *, int);
+extern uint16_t in_cksum_shouldbe(uint16_t, uint16_t);
#ifndef HAVE_BPF_DUMP
struct bpf_program;
@@ -358,30 +177,30 @@ extern void bpf_dump(const struct bpf_program *, int);
#ifndef NETDISSECT_REWORKED
extern netdissect_options *gndo;
-#define bflag gndo->ndo_bflag
-#define eflag gndo->ndo_eflag
-#define fflag gndo->ndo_fflag
+#define bflag gndo->ndo_bflag
+#define eflag gndo->ndo_eflag
+#define fflag gndo->ndo_fflag
#define jflag gndo->ndo_jflag
-#define Kflag gndo->ndo_Kflag
-#define nflag gndo->ndo_nflag
-#define Nflag gndo->ndo_Nflag
-#define Oflag gndo->ndo_Oflag
-#define pflag gndo->ndo_pflag
-#define qflag gndo->ndo_qflag
-#define Rflag gndo->ndo_Rflag
-#define sflag gndo->ndo_sflag
-#define Sflag gndo->ndo_Sflag
-#define tflag gndo->ndo_tflag
-#define Uflag gndo->ndo_Uflag
-#define uflag gndo->ndo_uflag
-#define vflag gndo->ndo_vflag
-#define xflag gndo->ndo_xflag
-#define Xflag gndo->ndo_Xflag
-#define Cflag gndo->ndo_Cflag
-#define Gflag gndo->ndo_Gflag
-#define Aflag gndo->ndo_Aflag
-#define Bflag gndo->ndo_Bflag
-#define Iflag gndo->ndo_Iflag
+#define Kflag gndo->ndo_Kflag
+#define nflag gndo->ndo_nflag
+#define Nflag gndo->ndo_Nflag
+#define Oflag gndo->ndo_Oflag
+#define pflag gndo->ndo_pflag
+#define qflag gndo->ndo_qflag
+#define Rflag gndo->ndo_Rflag
+#define sflag gndo->ndo_sflag
+#define Sflag gndo->ndo_Sflag
+#define tflag gndo->ndo_tflag
+#define Uflag gndo->ndo_Uflag
+#define uflag gndo->ndo_uflag
+#define vflag gndo->ndo_vflag
+#define xflag gndo->ndo_xflag
+#define Xflag gndo->ndo_Xflag
+#define Cflag gndo->ndo_Cflag
+#define Gflag gndo->ndo_Gflag
+#define Aflag gndo->ndo_Aflag
+#define Bflag gndo->ndo_Bflag
+#define Iflag gndo->ndo_Iflag
#define suppress_default_print gndo->ndo_suppress_default_print
#define packettype gndo->ndo_packettype
#define sigsecret gndo->ndo_sigsecret
@@ -389,9 +208,11 @@ extern netdissect_options *gndo;
#define WflagChars gndo->ndo_WflagChars
#define Cflag_count gndo->ndo_Cflag_count
#define Gflag_count gndo->ndo_Gflag_count
-#define Gflag_time gndo->ndo_Gflag_time
+#define Gflag_time gndo->ndo_Gflag_time
#define Hflag gndo->ndo_Hflag
#define snaplen gndo->ndo_snaplen
#define snapend gndo->ndo_snapend
+extern void default_print(const u_char *, u_int);
+
#endif
diff --git a/ip.h b/ip.h
index 8a97632e515f..891a89cd2d4d 100644
--- a/ip.h
+++ b/ip.h
@@ -1,4 +1,3 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.12 2007-09-14 01:29:28 guy Exp $ (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
@@ -34,6 +33,9 @@
* @(#)ip.h 8.2 (Berkeley) 6/1/94
*/
+#ifndef TCPDUMP_IP_H
+#define TCPDUMP_IP_H
+
/*
* Definitions for internet protocol version 4.
* Per RFC 791, September 1981.
@@ -48,19 +50,19 @@
* against negative integers quite easily, and fail in subtle ways.
*/
struct ip {
- u_int8_t ip_vhl; /* header length, version */
+ uint8_t ip_vhl; /* header length, version */
#define IP_V(ip) (((ip)->ip_vhl & 0xf0) >> 4)
#define IP_HL(ip) ((ip)->ip_vhl & 0x0f)
- u_int8_t ip_tos; /* type of service */
- u_int16_t ip_len; /* total length */
- u_int16_t ip_id; /* identification */
- u_int16_t ip_off; /* fragment offset field */
+ uint8_t ip_tos; /* type of service */
+ uint16_t ip_len; /* total length */
+ uint16_t ip_id; /* identification */
+ uint16_t ip_off; /* fragment offset field */
#define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
- u_int8_t ip_ttl; /* time to live */
- u_int8_t ip_p; /* protocol */
- u_int16_t ip_sum; /* checksum */
+ uint8_t ip_ttl; /* time to live */
+ uint8_t ip_p; /* protocol */
+ uint16_t ip_sum; /* checksum */
struct in_addr ip_src,ip_dst; /* source and dest address */
} UNALIGNED;
@@ -121,17 +123,17 @@ struct ip {
* Time stamp option structure.
*/
struct ip_timestamp {
- u_int8_t ipt_code; /* IPOPT_TS */
- u_int8_t ipt_len; /* size of structure (variable) */
- u_int8_t ipt_ptr; /* index of current entry */
- u_int8_t ipt_oflwflg; /* flags, overflow counter */
+ uint8_t ipt_code; /* IPOPT_TS */
+ uint8_t ipt_len; /* size of structure (variable) */
+ uint8_t ipt_ptr; /* index of current entry */
+ uint8_t ipt_oflwflg; /* flags, overflow counter */
#define IPTS_OFLW(ip) (((ipt)->ipt_oflwflg & 0xf0) >> 4)
#define IPTS_FLG(ip) ((ipt)->ipt_oflwflg & 0x0f)
union ipt_timestamp {
- u_int32_t ipt_time[1];
+ uint32_t ipt_time[1];
struct ipt_ta {
struct in_addr ipt_addr;
- u_int32_t ipt_time;
+ uint32_t ipt_time;
} ipt_ta[1];
} ipt_timestamp;
} UNALIGNED;
@@ -159,6 +161,4 @@ struct ip_timestamp {
#define IPTTLDEC 1 /* subtracted when forwarding */
#define IP_MSS 576 /* default maximum segment size */
-
-/* in print-ip.c */
-extern int nextproto4_cksum(const struct ip *, const u_int8_t *, u_int, u_int);
+#endif /* TCPDUMP_IP_H */
diff --git a/ip6.h b/ip6.h
index 12c87ad29291..1ad914985b62 100644
--- a/ip6.h
+++ b/ip6.h
@@ -1,4 +1,3 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ip6.h,v 1.8 2007-08-29 02:31:44 mcr Exp $ (LBL) */
/* NetBSD: ip6.h,v 1.9 2000/07/13 05:34:21 itojun Exp */
/* $KAME: ip6.h,v 1.9 2000/07/02 21:01:32 itojun Exp $ */
@@ -77,18 +76,19 @@
struct ip6_hdr {
union {
struct ip6_hdrctl {
- u_int32_t ip6_un1_flow; /* 20 bits of flow-ID */
- u_int16_t ip6_un1_plen; /* payload length */
- u_int8_t ip6_un1_nxt; /* next header */
- u_int8_t ip6_un1_hlim; /* hop limit */
+ uint32_t ip6_un1_flow; /* 20 bits of flow-ID */
+ uint16_t ip6_un1_plen; /* payload length */
+ uint8_t ip6_un1_nxt; /* next header */
+ uint8_t ip6_un1_hlim; /* hop limit */
} ip6_un1;
- u_int8_t ip6_un2_vfc; /* 4 bits version, top 4 bits class */
+ uint8_t ip6_un2_vfc; /* 4 bits version, top 4 bits class */
} ip6_ctlun;
struct in6_addr ip6_src; /* source address */
struct in6_addr ip6_dst; /* destination address */
} UNALIGNED;
#define ip6_vfc ip6_ctlun.ip6_un2_vfc
+#define IP6_VERSION(ip6_hdr) (((ip6_hdr)->ip6_vfc & 0xf0) >> 4)
#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
@@ -96,8 +96,8 @@ struct ip6_hdr {
#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
/* in network endian */
-#define IPV6_FLOWINFO_MASK ((u_int32_t)htonl(0x0fffffff)) /* flow info (28 bits) */
-#define IPV6_FLOWLABEL_MASK ((u_int32_t)htonl(0x000fffff)) /* flow label (20 bits) */
+#define IPV6_FLOWINFO_MASK ((uint32_t)htonl(0x0fffffff)) /* flow info (28 bits) */
+#define IPV6_FLOWLABEL_MASK ((uint32_t)htonl(0x000fffff)) /* flow label (20 bits) */
#if 1
/* ECN bits proposed by Sally Floyd */
#define IP6TOS_CE 0x01 /* congestion experienced */
@@ -109,29 +109,33 @@ struct ip6_hdr {
*/
struct ip6_ext {
- u_int8_t ip6e_nxt;
- u_int8_t ip6e_len;
+ uint8_t ip6e_nxt;
+ uint8_t ip6e_len;
} UNALIGNED;
/* Hop-by-Hop options header */
struct ip6_hbh {
- u_int8_t ip6h_nxt; /* next header */
- u_int8_t ip6h_len; /* length in units of 8 octets */
+ uint8_t ip6h_nxt; /* next header */
+ uint8_t ip6h_len; /* length in units of 8 octets */
/* followed by options */
} UNALIGNED;
/* Destination options header */
struct ip6_dest {
- u_int8_t ip6d_nxt; /* next header */
- u_int8_t ip6d_len; /* length in units of 8 octets */
+ uint8_t ip6d_nxt; /* next header */
+ uint8_t ip6d_len; /* length in units of 8 octets */
/* followed by options */
} UNALIGNED;
+/* http://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xhtml */
+
/* Option types and related macros */
#define IP6OPT_PAD1 0x00 /* 00 0 00000 */
#define IP6OPT_PADN 0x01 /* 00 0 00001 */
#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */
#define IP6OPT_JUMBO_LEN 6
+#define IP6OPT_RPL 0x63 /* 01 1 00011 */
+#define IP6OPT_TUN_ENC_LIMIT 0x04 /* 00 0 00100 */
#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 */
#define IP6OPT_RTALERT_LEN 4
@@ -140,11 +144,16 @@ struct ip6_dest {
#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */
#define IP6OPT_MINLEN 2
-#define IP6OPT_BINDING_UPDATE 0xc6 /* 11 0 00110 */
-#define IP6OPT_BINDING_ACK 0x07 /* 00 0 00111 */
-#define IP6OPT_BINDING_REQ 0x08 /* 00 0 01000 */
+#define IP6OPT_QUICK_START 0x26 /* 00 1 00110 */
+#define IP6OPT_CALIPSO 0x07 /* 00 0 00111 */
+#define IP6OPT_SMF_DPD 0x08 /* 00 0 01000 */
#define IP6OPT_HOME_ADDRESS 0xc9 /* 11 0 01001 */
+#define IP6OPT_HOMEADDR_MINLEN 18
#define IP6OPT_EID 0x8a /* 10 0 01010 */
+#define IP6OPT_ILNP_NOTICE 0x8b /* 10 0 01011 */
+#define IP6OPT_LINE_ID 0x8c /* 10 0 01100 */
+#define IP6OPT_MPL 0x6d /* 01 1 01101 */
+#define IP6OPT_IP_DFF 0xee /* 11 1 01110 */
#define IP6OPT_TYPE(o) ((o) & 0xC0)
#define IP6OPT_TYPE_SKIP 0x00
@@ -156,30 +165,30 @@ struct ip6_dest {
/* Routing header */
struct ip6_rthdr {
- u_int8_t ip6r_nxt; /* next header */
- u_int8_t ip6r_len; /* length in units of 8 octets */
- u_int8_t ip6r_type; /* routing type */
- u_int8_t ip6r_segleft; /* segments left */
+ uint8_t ip6r_nxt; /* next header */
+ uint8_t ip6r_len; /* length in units of 8 octets */
+ uint8_t ip6r_type; /* routing type */
+ uint8_t ip6r_segleft; /* segments left */
/* followed by routing type specific data */
} UNALIGNED;
/* Type 0 Routing header */
struct ip6_rthdr0 {
- u_int8_t ip6r0_nxt; /* next header */
- u_int8_t ip6r0_len; /* length in units of 8 octets */
- u_int8_t ip6r0_type; /* always zero */
- u_int8_t ip6r0_segleft; /* segments left */
- u_int8_t ip6r0_reserved; /* reserved field */
- u_int8_t ip6r0_slmap[3]; /* strict/loose bit map */
+ uint8_t ip6r0_nxt; /* next header */
+ uint8_t ip6r0_len; /* length in units of 8 octets */
+ uint8_t ip6r0_type; /* always zero */
+ uint8_t ip6r0_segleft; /* segments left */
+ uint8_t ip6r0_reserved; /* reserved field */
+ uint8_t ip6r0_slmap[3]; /* strict/loose bit map */
struct in6_addr ip6r0_addr[1]; /* up to 23 addresses */
} UNALIGNED;
/* Fragment header */
struct ip6_frag {
- u_int8_t ip6f_nxt; /* next header */
- u_int8_t ip6f_reserved; /* reserved field */
- u_int16_t ip6f_offlg; /* offset, reserved, and flag */
- u_int32_t ip6f_ident; /* identification */
+ uint8_t ip6f_nxt; /* next header */
+ uint8_t ip6f_reserved; /* reserved field */
+ uint16_t ip6f_offlg; /* offset, reserved, and flag */
+ uint32_t ip6f_ident; /* identification */
} UNALIGNED;
#define IP6F_OFF_MASK 0xfff8 /* mask out offset from ip6f_offlg */
@@ -187,6 +196,6 @@ struct ip6_frag {
#define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */
/* in print-ip6.c */
-extern int nextproto6_cksum(const struct ip6_hdr *, const u_int8_t *, u_int, u_int);
+extern int nextproto6_cksum(const struct ip6_hdr *, const uint8_t *, u_int, u_int, u_int);
#endif /* not _NETINET_IP6_H_ */
diff --git a/ipfc.h b/ipfc.h
deleted file mode 100644
index 438d1156446a..000000000000
--- a/ipfc.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 1992, 1993, 1994, 1995, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/ipfc.h,v 1.4 2002-12-11 07:13:53 guy Exp $ (LBL)
- */
-
-struct ipfc_header {
- u_char ipfc_dhost[8];
- u_char ipfc_shost[8];
-};
-
-#define IPFC_HDRLEN 16
diff --git a/ipnet.h b/ipnet.h
deleted file mode 100644
index ae692842e3b8..000000000000
--- a/ipnet.h
+++ /dev/null
@@ -1,13 +0,0 @@
-typedef struct ipnet_hdr {
- uint8_t iph_version;
- uint8_t iph_family;
- uint16_t iph_htype;
- uint32_t iph_pktlen;
- uint32_t iph_ifindex;
- uint32_t iph_grifindex;
- uint32_t iph_zsrc;
- uint32_t iph_zdst;
-} ipnet_hdr_t;
-
-#define IPH_AF_INET 2 /* Matches Solaris's AF_INET */
-#define IPH_AF_INET6 26 /* Matches Solaris's AF_INET6 */
diff --git a/ipproto.c b/ipproto.c
index cbb9bf3f74e6..e44b74814bb4 100755
--- a/ipproto.c
+++ b/ipproto.c
@@ -1,4 +1,4 @@
-/*
+/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
* distributions retain the above copyright notice and this paragraph
@@ -13,11 +13,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/ipproto.c,v 1.6 2005-09-20 06:01:22 guy Exp $ (LBL)";
-#endif
-
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/ipproto.h b/ipproto.h
index c9801a624a49..75def3d85f01 100644
--- a/ipproto.h
+++ b/ipproto.h
@@ -30,8 +30,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/ipproto.h,v 1.6 2005-09-20 06:01:22 guy Exp $ (LBL)
- *
* From:
* @(#)in.h 8.3 (Berkeley) 1/3/94
* $FreeBSD: src/sys/netinet/in.h,v 1.38.2.3 1999/08/29 16:29:34 peter Exp $
diff --git a/ipsec_doi.h b/ipsec_doi.h
deleted file mode 100644
index 554a2586a0a3..000000000000
--- a/ipsec_doi.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-/* YIPS @(#)$Id: ipsec_doi.h,v 1.7 2002-12-11 07:13:53 guy Exp $ */
-
-/* refer to RFC 2407 */
-
-#if !defined(_IPSEC_DOI_H_)
-#define _IPSEC_DOI_H_
-
-#define IPSEC_DOI 1
-
-/* 4.2 IPSEC Situation Definition */
-#define IPSECDOI_SIT_IDENTITY_ONLY 0x00000001
-#define IPSECDOI_SIT_SECRECY 0x00000002
-#define IPSECDOI_SIT_INTEGRITY 0x00000004
-
-/* 4.4.1 IPSEC Security Protocol Identifiers */
- /* 4.4.2 IPSEC ISAKMP Transform Values */
-#define IPSECDOI_PROTO_ISAKMP 1
-#define IPSECDOI_KEY_IKE 1
-
-/* 4.4.1 IPSEC Security Protocol Identifiers */
-#define IPSECDOI_PROTO_IPSEC_AH 2
- /* 4.4.3 IPSEC AH Transform Values */
-#define IPSECDOI_AH_MD5 2
-#define IPSECDOI_AH_SHA 3
-#define IPSECDOI_AH_DES 4
-#define IPSECDOI_AH_SHA2_256 5
-#define IPSECDOI_AH_SHA2_384 6
-#define IPSECDOI_AH_SHA2_512 7
-
-/* 4.4.1 IPSEC Security Protocol Identifiers */
-#define IPSECDOI_PROTO_IPSEC_ESP 3
- /* 4.4.4 IPSEC ESP Transform Identifiers */
-#define IPSECDOI_ESP_DES_IV64 1
-#define IPSECDOI_ESP_DES 2
-#define IPSECDOI_ESP_3DES 3
-#define IPSECDOI_ESP_RC5 4
-#define IPSECDOI_ESP_IDEA 5
-#define IPSECDOI_ESP_CAST 6
-#define IPSECDOI_ESP_BLOWFISH 7
-#define IPSECDOI_ESP_3IDEA 8
-#define IPSECDOI_ESP_DES_IV32 9
-#define IPSECDOI_ESP_RC4 10
-#define IPSECDOI_ESP_NULL 11
-#define IPSECDOI_ESP_RIJNDAEL 12
-#define IPSECDOI_ESP_AES 12
-
-/* 4.4.1 IPSEC Security Protocol Identifiers */
-#define IPSECDOI_PROTO_IPCOMP 4
- /* 4.4.5 IPSEC IPCOMP Transform Identifiers */
-#define IPSECDOI_IPCOMP_OUI 1
-#define IPSECDOI_IPCOMP_DEFLATE 2
-#define IPSECDOI_IPCOMP_LZS 3
-
-/* 4.5 IPSEC Security Association Attributes */
-#define IPSECDOI_ATTR_SA_LTYPE 1 /* B */
-#define IPSECDOI_ATTR_SA_LTYPE_DEFAULT 1
-#define IPSECDOI_ATTR_SA_LTYPE_SEC 1
-#define IPSECDOI_ATTR_SA_LTYPE_KB 2
-#define IPSECDOI_ATTR_SA_LDUR 2 /* V */
-#define IPSECDOI_ATTR_SA_LDUR_DEFAULT 28800 /* 8 hours */
-#define IPSECDOI_ATTR_GRP_DESC 3 /* B */
-#define IPSECDOI_ATTR_ENC_MODE 4 /* B */
- /* default value: host dependent */
-#define IPSECDOI_ATTR_ENC_MODE_TUNNEL 1
-#define IPSECDOI_ATTR_ENC_MODE_TRNS 2
-#define IPSECDOI_ATTR_AUTH 5 /* B */
- /* 0 means not to use authentication. */
-#define IPSECDOI_ATTR_AUTH_HMAC_MD5 1
-#define IPSECDOI_ATTR_AUTH_HMAC_SHA1 2
-#define IPSECDOI_ATTR_AUTH_DES_MAC 3
-#define IPSECDOI_ATTR_AUTH_KPDK 4 /*RFC-1826(Key/Pad/Data/Key)*/
- /*
- * When negotiating ESP without authentication, the Auth
- * Algorithm attribute MUST NOT be included in the proposal.
- * When negotiating ESP without confidentiality, the Auth
- * Algorithm attribute MUST be included in the proposal and
- * the ESP transform ID must be ESP_NULL.
- */
-#define IPSECDOI_ATTR_KEY_LENGTH 6 /* B */
-#define IPSECDOI_ATTR_KEY_ROUNDS 7 /* B */
-#define IPSECDOI_ATTR_COMP_DICT_SIZE 8 /* B */
-#define IPSECDOI_ATTR_COMP_PRIVALG 9 /* V */
-
-/* 4.6.1 Security Association Payload */
-struct ipsecdoi_sa {
- struct isakmp_gen h;
- u_int32_t doi; /* Domain of Interpretation */
- u_int32_t sit; /* Situation */
-};
-
-struct ipsecdoi_secrecy_h {
- u_int16_t len;
- u_int16_t reserved;
-};
-
-/* 4.6.2.1 Identification Type Values */
-struct ipsecdoi_id {
- struct isakmp_gen h;
- u_int8_t type; /* ID Type */
- u_int8_t proto_id; /* Protocol ID */
- u_int16_t port; /* Port */
- /* Identification Data */
-};
-
-#define IPSECDOI_ID_IPV4_ADDR 1
-#define IPSECDOI_ID_FQDN 2
-#define IPSECDOI_ID_USER_FQDN 3
-#define IPSECDOI_ID_IPV4_ADDR_SUBNET 4
-#define IPSECDOI_ID_IPV6_ADDR 5
-#define IPSECDOI_ID_IPV6_ADDR_SUBNET 6
-#define IPSECDOI_ID_IPV4_ADDR_RANGE 7
-#define IPSECDOI_ID_IPV6_ADDR_RANGE 8
-#define IPSECDOI_ID_DER_ASN1_DN 9
-#define IPSECDOI_ID_DER_ASN1_GN 10
-#define IPSECDOI_ID_KEY_ID 11
-
-/* 4.6.3 IPSEC DOI Notify Message Types */
-/* Notify Messages - Status Types */
-#define IPSECDOI_NTYPE_RESPONDER_LIFETIME 24576
-#define IPSECDOI_NTYPE_REPLAY_STATUS 24577
-#define IPSECDOI_NTYPE_INITIAL_CONTACT 24578
-
-#endif /* !defined(_IPSEC_DOI_H_) */
diff --git a/ipx.h b/ipx.h
deleted file mode 100644
index bfc301980d18..000000000000
--- a/ipx.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * IPX protocol formats
- *
- * @(#) $Header: /tcpdump/master/tcpdump/ipx.h,v 1.8 2002-12-11 07:13:54 guy Exp $
- */
-
-/* well-known sockets */
-#define IPX_SKT_NCP 0x0451
-#define IPX_SKT_SAP 0x0452
-#define IPX_SKT_RIP 0x0453
-#define IPX_SKT_NETBIOS 0x0455
-#define IPX_SKT_DIAGNOSTICS 0x0456
-#define IPX_SKT_NWLINK_DGM 0x0553 /* NWLink datagram, may contain SMB */
-#define IPX_SKT_EIGRP 0x85be /* Cisco EIGRP over IPX */
-
-/* IPX transport header */
-struct ipxHdr {
- u_int16_t cksum; /* Checksum */
- u_int16_t length; /* Length, in bytes, including header */
- u_int8_t tCtl; /* Transport Control (i.e. hop count) */
- u_int8_t pType; /* Packet Type (i.e. level 2 protocol) */
- u_int16_t dstNet[2]; /* destination net */
- u_int8_t dstNode[6]; /* destination node */
- u_int16_t dstSkt; /* destination socket */
- u_int16_t srcNet[2]; /* source net */
- u_int8_t srcNode[6]; /* source node */
- u_int16_t srcSkt; /* source socket */
-};
-
-#define ipxSize 30
-
diff --git a/isakmp.h b/isakmp.h
deleted file mode 100644
index d628f7ae32fc..000000000000
--- a/isakmp.h
+++ /dev/null
@@ -1,501 +0,0 @@
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-/* YIPS @(#)$Id: isakmp.h,v 1.12 2007-11-24 18:13:33 mcr Exp $ */
-
-/* refer to RFC 2408 */
-
-/* must include <netinet/in.h> */
-
-#if !defined(_ISAKMP_H_)
-#define _ISAKMP_H_
-
-typedef u_char cookie_t[8];
-typedef u_char msgid_t[4];
-
-typedef struct { /* i_cookie + r_cookie */
- cookie_t i_ck;
- cookie_t r_ck;
-} isakmp_index;
-
-#define INITIATOR 1
-#define RESPONDER 2
-
-#define PORT_ISAKMP 500
-
-#define GENERATE 1
-#define VALIDATE 0
-
-/* Phase of oakley definition */
-/*
- 0000 0000 0000 0000
- | |||| ||||
- | |||| ++++--> negosiation number in phase
- | ++++-------> phase number
- +---------------> expire ?
- */
-#define ISAKMP_PH1 0x0010
-#define ISAKMP_PH2 0x0020
-#define ISAKMP_EXPIRED 0x0100
-
-#define ISAKMP_NGP_0 0x0000
-#define ISAKMP_NGP_1 0x0001
-#define ISAKMP_NGP_2 0x0002
-#define ISAKMP_NGP_3 0x0003
-#define ISAKMP_NGP_4 0x0004
-
-#define ISAKMP_PH1_N (ISAKMP_PH1 | ISAKMP_NGP_0) /* i.e. spawn */
-#define ISAKMP_PH1_1 (ISAKMP_PH1 | ISAKMP_NGP_1)
-#define ISAKMP_PH1_2 (ISAKMP_PH1 | ISAKMP_NGP_2)
-#define ISAKMP_PH1_3 (ISAKMP_PH1 | ISAKMP_NGP_3)
-#define ISAKMP_PH2_N (ISAKMP_PH2 | ISAKMP_NGP_0)
-#define ISAKMP_PH2_1 (ISAKMP_PH2 | ISAKMP_NGP_1)
-#define ISAKMP_PH2_2 (ISAKMP_PH2 | ISAKMP_NGP_2)
-#define ISAKMP_PH2_3 (ISAKMP_PH2 | ISAKMP_NGP_3)
-
-#define ISAKMP_TIMER_DEFAULT 10 /* seconds */
-#define ISAKMP_TRY_DEFAULT 3 /* times */
-
-/* 3.1 ISAKMP Header Format (IKEv1 and IKEv2)
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Initiator !
- ! Cookie !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Responder !
- ! Cookie !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Next Payload ! MjVer ! MnVer ! Exchange Type ! Flags !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Message ID !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Length !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-*/
-struct isakmp {
- cookie_t i_ck; /* Initiator Cookie */
- cookie_t r_ck; /* Responder Cookie */
- u_int8_t np; /* Next Payload Type */
- u_int8_t vers;
-#define ISAKMP_VERS_MAJOR 0xf0
-#define ISAKMP_VERS_MAJOR_SHIFT 4
-#define ISAKMP_VERS_MINOR 0x0f
-#define ISAKMP_VERS_MINOR_SHIFT 0
- u_int8_t etype; /* Exchange Type */
- u_int8_t flags; /* Flags */
- msgid_t msgid;
- u_int32_t len; /* Length */
-};
-
-/* Next Payload Type */
-#define ISAKMP_NPTYPE_NONE 0 /* NONE*/
-#define ISAKMP_NPTYPE_SA 1 /* Security Association */
-#define ISAKMP_NPTYPE_P 2 /* Proposal */
-#define ISAKMP_NPTYPE_T 3 /* Transform */
-#define ISAKMP_NPTYPE_KE 4 /* Key Exchange */
-#define ISAKMP_NPTYPE_ID 5 /* Identification */
-#define ISAKMP_NPTYPE_CERT 6 /* Certificate */
-#define ISAKMP_NPTYPE_CR 7 /* Certificate Request */
-#define ISAKMP_NPTYPE_HASH 8 /* Hash */
-#define ISAKMP_NPTYPE_SIG 9 /* Signature */
-#define ISAKMP_NPTYPE_NONCE 10 /* Nonce */
-#define ISAKMP_NPTYPE_N 11 /* Notification */
-#define ISAKMP_NPTYPE_D 12 /* Delete */
-#define ISAKMP_NPTYPE_VID 13 /* Vendor ID */
-#define ISAKMP_NPTYPE_v2E 46 /* v2 Encrypted payload */
-
-#define IKEv1_MAJOR_VERSION 1
-#define IKEv1_MINOR_VERSION 0
-
-#define IKEv2_MAJOR_VERSION 2
-#define IKEv2_MINOR_VERSION 0
-
-/* Exchange Type */
-#define ISAKMP_ETYPE_NONE 0 /* NONE */
-#define ISAKMP_ETYPE_BASE 1 /* Base */
-#define ISAKMP_ETYPE_IDENT 2 /* Identity Proteciton */
-#define ISAKMP_ETYPE_AUTH 3 /* Authentication Only */
-#define ISAKMP_ETYPE_AGG 4 /* Aggressive */
-#define ISAKMP_ETYPE_INF 5 /* Informational */
-
-/* Flags */
-#define ISAKMP_FLAG_E 0x01 /* Encryption Bit */
-#define ISAKMP_FLAG_C 0x02 /* Commit Bit */
-#define ISAKMP_FLAG_extra 0x04
-
-/* IKEv2 */
-#define ISAKMP_FLAG_I (1 << 3) /* (I)nitiator */
-#define ISAKMP_FLAG_V (1 << 4) /* (V)ersion */
-#define ISAKMP_FLAG_R (1 << 5) /* (R)esponse */
-
-
-/* 3.2 Payload Generic Header
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ! Next Payload ! RESERVED ! Payload Length !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-*/
-struct isakmp_gen {
- u_int8_t np; /* Next Payload */
- u_int8_t critical; /* bit 7 - critical, rest is RESERVED */
- u_int16_t len; /* Payload Length */
-};
-
-/* 3.3 Data Attributes
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- !A! Attribute Type ! AF=0 Attribute Length !
- !F! ! AF=1 Attribute Value !
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- . AF=0 Attribute Value .
- . AF=1 Not Transmitted .
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-*/
-struct isakmp_data {
- u_int16_t type; /* defined by DOI-spec, and Attribute Format */
- u_int16_t lorv; /* if f equal 1, Attribute Length */
- /* if f equal 0, Attribute Value */
- /* if f equal 1, Attribute Value */
-};
-#define ISAKMP_GEN_TLV 0x0000
-#define ISAKMP_GEN_TV 0x8000
- /* mask for type of attribute format */
-#define ISAKMP_GEN_MASK 0x8000
-
-/* 3.4 Security Association Payload */
- /* MAY NOT be used, because of being defined in ipsec-doi. */
- /*
- If the current payload is the last in the message,
- then the value of the next payload field will be 0.
- This field MUST NOT contain the
- values for the Proposal or Transform payloads as they are considered
- part of the security association negotiation. For example, this
- field would contain the value "10" (Nonce payload) in the first
- message of a Base Exchange (see Section 4.4) and the value "0" in the
- first message of an Identity Protect Exchange (see Section 4.5).
- */
-struct ikev1_pl_sa {
- struct isakmp_gen h;
- u_int32_t doi; /* Domain of Interpretation */
- u_int32_t sit; /* Situation */
-};
-
-/* 3.5 Proposal Payload */
- /*
- The value of the next payload field MUST only contain the value "2"
- or "0". If there are additional Proposal payloads in the message,
- then this field will be 2. If the current Proposal payload is the
- last within the security association proposal, then this field will
- be 0.
- */
-struct ikev1_pl_p {
- struct isakmp_gen h;
- u_int8_t p_no; /* Proposal # */
- u_int8_t prot_id; /* Protocol */
- u_int8_t spi_size; /* SPI Size */
- u_int8_t num_t; /* Number of Transforms */
- /* SPI */
-};
-
-/* 3.6 Transform Payload */
- /*
- The value of the next payload field MUST only contain the value "3"
- or "0". If there are additional Transform payloads in the proposal,
- then this field will be 3. If the current Transform payload is the
- last within the proposal, then this field will be 0.
- */
-struct ikev1_pl_t {
- struct isakmp_gen h;
- u_int8_t t_no; /* Transform # */
- u_int8_t t_id; /* Transform-Id */
- u_int16_t reserved; /* RESERVED2 */
- /* SA Attributes */
-};
-
-/* 3.7 Key Exchange Payload */
-struct ikev1_pl_ke {
- struct isakmp_gen h;
- /* Key Exchange Data */
-};
-
-/* 3.8 Identification Payload */
- /* MUST NOT to be used, because of being defined in ipsec-doi. */
-struct ikev1_pl_id {
- struct isakmp_gen h;
- union {
- u_int8_t id_type; /* ID Type */
- u_int32_t doi_data; /* DOI Specific ID Data */
- } d;
- /* Identification Data */
-};
-
-/* 3.9 Certificate Payload */
-struct ikev1_pl_cert {
- struct isakmp_gen h;
- u_int8_t encode; /* Cert Encoding */
- char cert; /* Certificate Data */
- /*
- This field indicates the type of
- certificate or certificate-related information contained in the
- Certificate Data field.
- */
-};
-
-/* Certificate Type */
-#define ISAKMP_CERT_NONE 0
-#define ISAKMP_CERT_PKCS 1
-#define ISAKMP_CERT_PGP 2
-#define ISAKMP_CERT_DNS 3
-#define ISAKMP_CERT_SIGN 4
-#define ISAKMP_CERT_KE 5
-#define ISAKMP_CERT_KT 6
-#define ISAKMP_CERT_CRL 7
-#define ISAKMP_CERT_ARL 8
-#define ISAKMP_CERT_SPKI 9
-
-/* 3.10 Certificate Request Payload */
-struct ikev1_pl_cr {
- struct isakmp_gen h;
- u_int8_t num_cert; /* # Cert. Types */
- /*
- Certificate Types (variable length)
- -- Contains a list of the types of certificates requested,
- sorted in order of preference. Each individual certificate
- type is 1 octet. This field is NOT requiredo
- */
- /* # Certificate Authorities (1 octet) */
- /* Certificate Authorities (variable length) */
-};
-
-/* 3.11 Hash Payload */
- /* may not be used, because of having only data. */
-struct ikev1_pl_hash {
- struct isakmp_gen h;
- /* Hash Data */
-};
-
-/* 3.12 Signature Payload */
- /* may not be used, because of having only data. */
-struct ikev1_pl_sig {
- struct isakmp_gen h;
- /* Signature Data */
-};
-
-/* 3.13 Nonce Payload */
- /* may not be used, because of having only data. */
-struct ikev1_pl_nonce {
- struct isakmp_gen h;
- /* Nonce Data */
-};
-
-/* 3.14 Notification Payload */
-struct ikev1_pl_n {
- struct isakmp_gen h;
- u_int32_t doi; /* Domain of Interpretation */
- u_int8_t prot_id; /* Protocol-ID */
- u_int8_t spi_size; /* SPI Size */
- u_int16_t type; /* Notify Message Type */
- /* SPI */
- /* Notification Data */
-};
-
-/* 3.14.1 Notify Message Types */
-/* NOTIFY MESSAGES - ERROR TYPES */
-#define ISAKMP_NTYPE_INVALID_PAYLOAD_TYPE 1
-#define ISAKMP_NTYPE_DOI_NOT_SUPPORTED 2
-#define ISAKMP_NTYPE_SITUATION_NOT_SUPPORTED 3
-#define ISAKMP_NTYPE_INVALID_COOKIE 4
-#define ISAKMP_NTYPE_INVALID_MAJOR_VERSION 5
-#define ISAKMP_NTYPE_INVALID_MINOR_VERSION 6
-#define ISAKMP_NTYPE_INVALID_EXCHANGE_TYPE 7
-#define ISAKMP_NTYPE_INVALID_FLAGS 8
-#define ISAKMP_NTYPE_INVALID_MESSAGE_ID 9
-#define ISAKMP_NTYPE_INVALID_PROTOCOL_ID 10
-#define ISAKMP_NTYPE_INVALID_SPI 11
-#define ISAKMP_NTYPE_INVALID_TRANSFORM_ID 12
-#define ISAKMP_NTYPE_ATTRIBUTES_NOT_SUPPORTED 13
-#define ISAKMP_NTYPE_NO_PROPOSAL_CHOSEN 14
-#define ISAKMP_NTYPE_BAD_PROPOSAL_SYNTAX 15
-#define ISAKMP_NTYPE_PAYLOAD_MALFORMED 16
-#define ISAKMP_NTYPE_INVALID_KEY_INFORMATION 17
-#define ISAKMP_NTYPE_INVALID_ID_INFORMATION 18
-#define ISAKMP_NTYPE_INVALID_CERT_ENCODING 19
-#define ISAKMP_NTYPE_INVALID_CERTIFICATE 20
-#define ISAKMP_NTYPE_BAD_CERT_REQUEST_SYNTAX 21
-#define ISAKMP_NTYPE_INVALID_CERT_AUTHORITY 22
-#define ISAKMP_NTYPE_INVALID_HASH_INFORMATION 23
-#define ISAKMP_NTYPE_AUTHENTICATION_FAILED 24
-#define ISAKMP_NTYPE_INVALID_SIGNATURE 25
-#define ISAKMP_NTYPE_ADDRESS_NOTIFICATION 26
-/* NOTIFY MESSAGES - STATUS TYPES */
-#define ISAKMP_NTYPE_CONNECTED 16384
-/* using only to log */
-#define ISAKMP_LOG_RETRY_LIMIT_REACHED 65530
-
-/* 3.15 Delete Payload */
-struct ikev1_pl_d {
- struct isakmp_gen h;
- u_int32_t doi; /* Domain of Interpretation */
- u_int8_t prot_id; /* Protocol-Id */
- u_int8_t spi_size; /* SPI Size */
- u_int16_t num_spi; /* # of SPIs */
- /* SPI(es) */
-};
-
-
-struct ikev1_ph1tab {
- struct ikev1_ph1 *head;
- struct ikev1_ph1 *tail;
- int len;
-};
-
-struct isakmp_ph2tab {
- struct ikev1_ph2 *head;
- struct ikev1_ph2 *tail;
- int len;
-};
-
-#define EXCHANGE_PROXY 1
-#define EXCHANGE_MYSELF 0
-
-#define PFS_NEED 1
-#define PFS_NONEED 0
-
-/* IKEv2 (RFC4306) */
-
-/* 3.3 Security Association Payload -- generic header */
-/* 3.3.1. Proposal Substructure */
-struct ikev2_p {
- struct isakmp_gen h;
- u_int8_t p_no; /* Proposal # */
- u_int8_t prot_id; /* Protocol */
- u_int8_t spi_size; /* SPI Size */
- u_int8_t num_t; /* Number of Transforms */
-};
-
-/* 3.3.2. Transform Substructure */
-struct ikev2_t {
- struct isakmp_gen h;
- u_int8_t t_type; /* Transform Type (ENCR,PRF,INTEG,etc.*/
- u_int8_t res2; /* reserved byte */
- u_int16_t t_id; /* Transform ID */
-};
-
-enum ikev2_t_type {
- IV2_T_ENCR = 1,
- IV2_T_PRF = 2,
- IV2_T_INTEG= 3,
- IV2_T_DH = 4,
- IV2_T_ESN = 5,
-};
-
-/* 3.4. Key Exchange Payload */
-struct ikev2_ke {
- struct isakmp_gen h;
- u_int16_t ke_group;
- u_int16_t ke_res1;
- /* KE data */
-};
-
-
-/* 3.5. Identification Payloads */
-enum ikev2_id_type {
- ID_IPV4_ADDR=1,
- ID_FQDN=2,
- ID_RFC822_ADDR=3,
- ID_IPV6_ADDR=5,
- ID_DER_ASN1_DN=9,
- ID_DER_ASN1_GN=10,
- ID_KEY_ID=11,
-};
-struct ikev2_id {
- struct isakmp_gen h;
- u_int8_t type; /* ID type */
- u_int8_t res1;
- u_int16_t res2;
- /* SPI */
- /* Notification Data */
-};
-
-/* 3.10 Notification Payload */
-struct ikev2_n {
- struct isakmp_gen h;
- u_int8_t prot_id; /* Protocol-ID */
- u_int8_t spi_size; /* SPI Size */
- u_int16_t type; /* Notify Message Type */
-};
-
-enum ikev2_n_type {
- IV2_NOTIFY_UNSUPPORTED_CRITICAL_PAYLOAD = 1,
- IV2_NOTIFY_INVALID_IKE_SPI = 4,
- IV2_NOTIFY_INVALID_MAJOR_VERSION = 5,
- IV2_NOTIFY_INVALID_SYNTAX = 7,
- IV2_NOTIFY_INVALID_MESSAGE_ID = 9,
- IV2_NOTIFY_INVALID_SPI =11,
- IV2_NOTIFY_NO_PROPOSAL_CHOSEN =14,
- IV2_NOTIFY_INVALID_KE_PAYLOAD =17,
- IV2_NOTIFY_AUTHENTICATION_FAILED =24,
- IV2_NOTIFY_SINGLE_PAIR_REQUIRED =34,
- IV2_NOTIFY_NO_ADDITIONAL_SAS =35,
- IV2_NOTIFY_INTERNAL_ADDRESS_FAILURE =36,
- IV2_NOTIFY_FAILED_CP_REQUIRED =37,
- IV2_NOTIFY_INVALID_SELECTORS =39,
- IV2_NOTIFY_INITIAL_CONTACT =16384,
- IV2_NOTIFY_SET_WINDOW_SIZE =16385,
- IV2_NOTIFY_ADDITIONAL_TS_POSSIBLE =16386,
- IV2_NOTIFY_IPCOMP_SUPPORTED =16387,
- IV2_NOTIFY_NAT_DETECTION_SOURCE_IP =16388,
- IV2_NOTIFY_NAT_DETECTION_DESTINATION_IP =16389,
- IV2_NOTIFY_COOKIE =16390,
- IV2_NOTIFY_USE_TRANSPORT_MODE =16391,
- IV2_NOTIFY_HTTP_CERT_LOOKUP_SUPPORTED =16392,
- IV2_NOTIFY_REKEY_SA =16393,
- IV2_NOTIFY_ESP_TFC_PADDING_NOT_SUPPORTED =16394,
- IV2_NOTIFY_NON_FIRST_FRAGMENTS_ALSO =16395
-};
-
-struct notify_messages {
- u_int16_t type;
- char *msg;
-};
-
-/* 3.8 Notification Payload */
-struct ikev2_auth {
- struct isakmp_gen h;
- u_int8_t auth_method; /* Protocol-ID */
- u_int8_t reserved[3];
- /* authentication data */
-};
-
-enum ikev2_auth_type {
- IV2_RSA_SIG = 1,
- IV2_SHARED = 2,
- IV2_DSS_SIG = 3,
-};
-
-#endif /* !defined(_ISAKMP_H_) */
diff --git a/l2tp.h b/l2tp.h
deleted file mode 100644
index 5be24b9fc5af..000000000000
--- a/l2tp.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/l2tp.h,v 1.5 2001-11-05 10:03:27 guy Exp $ (LBL) */
-/*
- * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * L2TP support contributed by Motonori Shindo (mshindo@mshindo.net)
- */
-
-
-#define L2TP_FLAG_TYPE 0x8000 /* Type (0=Data, 1=Control) */
-#define L2TP_FLAG_LENGTH 0x4000 /* Length */
-#define L2TP_FLAG_SEQUENCE 0x0800 /* Sequence */
-#define L2TP_FLAG_OFFSET 0x0200 /* Offset */
-#define L2TP_FLAG_PRIORITY 0x0100 /* Priority */
-
-#define L2TP_VERSION_MASK 0x000f /* Version Mask */
-#define L2TP_VERSION_L2F 0x0001 /* L2F */
-#define L2TP_VERSION_L2TP 0x0002 /* L2TP */
-
-#define L2TP_AVP_HDR_FLAG_MANDATORY 0x8000 /* Mandatory Flag */
-#define L2TP_AVP_HDR_FLAG_HIDDEN 0x4000 /* Hidden Flag */
-#define L2TP_AVP_HDR_LEN_MASK 0x03ff /* Length Mask */
-
-#define L2TP_FRAMING_CAP_SYNC_MASK 0x00000001 /* Synchronous */
-#define L2TP_FRAMING_CAP_ASYNC_MASK 0x00000002 /* Asynchronous */
-
-#define L2TP_FRAMING_TYPE_SYNC_MASK 0x00000001 /* Synchronous */
-#define L2TP_FRAMING_TYPE_ASYNC_MASK 0x00000002 /* Asynchronous */
-
-#define L2TP_BEARER_CAP_DIGITAL_MASK 0x00000001 /* Digital */
-#define L2TP_BEARER_CAP_ANALOG_MASK 0x00000002 /* Analog */
-
-#define L2TP_BEARER_TYPE_DIGITAL_MASK 0x00000001 /* Digital */
-#define L2TP_BEARER_TYPE_ANALOG_MASK 0x00000002 /* Analog */
-
-/* Authen Type */
-#define L2TP_AUTHEN_TYPE_RESERVED 0x0000 /* Reserved */
-#define L2TP_AUTHEN_TYPE_TEXTUAL 0x0001 /* Textual username/password exchange */
-#define L2TP_AUTHEN_TYPE_CHAP 0x0002 /* PPP CHAP */
-#define L2TP_AUTHEN_TYPE_PAP 0x0003 /* PPP PAP */
-#define L2TP_AUTHEN_TYPE_NO_AUTH 0x0004 /* No Authentication */
-#define L2TP_AUTHEN_TYPE_MSCHAPv1 0x0005 /* MSCHAPv1 */
-
-#define L2TP_PROXY_AUTH_ID_MASK 0x00ff
-
-
diff --git a/l2vpn.c b/l2vpn.c
index 021e7f0ad2bb..54037aa19bc3 100755
--- a/l2vpn.c
+++ b/l2vpn.c
@@ -1,4 +1,4 @@
-/*
+/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
* distributions retain the above copyright notice and this paragraph
@@ -13,11 +13,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/l2vpn.c,v 1.1 2004-06-15 09:42:40 hannes Exp $ (LBL)";
-#endif
-
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -31,16 +27,16 @@ const struct tok l2vpn_encaps_values[] = {
{ 0x00, "Reserved"},
{ 0x01, "Frame Relay"},
{ 0x02, "ATM AAL5 VCC transport"},
- { 0x03, "ATM transparent cell transport"},
- { 0x04, "Ethernet VLAN"},
- { 0x05, "Ethernet"},
- { 0x06, "Cisco-HDLC"},
- { 0x07, "PPP"},
- { 0x08, "SONET/SDH Circuit Emulation Service over MPLS"},
- { 0x09, "ATM n-to-one VCC cell transport"},
- { 0x0a, "ATM n-to-one VPC cell transport"},
- { 0x0b, "IP Layer2 Transport"},
- { 0x0c, "ATM one-to-one VCC Cell Mode"},
+ { 0x03, "ATM transparent cell transport"},
+ { 0x04, "Ethernet VLAN"},
+ { 0x05, "Ethernet"},
+ { 0x06, "Cisco-HDLC"},
+ { 0x07, "PPP"},
+ { 0x08, "SONET/SDH Circuit Emulation Service over MPLS"},
+ { 0x09, "ATM n-to-one VCC cell transport"},
+ { 0x0a, "ATM n-to-one VPC cell transport"},
+ { 0x0b, "IP Layer2 Transport"},
+ { 0x0c, "ATM one-to-one VCC Cell Mode"},
{ 0x0d, "ATM one-to-one VPC Cell Mode"},
{ 0x0e, "ATM AAL5 PDU VCC transport"},
{ 0x0f, "Frame-Relay Port mode"},
@@ -53,6 +49,6 @@ const struct tok l2vpn_encaps_values[] = {
{ 0x16, "TDMoIP basic mode"},
{ 0x17, "CESoPSN TDM with CAS"},
{ 0x18, "TDMoIP TDM with CAS"},
- { 0x40, "IP-interworking"},
+ { 0x40, "IP-interworking"},
{ 0, NULL}
};
diff --git a/l2vpn.h b/l2vpn.h
index 871eca0e0d22..151228fc697b 100755
--- a/l2vpn.h
+++ b/l2vpn.h
@@ -1,5 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/l2vpn.h,v 1.1 2004-06-15 09:42:41 hannes Exp $ (LBL) */
-/*
+/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
* distributions retain the above copyright notice and this paragraph
diff --git a/lane.h b/lane.h
deleted file mode 100644
index 76cc020ea791..000000000000
--- a/lane.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Marko Kiiskila carnil@cs.tut.fi
- *
- * Tampere University of Technology - Telecommunications Laboratory
- *
- * Permission to use, copy, modify and distribute this
- * software and its documentation is hereby granted,
- * provided that both the copyright notice and this
- * permission notice appear in all copies of the software,
- * derivative works or modified versions, and any portions
- * thereof, that both notices appear in supporting
- * documentation, and that the use of this software is
- * acknowledged in any publications resulting from using
- * the software.
- *
- * TUT ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION AND DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS
- * SOFTWARE.
- *
- */
-
-/* $Id: lane.h,v 1.7 2002-12-11 07:13:54 guy Exp $ */
-
-#ifndef ETHER_ADDR_LEN
-#define ETHER_ADDR_LEN 6
-#endif
-
-struct lecdatahdr_8023 {
- u_int16_t le_header;
- u_int8_t h_dest[ETHER_ADDR_LEN];
- u_int8_t h_source[ETHER_ADDR_LEN];
- u_int16_t h_type;
-};
-
-struct lane_controlhdr {
- u_int16_t lec_header;
- u_int8_t lec_proto;
- u_int8_t lec_vers;
- u_int16_t lec_opcode;
-};
diff --git a/lbl/os-osf4.h b/lbl/os-osf4.h
index 5682b7e6c1fa..359bf3656eb0 100644
--- a/lbl/os-osf4.h
+++ b/lbl/os-osf4.h
@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-osf4.h,v 1.1 2002-12-11 05:03:13 guy Exp $ (LBL)
*/
/* Prototypes missing in Digital UNIX 4.x */
diff --git a/lbl/os-solaris2.h b/lbl/os-solaris2.h
index 5c01b87212e6..9f94da97658f 100644
--- a/lbl/os-solaris2.h
+++ b/lbl/os-solaris2.h
@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-solaris2.h,v 1.19 2000-10-11 04:02:15 guy Exp $ (LBL)
*/
/* Prototypes missing in SunOS 5 */
diff --git a/lbl/os-sunos4.h b/lbl/os-sunos4.h
index ab0a12c54131..b73585706cd5 100644
--- a/lbl/os-sunos4.h
+++ b/lbl/os-sunos4.h
@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-sunos4.h,v 1.32 1999-10-07 23:47:13 mcr Exp $ (LBL)
*/
/* Prototypes missing in SunOS 4 */
diff --git a/lbl/os-ultrix4.h b/lbl/os-ultrix4.h
index 347485ec530e..fa1f770f8d44 100644
--- a/lbl/os-ultrix4.h
+++ b/lbl/os-ultrix4.h
@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-ultrix4.h,v 1.19 1999-10-07 23:47:13 mcr Exp $ (LBL)
*/
/* Prototypes missing in Ultrix 4 */
diff --git a/llc.h b/llc.h
index faa72561c9a9..ec8d069e77b9 100644
--- a/llc.h
+++ b/llc.h
@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.23 2007-04-13 09:43:11 hannes Exp $ (LBL)
*/
/*
@@ -106,6 +104,7 @@
#define PID_CISCO_DTP 0x2004 /* Cisco Dynamic Trunk Protocol */
#define PID_CISCO_UDLD 0x0111 /* Unidirectional Link Detection */
#define PID_CISCO_PVST 0x010b /* Per VLAN Spanning Tree+ and RPVST+ */
+#define PID_CISCO_VLANBRIDGE 0x010c /* "VLAN Bridge", according to Wireshark */
/*
* PIDs for use with OUI_RFC2684.
diff --git a/machdep.c b/machdep.c
index 2bcf31747062..3b8c9664f266 100644
--- a/machdep.c
+++ b/machdep.c
@@ -19,11 +19,6 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/machdep.c,v 1.13 2003-12-15 03:53:21 guy Exp $ (LBL)";
-#endif
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -46,7 +41,10 @@ static const char rcsid[] _U_ =
#if !defined(HAVE_SNPRINTF)
int snprintf(char *, size_t, const char *, ...)
- __attribute__((format(printf, 3, 4)));
+#ifdef __ATTRIBUTE___FORMAT_OK
+ __attribute__((format(printf, 3, 4)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+ ;
#endif /* !defined(HAVE_SNPRINTF) */
#endif /* __osf__ */
diff --git a/machdep.h b/machdep.h
index 6328c8265947..d1c7d4b5c55b 100644
--- a/machdep.h
+++ b/machdep.h
@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/machdep.h,v 1.2 2000-01-17 06:24:24 itojun Exp $ (LBL)
*/
#ifndef tcpdump_machdep_h
#define tcpdump_machdep_h
diff --git a/makemib b/makemib
index b59e2f105a75..97e78754ff7b 100755
--- a/makemib
+++ b/makemib
@@ -26,8 +26,6 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# @(#) $Id: makemib,v 1.3 2001-09-17 22:16:52 fenner Exp $ (jlv)
#
# This script will read either ASN.1-style MIB files or the ".defs" files
@@ -39,7 +37,7 @@
# This script needs to be run by "gawk" (GNU awk). "nawk" will work, but
# dump will get a recursion error if you process LARGE mibs. While it would
# by farily easy to rewrite this not to use recursion (and also easy to
-# eliminate use of gsub and functions to use classic "awk"), you have to
+# eliminate use of gsub and functions to use classic "awk"), you have to
# order the structure declarations in defined-first order for the compiler
# not to barf; too bad tsort doesn't take arguments.
#
@@ -49,7 +47,7 @@ cat << EOF
* This file was generated by tcpdump/makemib on `date`
* You probably don't want to edit this by hand!
*
- * struct mib somename = { desc, oid-octet, type, child-pointer, next-pointer
+ * struct mib somename = { desc, oid-octet, type, child-pointer, next-pointer
};
*/
@@ -159,7 +157,7 @@ $2$3 == "::={" {
}
-#
+#
# End of the road - output the data.
#
diff --git a/missing/addrinfo.h b/missing/addrinfo.h
index d3d63cd78bea..bf4bbf6ed6d0 100644
--- a/missing/addrinfo.h
+++ b/missing/addrinfo.h
@@ -27,8 +27,6 @@
* SUCH DAMAGE.
*/
-/* $Id: addrinfo.h,v 1.4 2002-06-11 17:13:36 itojun Exp $ */
-
#ifndef HAVE_ADDRINFO
/*
diff --git a/missing/datalinks.c b/missing/datalinks.c
index 1bd86448a8d0..e7d526bcedb1 100644
--- a/missing/datalinks.c
+++ b/missing/datalinks.c
@@ -31,11 +31,6 @@
* SUCH DAMAGE.
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/datalinks.c,v 1.3 2003-11-16 09:36:47 guy Exp $ (LBL)";
-#endif
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/missing/dlnames.c b/missing/dlnames.c
index 32072b784f95..a10cd398d893 100644
--- a/missing/dlnames.c
+++ b/missing/dlnames.c
@@ -31,11 +31,6 @@
* SUCH DAMAGE.
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/dlnames.c,v 1.5 2003-11-18 23:09:43 guy Exp $ (LBL)";
-#endif
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/missing/getnameinfo.c b/missing/getnameinfo.c
index c287221c402b..63aba7310487 100644
--- a/missing/getnameinfo.c
+++ b/missing/getnameinfo.c
@@ -41,11 +41,6 @@
#include <config.h>
#endif
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/getnameinfo.c,v 1.11 2003-11-16 09:36:49 guy Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
@@ -112,7 +107,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
u_short port;
int family, i;
char *addr, *p;
- u_int32_t v4a;
+ uint32_t v4a;
int h_error;
char numserv[512];
char numaddr[512];
@@ -168,7 +163,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
switch (sa->sa_family) {
case AF_INET:
- v4a = (u_int32_t)
+ v4a = (uint32_t)
ntohl(((struct sockaddr_in *)sa)->sin_addr.s_addr);
if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
flags |= NI_NUMERICHOST;
diff --git a/missing/getopt_long.c b/missing/getopt_long.c
new file mode 100644
index 000000000000..80857369804d
--- /dev/null
+++ b/missing/getopt_long.c
@@ -0,0 +1,612 @@
+/* $OpenBSD: getopt_long.c,v 1.22 2006/10/04 21:29:04 jmc Exp $ */
+/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */
+
+/*
+ * Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Sponsored in part by the Defense Advanced Research Projects
+ * Agency (DARPA) and Air Force Research Laboratory, Air Force
+ * Materiel Command, USAF, under agreement number F39502-99-1-0512.
+ */
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include <errno.h>
+#include "getopt_long.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+
+#define GNU_COMPATIBLE /* Be more compatible, configure's use us! */
+
+#define PRINT_ERROR ((opterr) && (*options != ':'))
+
+#define FLAG_PERMUTE 0x01 /* permute non-options to the end of argv */
+#define FLAG_ALLARGS 0x02 /* treat non-options as args to option "-1" */
+#define FLAG_LONGONLY 0x04 /* operate as getopt_long_only */
+
+/* return values */
+#define BADCH (int)'?'
+#define BADARG ((*options == ':') ? (int)':' : (int)'?')
+#define INORDER (int)1
+
+#define EMSG ""
+
+#ifdef GNU_COMPATIBLE
+#define NO_PREFIX (-1)
+#define D_PREFIX 0
+#define DD_PREFIX 1
+#define W_PREFIX 2
+#endif
+
+char *optarg;
+int optind, opterr = 1, optopt;
+
+static int getopt_internal(int, char * const *, const char *,
+ const struct option *, int *, int);
+static int parse_long_options(char * const *, const char *,
+ const struct option *, int *, int, int);
+static int gcd(int, int);
+static void permute_args(int, int, int, char * const *);
+
+static const char *place = EMSG; /* option letter processing */
+
+static int nonopt_start = -1; /* first non option argument (for permute) */
+static int nonopt_end = -1; /* first option after non options (for permute) */
+
+/* Error messages */
+static const char recargchar[] = "option requires an argument -- %c";
+static const char illoptchar[] = "illegal option -- %c"; /* From P1003.2 */
+#ifdef GNU_COMPATIBLE
+static int dash_prefix = NO_PREFIX;
+static const char gnuoptchar[] = "invalid option -- %c";
+
+static const char recargstring[] = "option `%s%s' requires an argument";
+static const char ambig[] = "option `%s%.*s' is ambiguous";
+static const char noarg[] = "option `%s%.*s' doesn't allow an argument";
+static const char illoptstring[] = "unrecognized option `%s%s'";
+#else
+static const char recargstring[] = "option requires an argument -- %s";
+static const char ambig[] = "ambiguous option -- %.*s";
+static const char noarg[] = "option doesn't take an argument -- %.*s";
+static const char illoptstring[] = "unknown option -- %s";
+#endif
+
+/*
+ * Compute the greatest common divisor of a and b.
+ */
+static int
+gcd(int a, int b)
+{
+ int c;
+
+ c = a % b;
+ while (c != 0) {
+ a = b;
+ b = c;
+ c = a % b;
+ }
+
+ return (b);
+}
+
+/*
+ * Exchange the block from nonopt_start to nonopt_end with the block
+ * from nonopt_end to opt_end (keeping the same order of arguments
+ * in each block).
+ */
+static void
+permute_args(int panonopt_start, int panonopt_end, int opt_end,
+ char * const *nargv)
+{
+ int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
+ char *swap;
+
+ /*
+ * compute lengths of blocks and number and size of cycles
+ */
+ nnonopts = panonopt_end - panonopt_start;
+ nopts = opt_end - panonopt_end;
+ ncycle = gcd(nnonopts, nopts);
+ cyclelen = (opt_end - panonopt_start) / ncycle;
+
+ for (i = 0; i < ncycle; i++) {
+ cstart = panonopt_end+i;
+ pos = cstart;
+ for (j = 0; j < cyclelen; j++) {
+ if (pos >= panonopt_end)
+ pos -= nnonopts;
+ else
+ pos += nopts;
+ swap = nargv[pos];
+ /* LINTED const cast */
+ ((char **) nargv)[pos] = nargv[cstart];
+ /* LINTED const cast */
+ ((char **)nargv)[cstart] = swap;
+ }
+ }
+}
+
+static void
+warnx(const char *fmt, ...)
+{
+ extern char *program_name;
+ va_list ap;
+
+ va_start(ap, fmt);
+ fprintf(stderr, "%s: ", program_name);
+ vfprintf(stderr, fmt, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
+}
+
+/*
+ * parse_long_options --
+ * Parse long options in argc/argv argument vector.
+ * Returns -1 if short_too is set and the option does not match long_options.
+ */
+static int
+parse_long_options(char * const *nargv, const char *options,
+ const struct option *long_options, int *idx, int short_too, int flags)
+{
+ const char *current_argv, *has_equal;
+#ifdef GNU_COMPATIBLE
+ const char *current_dash;
+#endif
+ size_t current_argv_len;
+ int i, match, exact_match, second_partial_match;
+
+ current_argv = place;
+#ifdef GNU_COMPATIBLE
+ switch (dash_prefix) {
+ case D_PREFIX:
+ current_dash = "-";
+ break;
+ case DD_PREFIX:
+ current_dash = "--";
+ break;
+ case W_PREFIX:
+ current_dash = "-W ";
+ break;
+ default:
+ current_dash = "";
+ break;
+ }
+#endif
+ match = -1;
+ exact_match = 0;
+ second_partial_match = 0;
+
+ optind++;
+
+ if ((has_equal = strchr(current_argv, '=')) != NULL) {
+ /* argument found (--option=arg) */
+ current_argv_len = has_equal - current_argv;
+ has_equal++;
+ } else
+ current_argv_len = strlen(current_argv);
+
+ for (i = 0; long_options[i].name; i++) {
+ /* find matching long option */
+ if (strncmp(current_argv, long_options[i].name,
+ current_argv_len))
+ continue;
+
+ if (strlen(long_options[i].name) == current_argv_len) {
+ /* exact match */
+ match = i;
+ exact_match = 1;
+ break;
+ }
+ /*
+ * If this is a known short option, don't allow
+ * a partial match of a single character.
+ */
+ if (short_too && current_argv_len == 1)
+ continue;
+
+ if (match == -1) /* first partial match */
+ match = i;
+ else if ((flags & FLAG_LONGONLY) ||
+ long_options[i].has_arg !=
+ long_options[match].has_arg ||
+ long_options[i].flag != long_options[match].flag ||
+ long_options[i].val != long_options[match].val)
+ second_partial_match = 1;
+ }
+ if (!exact_match && second_partial_match) {
+ /* ambiguous abbreviation */
+ if (PRINT_ERROR)
+ warnx(ambig,
+#ifdef GNU_COMPATIBLE
+ current_dash,
+#endif
+ (int)current_argv_len,
+ current_argv);
+ optopt = 0;
+ return (BADCH);
+ }
+ if (match != -1) { /* option found */
+ if (long_options[match].has_arg == no_argument
+ && has_equal) {
+ if (PRINT_ERROR)
+ warnx(noarg,
+#ifdef GNU_COMPATIBLE
+ current_dash,
+#endif
+ (int)current_argv_len,
+ current_argv);
+ /*
+ * XXX: GNU sets optopt to val regardless of flag
+ */
+ if (long_options[match].flag == NULL)
+ optopt = long_options[match].val;
+ else
+ optopt = 0;
+#ifdef GNU_COMPATIBLE
+ return (BADCH);
+#else
+ return (BADARG);
+#endif
+ }
+ if (long_options[match].has_arg == required_argument ||
+ long_options[match].has_arg == optional_argument) {
+ if (has_equal)
+ optarg = (char *)has_equal;
+ else if (long_options[match].has_arg ==
+ required_argument) {
+ /*
+ * optional argument doesn't use next nargv
+ */
+ optarg = nargv[optind++];
+ }
+ }
+ if ((long_options[match].has_arg == required_argument)
+ && (optarg == NULL)) {
+ /*
+ * Missing argument; leading ':' indicates no error
+ * should be generated.
+ */
+ if (PRINT_ERROR)
+ warnx(recargstring,
+#ifdef GNU_COMPATIBLE
+ current_dash,
+#endif
+ current_argv);
+ /*
+ * XXX: GNU sets optopt to val regardless of flag
+ */
+ if (long_options[match].flag == NULL)
+ optopt = long_options[match].val;
+ else
+ optopt = 0;
+ --optind;
+ return (BADARG);
+ }
+ } else { /* unknown option */
+ if (short_too) {
+ --optind;
+ return (-1);
+ }
+ if (PRINT_ERROR)
+ warnx(illoptstring,
+#ifdef GNU_COMPATIBLE
+ current_dash,
+#endif
+ current_argv);
+ optopt = 0;
+ return (BADCH);
+ }
+ if (idx)
+ *idx = match;
+ if (long_options[match].flag) {
+ *long_options[match].flag = long_options[match].val;
+ return (0);
+ } else
+ return (long_options[match].val);
+}
+
+/*
+ * getopt_internal --
+ * Parse argc/argv argument vector. Called by user level routines.
+ */
+static int
+getopt_internal(int nargc, char * const *nargv, const char *options,
+ const struct option *long_options, int *idx, int flags)
+{
+ char *oli; /* option letter list index */
+ int optchar, short_too;
+ int posixly_correct; /* no static, can be changed on the fly */
+
+ if (options == NULL)
+ return (-1);
+
+ /*
+ * Disable GNU extensions if POSIXLY_CORRECT is set or options
+ * string begins with a '+'.
+ */
+ posixly_correct = (getenv("POSIXLY_CORRECT") != NULL);
+#ifdef GNU_COMPATIBLE
+ if (*options == '-')
+ flags |= FLAG_ALLARGS;
+ else if (posixly_correct || *options == '+')
+ flags &= ~FLAG_PERMUTE;
+#else
+ if (posixly_correct || *options == '+')
+ flags &= ~FLAG_PERMUTE;
+ else if (*options == '-')
+ flags |= FLAG_ALLARGS;
+#endif
+ if (*options == '+' || *options == '-')
+ options++;
+
+ /*
+ * XXX Some GNU programs (like cvs) set optind to 0 instead of
+ * XXX using optreset. Work around this braindamage.
+ */
+ if (optind == 0)
+ optind = 1;
+
+ optarg = NULL;
+start:
+ if (!*place) { /* update scanning pointer */
+ if (optind >= nargc) { /* end of argument vector */
+ place = EMSG;
+ if (nonopt_end != -1) {
+ /* do permutation, if we have to */
+ permute_args(nonopt_start, nonopt_end,
+ optind, nargv);
+ optind -= nonopt_end - nonopt_start;
+ }
+ else if (nonopt_start != -1) {
+ /*
+ * If we skipped non-options, set optind
+ * to the first of them.
+ */
+ optind = nonopt_start;
+ }
+ nonopt_start = nonopt_end = -1;
+ return (-1);
+ }
+ if (*(place = nargv[optind]) != '-' ||
+#ifdef GNU_COMPATIBLE
+ place[1] == '\0') {
+#else
+ (place[1] == '\0' && strchr(options, '-') == NULL)) {
+#endif
+ place = EMSG; /* found non-option */
+ if (flags & FLAG_ALLARGS) {
+ /*
+ * GNU extension:
+ * return non-option as argument to option 1
+ */
+ optarg = nargv[optind++];
+ return (INORDER);
+ }
+ if (!(flags & FLAG_PERMUTE)) {
+ /*
+ * If no permutation wanted, stop parsing
+ * at first non-option.
+ */
+ return (-1);
+ }
+ /* do permutation */
+ if (nonopt_start == -1)
+ nonopt_start = optind;
+ else if (nonopt_end != -1) {
+ permute_args(nonopt_start, nonopt_end,
+ optind, nargv);
+ nonopt_start = optind -
+ (nonopt_end - nonopt_start);
+ nonopt_end = -1;
+ }
+ optind++;
+ /* process next argument */
+ goto start;
+ }
+ if (nonopt_start != -1 && nonopt_end == -1)
+ nonopt_end = optind;
+
+ /*
+ * If we have "-" do nothing, if "--" we are done.
+ */
+ if (place[1] != '\0' && *++place == '-' && place[1] == '\0') {
+ optind++;
+ place = EMSG;
+ /*
+ * We found an option (--), so if we skipped
+ * non-options, we have to permute.
+ */
+ if (nonopt_end != -1) {
+ permute_args(nonopt_start, nonopt_end,
+ optind, nargv);
+ optind -= nonopt_end - nonopt_start;
+ }
+ nonopt_start = nonopt_end = -1;
+ return (-1);
+ }
+ }
+
+ /*
+ * Check long options if:
+ * 1) we were passed some
+ * 2) the arg is not just "-"
+ * 3) either the arg starts with -- we are getopt_long_only()
+ */
+ if (long_options != NULL && place != nargv[optind] &&
+ (*place == '-' || (flags & FLAG_LONGONLY))) {
+ short_too = 0;
+#ifdef GNU_COMPATIBLE
+ dash_prefix = D_PREFIX;
+#endif
+ if (*place == '-') {
+ place++; /* --foo long option */
+#ifdef GNU_COMPATIBLE
+ dash_prefix = DD_PREFIX;
+#endif
+ } else if (*place != ':' && strchr(options, *place) != NULL)
+ short_too = 1; /* could be short option too */
+
+ optchar = parse_long_options(nargv, options, long_options,
+ idx, short_too, flags);
+ if (optchar != -1) {
+ place = EMSG;
+ return (optchar);
+ }
+ }
+
+ if ((optchar = (int)*place++) == (int)':' ||
+ (optchar == (int)'-' && *place != '\0') ||
+ (oli = strchr(options, optchar)) == NULL) {
+ /*
+ * If the user specified "-" and '-' isn't listed in
+ * options, return -1 (non-option) as per POSIX.
+ * Otherwise, it is an unknown option character (or ':').
+ */
+ if (optchar == (int)'-' && *place == '\0')
+ return (-1);
+ if (!*place)
+ ++optind;
+#ifdef GNU_COMPATIBLE
+ if (PRINT_ERROR)
+ warnx(posixly_correct ? illoptchar : gnuoptchar,
+ optchar);
+#else
+ if (PRINT_ERROR)
+ warnx(illoptchar, optchar);
+#endif
+ optopt = optchar;
+ return (BADCH);
+ }
+ if (long_options != NULL && optchar == 'W' && oli[1] == ';') {
+ /* -W long-option */
+ if (*place) /* no space */
+ /* NOTHING */;
+ else if (++optind >= nargc) { /* no arg */
+ place = EMSG;
+ if (PRINT_ERROR)
+ warnx(recargchar, optchar);
+ optopt = optchar;
+ return (BADARG);
+ } else /* white space */
+ place = nargv[optind];
+#ifdef GNU_COMPATIBLE
+ dash_prefix = W_PREFIX;
+#endif
+ optchar = parse_long_options(nargv, options, long_options,
+ idx, 0, flags);
+ place = EMSG;
+ return (optchar);
+ }
+ if (*++oli != ':') { /* doesn't take argument */
+ if (!*place)
+ ++optind;
+ } else { /* takes (optional) argument */
+ optarg = NULL;
+ if (*place) /* no white space */
+ optarg = (char *)place;
+ else if (oli[1] != ':') { /* arg not optional */
+ if (++optind >= nargc) { /* no arg */
+ place = EMSG;
+ if (PRINT_ERROR)
+ warnx(recargchar, optchar);
+ optopt = optchar;
+ return (BADARG);
+ } else
+ optarg = nargv[optind];
+ }
+ place = EMSG;
+ ++optind;
+ }
+ /* dump back option letter */
+ return (optchar);
+}
+
+#ifdef REPLACE_GETOPT
+/*
+ * getopt --
+ * Parse argc/argv argument vector.
+ *
+ * [eventually this will replace the BSD getopt]
+ */
+int
+getopt(int nargc, char * const *nargv, const char *options)
+{
+
+ /*
+ * We don't pass FLAG_PERMUTE to getopt_internal() since
+ * the BSD getopt(3) (unlike GNU) has never done this.
+ *
+ * Furthermore, since many privileged programs call getopt()
+ * before dropping privileges it makes sense to keep things
+ * as simple (and bug-free) as possible.
+ */
+ return (getopt_internal(nargc, nargv, options, NULL, NULL, 0));
+}
+#endif /* REPLACE_GETOPT */
+
+/*
+ * getopt_long --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt_long(int nargc, char * const *nargv, const char *options,
+ const struct option *long_options, int *idx)
+{
+
+ return (getopt_internal(nargc, nargv, options, long_options, idx,
+ FLAG_PERMUTE));
+}
+
+/*
+ * getopt_long_only --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt_long_only(int nargc, char * const *nargv, const char *options,
+ const struct option *long_options, int *idx)
+{
+
+ return (getopt_internal(nargc, nargv, options, long_options, idx,
+ FLAG_PERMUTE|FLAG_LONGONLY));
+}
diff --git a/missing/inet_aton.c b/missing/inet_aton.c
index bc1461aa7189..e85ad5f814dc 100644
--- a/missing/inet_aton.c
+++ b/missing/inet_aton.c
@@ -36,13 +36,6 @@
* SUCH DAMAGE.
*/
-/* $Id: inet_aton.c,v 1.6 2003-11-16 09:36:49 guy Exp $ */
-
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_aton.c,v 1.6 2003-11-16 09:36:49 guy Exp $";
-#endif
-
#include <tcpdump-stdinc.h>
/* Minimal implementation of inet_aton.
diff --git a/missing/inet_ntop.c b/missing/inet_ntop.c
index d17d5925737d..8c6f7eb8c7eb 100644
--- a/missing/inet_ntop.c
+++ b/missing/inet_ntop.c
@@ -36,17 +36,13 @@
* SUCH DAMAGE.
*/
-/* $Id: inet_ntop.c,v 1.8 2005-02-09 02:25:46 guy Exp $ */
-
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_ntop.c,v 1.8 2005-02-09 02:25:46 guy Exp $";
+#ifdef HAVE_CONFIG_H
+#include "config.h"
#endif
#include <tcpdump-stdinc.h>
#include <stdio.h>
-#include <errno.h>
/*
*
@@ -126,7 +122,9 @@ inet_ntop_v6 (const u_char *src, char *dst, size_t size)
for (i = 0; i < IN6ADDRSZ; i++)
words[i/2] |= (src[i] << ((1 - (i % 2)) << 3));
+ best.len = 0;
best.base = -1;
+ cur.len = 0;
cur.base = -1;
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++)
{
@@ -180,7 +178,7 @@ inet_ntop_v6 (const u_char *src, char *dst, size_t size)
tp += strlen(tp);
break;
}
- tp += sprintf (tp, "%lX", words[i]);
+ tp += sprintf (tp, "%lx", words[i]);
}
/* Was it a trailing run of 0x00's?
@@ -197,7 +195,6 @@ inet_ntop_v6 (const u_char *src, char *dst, size_t size)
return (NULL);
}
return strcpy (dst, tmp);
- return (NULL);
}
#endif /* INET6 */
diff --git a/missing/inet_pton.c b/missing/inet_pton.c
index 83f67e1e515a..3466f42b7cb5 100644
--- a/missing/inet_pton.c
+++ b/missing/inet_pton.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999 Kungliga Tekniska Hgskolan
+ * Copyright (c) 1999 Kungliga Tekniska H�gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -17,7 +17,7 @@
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the Kungliga Tekniska
- * Hgskolan and its contributors.
+ * H�gskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
@@ -36,17 +36,8 @@
* SUCH DAMAGE.
*/
-/* $Id: inet_pton.c,v 1.6 2003-11-16 09:36:51 guy Exp $ */
-
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_pton.c,v 1.6 2003-11-16 09:36:51 guy Exp $";
-#endif
-
#include <tcpdump-stdinc.h>
-#include <errno.h>
-
int
inet_pton(int af, const char *src, void *dst)
{
diff --git a/missing/snprintf.c b/missing/snprintf.c
index 79329977bf9b..21d235d217f2 100644
--- a/missing/snprintf.c
+++ b/missing/snprintf.c
@@ -31,17 +31,10 @@
* SUCH DAMAGE.
*/
-/* $Id: snprintf.c,v 1.8 2003-11-16 09:36:51 guy Exp $ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/snprintf.c,v 1.8 2003-11-16 09:36:51 guy Exp $";
-#endif
-
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
diff --git a/missing/sockstorage.h b/missing/sockstorage.h
deleted file mode 100644
index e7333289f176..000000000000
--- a/missing/sockstorage.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-struct sockaddr_storage {
-#ifdef HAVE_SOCKADDR_SA_LEN
- u_int8_t ss_len;
- u_int8_t ss_family;
- u_int8_t fill[126];
-#else
- u_int8_t ss_family;
- u_int8_t fill[127];
-#endif /* HAVE_SOCKADDR_SA_LEN */
-};
diff --git a/missing/strdup.c b/missing/strdup.c
index 079a8ff82141..9fca7529e34d 100644
--- a/missing/strdup.c
+++ b/missing/strdup.c
@@ -31,11 +31,6 @@
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/strdup.c,v 1.1 2001-01-20 07:26:08 guy Exp $ (LBL)";
-#endif /* LIBC_SCCS and not lint */
-
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
diff --git a/missing/strlcat.c b/missing/strlcat.c
index a3d3face4a83..34f1af2d9628 100644
--- a/missing/strlcat.c
+++ b/missing/strlcat.c
@@ -28,11 +28,6 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcat.c,v 1.5 2003-11-16 09:36:51 guy Exp $ (LBL)";
-#endif
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -41,6 +36,8 @@ static const char rcsid[] _U_ =
#include <string.h>
+#include "interface.h"
+
/*
* Appends src to string dst of size siz (unlike strncat, siz is the
* full size of dst, not space left). At most siz-1 characters
diff --git a/missing/strlcpy.c b/missing/strlcpy.c
index a92e4d130bb9..b0671ebd311b 100644
--- a/missing/strlcpy.c
+++ b/missing/strlcpy.c
@@ -28,11 +28,6 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcpy.c,v 1.5 2003-11-16 09:36:52 guy Exp $ (LBL)";
-#endif
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -41,6 +36,8 @@ static const char rcsid[] _U_ =
#include <string.h>
+#include "interface.h"
+
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
diff --git a/missing/strsep.c b/missing/strsep.c
index 0362d1f51b71..bcce4c46861a 100644
--- a/missing/strsep.c
+++ b/missing/strsep.c
@@ -31,11 +31,6 @@
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/strsep.c,v 1.3 2003-03-25 08:33:48 guy Exp $ (LBL)";
-#endif /* LIBC_SCCS and not lint */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
diff --git a/mkdep b/mkdep
index 2a9c221b1f1d..3062e642eab8 100755
--- a/mkdep
+++ b/mkdep
@@ -18,6 +18,7 @@ export PATH
MAKE=Makefile # default makefile name is "Makefile"
CC=cc # default C compiler is "cc"
+DEPENDENCY_CFLAG=-M # default dependency-generation flag is -M
while :
do case "$1" in
@@ -31,6 +32,11 @@ while :
MAKE=$2
shift; shift ;;
+ # -m allows you to specify the dependency-generation flag
+ -m)
+ DEPENDENCY_CFLAG=$2
+ shift; shift ;;
+
# the -p flag produces "program: program.c" style dependencies
# so .o's don't get produced
-p)
@@ -42,7 +48,7 @@ while :
done
if [ $# = 0 ] ; then
- echo 'usage: mkdep [-p] [-c cc] [-f makefile] [flags] file ...'
+ echo 'usage: mkdep [-p] [-c cc] [-f makefile] [-m dependency-cflag] [flags] file ...'
exit 1
fi
@@ -74,7 +80,7 @@ _EOF_
# sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' -e 's/\.c/.o/' |
# XXX this doesn't work with things like "-DDECLWAITSTATUS=union\ wait"
-$CC -M $* |
+$CC $DEPENDENCY_CFLAG $* |
sed "
s; \./; ;g
$SED" |
diff --git a/mpls.h b/mpls.h
index ae1c97e67ee0..03cb4bf57032 100644
--- a/mpls.h
+++ b/mpls.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/mpls.h,v 1.1 2004-06-14 14:47:58 hannes Exp $ (LBL)
+/*
* Copyright (C) 2001 WIDE Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nameser.h b/nameser.h
index f441f3ea6f56..11e71ef87d6a 100644
--- a/nameser.h
+++ b/nameser.h
@@ -1,4 +1,3 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/nameser.h,v 1.16 2006-11-10 03:18:21 guy Exp $ (LBL) */
/*
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -225,13 +224,13 @@
* Structure for query header.
*/
typedef struct {
- u_int16_t id; /* query identification number */
- u_int8_t flags1; /* first byte of flags */
- u_int8_t flags2; /* second byte of flags */
- u_int16_t qdcount; /* number of question entries */
- u_int16_t ancount; /* number of answer entries */
- u_int16_t nscount; /* number of authority entries */
- u_int16_t arcount; /* number of resource entries */
+ uint16_t id; /* query identification number */
+ uint8_t flags1; /* first byte of flags */
+ uint8_t flags2; /* second byte of flags */
+ uint16_t qdcount; /* number of question entries */
+ uint16_t ancount; /* number of answer entries */
+ uint16_t nscount; /* number of authority entries */
+ uint16_t arcount; /* number of resource entries */
} HEADER;
/*
@@ -262,36 +261,36 @@ struct rrec {
int16_t r_zone; /* zone number */
int16_t r_class; /* class number */
int16_t r_type; /* type number */
- u_int32_t r_ttl; /* time to live */
+ uint32_t r_ttl; /* time to live */
int r_size; /* size of data area */
char *r_data; /* pointer to data */
};
/*
* Inline versions of get/put short/long. Pointer is advanced.
- * We also assume that a "u_int16_t" holds 2 "chars"
- * and that a "u_int32_t" holds 4 "chars".
+ * We also assume that a "uint16_t" holds 2 "chars"
+ * and that a "uint32_t" holds 4 "chars".
*
* These macros demonstrate the property of C whereby it can be
* portable or it can be elegant but never both.
*/
#define GETSHORT(s, cp) { \
register u_char *t_cp = (u_char *)(cp); \
- (s) = ((u_int16_t)t_cp[0] << 8) | (u_int16_t)t_cp[1]; \
+ (s) = ((uint16_t)t_cp[0] << 8) | (uint16_t)t_cp[1]; \
(cp) += 2; \
}
#define GETLONG(l, cp) { \
register u_char *t_cp = (u_char *)(cp); \
- (l) = (((u_int32_t)t_cp[0]) << 24) \
- | (((u_int32_t)t_cp[1]) << 16) \
- | (((u_int32_t)t_cp[2]) << 8) \
- | (((u_int32_t)t_cp[3])); \
+ (l) = (((uint32_t)t_cp[0]) << 24) \
+ | (((uint32_t)t_cp[1]) << 16) \
+ | (((uint32_t)t_cp[2]) << 8) \
+ | (((uint32_t)t_cp[3])); \
(cp) += 4; \
}
#define PUTSHORT(s, cp) { \
- register u_int16_t t_s = (u_int16_t)(s); \
+ register uint16_t t_s = (uint16_t)(s); \
register u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_s >> 8; \
*t_cp = t_s; \
@@ -303,7 +302,7 @@ struct rrec {
* were depending on this "feature", you will lose.
*/
#define PUTLONG(l, cp) { \
- register u_int32_t t_l = (u_int32_t)(l); \
+ register uint32_t t_l = (uint32_t)(l); \
register u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_l >> 24; \
*t_cp++ = t_l >> 16; \
diff --git a/netbios.h b/netbios.h
deleted file mode 100644
index d3e2725fc6d1..000000000000
--- a/netbios.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * NETBIOS protocol formats
- *
- * @(#) $Header: /tcpdump/master/tcpdump/netbios.h,v 1.3 2002-12-11 07:13:55 guy Exp $
- */
-
-struct p8022Hdr {
- u_char dsap;
- u_char ssap;
- u_char flags;
-};
-
-#define p8022Size 3 /* min 802.2 header size */
-
-#define UI 0x03 /* 802.2 flags */
-
diff --git a/netdissect.h b/netdissect.h
index be6fb11908ba..55d45b2a9ea6 100644
--- a/netdissect.h
+++ b/netdissect.h
@@ -20,8 +20,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.27 2008-08-16 11:36:20 hannes Exp $ (LBL)
*/
#ifndef netdissect_h
@@ -40,15 +38,23 @@
#include <stdarg.h>
+#include "ip.h" /* struct ip for nextproto4_cksum() */
+
#if !defined(HAVE_SNPRINTF)
int snprintf (char *str, size_t sz, const char *format, ...)
- __attribute__ ((format (printf, 3, 4)));
-#endif
+#ifdef __ATTRIBUTE___FORMAT_OK
+ __attribute__((format (printf, 3, 4)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+ ;
+#endif /* !defined(HAVE_SNPRINTF) */
#if !defined(HAVE_VSNPRINTF)
int vsnprintf (char *str, size_t sz, const char *format, va_list ap)
- __attribute__((format (printf, 3, 0)));
-#endif
+#ifdef __ATTRIBUTE___FORMAT_OK
+ __attribute__((format (printf, 3, 0)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+ ;
+#endif /* !defined(HAVE_SNPRINTF) */
#ifndef HAVE_STRLCAT
extern size_t strlcat (char *, const char *, size_t);
@@ -66,12 +72,12 @@ extern char *strsep(char **, const char *);
#endif
struct tok {
- int v; /* value */
+ u_int v; /* value */
const char *s; /* string */
};
#define TOKBUFSIZE 128
-extern const char *tok2strbuf(const struct tok *, const char *, int,
+extern const char *tok2strbuf(const struct tok *, const char *, u_int,
char *buf, size_t bufsize);
/* tok2str is deprecated */
@@ -118,7 +124,9 @@ struct netdissect_options {
int ndo_Wflag; /* recycle output files after this number of files */
int ndo_WflagChars;
int ndo_Hflag; /* dissect 802.11s draft mesh standard */
+ int ndo_packet_number; /* print a packet number in the beginning of line */
int ndo_suppress_default_print; /* don't use default_print() for unknown packet types */
+ int ndo_tstamp_precision; /* requested time stamp precision */
const char *ndo_dltname;
char *ndo_espsecret;
@@ -158,9 +166,12 @@ struct netdissect_options {
;
void (*ndo_error)(netdissect_options *,
const char *fmt, ...)
+#ifdef __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS
+ __attribute__ ((noreturn))
+#endif /* __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS */
#ifdef __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS
- __attribute__ ((noreturn, format (printf, 2, 3)))
-#endif
+ __attribute__ ((format (printf, 2, 3)))
+#endif /* __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS */
;
void (*ndo_warning)(netdissect_options *,
const char *fmt, ...)
@@ -183,6 +194,9 @@ struct netdissect_options {
#define PT_RADIUS 11 /* RADIUS authentication Protocol */
#define PT_ZMTP1 12 /* ZeroMQ Message Transport Protocol 1.0 */
#define PT_VXLAN 13 /* Virtual eXtensible Local Area Network */
+#define PT_PGM 14 /* [UDP-encapsulated] Pragmatic General Multicast */
+#define PT_PGM_ZMTP1 15 /* ZMTP/1.0 inside PGM (native or UDP-encapsulated) */
+#define PT_LMP 16 /* Link Management Protocol */
#ifndef min
#define min(a,b) ((a)>(b)?(b):(a))
@@ -195,12 +209,26 @@ struct netdissect_options {
* Maximum snapshot length. This should be enough to capture the full
* packet on most network interfaces.
*
- * XXX - could it be larger? If so, should it? Some applications might
- * use the snapshot length in a savefile header to control the size of
- * the buffer they allocate, so a size of, say, 2^31-1 might not work
- * well.
+ *
+ * Somewhat arbitrary, but chosen to be:
+ *
+ * 1) big enough for maximum-size Linux loopback packets (65549)
+ * and some USB packets captured with USBPcap:
+ *
+ * http://desowin.org/usbpcap/
+ *
+ * (> 131072, < 262144)
+ *
+ * and
+ *
+ * 2) small enough not to cause attempts to allocate huge amounts of
+ * memory; some applications might use the snapshot length in a
+ * savefile header to control the size of the buffer they allocate,
+ * so a size of, say, 2^31-1 might not work well.
+ *
+ * XXX - does it need to be bigger still?
*/
-#define MAXIMUM_SNAPLEN 65535
+#define MAXIMUM_SNAPLEN 262144
/*
* The default snapshot length is the maximum.
@@ -240,32 +268,62 @@ struct netdissect_options {
#define ND_PRINT(STUFF) (*ndo->ndo_printf)STUFF
#define ND_DEFAULTPRINT(ap, length) (*ndo->ndo_default_print)(ndo, ap, length)
-#if 0
-extern void ts_print(netdissect_options *ipdo,
- const struct timeval *);
-extern void relts_print(int);
-#endif
+extern void ts_print(netdissect_options *, const struct timeval *);
+extern void relts_print(netdissect_options *, int);
-extern int fn_print(const u_char *, const u_char *);
-extern int fn_printn(const u_char *, u_int, const u_char *);
+extern int fn_print(netdissect_options *, const u_char *, const u_char *);
+extern int fn_printn(netdissect_options *, const u_char *, u_int, const u_char *);
+extern int fn_printzp(netdissect_options *, const u_char *, u_int, const u_char *);
extern const char *tok2str(const struct tok *, const char *, int);
-extern void wrapup(int);
-
#if 0
extern char *read_infile(netdissect_options *, char *);
extern char *copy_argv(netdissect_options *, char **);
#endif
-extern void safeputchar(int);
-extern void safeputs(const char *, int);
+/*
+ * Locale-independent macros for testing character properties and
+ * stripping the 8th bit from characters. Assumed to be handed
+ * a value between 0 and 255, i.e. don't hand them a char, as
+ * those might be in the range -128 to 127.
+ */
+#define ND_ISASCII(c) (!((c) & 0x80)) /* value is an ASCII code point */
+#define ND_ISPRINT(c) ((c) >= 0x20 && (c) <= 0x7E)
+#define ND_ISGRAPH(c) ((c) > 0x20 && (c) <= 0x7E)
+#define ND_TOASCII(c) ((c) & 0x7F)
+
+extern void safeputchar(netdissect_options *, const u_char);
+extern void safeputs(netdissect_options *, const u_char *, const u_int);
+
+#ifdef LBL_ALIGN
+/*
+ * The processor doesn't natively handle unaligned loads,
+ * and the compiler might "helpfully" optimize memcpy()
+ * and memcmp(), when handed pointers that would normally
+ * be properly aligned, into sequences that assume proper
+ * alignment.
+ *
+ * Do copies and compares of possibly-unaligned data by
+ * calling routines that wrap memcpy() and memcmp(), to
+ * prevent that optimization.
+ */
+extern void unaligned_memcpy(void *, const void *, size_t);
+extern int unaligned_memcmp(const void *, const void *, size_t);
+#define UNALIGNED_MEMCPY(p, q, l) unaligned_memcpy((p), (q), (l))
+#define UNALIGNED_MEMCMP(p, q, l) unaligned_memcmp((p), (q), (l))
+#else
+/*
+ * The procesor natively handles unaligned loads, so just use memcpy()
+ * and memcmp(), to enable those optimizations.
+ */
+#define UNALIGNED_MEMCPY(p, q, l) memcpy((p), (q), (l))
+#define UNALIGNED_MEMCMP(p, q, l) memcmp((p), (q), (l))
+#endif
#define PLURAL_SUFFIX(n) \
(((n) != 1) ? "s" : "")
#if 0
-extern const char *isonsap_string(netdissect_options *, const u_char *);
-extern const char *protoid_string(netdissect_options *, const u_char *);
extern const char *dnname_string(netdissect_options *, u_short);
extern const char *dnnum_string(netdissect_options *, u_short);
#endif
@@ -283,11 +341,11 @@ extern if_printer lookup_printer(int);
extern void eap_print(netdissect_options *,const u_char *, u_int);
extern int esp_print(netdissect_options *,
- register const u_char *bp, int len, register const u_char *bp2,
+ const u_char *bp, const int length, const u_char *bp2,
int *nhdr, int *padlen);
extern void arp_print(netdissect_options *,const u_char *, u_int, u_int);
extern void tipc_print(netdissect_options *, const u_char *, u_int, u_int);
-extern void msnlb_print(netdissect_options *, const u_char *, u_int);
+extern void msnlb_print(netdissect_options *, const u_char *);
extern void icmp6_print(netdissect_options *ndo, const u_char *,
u_int, const u_char *, int);
extern void isakmp_print(netdissect_options *,const u_char *,
@@ -299,6 +357,8 @@ extern void ip_print_inner(netdissect_options *ndo,
const u_char *bp, u_int length, u_int nh,
const u_char *bp2);
extern void rrcp_print(netdissect_options *,const u_char *, u_int);
+extern void loopback_print(netdissect_options *, const u_char *, const u_int);
+extern void carp_print(netdissect_options *, const u_char *, u_int, int);
extern void ether_print(netdissect_options *,
const u_char *, u_int, u_int,
@@ -316,193 +376,214 @@ extern u_int netanalyzer_transparent_if_print(netdissect_options *,
extern int ethertype_print(netdissect_options *,u_short, const u_char *,
u_int, u_int);
+extern int print_unknown_data(netdissect_options *,const u_char *, const char *,int);
+extern void ascii_print(netdissect_options *, const u_char *, u_int);
+extern void hex_print_with_offset(netdissect_options *, const char *ident, const u_char *cp,
+ u_int, u_int);
+extern void hex_print(netdissect_options *,const char *ident, const u_char *cp,u_int);
+extern void hex_and_ascii_print_with_offset(netdissect_options *, const char *, const u_char *, u_int, u_int);
+extern void hex_and_ascii_print(netdissect_options *, const char *, const u_char *, u_int);
+
+extern int ah_print(netdissect_options *, register const u_char *);
+extern void beep_print(netdissect_options *, const u_char *, u_int);
+extern void dtp_print(netdissect_options *, const u_char *, u_int);
+extern u_int cip_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern int ipcomp_print(netdissect_options *, register const u_char *, int *);
+extern u_int ipfc_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern void udld_print(netdissect_options *, const u_char *, u_int);
+extern void hsrp_print(netdissect_options *, const u_char *, u_int);
+extern void igrp_print(netdissect_options *, const u_char *, u_int);
+extern void msdp_print(netdissect_options *, const u_char *, u_int);
+extern u_int null_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern void mobile_print(netdissect_options *, const u_char *, u_int);
+extern u_int ap1394_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern u_int bt_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern void lane_print(netdissect_options *, const u_char *, u_int, u_int);
+extern u_int lane_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern void otv_print(netdissect_options *, const u_char *, u_int);
+extern void ahcp_print(netdissect_options *, const u_char *, const u_int);
+extern void vxlan_print(netdissect_options *, const u_char *, u_int);
+extern u_int arcnet_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern u_int arcnet_linux_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern void bfd_print(netdissect_options *, const u_char *, u_int, u_int);
+extern void gre_print(netdissect_options *, const u_char *, u_int);
+extern int vjc_print(netdissect_options *, register const char *, u_short);
+extern void ipN_print(netdissect_options *, const u_char *, u_int);
+extern u_int raw_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern u_int usb_linux_48_byte_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern u_int usb_linux_64_byte_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern u_int symantec_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern u_int chdlc_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern u_int chdlc_print(netdissect_options *, register const u_char *, u_int);
+extern void zmtp1_print(netdissect_options *, const u_char *, u_int);
+extern void zmtp1_print_datagram(netdissect_options *, const u_char *, const u_int);
+extern void ipx_print(netdissect_options *, const u_char *, u_int);
+extern void mpls_print(netdissect_options *, const u_char *, u_int);
+extern u_int pppoe_print(netdissect_options *, const u_char *, u_int);
+extern u_int pppoe_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern void sunrpcrequest_print(netdissect_options *, const u_char *, u_int, const u_char *);
+extern u_int pflog_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern u_int token_print(netdissect_options *, const u_char *, u_int, u_int);
+extern u_int token_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern void vqp_print(netdissect_options *, register const u_char *, register u_int);
+extern void zephyr_print(netdissect_options *, const u_char *, int);
+extern void fddi_print(netdissect_options *, const u_char *, u_int, u_int);
+extern u_int fddi_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern void mpcp_print(netdissect_options *, const u_char *, u_int);
+extern void rpki_rtr_print(netdissect_options *, const u_char *, u_int);
+extern u_int sll_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern void dccp_print(netdissect_options *, const u_char *, const u_char *, u_int);
+extern int llc_print(netdissect_options *, const u_char *, u_int, u_int, const u_char *, const u_char *, u_short *);
+extern int snap_print(netdissect_options *, const u_char *, u_int, u_int, u_int);
+extern void eigrp_print(netdissect_options *, const u_char *, u_int);
+extern void stp_print(netdissect_options *, const u_char *, u_int);
+extern void l2tp_print(netdissect_options *, const u_char *, u_int);
+extern void udp_print(netdissect_options *, const u_char *, u_int, const u_char *, int);
+extern void icmp_print(netdissect_options *, const u_char *, u_int, const u_char *, int);
+extern void openflow_print(netdissect_options *, const u_char *, const u_int);
+extern void telnet_print(netdissect_options *, const u_char *, u_int);
+extern void slow_print(netdissect_options *, const u_char *, u_int);
+extern void radius_print(netdissect_options *, const u_char *, u_int);
+extern void lmp_print(netdissect_options *, const u_char *, u_int);
+extern u_int fr_print(netdissect_options *, register const u_char *, u_int);
+extern u_int mfr_print(netdissect_options *, register const u_char *, u_int);
+extern u_int fr_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern u_int mfr_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern void q933_print(netdissect_options *, const u_char *, u_int);
+extern void igmp_print(netdissect_options *, const u_char *, u_int);
+extern void rip_print(netdissect_options *, const u_char *, u_int);
+extern void lwapp_control_print(netdissect_options *, const u_char *, u_int, int);
+extern void lwapp_data_print(netdissect_options *, const u_char *, u_int);
+extern void pgm_print(netdissect_options *, const u_char *, u_int, const u_char *);
+extern void pptp_print(netdissect_options *, const u_char *);
+extern void ldp_print(netdissect_options *, const u_char *, u_int);
+extern void wb_print(netdissect_options *, const void *, u_int);
+extern int oam_print(netdissect_options *, const u_char *, u_int, u_int);
+extern void atm_print(netdissect_options *, u_int, u_int, u_int, const u_char *, u_int, u_int);
+extern u_int sunatm_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern u_int atm_if_print(netdissect_options *, const struct pcap_pkthdr *, const u_char *);
+extern void vtp_print(netdissect_options *, const u_char *, u_int);
+extern int mptcp_print(netdissect_options *, const u_char *, u_int, u_char);
+extern void ntp_print(netdissect_options *, const u_char *, u_int);