libnet4r 0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +15 -0
- data/LICENSE +28 -0
- data/README +187 -0
- data/Rakefile +110 -0
- data/ext/extconf.rb +60 -0
- data/ext/libnet.c +705 -0
- data/ext/libnet_arp.c +152 -0
- data/ext/libnet_ethernet.c +115 -0
- data/ext/libnet_ipv4.c +140 -0
- data/ext/libnet_ipv6.c +138 -0
- data/ext/libnet_udp.c +112 -0
- data/ext/libnet_vlan.c +131 -0
- data/lib/libnet4r/header.rb +609 -0
- data/lib/libnet4r/helpers.rb +19 -0
- data/lib/libnet4r/libnet.rb +39 -0
- data/libnet/CVS/Entries +24 -0
- data/libnet/CVS/Repository +1 -0
- data/libnet/CVS/Root +1 -0
- data/libnet/Makefile.am +15 -0
- data/libnet/Makefile.am.common +10 -0
- data/libnet/Makefile.in +443 -0
- data/libnet/README +21 -0
- data/libnet/VERSION +1 -0
- data/libnet/acconfig.h +36 -0
- data/libnet/acinclude.m4 +463 -0
- data/libnet/aclocal.m4 +1337 -0
- data/libnet/autom4te.cache/CVS/Entries +1 -0
- data/libnet/autom4te.cache/CVS/Repository +1 -0
- data/libnet/autom4te.cache/CVS/Root +1 -0
- data/libnet/autom4te.cache/output.0 +6225 -0
- data/libnet/autom4te.cache/requests +111 -0
- data/libnet/autom4te.cache/traces.0 +272 -0
- data/libnet/config.guess +1314 -0
- data/libnet/config.sub +1410 -0
- data/libnet/configure +6225 -0
- data/libnet/configure.in +235 -0
- data/libnet/doc/BUGS +19 -0
- data/libnet/doc/CHANGELOG +527 -0
- data/libnet/doc/CONTRIB +53 -0
- data/libnet/doc/COPYING +31 -0
- data/libnet/doc/CVS/Entries +12 -0
- data/libnet/doc/CVS/Repository +1 -0
- data/libnet/doc/CVS/Root +1 -0
- data/libnet/doc/DESIGN_NOTES +134 -0
- data/libnet/doc/MIGRATION +172 -0
- data/libnet/doc/PACKET_BUILDING +161 -0
- data/libnet/doc/PORTED +45 -0
- data/libnet/doc/RAWSOCKET_NON_SEQUITUR +41 -0
- data/libnet/doc/TODO +96 -0
- data/libnet/doc/html/acconfig_8h-source.html +49 -0
- data/libnet/doc/html/annotated.html +17 -0
- data/libnet/doc/html/bpf_8h-source.html +277 -0
- data/libnet/doc/html/config_8h-source.html +125 -0
- data/libnet/doc/html/doxygen.css +169 -0
- data/libnet/doc/html/doxygen.png +0 -0
- data/libnet/doc/html/files.html +29 -0
- data/libnet/doc/html/functions.html +26 -0
- data/libnet/doc/html/functions_vars.html +26 -0
- data/libnet/doc/html/getopt_8h-source.html +97 -0
- data/libnet/doc/html/globals.html +219 -0
- data/libnet/doc/html/globals_defs.html +104 -0
- data/libnet/doc/html/globals_func.html +136 -0
- data/libnet/doc/html/gnuc_8h-source.html +56 -0
- data/libnet/doc/html/graph_legend.dot +22 -0
- data/libnet/doc/html/graph_legend.html +75 -0
- data/libnet/doc/html/ifaddrlist_8h-source.html +65 -0
- data/libnet/doc/html/in__systm_8h-source.html +90 -0
- data/libnet/doc/html/index.html +17 -0
- data/libnet/doc/html/libnet-asn1_8h-source.html +268 -0
- data/libnet/doc/html/libnet-functions_8h-source.html +742 -0
- data/libnet/doc/html/libnet-functions_8h.html +8844 -0
- data/libnet/doc/html/libnet-headers_8h-source.html +1655 -0
- data/libnet/doc/html/libnet-headers_8h.html +3053 -0
- data/libnet/doc/html/libnet-macros_8h-source.html +161 -0
- data/libnet/doc/html/libnet-macros_8h.html +358 -0
- data/libnet/doc/html/libnet-structures_8h-source.html +233 -0
- data/libnet/doc/html/libnet-types_8h-source.html +58 -0
- data/libnet/doc/html/libnet_8h-source.html +119 -0
- data/libnet/doc/html/libnet_8h.html +24 -0
- data/libnet/doc/html/structlibnet__802__1q__hdr.html +145 -0
- data/libnet/doc/html/structlibnet__802__1x__hdr.html +97 -0
- data/libnet/doc/libnet.doxygen.conf +1102 -0
- data/libnet/doc/man/CVS/Entries +1 -0
- data/libnet/doc/man/CVS/Repository +1 -0
- data/libnet/doc/man/CVS/Root +1 -0
- data/libnet/doc/man/man3/libnet-functions.h.3 +3136 -0
- data/libnet/doc/man/man3/libnet-headers.h.3 +1872 -0
- data/libnet/doc/man/man3/libnet-macros.h.3 +172 -0
- data/libnet/doc/man/man3/libnet.h.3 +17 -0
- data/libnet/doc/man/man3/libnet_802_1q_hdr.3 +53 -0
- data/libnet/doc/man/man3/libnet_802_1x_hdr.3 +41 -0
- data/libnet/include/CVS/Entries +10 -0
- data/libnet/include/CVS/Repository +1 -0
- data/libnet/include/CVS/Root +1 -0
- data/libnet/include/Makefile.am +7 -0
- data/libnet/include/Makefile.in +395 -0
- data/libnet/include/bpf.h +264 -0
- data/libnet/include/config.h.in +118 -0
- data/libnet/include/gnuc.h +43 -0
- data/libnet/include/ifaddrlist.h +52 -0
- data/libnet/include/libnet/CVS/Entries +9 -0
- data/libnet/include/libnet/CVS/Repository +1 -0
- data/libnet/include/libnet/CVS/Root +1 -0
- data/libnet/include/libnet/Makefile.am +12 -0
- data/libnet/include/libnet/Makefile.in +294 -0
- data/libnet/include/libnet/libnet-asn1.h +255 -0
- data/libnet/include/libnet/libnet-functions.h +2157 -0
- data/libnet/include/libnet/libnet-headers.h +1662 -0
- data/libnet/include/libnet/libnet-macros.h +186 -0
- data/libnet/include/libnet/libnet-structures.h +222 -0
- data/libnet/include/libnet/libnet-types.h +45 -0
- data/libnet/include/libnet.h.in +132 -0
- data/libnet/include/stamp-h.in +1 -0
- data/libnet/include/win32/CVS/Entries +5 -0
- data/libnet/include/win32/CVS/Repository +1 -0
- data/libnet/include/win32/CVS/Root +1 -0
- data/libnet/include/win32/config.h +112 -0
- data/libnet/include/win32/getopt.h +84 -0
- data/libnet/include/win32/in_systm.h +77 -0
- data/libnet/include/win32/libnet.h +106 -0
- data/libnet/install-sh +250 -0
- data/libnet/libnet-config.in +62 -0
- data/libnet/libnet.doxygen.conf +1102 -0
- data/libnet/man/CVS/Entries +1 -0
- data/libnet/man/CVS/Repository +1 -0
- data/libnet/man/CVS/Root +1 -0
- data/libnet/missing +283 -0
- data/libnet/mkinstalldirs +40 -0
- data/libnet/sample/CVS/Entries +47 -0
- data/libnet/sample/CVS/Repository +1 -0
- data/libnet/sample/CVS/Root +1 -0
- data/libnet/sample/Makefile.am +63 -0
- data/libnet/sample/Makefile.in +729 -0
- data/libnet/sample/arp-new.c +144 -0
- data/libnet/sample/arp.c +151 -0
- data/libnet/sample/bgp4_hdr.c +225 -0
- data/libnet/sample/bgp4_notification.c +242 -0
- data/libnet/sample/bgp4_open.c +266 -0
- data/libnet/sample/bgp4_update.c +337 -0
- data/libnet/sample/cdp.c +187 -0
- data/libnet/sample/dhcp_discover.c +257 -0
- data/libnet/sample/dns.c +260 -0
- data/libnet/sample/dot1x.c +113 -0
- data/libnet/sample/fddi_tcp1.c +213 -0
- data/libnet/sample/fddi_tcp2.c +209 -0
- data/libnet/sample/get_addr.c +112 -0
- data/libnet/sample/gre.c +410 -0
- data/libnet/sample/icmp6_echoreq.c +184 -0
- data/libnet/sample/icmp_echo_cq.c +201 -0
- data/libnet/sample/icmp_redirect.c +200 -0
- data/libnet/sample/icmp_timeexceed.c +190 -0
- data/libnet/sample/icmp_timestamp.c +157 -0
- data/libnet/sample/icmp_unreach.c +204 -0
- data/libnet/sample/ieee.c +177 -0
- data/libnet/sample/ip_link.c +201 -0
- data/libnet/sample/ip_raw.c +180 -0
- data/libnet/sample/isl.c +167 -0
- data/libnet/sample/libnet_test.h +60 -0
- data/libnet/sample/mpls.c +251 -0
- data/libnet/sample/ntp.c +193 -0
- data/libnet/sample/ospf_hello.c +179 -0
- data/libnet/sample/ospf_lsa.c +190 -0
- data/libnet/sample/ping_of_death.c +171 -0
- data/libnet/sample/rpc_tcp.c +214 -0
- data/libnet/sample/rpc_udp.c +213 -0
- data/libnet/sample/sebek.c +299 -0
- data/libnet/sample/smurf.c +194 -0
- data/libnet/sample/stp.c +227 -0
- data/libnet/sample/synflood.c +200 -0
- data/libnet/sample/synflood6.c +209 -0
- data/libnet/sample/synflood6_frag.c +234 -0
- data/libnet/sample/tcp1.c +227 -0
- data/libnet/sample/tcp2.c +192 -0
- data/libnet/sample/tftp.c +207 -0
- data/libnet/sample/tring_tcp1.c +214 -0
- data/libnet/sample/tring_tcp2.c +210 -0
- data/libnet/sample/udp1.c +223 -0
- data/libnet/sample/udp2.c +232 -0
- data/libnet/sample/win32/CVS/Entries +9 -0
- data/libnet/sample/win32/CVS/Repository +1 -0
- data/libnet/sample/win32/CVS/Root +1 -0
- data/libnet/sample/win32/arp/CVS/Entries +2 -0
- data/libnet/sample/win32/arp/CVS/Repository +1 -0
- data/libnet/sample/win32/arp/CVS/Root +1 -0
- data/libnet/sample/win32/arp/arp.vcproj +136 -0
- data/libnet/sample/win32/cdp/CVS/Entries +2 -0
- data/libnet/sample/win32/cdp/CVS/Repository +1 -0
- data/libnet/sample/win32/cdp/CVS/Root +1 -0
- data/libnet/sample/win32/cdp/cdp.vcproj +136 -0
- data/libnet/sample/win32/dhcp_discover/CVS/Entries +2 -0
- data/libnet/sample/win32/dhcp_discover/CVS/Repository +1 -0
- data/libnet/sample/win32/dhcp_discover/CVS/Root +1 -0
- data/libnet/sample/win32/dhcp_discover/dhcp_discover.vcproj +139 -0
- data/libnet/sample/win32/dns/CVS/Entries +2 -0
- data/libnet/sample/win32/dns/CVS/Repository +1 -0
- data/libnet/sample/win32/dns/CVS/Root +1 -0
- data/libnet/sample/win32/dns/dns.vcproj +139 -0
- data/libnet/sample/win32/get_addr/CVS/Entries +2 -0
- data/libnet/sample/win32/get_addr/CVS/Repository +1 -0
- data/libnet/sample/win32/get_addr/CVS/Root +1 -0
- data/libnet/sample/win32/get_addr/get_addr.vcproj +139 -0
- data/libnet/sample/win32/getopt.c +121 -0
- data/libnet/sample/win32/icmp_echo_cq/CVS/Entries +2 -0
- data/libnet/sample/win32/icmp_echo_cq/CVS/Repository +1 -0
- data/libnet/sample/win32/icmp_echo_cq/CVS/Root +1 -0
- data/libnet/sample/win32/icmp_echo_cq/icmp_echo_cq.vcproj +139 -0
- data/libnet/sample/win32/tcp1/CVS/Entries +2 -0
- data/libnet/sample/win32/tcp1/CVS/Repository +1 -0
- data/libnet/sample/win32/tcp1/CVS/Root +1 -0
- data/libnet/sample/win32/tcp1/tcp1.vcproj +142 -0
- data/libnet/sample/win32/udp1/CVS/Entries +3 -0
- data/libnet/sample/win32/udp1/CVS/Repository +1 -0
- data/libnet/sample/win32/udp1/CVS/Root +1 -0
- data/libnet/sample/win32/udp1/dns.vcproj +125 -0
- data/libnet/sample/win32/udp1/udp1.vcproj +139 -0
- data/libnet/src/CVS/Entries +60 -0
- data/libnet/src/CVS/Repository +1 -0
- data/libnet/src/CVS/Root +1 -0
- data/libnet/src/Makefile.am +71 -0
- data/libnet/src/Makefile.in +428 -0
- data/libnet/src/libnet_advanced.c +136 -0
- data/libnet/src/libnet_asn1.c +436 -0
- data/libnet/src/libnet_build_802.1q.c +115 -0
- data/libnet/src/libnet_build_802.1x.c +103 -0
- data/libnet/src/libnet_build_802.2.c +167 -0
- data/libnet/src/libnet_build_802.3.c +101 -0
- data/libnet/src/libnet_build_arp.c +169 -0
- data/libnet/src/libnet_build_bgp.c +350 -0
- data/libnet/src/libnet_build_cdp.c +191 -0
- data/libnet/src/libnet_build_data.c +90 -0
- data/libnet/src/libnet_build_dhcp.c +156 -0
- data/libnet/src/libnet_build_dns.c +129 -0
- data/libnet/src/libnet_build_ethernet.c +173 -0
- data/libnet/src/libnet_build_fddi.c +191 -0
- data/libnet/src/libnet_build_gre.c +427 -0
- data/libnet/src/libnet_build_icmp.c +437 -0
- data/libnet/src/libnet_build_igmp.c +112 -0
- data/libnet/src/libnet_build_ip.c +892 -0
- data/libnet/src/libnet_build_ipsec.c +232 -0
- data/libnet/src/libnet_build_isl.c +113 -0
- data/libnet/src/libnet_build_link.c +90 -0
- data/libnet/src/libnet_build_mpls.c +112 -0
- data/libnet/src/libnet_build_ntp.c +121 -0
- data/libnet/src/libnet_build_ospf.c +699 -0
- data/libnet/src/libnet_build_rip.c +108 -0
- data/libnet/src/libnet_build_rpc.c +138 -0
- data/libnet/src/libnet_build_sebek.c +108 -0
- data/libnet/src/libnet_build_snmp.c +52 -0
- data/libnet/src/libnet_build_stp.c +222 -0
- data/libnet/src/libnet_build_tcp.c +365 -0
- data/libnet/src/libnet_build_token_ring.c +193 -0
- data/libnet/src/libnet_build_udp.c +111 -0
- data/libnet/src/libnet_build_vrrp.c +117 -0
- data/libnet/src/libnet_checksum.c +376 -0
- data/libnet/src/libnet_cq.c +395 -0
- data/libnet/src/libnet_crc.c +113 -0
- data/libnet/src/libnet_dll.c +47 -0
- data/libnet/src/libnet_error.c +55 -0
- data/libnet/src/libnet_if_addr.c +415 -0
- data/libnet/src/libnet_init.c +234 -0
- data/libnet/src/libnet_internal.c +310 -0
- data/libnet/src/libnet_link_bpf.c +348 -0
- data/libnet/src/libnet_link_dlpi.c +785 -0
- data/libnet/src/libnet_link_linux.c +310 -0
- data/libnet/src/libnet_link_nit.c +125 -0
- data/libnet/src/libnet_link_none.c +66 -0
- data/libnet/src/libnet_link_pf.c +179 -0
- data/libnet/src/libnet_link_snit.c +149 -0
- data/libnet/src/libnet_link_snoop.c +166 -0
- data/libnet/src/libnet_link_win32.c +346 -0
- data/libnet/src/libnet_pblock.c +511 -0
- data/libnet/src/libnet_port_list.c +295 -0
- data/libnet/src/libnet_prand.c +106 -0
- data/libnet/src/libnet_raw.c +257 -0
- data/libnet/src/libnet_resolve.c +414 -0
- data/libnet/src/libnet_version.c +54 -0
- data/libnet/src/libnet_write.c +502 -0
- data/libnet/version.h.in +6 -0
- data/libnet/win32/CVS/Entries +15 -0
- data/libnet/win32/CVS/Repository +1 -0
- data/libnet/win32/CVS/Root +1 -0
- data/libnet/win32/Libnet-1.1.1-2002.sln +77 -0
- data/libnet/win32/Libnet-1.1.1-2003.ncb +0 -0
- data/libnet/win32/Libnet-1.1.1-2003.sln +84 -0
- data/libnet/win32/Libnet-1.1.1-2003.suo +0 -0
- data/libnet/win32/Libnet-1.1.1.vcproj +311 -0
- data/libnet/win32/Libnet-latest.ncb +0 -0
- data/libnet/win32/Libnet-latest.opt +0 -0
- data/libnet/win32/Libnet-latest.sln +77 -0
- data/libnet/win32/Libnet-latest.suo +0 -0
- data/libnet/win32/Libnet-latest.vcproj +311 -0
- data/libnet/win32/Libnet.dsp +337 -0
- data/libnet/win32/Libnet.dsw +32 -0
- data/libnet/win32/README.txt +57 -0
- data/libnet/win32/libnet_dll.def +164 -0
- data/test/tc_arp.rb +169 -0
- data/test/tc_class.rb +219 -0
- data/test/tc_ethernet.rb +97 -0
- data/test/tc_header.rb +163 -0
- data/test/tc_init.rb +25 -0
- data/test/tc_ipv4.rb +219 -0
- data/test/tc_ipv6.rb +235 -0
- data/test/tc_udp.rb +229 -0
- data/test/tc_vlan.rb +118 -0
- data/test/ts_all.rb +15 -0
- metadata +401 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
3
|
+
<title>libnet: acconfig.h Source File</title>
|
4
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
5
|
+
</head><body>
|
6
|
+
<!-- Generated by Doxygen 1.3.4 -->
|
7
|
+
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
|
8
|
+
<h1>acconfig.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>
|
9
|
+
00002 <span class="comment">dnl $Id: acconfig.h,v 1.2 2004/01/03 20:31:00 mike Exp $</span>
|
10
|
+
00003 <span class="comment">dnl</span>
|
11
|
+
00004 <span class="comment">dnl Libnet autoconfiguration acconfig.h file</span>
|
12
|
+
00005 <span class="comment">dnl Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com></span>
|
13
|
+
00006 <span class="comment">dnl All rights reserved.</span>
|
14
|
+
00007 <span class="comment">dnl</span>
|
15
|
+
00008 <span class="comment">dnl Process this file with autoheader to produce a config.h file.</span>
|
16
|
+
00009 <span class="comment">dnl</span>
|
17
|
+
00010 <span class="comment">*/</span>
|
18
|
+
00011
|
19
|
+
00012 <span class="preprocessor">#undef LIBNET_BSDISH_OS</span>
|
20
|
+
00013 <span class="preprocessor"></span><span class="preprocessor">#undef LIBNET_BSD_BYTE_SWAP</span>
|
21
|
+
00014 <span class="preprocessor"></span><span class="preprocessor">#undef DLPI_DEV_PREFIX</span>
|
22
|
+
00015 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_DEV_DLPI</span>
|
23
|
+
00016 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_SOLARIS</span>
|
24
|
+
00017 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_SOLARIS_IPV6</span>
|
25
|
+
00018 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_HPUX11</span>
|
26
|
+
00019 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_SOCKADDR_SA_LEN</span>
|
27
|
+
00020 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_DLPI</span>
|
28
|
+
00021 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_PACKET_SOCKET</span>
|
29
|
+
00022 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_STRUCT_IP_CSUM</span>
|
30
|
+
00023 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_LIB_PCAP</span>
|
31
|
+
00024 <span class="preprocessor"></span><span class="preprocessor">#undef LBL_ALIGN</span>
|
32
|
+
00025 <span class="preprocessor"></span><span class="preprocessor">#undef STUPID_SOLARIS_CHECKSUM_BUG</span>
|
33
|
+
00026 <span class="preprocessor"></span><span class="preprocessor">#undef _BSD_SOURCE</span>
|
34
|
+
00027 <span class="preprocessor"></span><span class="preprocessor">#undef __BSD_SOURCE</span>
|
35
|
+
00028 <span class="preprocessor"></span><span class="preprocessor">#undef __FAVOR_BSD</span>
|
36
|
+
00029 <span class="preprocessor"></span><span class="preprocessor">#undef LIBNET_BIG_ENDIAN</span>
|
37
|
+
00030 <span class="preprocessor"></span><span class="preprocessor">#undef LIBNET_LIL_ENDIAN</span>
|
38
|
+
00031 <span class="preprocessor"></span><span class="preprocessor">#undef NO_SNPRINTF</span>
|
39
|
+
00032 <span class="preprocessor"></span>
|
40
|
+
00033
|
41
|
+
00034 <span class="comment">/*</span>
|
42
|
+
00035 <span class="comment">dnl EOF</span>
|
43
|
+
00036 <span class="comment">*/</span>
|
44
|
+
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Mar 10 13:23:37 2004 for libnet by
|
45
|
+
<a href="http://www.doxygen.org/index.html">
|
46
|
+
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
|
47
|
+
</a>1.3.4 </small></address>
|
48
|
+
</body>
|
49
|
+
</html>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
3
|
+
<title>libnet: Annotated Index</title>
|
4
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
5
|
+
</head><body>
|
6
|
+
<!-- Generated by Doxygen 1.3.4 -->
|
7
|
+
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindexHL" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
|
8
|
+
<h1>libnet Data Structures</h1>Here are the data structures with brief descriptions:<table>
|
9
|
+
<tr><td class="indexkey"><a class="el" href="structlibnet__802__1q__hdr.html">libnet_802_1q_hdr</a></td><td class="indexvalue"></td></tr>
|
10
|
+
<tr><td class="indexkey"><a class="el" href="structlibnet__802__1x__hdr.html">libnet_802_1x_hdr</a></td><td class="indexvalue"></td></tr>
|
11
|
+
</table>
|
12
|
+
<hr size="1"><address style="align: right;"><small>Generated on Wed Mar 10 13:23:38 2004 for libnet by
|
13
|
+
<a href="http://www.doxygen.org/index.html">
|
14
|
+
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
|
15
|
+
</a>1.3.4 </small></address>
|
16
|
+
</body>
|
17
|
+
</html>
|
@@ -0,0 +1,277 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
3
|
+
<title>libnet: bpf.h Source File</title>
|
4
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
5
|
+
</head><body>
|
6
|
+
<!-- Generated by Doxygen 1.3.4 -->
|
7
|
+
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
|
8
|
+
<h1>bpf.h</h1><div class="fragment"><pre>00001 <span class="comment">/*-</span>
|
9
|
+
00002 <span class="comment"> * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997</span>
|
10
|
+
00003 <span class="comment"> * The Regents of the University of California. All rights reserved.</span>
|
11
|
+
00004 <span class="comment"> *</span>
|
12
|
+
00005 <span class="comment"> * This code is derived from the Stanford/CMU enet packet filter,</span>
|
13
|
+
00006 <span class="comment"> * (net/enet.c) distributed as part of 4.3BSD, and code contributed</span>
|
14
|
+
00007 <span class="comment"> * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence </span>
|
15
|
+
00008 <span class="comment"> * Berkeley Laboratory.</span>
|
16
|
+
00009 <span class="comment"> *</span>
|
17
|
+
00010 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
|
18
|
+
00011 <span class="comment"> * modification, are permitted provided that the following conditions</span>
|
19
|
+
00012 <span class="comment"> * are met:</span>
|
20
|
+
00013 <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span>
|
21
|
+
00014 <span class="comment"> * notice, this list of conditions and the following disclaimer.</span>
|
22
|
+
00015 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span>
|
23
|
+
00016 <span class="comment"> * notice, this list of conditions and the following disclaimer in the</span>
|
24
|
+
00017 <span class="comment"> * documentation and/or other materials provided with the distribution.</span>
|
25
|
+
00018 <span class="comment"> * 3. All advertising materials mentioning features or use of this software</span>
|
26
|
+
00019 <span class="comment"> * must display the following acknowledgement:</span>
|
27
|
+
00020 <span class="comment"> * This product includes software developed by the University of</span>
|
28
|
+
00021 <span class="comment"> * California, Berkeley and its contributors.</span>
|
29
|
+
00022 <span class="comment"> * 4. Neither the name of the University nor the names of its contributors</span>
|
30
|
+
00023 <span class="comment"> * may be used to endorse or promote products derived from this software</span>
|
31
|
+
00024 <span class="comment"> * without specific prior written permission.</span>
|
32
|
+
00025 <span class="comment"> *</span>
|
33
|
+
00026 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND</span>
|
34
|
+
00027 <span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span>
|
35
|
+
00028 <span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span>
|
36
|
+
00029 <span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE</span>
|
37
|
+
00030 <span class="comment"> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</span>
|
38
|
+
00031 <span class="comment"> * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS</span>
|
39
|
+
00032 <span class="comment"> * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span>
|
40
|
+
00033 <span class="comment"> * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span>
|
41
|
+
00034 <span class="comment"> * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY</span>
|
42
|
+
00035 <span class="comment"> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</span>
|
43
|
+
00036 <span class="comment"> * SUCH DAMAGE.</span>
|
44
|
+
00037 <span class="comment"> *</span>
|
45
|
+
00038 <span class="comment"> * @(#)bpf.h 7.1 (Berkeley) 5/7/91</span>
|
46
|
+
00039 <span class="comment"> *</span>
|
47
|
+
00040 <span class="comment"> * @(#) $Header: /usr/local/CVS/libnet/include/bpf.h,v 1.1.1.1 2003/06/26 21:55:10 route Exp $ (LBL)</span>
|
48
|
+
00041 <span class="comment"> */</span>
|
49
|
+
00042
|
50
|
+
00043 <span class="preprocessor">#ifndef BPF_MAJOR_VERSION</span>
|
51
|
+
00044 <span class="preprocessor"></span>
|
52
|
+
00045 <span class="comment">/* BSD style release date */</span>
|
53
|
+
00046 <span class="preprocessor">#define BPF_RELEASE 199606</span>
|
54
|
+
00047 <span class="preprocessor"></span>
|
55
|
+
00048 <span class="keyword">typedef</span> <span class="keywordtype">int</span> bpf_int32;
|
56
|
+
00049 <span class="keyword">typedef</span> u_int bpf_u_int32;
|
57
|
+
00050
|
58
|
+
00051 <span class="comment">/*</span>
|
59
|
+
00052 <span class="comment"> * Alignment macros. BPF_WORDALIGN rounds up to the next </span>
|
60
|
+
00053 <span class="comment"> * even multiple of BPF_ALIGNMENT. </span>
|
61
|
+
00054 <span class="comment"> */</span>
|
62
|
+
00055 <span class="preprocessor">#define BPF_ALIGNMENT sizeof(bpf_int32)</span>
|
63
|
+
00056 <span class="preprocessor"></span><span class="preprocessor">#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))</span>
|
64
|
+
00057 <span class="preprocessor"></span>
|
65
|
+
00058 <span class="preprocessor">#define BPF_MAXINSNS 512</span>
|
66
|
+
00059 <span class="preprocessor"></span><span class="preprocessor">#define BPF_MAXBUFSIZE 0x8000</span>
|
67
|
+
00060 <span class="preprocessor"></span><span class="preprocessor">#define BPF_MINBUFSIZE 32</span>
|
68
|
+
00061 <span class="preprocessor"></span>
|
69
|
+
00062 <span class="comment">/*</span>
|
70
|
+
00063 <span class="comment"> * Structure for BIOCSETF.</span>
|
71
|
+
00064 <span class="comment"> */</span>
|
72
|
+
00065 <span class="keyword">struct </span>bpf_program {
|
73
|
+
00066 u_int bf_len;
|
74
|
+
00067 <span class="keyword">struct </span>bpf_insn *bf_insns;
|
75
|
+
00068 };
|
76
|
+
00069
|
77
|
+
00070 <span class="comment">/*</span>
|
78
|
+
00071 <span class="comment"> * Struct returned by BIOCGSTATS.</span>
|
79
|
+
00072 <span class="comment"> */</span>
|
80
|
+
00073 <span class="keyword">struct </span>bpf_stat {
|
81
|
+
00074 u_int bs_recv; <span class="comment">/* number of packets received */</span>
|
82
|
+
00075 u_int bs_drop; <span class="comment">/* number of packets dropped */</span>
|
83
|
+
00076 };
|
84
|
+
00077
|
85
|
+
00078 <span class="comment">/*</span>
|
86
|
+
00079 <span class="comment"> * Struct return by BIOCVERSION. This represents the version number of </span>
|
87
|
+
00080 <span class="comment"> * the filter language described by the instruction encodings below.</span>
|
88
|
+
00081 <span class="comment"> * bpf understands a program iff kernel_major == filter_major &&</span>
|
89
|
+
00082 <span class="comment"> * kernel_minor >= filter_minor, that is, if the value returned by the</span>
|
90
|
+
00083 <span class="comment"> * running kernel has the same major number and a minor number equal</span>
|
91
|
+
00084 <span class="comment"> * equal to or less than the filter being downloaded. Otherwise, the</span>
|
92
|
+
00085 <span class="comment"> * results are undefined, meaning an error may be returned or packets</span>
|
93
|
+
00086 <span class="comment"> * may be accepted haphazardly.</span>
|
94
|
+
00087 <span class="comment"> * It has nothing to do with the source code version.</span>
|
95
|
+
00088 <span class="comment"> */</span>
|
96
|
+
00089 <span class="keyword">struct </span>bpf_version {
|
97
|
+
00090 u_short bv_major;
|
98
|
+
00091 u_short bv_minor;
|
99
|
+
00092 };
|
100
|
+
00093 <span class="comment">/* Current version number of filter architecture. */</span>
|
101
|
+
00094 <span class="preprocessor">#define BPF_MAJOR_VERSION 1</span>
|
102
|
+
00095 <span class="preprocessor"></span><span class="preprocessor">#define BPF_MINOR_VERSION 1</span>
|
103
|
+
00096 <span class="preprocessor"></span>
|
104
|
+
00097 <span class="comment">/*</span>
|
105
|
+
00098 <span class="comment"> * BPF ioctls</span>
|
106
|
+
00099 <span class="comment"> *</span>
|
107
|
+
00100 <span class="comment"> * The first set is for compatibility with Sun's pcc style</span>
|
108
|
+
00101 <span class="comment"> * header files. If your using gcc, we assume that you</span>
|
109
|
+
00102 <span class="comment"> * have run fixincludes so the latter set should work.</span>
|
110
|
+
00103 <span class="comment"> */</span>
|
111
|
+
00104 <span class="preprocessor">#if (defined(sun) || defined(ibm032)) && !defined(__GNUC__)</span>
|
112
|
+
00105 <span class="preprocessor"></span><span class="preprocessor">#define BIOCGBLEN _IOR(B,102, u_int)</span>
|
113
|
+
00106 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSBLEN _IOWR(B,102, u_int)</span>
|
114
|
+
00107 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSETF _IOW(B,103, struct bpf_program)</span>
|
115
|
+
00108 <span class="preprocessor"></span><span class="preprocessor">#define BIOCFLUSH _IO(B,104)</span>
|
116
|
+
00109 <span class="preprocessor"></span><span class="preprocessor">#define BIOCPROMISC _IO(B,105)</span>
|
117
|
+
00110 <span class="preprocessor"></span><span class="preprocessor">#define BIOCGDLT _IOR(B,106, u_int)</span>
|
118
|
+
00111 <span class="preprocessor"></span><span class="preprocessor">#define BIOCGETIF _IOR(B,107, struct ifreq)</span>
|
119
|
+
00112 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSETIF _IOW(B,108, struct ifreq)</span>
|
120
|
+
00113 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSRTIMEOUT _IOW(B,109, struct timeval)</span>
|
121
|
+
00114 <span class="preprocessor"></span><span class="preprocessor">#define BIOCGRTIMEOUT _IOR(B,110, struct timeval)</span>
|
122
|
+
00115 <span class="preprocessor"></span><span class="preprocessor">#define BIOCGSTATS _IOR(B,111, struct bpf_stat)</span>
|
123
|
+
00116 <span class="preprocessor"></span><span class="preprocessor">#define BIOCIMMEDIATE _IOW(B,112, u_int)</span>
|
124
|
+
00117 <span class="preprocessor"></span><span class="preprocessor">#define BIOCVERSION _IOR(B,113, struct bpf_version)</span>
|
125
|
+
00118 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSTCPF _IOW(B,114, struct bpf_program)</span>
|
126
|
+
00119 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSUDPF _IOW(B,115, struct bpf_program)</span>
|
127
|
+
00120 <span class="preprocessor"></span><span class="preprocessor">#else</span>
|
128
|
+
00121 <span class="preprocessor"></span><span class="preprocessor">#define BIOCGBLEN _IOR('B',102, u_int)</span>
|
129
|
+
00122 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSBLEN _IOWR('B',102, u_int)</span>
|
130
|
+
00123 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSETF _IOW('B',103, struct bpf_program)</span>
|
131
|
+
00124 <span class="preprocessor"></span><span class="preprocessor">#define BIOCFLUSH _IO('B',104)</span>
|
132
|
+
00125 <span class="preprocessor"></span><span class="preprocessor">#define BIOCPROMISC _IO('B',105)</span>
|
133
|
+
00126 <span class="preprocessor"></span><span class="preprocessor">#define BIOCGDLT _IOR('B',106, u_int)</span>
|
134
|
+
00127 <span class="preprocessor"></span><span class="preprocessor">#define BIOCGETIF _IOR('B',107, struct ifreq)</span>
|
135
|
+
00128 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSETIF _IOW('B',108, struct ifreq)</span>
|
136
|
+
00129 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSRTIMEOUT _IOW('B',109, struct timeval)</span>
|
137
|
+
00130 <span class="preprocessor"></span><span class="preprocessor">#define BIOCGRTIMEOUT _IOR('B',110, struct timeval)</span>
|
138
|
+
00131 <span class="preprocessor"></span><span class="preprocessor">#define BIOCGSTATS _IOR('B',111, struct bpf_stat)</span>
|
139
|
+
00132 <span class="preprocessor"></span><span class="preprocessor">#define BIOCIMMEDIATE _IOW('B',112, u_int)</span>
|
140
|
+
00133 <span class="preprocessor"></span><span class="preprocessor">#define BIOCVERSION _IOR('B',113, struct bpf_version)</span>
|
141
|
+
00134 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSTCPF _IOW('B',114, struct bpf_program)</span>
|
142
|
+
00135 <span class="preprocessor"></span><span class="preprocessor">#define BIOCSUDPF _IOW('B',115, struct bpf_program)</span>
|
143
|
+
00136 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
144
|
+
00137 <span class="preprocessor"></span>
|
145
|
+
00138 <span class="comment">/*</span>
|
146
|
+
00139 <span class="comment"> * Structure prepended to each packet.</span>
|
147
|
+
00140 <span class="comment"> */</span>
|
148
|
+
00141 <span class="keyword">struct </span>bpf_hdr {
|
149
|
+
00142 <span class="keyword">struct </span>timeval bh_tstamp; <span class="comment">/* time stamp */</span>
|
150
|
+
00143 bpf_u_int32 bh_caplen; <span class="comment">/* length of captured portion */</span>
|
151
|
+
00144 bpf_u_int32 bh_datalen; <span class="comment">/* original length of packet */</span>
|
152
|
+
00145 u_short bh_hdrlen; <span class="comment">/* length of bpf header (this struct</span>
|
153
|
+
00146 <span class="comment"> plus alignment padding) */</span>
|
154
|
+
00147 };
|
155
|
+
00148 <span class="comment">/*</span>
|
156
|
+
00149 <span class="comment"> * Because the structure above is not a multiple of 4 bytes, some compilers</span>
|
157
|
+
00150 <span class="comment"> * will insist on inserting padding; hence, sizeof(struct bpf_hdr) won't work.</span>
|
158
|
+
00151 <span class="comment"> * Only the kernel needs to know about it; applications use bh_hdrlen.</span>
|
159
|
+
00152 <span class="comment"> */</span>
|
160
|
+
00153 <span class="preprocessor">#ifdef KERNEL</span>
|
161
|
+
00154 <span class="preprocessor"></span><span class="preprocessor">#define SIZEOF_BPF_HDR 18</span>
|
162
|
+
00155 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
163
|
+
00156 <span class="preprocessor"></span>
|
164
|
+
00157 <span class="comment">/*</span>
|
165
|
+
00158 <span class="comment"> * Data-link level type codes.</span>
|
166
|
+
00159 <span class="comment"> */</span>
|
167
|
+
00160 <span class="preprocessor">#define DLT_NULL 0 </span><span class="comment">/* no link-layer encapsulation */</span>
|
168
|
+
00161 <span class="preprocessor">#define DLT_EN10MB 1 </span><span class="comment">/* Ethernet (10Mb) */</span>
|
169
|
+
00162 <span class="preprocessor">#define DLT_EN3MB 2 </span><span class="comment">/* Experimental Ethernet (3Mb) */</span>
|
170
|
+
00163 <span class="preprocessor">#define DLT_AX25 3 </span><span class="comment">/* Amateur Radio AX.25 */</span>
|
171
|
+
00164 <span class="preprocessor">#define DLT_PRONET 4 </span><span class="comment">/* Proteon ProNET Token Ring */</span>
|
172
|
+
00165 <span class="preprocessor">#define DLT_CHAOS 5 </span><span class="comment">/* Chaos */</span>
|
173
|
+
00166 <span class="preprocessor">#define DLT_IEEE802 6 </span><span class="comment">/* IEEE 802 Networks */</span>
|
174
|
+
00167 <span class="preprocessor">#define DLT_ARCNET 7 </span><span class="comment">/* ARCNET */</span>
|
175
|
+
00168 <span class="preprocessor">#define DLT_SLIP 8 </span><span class="comment">/* Serial Line IP */</span>
|
176
|
+
00169 <span class="preprocessor">#define DLT_PPP 9 </span><span class="comment">/* Point-to-point Protocol */</span>
|
177
|
+
00170 <span class="preprocessor">#define DLT_FDDI 10 </span><span class="comment">/* FDDI */</span>
|
178
|
+
00171 <span class="preprocessor">#define DLT_ATM_RFC1483 11 </span><span class="comment">/* LLC/SNAP encapsulated atm */</span>
|
179
|
+
00172 <span class="preprocessor">#define DLT_RAW 12 </span><span class="comment">/* raw IP */</span>
|
180
|
+
00173 <span class="preprocessor">#define DLT_SLIP_BSDOS 13 </span><span class="comment">/* BSD/OS Serial Line IP */</span>
|
181
|
+
00174 <span class="preprocessor">#define DLT_PPP_BSDOS 14 </span><span class="comment">/* BSD/OS Point-to-point Protocol */</span>
|
182
|
+
00175
|
183
|
+
00176 <span class="comment">/*</span>
|
184
|
+
00177 <span class="comment"> * The instruction encondings.</span>
|
185
|
+
00178 <span class="comment"> */</span>
|
186
|
+
00179 <span class="comment">/* instruction classes */</span>
|
187
|
+
00180 <span class="preprocessor">#define BPF_CLASS(code) ((code) & 0x07)</span>
|
188
|
+
00181 <span class="preprocessor"></span><span class="preprocessor">#define BPF_LD 0x00</span>
|
189
|
+
00182 <span class="preprocessor"></span><span class="preprocessor">#define BPF_LDX 0x01</span>
|
190
|
+
00183 <span class="preprocessor"></span><span class="preprocessor">#define BPF_ST 0x02</span>
|
191
|
+
00184 <span class="preprocessor"></span><span class="preprocessor">#define BPF_STX 0x03</span>
|
192
|
+
00185 <span class="preprocessor"></span><span class="preprocessor">#define BPF_ALU 0x04</span>
|
193
|
+
00186 <span class="preprocessor"></span><span class="preprocessor">#define BPF_JMP 0x05</span>
|
194
|
+
00187 <span class="preprocessor"></span><span class="preprocessor">#define BPF_RET 0x06</span>
|
195
|
+
00188 <span class="preprocessor"></span><span class="preprocessor">#define BPF_MISC 0x07</span>
|
196
|
+
00189 <span class="preprocessor"></span>
|
197
|
+
00190 <span class="comment">/* ld/ldx fields */</span>
|
198
|
+
00191 <span class="preprocessor">#define BPF_SIZE(code) ((code) & 0x18)</span>
|
199
|
+
00192 <span class="preprocessor"></span><span class="preprocessor">#define BPF_W 0x00</span>
|
200
|
+
00193 <span class="preprocessor"></span><span class="preprocessor">#define BPF_H 0x08</span>
|
201
|
+
00194 <span class="preprocessor"></span><span class="preprocessor">#define BPF_B 0x10</span>
|
202
|
+
00195 <span class="preprocessor"></span><span class="preprocessor">#define BPF_MODE(code) ((code) & 0xe0)</span>
|
203
|
+
00196 <span class="preprocessor"></span><span class="preprocessor">#define BPF_IMM 0x00</span>
|
204
|
+
00197 <span class="preprocessor"></span><span class="preprocessor">#define BPF_ABS 0x20</span>
|
205
|
+
00198 <span class="preprocessor"></span><span class="preprocessor">#define BPF_IND 0x40</span>
|
206
|
+
00199 <span class="preprocessor"></span><span class="preprocessor">#define BPF_MEM 0x60</span>
|
207
|
+
00200 <span class="preprocessor"></span><span class="preprocessor">#define BPF_LEN 0x80</span>
|
208
|
+
00201 <span class="preprocessor"></span><span class="preprocessor">#define BPF_MSH 0xa0</span>
|
209
|
+
00202 <span class="preprocessor"></span>
|
210
|
+
00203 <span class="comment">/* alu/jmp fields */</span>
|
211
|
+
00204 <span class="preprocessor">#define BPF_OP(code) ((code) & 0xf0)</span>
|
212
|
+
00205 <span class="preprocessor"></span><span class="preprocessor">#define BPF_ADD 0x00</span>
|
213
|
+
00206 <span class="preprocessor"></span><span class="preprocessor">#define BPF_SUB 0x10</span>
|
214
|
+
00207 <span class="preprocessor"></span><span class="preprocessor">#define BPF_MUL 0x20</span>
|
215
|
+
00208 <span class="preprocessor"></span><span class="preprocessor">#define BPF_DIV 0x30</span>
|
216
|
+
00209 <span class="preprocessor"></span><span class="preprocessor">#define BPF_OR 0x40</span>
|
217
|
+
00210 <span class="preprocessor"></span><span class="preprocessor">#define BPF_AND 0x50</span>
|
218
|
+
00211 <span class="preprocessor"></span><span class="preprocessor">#define BPF_LSH 0x60</span>
|
219
|
+
00212 <span class="preprocessor"></span><span class="preprocessor">#define BPF_RSH 0x70</span>
|
220
|
+
00213 <span class="preprocessor"></span><span class="preprocessor">#define BPF_NEG 0x80</span>
|
221
|
+
00214 <span class="preprocessor"></span><span class="preprocessor">#define BPF_JA 0x00</span>
|
222
|
+
00215 <span class="preprocessor"></span><span class="preprocessor">#define BPF_JEQ 0x10</span>
|
223
|
+
00216 <span class="preprocessor"></span><span class="preprocessor">#define BPF_JGT 0x20</span>
|
224
|
+
00217 <span class="preprocessor"></span><span class="preprocessor">#define BPF_JGE 0x30</span>
|
225
|
+
00218 <span class="preprocessor"></span><span class="preprocessor">#define BPF_JSET 0x40</span>
|
226
|
+
00219 <span class="preprocessor"></span><span class="preprocessor">#define BPF_SRC(code) ((code) & 0x08)</span>
|
227
|
+
00220 <span class="preprocessor"></span><span class="preprocessor">#define BPF_K 0x00</span>
|
228
|
+
00221 <span class="preprocessor"></span><span class="preprocessor">#define BPF_X 0x08</span>
|
229
|
+
00222 <span class="preprocessor"></span>
|
230
|
+
00223 <span class="comment">/* ret - BPF_K and BPF_X also apply */</span>
|
231
|
+
00224 <span class="preprocessor">#define BPF_RVAL(code) ((code) & 0x18)</span>
|
232
|
+
00225 <span class="preprocessor"></span><span class="preprocessor">#define BPF_A 0x10</span>
|
233
|
+
00226 <span class="preprocessor"></span>
|
234
|
+
00227 <span class="comment">/* misc */</span>
|
235
|
+
00228 <span class="preprocessor">#define BPF_MISCOP(code) ((code) & 0xf8)</span>
|
236
|
+
00229 <span class="preprocessor"></span><span class="preprocessor">#define BPF_TAX 0x00</span>
|
237
|
+
00230 <span class="preprocessor"></span><span class="preprocessor">#define BPF_TXA 0x80</span>
|
238
|
+
00231 <span class="preprocessor"></span>
|
239
|
+
00232 <span class="comment">/*</span>
|
240
|
+
00233 <span class="comment"> * The instruction data structure.</span>
|
241
|
+
00234 <span class="comment"> */</span>
|
242
|
+
00235 <span class="keyword">struct </span>bpf_insn {
|
243
|
+
00236 u_short code;
|
244
|
+
00237 u_char jt;
|
245
|
+
00238 u_char jf;
|
246
|
+
00239 bpf_int32 k;
|
247
|
+
00240 };
|
248
|
+
00241
|
249
|
+
00242 <span class="comment">/*</span>
|
250
|
+
00243 <span class="comment"> * Macros for insn array initializers.</span>
|
251
|
+
00244 <span class="comment"> */</span>
|
252
|
+
00245 <span class="preprocessor">#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }</span>
|
253
|
+
00246 <span class="preprocessor"></span><span class="preprocessor">#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }</span>
|
254
|
+
00247 <span class="preprocessor"></span>
|
255
|
+
00248 <span class="preprocessor">#ifdef KERNEL</span>
|
256
|
+
00249 <span class="preprocessor"></span><span class="keyword">extern</span> u_int bpf_filter();
|
257
|
+
00250 <span class="keyword">extern</span> <span class="keywordtype">void</span> bpfattach();
|
258
|
+
00251 <span class="keyword">extern</span> <span class="keywordtype">void</span> bpf_tap();
|
259
|
+
00252 <span class="keyword">extern</span> <span class="keywordtype">void</span> bpf_mtap();
|
260
|
+
00253 <span class="preprocessor">#else</span>
|
261
|
+
00254 <span class="preprocessor"></span><span class="preprocessor">#if __STDC__</span>
|
262
|
+
00255 <span class="preprocessor"></span><span class="keyword">extern</span> u_int bpf_filter(<span class="keyword">struct</span> bpf_insn *, u_char *, u_int, u_int);
|
263
|
+
00256 <span class="preprocessor">#endif</span>
|
264
|
+
00257 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
265
|
+
00258 <span class="preprocessor"></span>
|
266
|
+
00259 <span class="comment">/*</span>
|
267
|
+
00260 <span class="comment"> * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).</span>
|
268
|
+
00261 <span class="comment"> */</span>
|
269
|
+
00262 <span class="preprocessor">#define BPF_MEMWORDS 16</span>
|
270
|
+
00263 <span class="preprocessor"></span>
|
271
|
+
00264 <span class="preprocessor">#endif</span>
|
272
|
+
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Mar 10 13:23:37 2004 for libnet by
|
273
|
+
<a href="http://www.doxygen.org/index.html">
|
274
|
+
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
|
275
|
+
</a>1.3.4 </small></address>
|
276
|
+
</body>
|
277
|
+
</html>
|
@@ -0,0 +1,125 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
3
|
+
<title>libnet: config.h Source File</title>
|
4
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
5
|
+
</head><body>
|
6
|
+
<!-- Generated by Doxygen 1.3.4 -->
|
7
|
+
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
|
8
|
+
<h1>config.h</h1><div class="fragment"><pre>00001 <span class="comment">/* include/config.h.in. Generated from configure.in by autoheader. */</span>
|
9
|
+
00002 <span class="comment">/*</span>
|
10
|
+
00003 <span class="comment">dnl $Id: config.h,v 1.4 2004/01/03 20:31:00 mike Exp $</span>
|
11
|
+
00004 <span class="comment">dnl</span>
|
12
|
+
00005 <span class="comment">dnl Libnet autoconfiguration acconfig.h file</span>
|
13
|
+
00006 <span class="comment">dnl Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com></span>
|
14
|
+
00007 <span class="comment">dnl All rights reserved.</span>
|
15
|
+
00008 <span class="comment">dnl</span>
|
16
|
+
00009 <span class="comment">dnl Process this file with autoheader to produce a config.h file.</span>
|
17
|
+
00010 <span class="comment">dnl</span>
|
18
|
+
00011 <span class="comment">*/</span>
|
19
|
+
00012
|
20
|
+
00013 <span class="preprocessor">#undef LIBNET_BSDISH_OS</span>
|
21
|
+
00014 <span class="preprocessor"></span><span class="preprocessor">#undef LIBNET_BSD_BYTE_SWAP</span>
|
22
|
+
00015 <span class="preprocessor"></span><span class="preprocessor">#undef DLPI_DEV_PREFIX</span>
|
23
|
+
00016 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_DEV_DLPI</span>
|
24
|
+
00017 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_SOLARIS</span>
|
25
|
+
00018 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_SOLARIS_IPV6</span>
|
26
|
+
00019 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_HPUX11</span>
|
27
|
+
00020 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_SOCKADDR_SA_LEN</span>
|
28
|
+
00021 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_DLPI</span>
|
29
|
+
00022 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_PACKET_SOCKET</span>
|
30
|
+
00023 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_STRUCT_IP_CSUM</span>
|
31
|
+
00024 <span class="preprocessor"></span><span class="preprocessor">#undef HAVE_LIB_PCAP</span>
|
32
|
+
00025 <span class="preprocessor"></span><span class="preprocessor">#undef LBL_ALIGN</span>
|
33
|
+
00026 <span class="preprocessor"></span><span class="preprocessor">#undef STUPID_SOLARIS_CHECKSUM_BUG</span>
|
34
|
+
00027 <span class="preprocessor"></span><span class="preprocessor">#undef _BSD_SOURCE</span>
|
35
|
+
00028 <span class="preprocessor"></span><span class="preprocessor">#undef __BSD_SOURCE</span>
|
36
|
+
00029 <span class="preprocessor"></span><span class="preprocessor">#undef __FAVOR_BSD</span>
|
37
|
+
00030 <span class="preprocessor"></span><span class="preprocessor">#undef LIBNET_BIG_ENDIAN</span>
|
38
|
+
00031 <span class="preprocessor"></span><span class="preprocessor">#define LIBNET_LIL_ENDIAN 1</span>
|
39
|
+
00032 <span class="preprocessor"></span><span class="preprocessor">#undef NO_SNPRINTF</span>
|
40
|
+
00033 <span class="preprocessor"></span>
|
41
|
+
00034
|
42
|
+
00035 <span class="comment">/*</span>
|
43
|
+
00036 <span class="comment">dnl EOF</span>
|
44
|
+
00037 <span class="comment">*/</span>
|
45
|
+
00038
|
46
|
+
00039 <span class="comment">/* Define to 1 if you have the <inttypes.h> header file. */</span>
|
47
|
+
00040 <span class="preprocessor">#undef HAVE_INTTYPES_H</span>
|
48
|
+
00041 <span class="preprocessor"></span>
|
49
|
+
00042 <span class="comment">/* Define to 1 if you have the `nsl' library (-lnsl). */</span>
|
50
|
+
00043 <span class="preprocessor">#undef HAVE_LIBNSL</span>
|
51
|
+
00044 <span class="preprocessor"></span>
|
52
|
+
00045 <span class="comment">/* Define to 1 if you have the `packet' library (-lpacket). */</span>
|
53
|
+
00046 <span class="preprocessor">#undef HAVE_LIBPACKET</span>
|
54
|
+
00047 <span class="preprocessor"></span>
|
55
|
+
00048 <span class="comment">/* Define to 1 if you have the `socket' library (-lsocket). */</span>
|
56
|
+
00049 <span class="preprocessor">#undef HAVE_LIBSOCKET</span>
|
57
|
+
00050 <span class="preprocessor"></span>
|
58
|
+
00051 <span class="comment">/* Define to 1 if you have the `wpcap' library (-lwpcap). */</span>
|
59
|
+
00052 <span class="preprocessor">#undef HAVE_LIBWPCAP</span>
|
60
|
+
00053 <span class="preprocessor"></span>
|
61
|
+
00054 <span class="comment">/* Define to 1 if you have the <memory.h> header file. */</span>
|
62
|
+
00055 <span class="preprocessor">#undef HAVE_MEMORY_H</span>
|
63
|
+
00056 <span class="preprocessor"></span>
|
64
|
+
00057 <span class="comment">/* Define to 1 if you have the <net/ethernet.h> header file. */</span>
|
65
|
+
00058 <span class="preprocessor">#define HAVE_NET_ETHERNET_H 1</span>
|
66
|
+
00059 <span class="preprocessor"></span>
|
67
|
+
00060 <span class="comment">/* Define to 1 if you have the <stdint.h> header file. */</span>
|
68
|
+
00061 <span class="preprocessor">#undef HAVE_STDINT_H</span>
|
69
|
+
00062 <span class="preprocessor"></span>
|
70
|
+
00063 <span class="comment">/* Define to 1 if you have the <stdlib.h> header file. */</span>
|
71
|
+
00064 <span class="preprocessor">#undef HAVE_STDLIB_H</span>
|
72
|
+
00065 <span class="preprocessor"></span>
|
73
|
+
00066 <span class="comment">/* Define to 1 if you have the `strerror' function. */</span>
|
74
|
+
00067 <span class="preprocessor">#define HAVE_STRERROR 1</span>
|
75
|
+
00068 <span class="preprocessor"></span>
|
76
|
+
00069 <span class="comment">/* Define to 1 if you have the <strings.h> header file. */</span>
|
77
|
+
00070 <span class="preprocessor">#undef HAVE_STRINGS_H</span>
|
78
|
+
00071 <span class="preprocessor"></span>
|
79
|
+
00072 <span class="comment">/* Define to 1 if you have the <string.h> header file. */</span>
|
80
|
+
00073 <span class="preprocessor">#undef HAVE_STRING_H</span>
|
81
|
+
00074 <span class="preprocessor"></span>
|
82
|
+
00075 <span class="comment">/* Define to 1 if you have the <sys/bufmod.h> header file. */</span>
|
83
|
+
00076 <span class="preprocessor">#undef HAVE_SYS_BUFMOD_H</span>
|
84
|
+
00077 <span class="preprocessor"></span>
|
85
|
+
00078 <span class="comment">/* Define to 1 if you have the <sys/dlpi_ext.h> header file. */</span>
|
86
|
+
00079 <span class="preprocessor">#undef HAVE_SYS_DLPI_EXT_H</span>
|
87
|
+
00080 <span class="preprocessor"></span>
|
88
|
+
00081 <span class="comment">/* Define to 1 if you have the <sys/sockio.h> header file. */</span>
|
89
|
+
00082 <span class="preprocessor">#undef HAVE_SYS_SOCKIO_H</span>
|
90
|
+
00083 <span class="preprocessor"></span>
|
91
|
+
00084 <span class="comment">/* Define to 1 if you have the <sys/stat.h> header file. */</span>
|
92
|
+
00085 <span class="preprocessor">#undef HAVE_SYS_STAT_H</span>
|
93
|
+
00086 <span class="preprocessor"></span>
|
94
|
+
00087 <span class="comment">/* Define to 1 if you have the <sys/types.h> header file. */</span>
|
95
|
+
00088 <span class="preprocessor">#undef HAVE_SYS_TYPES_H</span>
|
96
|
+
00089 <span class="preprocessor"></span>
|
97
|
+
00090 <span class="comment">/* Define to 1 if you have the <unistd.h> header file. */</span>
|
98
|
+
00091 <span class="preprocessor">#undef HAVE_UNISTD_H</span>
|
99
|
+
00092 <span class="preprocessor"></span>
|
100
|
+
00093 <span class="comment">/* Name of package */</span>
|
101
|
+
00094 <span class="preprocessor">#undef PACKAGE</span>
|
102
|
+
00095 <span class="preprocessor"></span>
|
103
|
+
00096 <span class="comment">/* Define to the address where bug reports for this package should be sent. */</span>
|
104
|
+
00097 <span class="preprocessor">#undef PACKAGE_BUGREPORT</span>
|
105
|
+
00098 <span class="preprocessor"></span>
|
106
|
+
00099 <span class="comment">/* Define to the full name of this package. */</span>
|
107
|
+
00100 <span class="preprocessor">#undef PACKAGE_NAME</span>
|
108
|
+
00101 <span class="preprocessor"></span>
|
109
|
+
00102 <span class="comment">/* Define to the full name and version of this package. */</span>
|
110
|
+
00103 <span class="preprocessor">#undef PACKAGE_STRING</span>
|
111
|
+
00104 <span class="preprocessor"></span>
|
112
|
+
00105 <span class="comment">/* Define to the one symbol short name of this package. */</span>
|
113
|
+
00106 <span class="preprocessor">#undef PACKAGE_TARNAME</span>
|
114
|
+
00107 <span class="preprocessor"></span>
|
115
|
+
00108 <span class="comment">/* Define to the version of this package. */</span>
|
116
|
+
00109 <span class="preprocessor">#undef PACKAGE_VERSION</span>
|
117
|
+
00110 <span class="preprocessor"></span>
|
118
|
+
00111 <span class="comment">/* Define to 1 if you have the ANSI C header files. */</span>
|
119
|
+
00112 <span class="preprocessor">#undef STDC_HEADERS</span>
|
120
|
+
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Mar 10 13:23:37 2004 for libnet by
|
121
|
+
<a href="http://www.doxygen.org/index.html">
|
122
|
+
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
|
123
|
+
</a>1.3.4 </small></address>
|
124
|
+
</body>
|
125
|
+
</html>
|