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,294 @@
|
|
1
|
+
# Makefile.in generated by automake 1.6.3 from Makefile.am.
|
2
|
+
# @configure_input@
|
3
|
+
|
4
|
+
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
5
|
+
# Free Software Foundation, Inc.
|
6
|
+
# This Makefile.in is free software; the Free Software Foundation
|
7
|
+
# gives unlimited permission to copy and/or distribute it,
|
8
|
+
# with or without modifications, as long as this notice is preserved.
|
9
|
+
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
12
|
+
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
13
|
+
# PARTICULAR PURPOSE.
|
14
|
+
|
15
|
+
@SET_MAKE@
|
16
|
+
|
17
|
+
# $Id: Makefile.in,v 1.14 2004/03/11 18:50:20 mike Exp $
|
18
|
+
|
19
|
+
# $Id: Makefile.in,v 1.14 2004/03/11 18:50:20 mike Exp $
|
20
|
+
#
|
21
|
+
# Libnet automake information file
|
22
|
+
# Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
|
23
|
+
# All rights reserved.
|
24
|
+
#
|
25
|
+
SHELL = @SHELL@
|
26
|
+
|
27
|
+
srcdir = @srcdir@
|
28
|
+
top_srcdir = @top_srcdir@
|
29
|
+
VPATH = @srcdir@
|
30
|
+
prefix = @prefix@
|
31
|
+
exec_prefix = @exec_prefix@
|
32
|
+
|
33
|
+
bindir = @bindir@
|
34
|
+
sbindir = @sbindir@
|
35
|
+
libexecdir = @libexecdir@
|
36
|
+
datadir = @datadir@
|
37
|
+
sysconfdir = @sysconfdir@
|
38
|
+
sharedstatedir = @sharedstatedir@
|
39
|
+
localstatedir = @localstatedir@
|
40
|
+
libdir = @libdir@
|
41
|
+
infodir = @infodir@
|
42
|
+
mandir = @mandir@
|
43
|
+
includedir = @includedir@
|
44
|
+
oldincludedir = /usr/include
|
45
|
+
pkgdatadir = $(datadir)/@PACKAGE@
|
46
|
+
pkglibdir = $(libdir)/@PACKAGE@
|
47
|
+
pkgincludedir = $(includedir)/@PACKAGE@
|
48
|
+
top_builddir = ../..
|
49
|
+
|
50
|
+
ACLOCAL = @ACLOCAL@
|
51
|
+
AUTOCONF = @AUTOCONF@
|
52
|
+
AUTOMAKE = @AUTOMAKE@
|
53
|
+
AUTOHEADER = @AUTOHEADER@
|
54
|
+
|
55
|
+
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
56
|
+
INSTALL = @INSTALL@
|
57
|
+
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
58
|
+
INSTALL_DATA = @INSTALL_DATA@
|
59
|
+
install_sh_DATA = $(install_sh) -c -m 644
|
60
|
+
install_sh_PROGRAM = $(install_sh) -c
|
61
|
+
install_sh_SCRIPT = $(install_sh) -c
|
62
|
+
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
63
|
+
INSTALL_HEADER = $(INSTALL_DATA)
|
64
|
+
transform = @program_transform_name@
|
65
|
+
NORMAL_INSTALL = :
|
66
|
+
PRE_INSTALL = :
|
67
|
+
POST_INSTALL = :
|
68
|
+
NORMAL_UNINSTALL = :
|
69
|
+
PRE_UNINSTALL = :
|
70
|
+
POST_UNINSTALL = :
|
71
|
+
build_alias = @build_alias@
|
72
|
+
build_triplet = @build@
|
73
|
+
host_alias = @host_alias@
|
74
|
+
host_triplet = @host@
|
75
|
+
target_alias = @target_alias@
|
76
|
+
target_triplet = @target@
|
77
|
+
|
78
|
+
EXEEXT = @EXEEXT@
|
79
|
+
OBJEXT = @OBJEXT@
|
80
|
+
PATH_SEPARATOR = @PATH_SEPARATOR@
|
81
|
+
ADDITIONAL_LIBS = @ADDITIONAL_LIBS@
|
82
|
+
AMTAR = @AMTAR@
|
83
|
+
AWK = @AWK@
|
84
|
+
CC = @CC@
|
85
|
+
DEPDIR = @DEPDIR@
|
86
|
+
ENDIANESS = @ENDIANESS@
|
87
|
+
HAVE_PACKET_SOCKET = @HAVE_PACKET_SOCKET@
|
88
|
+
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
89
|
+
LIBNET_CONFIG_CFLAGS = @LIBNET_CONFIG_CFLAGS@
|
90
|
+
LIBNET_CONFIG_DEFINES = @LIBNET_CONFIG_DEFINES@
|
91
|
+
LIBNET_CONFIG_LIBS = @LIBNET_CONFIG_LIBS@
|
92
|
+
LIBNET_VERSION = @LIBNET_VERSION@
|
93
|
+
MAINT = @MAINT@
|
94
|
+
PACKAGE = @PACKAGE@
|
95
|
+
RANLIB = @RANLIB@
|
96
|
+
STRIP = @STRIP@
|
97
|
+
VERSION = @VERSION@
|
98
|
+
am__include = @am__include@
|
99
|
+
am__quote = @am__quote@
|
100
|
+
install_sh = @install_sh@
|
101
|
+
|
102
|
+
AUTOMAKE_OPTIONS = foreign no-dependencies
|
103
|
+
|
104
|
+
DISTCLEANFILES = *~
|
105
|
+
|
106
|
+
libnetincludedir = $(includedir)/libnet
|
107
|
+
|
108
|
+
libnetinclude_HEADERS = libnet-asn1.h \
|
109
|
+
libnet-functions.h \
|
110
|
+
libnet-headers.h \
|
111
|
+
libnet-macros.h \
|
112
|
+
libnet-structures.h \
|
113
|
+
libnet-types.h
|
114
|
+
|
115
|
+
subdir = include/libnet
|
116
|
+
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
117
|
+
CONFIG_HEADER = $(top_builddir)/include/config.h
|
118
|
+
CONFIG_CLEAN_FILES =
|
119
|
+
depcomp =
|
120
|
+
am__depfiles_maybe =
|
121
|
+
DIST_SOURCES =
|
122
|
+
HEADERS = $(libnetinclude_HEADERS)
|
123
|
+
|
124
|
+
DIST_COMMON = $(libnetinclude_HEADERS) Makefile.am Makefile.in
|
125
|
+
all: all-am
|
126
|
+
|
127
|
+
.SUFFIXES:
|
128
|
+
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
129
|
+
cd $(top_srcdir) && \
|
130
|
+
$(AUTOMAKE) --foreign include/libnet/Makefile
|
131
|
+
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
|
132
|
+
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
133
|
+
uninstall-info-am:
|
134
|
+
libnetincludeHEADERS_INSTALL = $(INSTALL_HEADER)
|
135
|
+
install-libnetincludeHEADERS: $(libnetinclude_HEADERS)
|
136
|
+
@$(NORMAL_INSTALL)
|
137
|
+
$(mkinstalldirs) $(DESTDIR)$(libnetincludedir)
|
138
|
+
@list='$(libnetinclude_HEADERS)'; for p in $$list; do \
|
139
|
+
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
140
|
+
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
141
|
+
echo " $(libnetincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(libnetincludedir)/$$f"; \
|
142
|
+
$(libnetincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(libnetincludedir)/$$f; \
|
143
|
+
done
|
144
|
+
|
145
|
+
uninstall-libnetincludeHEADERS:
|
146
|
+
@$(NORMAL_UNINSTALL)
|
147
|
+
@list='$(libnetinclude_HEADERS)'; for p in $$list; do \
|
148
|
+
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
149
|
+
echo " rm -f $(DESTDIR)$(libnetincludedir)/$$f"; \
|
150
|
+
rm -f $(DESTDIR)$(libnetincludedir)/$$f; \
|
151
|
+
done
|
152
|
+
|
153
|
+
ETAGS = etags
|
154
|
+
ETAGSFLAGS =
|
155
|
+
|
156
|
+
tags: TAGS
|
157
|
+
|
158
|
+
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
159
|
+
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
160
|
+
unique=`for i in $$list; do \
|
161
|
+
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
162
|
+
done | \
|
163
|
+
$(AWK) ' { files[$$0] = 1; } \
|
164
|
+
END { for (i in files) print i; }'`; \
|
165
|
+
mkid -fID $$unique
|
166
|
+
|
167
|
+
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
168
|
+
$(TAGS_FILES) $(LISP)
|
169
|
+
tags=; \
|
170
|
+
here=`pwd`; \
|
171
|
+
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
172
|
+
unique=`for i in $$list; do \
|
173
|
+
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
174
|
+
done | \
|
175
|
+
$(AWK) ' { files[$$0] = 1; } \
|
176
|
+
END { for (i in files) print i; }'`; \
|
177
|
+
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
178
|
+
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
179
|
+
$$tags $$unique
|
180
|
+
|
181
|
+
GTAGS:
|
182
|
+
here=`$(am__cd) $(top_builddir) && pwd` \
|
183
|
+
&& cd $(top_srcdir) \
|
184
|
+
&& gtags -i $(GTAGS_ARGS) $$here
|
185
|
+
|
186
|
+
distclean-tags:
|
187
|
+
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
188
|
+
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
189
|
+
|
190
|
+
top_distdir = ../..
|
191
|
+
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
192
|
+
|
193
|
+
distdir: $(DISTFILES)
|
194
|
+
@list='$(DISTFILES)'; for file in $$list; do \
|
195
|
+
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
196
|
+
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
197
|
+
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
198
|
+
dir="/$$dir"; \
|
199
|
+
$(mkinstalldirs) "$(distdir)$$dir"; \
|
200
|
+
else \
|
201
|
+
dir=''; \
|
202
|
+
fi; \
|
203
|
+
if test -d $$d/$$file; then \
|
204
|
+
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
205
|
+
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
206
|
+
fi; \
|
207
|
+
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
208
|
+
else \
|
209
|
+
test -f $(distdir)/$$file \
|
210
|
+
|| cp -p $$d/$$file $(distdir)/$$file \
|
211
|
+
|| exit 1; \
|
212
|
+
fi; \
|
213
|
+
done
|
214
|
+
check-am: all-am
|
215
|
+
check: check-am
|
216
|
+
all-am: Makefile $(HEADERS)
|
217
|
+
|
218
|
+
installdirs:
|
219
|
+
$(mkinstalldirs) $(DESTDIR)$(libnetincludedir)
|
220
|
+
|
221
|
+
install: install-am
|
222
|
+
install-exec: install-exec-am
|
223
|
+
install-data: install-data-am
|
224
|
+
uninstall: uninstall-am
|
225
|
+
|
226
|
+
install-am: all-am
|
227
|
+
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
228
|
+
|
229
|
+
installcheck: installcheck-am
|
230
|
+
install-strip:
|
231
|
+
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
232
|
+
INSTALL_STRIP_FLAG=-s \
|
233
|
+
`test -z '$(STRIP)' || \
|
234
|
+
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
235
|
+
mostlyclean-generic:
|
236
|
+
|
237
|
+
clean-generic:
|
238
|
+
|
239
|
+
distclean-generic:
|
240
|
+
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
241
|
+
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
242
|
+
|
243
|
+
maintainer-clean-generic:
|
244
|
+
@echo "This command is intended for maintainers to use"
|
245
|
+
@echo "it deletes files that may require special tools to rebuild."
|
246
|
+
clean: clean-am
|
247
|
+
|
248
|
+
clean-am: clean-generic mostlyclean-am
|
249
|
+
|
250
|
+
distclean: distclean-am
|
251
|
+
|
252
|
+
distclean-am: clean-am distclean-generic distclean-tags
|
253
|
+
|
254
|
+
dvi: dvi-am
|
255
|
+
|
256
|
+
dvi-am:
|
257
|
+
|
258
|
+
info: info-am
|
259
|
+
|
260
|
+
info-am:
|
261
|
+
|
262
|
+
install-data-am: install-libnetincludeHEADERS
|
263
|
+
|
264
|
+
install-exec-am:
|
265
|
+
|
266
|
+
install-info: install-info-am
|
267
|
+
|
268
|
+
install-man:
|
269
|
+
|
270
|
+
installcheck-am:
|
271
|
+
|
272
|
+
maintainer-clean: maintainer-clean-am
|
273
|
+
|
274
|
+
maintainer-clean-am: distclean-am maintainer-clean-generic
|
275
|
+
|
276
|
+
mostlyclean: mostlyclean-am
|
277
|
+
|
278
|
+
mostlyclean-am: mostlyclean-generic
|
279
|
+
|
280
|
+
uninstall-am: uninstall-info-am uninstall-libnetincludeHEADERS
|
281
|
+
|
282
|
+
.PHONY: GTAGS all all-am check check-am clean clean-generic distclean \
|
283
|
+
distclean-generic distclean-tags distdir dvi dvi-am info \
|
284
|
+
info-am install install-am install-data install-data-am \
|
285
|
+
install-exec install-exec-am install-info install-info-am \
|
286
|
+
install-libnetincludeHEADERS install-man install-strip \
|
287
|
+
installcheck installcheck-am installdirs maintainer-clean \
|
288
|
+
maintainer-clean-generic mostlyclean mostlyclean-generic tags \
|
289
|
+
uninstall uninstall-am uninstall-info-am \
|
290
|
+
uninstall-libnetincludeHEADERS
|
291
|
+
|
292
|
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
293
|
+
# Otherwise a system limit (for SysV at least) may be exceeded.
|
294
|
+
.NOEXPORT:
|
@@ -0,0 +1,255 @@
|
|
1
|
+
/*
|
2
|
+
* $Id: libnet-asn1.h,v 1.3 2004/01/17 07:51:19 mike Exp $
|
3
|
+
*
|
4
|
+
* libnet-asn1.h - Network routine library ASN.1 header file
|
5
|
+
*
|
6
|
+
* Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
|
7
|
+
* All rights reserved.
|
8
|
+
*
|
9
|
+
* Definitions for Abstract Syntax Notation One, ASN.1
|
10
|
+
* As defined in ISO/IS 8824 and ISO/IS 8825
|
11
|
+
*
|
12
|
+
* Copyright 1988, 1989 by Carnegie Mellon University
|
13
|
+
* All rights reserved.
|
14
|
+
*
|
15
|
+
* Permission to use, copy, modify, and distribute this software and its
|
16
|
+
* documentation for any purpose and without fee is hereby granted,
|
17
|
+
* provided that the above copyright notice appear in all copies and that
|
18
|
+
* both that copyright notice and this permission notice appear in
|
19
|
+
* supporting documentation, and that the name of CMU not be
|
20
|
+
* used in advertising or publicity pertaining to distribution of the
|
21
|
+
* software without specific, written prior permission.
|
22
|
+
*
|
23
|
+
* CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
24
|
+
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
25
|
+
* CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
26
|
+
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
27
|
+
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
28
|
+
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
29
|
+
* SOFTWARE.
|
30
|
+
*
|
31
|
+
* Copyright (c) 1998 - 2001 Mike D. Schiffman <mike@infonexus.com>
|
32
|
+
* All rights reserved.
|
33
|
+
*
|
34
|
+
* Redistribution and use in source and binary forms, with or without
|
35
|
+
* modification, are permitted provided that the following conditions
|
36
|
+
* are met:
|
37
|
+
* 1. Redistributions of source code must retain the above copyright
|
38
|
+
* notice, this list of conditions and the following disclaimer.
|
39
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
40
|
+
* notice, this list of conditions and the following disclaimer in the
|
41
|
+
* documentation and/or other materials provided with the distribution.
|
42
|
+
*
|
43
|
+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
44
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
45
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
46
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
47
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
48
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
49
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
50
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
51
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
52
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
53
|
+
* SUCH DAMAGE.
|
54
|
+
*/
|
55
|
+
|
56
|
+
#ifndef __LIBNET_ASN1_H
|
57
|
+
#define __LIBNET_ASN1_H
|
58
|
+
|
59
|
+
#ifndef EIGHTBIT_SUBIDS
|
60
|
+
typedef u_int32_t oid;
|
61
|
+
#define MAX_SUBID 0xFFFFFFFF
|
62
|
+
#else
|
63
|
+
typedef u_int8_t oid;
|
64
|
+
#define MAX_SUBID 0xFF
|
65
|
+
#endif
|
66
|
+
|
67
|
+
#define MAX_OID_LEN 64 /* max subid's in an oid */
|
68
|
+
|
69
|
+
#define ASN_BOOLEAN (0x01)
|
70
|
+
#define ASN_INTEGER (0x02)
|
71
|
+
#define ASN_BIT_STR (0x03)
|
72
|
+
#define ASN_OCTET_STR (0x04)
|
73
|
+
#define ASN_NULL (0x05)
|
74
|
+
#define ASN_OBJECT_ID (0x06)
|
75
|
+
#define ASN_SEQUENCE (0x10)
|
76
|
+
#define ASN_SET (0x11)
|
77
|
+
|
78
|
+
#define ASN_UNIVERSAL (0x00)
|
79
|
+
#define ASN_APPLICATION (0x40)
|
80
|
+
#define ASN_CONTEXT (0x80)
|
81
|
+
#define ASN_PRIVATE (0xC0)
|
82
|
+
|
83
|
+
#define ASN_PRIMITIVE (0x00)
|
84
|
+
#define ASN_CONSTRUCTOR (0x20)
|
85
|
+
|
86
|
+
#define ASN_LONG_LEN (0x80)
|
87
|
+
#define ASN_EXTENSION_ID (0x1F)
|
88
|
+
#define ASN_BIT8 (0x80)
|
89
|
+
|
90
|
+
#define IS_CONSTRUCTOR(byte) ((byte) & ASN_CONSTRUCTOR)
|
91
|
+
#define IS_EXTENSION_ID(byte) (((byte) & ASN_EXTENSION_ID) = ASN_EXTENSION_ID)
|
92
|
+
|
93
|
+
/*
|
94
|
+
* All of the build_asn1_* (build_asn1_length being an exception) functions
|
95
|
+
* take the same first 3 arguments:
|
96
|
+
*
|
97
|
+
* u_int8_t *data: This is a pointer to the start of the data object to be
|
98
|
+
* manipulated.
|
99
|
+
* int *datalen: This is a pointer to the number of valid bytes following
|
100
|
+
* "data". This should be not be exceeded in any function.
|
101
|
+
* Upon exiting a function, this value will reflect the
|
102
|
+
* changed "data" and then refer to the new number of valid
|
103
|
+
* bytes until the end of "data".
|
104
|
+
* u_int8_t type: The ASN.1 object type.
|
105
|
+
*/
|
106
|
+
|
107
|
+
|
108
|
+
/*
|
109
|
+
* Builds an ASN object containing an integer.
|
110
|
+
*
|
111
|
+
* Returns NULL upon error or a pointer to the first byte past the end of
|
112
|
+
* this object (the start of the next object).
|
113
|
+
*/
|
114
|
+
|
115
|
+
u_int8_t *
|
116
|
+
libnet_build_asn1_int(
|
117
|
+
u_int8_t *, /* Pointer to the output buffer */
|
118
|
+
int *, /* Number of valid bytes left in the buffer */
|
119
|
+
u_int8_t, /* ASN object type */
|
120
|
+
int32_t *, /* Pointer to a int32_t integer */
|
121
|
+
int /* Size of a int32_t integer */
|
122
|
+
);
|
123
|
+
|
124
|
+
|
125
|
+
/*
|
126
|
+
* Builds an ASN object containing an unsigned integer.
|
127
|
+
*
|
128
|
+
* Returns NULL upon error or a pointer to the first byte past the end of
|
129
|
+
* this object (the start of the next object).
|
130
|
+
*/
|
131
|
+
|
132
|
+
u_int8_t *
|
133
|
+
libnet_build_asn1_uint(
|
134
|
+
u_int8_t *, /* Pointer to the output buffer */
|
135
|
+
int *, /* Number of valid bytes left in the buffer */
|
136
|
+
u_int8_t, /* ASN object type */
|
137
|
+
u_int32_t *, /* Pointer to an unsigned int32_t integer */
|
138
|
+
int /* Size of a int32_t integer */
|
139
|
+
);
|
140
|
+
|
141
|
+
|
142
|
+
/*
|
143
|
+
* Builds an ASN object containing an octect string.
|
144
|
+
*
|
145
|
+
* Returns NULL upon error or a pointer to the first byte past the end of
|
146
|
+
* this object (the start of the next object).
|
147
|
+
*/
|
148
|
+
|
149
|
+
u_int8_t *
|
150
|
+
libnet_build_asn1_string(
|
151
|
+
u_int8_t *, /* Pointer to the output buffer */
|
152
|
+
int *, /* Number of valid bytes left in the buffer */
|
153
|
+
u_int8_t, /* ASN object type */
|
154
|
+
u_int8_t *, /* Pointer to a string to be built into an object */
|
155
|
+
int /* Size of the string */
|
156
|
+
);
|
157
|
+
|
158
|
+
|
159
|
+
/*
|
160
|
+
* Builds an ASN header for an object with the ID and length specified. This
|
161
|
+
* only works on data types < 30, i.e. no extension octets. The maximum
|
162
|
+
* length is 0xFFFF;
|
163
|
+
*
|
164
|
+
* Returns a pointer to the first byte of the contents of this object or
|
165
|
+
* NULL upon error
|
166
|
+
*/
|
167
|
+
|
168
|
+
u_int8_t *
|
169
|
+
libnet_build_asn1_header(
|
170
|
+
u_int8_t *, /* Pointer to the start of the object */
|
171
|
+
int *, /* Number of valid bytes left in buffer */
|
172
|
+
u_int8_t, /* ASN object type */
|
173
|
+
int /* ASN object length */
|
174
|
+
);
|
175
|
+
|
176
|
+
|
177
|
+
u_int8_t *
|
178
|
+
libnet_build_asn1_length(
|
179
|
+
u_int8_t *, /* Pointer to start of object */
|
180
|
+
int *, /* Number of valid bytes in buffer */
|
181
|
+
int /* Length of object */
|
182
|
+
);
|
183
|
+
|
184
|
+
|
185
|
+
/*
|
186
|
+
* Builds an ASN header for a sequence with the ID and length specified.
|
187
|
+
*
|
188
|
+
* This only works on data types < 30, i.e. no extension octets.
|
189
|
+
* The maximum length is 0xFFFF;
|
190
|
+
*
|
191
|
+
* Returns a pointer to the first byte of the contents of this object.
|
192
|
+
* Returns NULL on any error.
|
193
|
+
*/
|
194
|
+
|
195
|
+
u_int8_t *
|
196
|
+
libnet_build_asn1_sequence(
|
197
|
+
u_int8_t *,
|
198
|
+
int *,
|
199
|
+
u_int8_t,
|
200
|
+
int
|
201
|
+
);
|
202
|
+
|
203
|
+
|
204
|
+
/*
|
205
|
+
* Builds an ASN object identifier object containing the input string.
|
206
|
+
*
|
207
|
+
* Returns NULL upon error or a pointer to the first byte past the end of
|
208
|
+
* this object (the start of the next object).
|
209
|
+
*/
|
210
|
+
|
211
|
+
u_int8_t *
|
212
|
+
libnet_build_asn1_objid(
|
213
|
+
u_int8_t *,
|
214
|
+
int *,
|
215
|
+
u_int8_t,
|
216
|
+
oid *,
|
217
|
+
int
|
218
|
+
);
|
219
|
+
|
220
|
+
|
221
|
+
/*
|
222
|
+
* Builds an ASN null object.
|
223
|
+
*
|
224
|
+
* Returns NULL upon error or a pointer to the first byte past the end of
|
225
|
+
* this object (the start of the next object).
|
226
|
+
*/
|
227
|
+
|
228
|
+
u_int8_t *
|
229
|
+
libnet_build_asn1_null(
|
230
|
+
u_int8_t *,
|
231
|
+
int *,
|
232
|
+
u_int8_t
|
233
|
+
);
|
234
|
+
|
235
|
+
|
236
|
+
/*
|
237
|
+
* Builds an ASN bitstring.
|
238
|
+
*
|
239
|
+
* Returns NULL upon error or a pointer to the first byte past the end of
|
240
|
+
* this object (the start of the next object).
|
241
|
+
*/
|
242
|
+
|
243
|
+
u_int8_t *
|
244
|
+
libnet_build_asn1_bitstring(
|
245
|
+
u_int8_t *,
|
246
|
+
int *,
|
247
|
+
u_int8_t,
|
248
|
+
u_int8_t *, /* Pointer to the input buffer */
|
249
|
+
int /* Length of the input buffer */
|
250
|
+
);
|
251
|
+
|
252
|
+
|
253
|
+
#endif /* __LIBNET_ASN1_H */
|
254
|
+
|
255
|
+
/* EOF */
|