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.
Files changed (306) hide show
  1. data/CHANGELOG +15 -0
  2. data/LICENSE +28 -0
  3. data/README +187 -0
  4. data/Rakefile +110 -0
  5. data/ext/extconf.rb +60 -0
  6. data/ext/libnet.c +705 -0
  7. data/ext/libnet_arp.c +152 -0
  8. data/ext/libnet_ethernet.c +115 -0
  9. data/ext/libnet_ipv4.c +140 -0
  10. data/ext/libnet_ipv6.c +138 -0
  11. data/ext/libnet_udp.c +112 -0
  12. data/ext/libnet_vlan.c +131 -0
  13. data/lib/libnet4r/header.rb +609 -0
  14. data/lib/libnet4r/helpers.rb +19 -0
  15. data/lib/libnet4r/libnet.rb +39 -0
  16. data/libnet/CVS/Entries +24 -0
  17. data/libnet/CVS/Repository +1 -0
  18. data/libnet/CVS/Root +1 -0
  19. data/libnet/Makefile.am +15 -0
  20. data/libnet/Makefile.am.common +10 -0
  21. data/libnet/Makefile.in +443 -0
  22. data/libnet/README +21 -0
  23. data/libnet/VERSION +1 -0
  24. data/libnet/acconfig.h +36 -0
  25. data/libnet/acinclude.m4 +463 -0
  26. data/libnet/aclocal.m4 +1337 -0
  27. data/libnet/autom4te.cache/CVS/Entries +1 -0
  28. data/libnet/autom4te.cache/CVS/Repository +1 -0
  29. data/libnet/autom4te.cache/CVS/Root +1 -0
  30. data/libnet/autom4te.cache/output.0 +6225 -0
  31. data/libnet/autom4te.cache/requests +111 -0
  32. data/libnet/autom4te.cache/traces.0 +272 -0
  33. data/libnet/config.guess +1314 -0
  34. data/libnet/config.sub +1410 -0
  35. data/libnet/configure +6225 -0
  36. data/libnet/configure.in +235 -0
  37. data/libnet/doc/BUGS +19 -0
  38. data/libnet/doc/CHANGELOG +527 -0
  39. data/libnet/doc/CONTRIB +53 -0
  40. data/libnet/doc/COPYING +31 -0
  41. data/libnet/doc/CVS/Entries +12 -0
  42. data/libnet/doc/CVS/Repository +1 -0
  43. data/libnet/doc/CVS/Root +1 -0
  44. data/libnet/doc/DESIGN_NOTES +134 -0
  45. data/libnet/doc/MIGRATION +172 -0
  46. data/libnet/doc/PACKET_BUILDING +161 -0
  47. data/libnet/doc/PORTED +45 -0
  48. data/libnet/doc/RAWSOCKET_NON_SEQUITUR +41 -0
  49. data/libnet/doc/TODO +96 -0
  50. data/libnet/doc/html/acconfig_8h-source.html +49 -0
  51. data/libnet/doc/html/annotated.html +17 -0
  52. data/libnet/doc/html/bpf_8h-source.html +277 -0
  53. data/libnet/doc/html/config_8h-source.html +125 -0
  54. data/libnet/doc/html/doxygen.css +169 -0
  55. data/libnet/doc/html/doxygen.png +0 -0
  56. data/libnet/doc/html/files.html +29 -0
  57. data/libnet/doc/html/functions.html +26 -0
  58. data/libnet/doc/html/functions_vars.html +26 -0
  59. data/libnet/doc/html/getopt_8h-source.html +97 -0
  60. data/libnet/doc/html/globals.html +219 -0
  61. data/libnet/doc/html/globals_defs.html +104 -0
  62. data/libnet/doc/html/globals_func.html +136 -0
  63. data/libnet/doc/html/gnuc_8h-source.html +56 -0
  64. data/libnet/doc/html/graph_legend.dot +22 -0
  65. data/libnet/doc/html/graph_legend.html +75 -0
  66. data/libnet/doc/html/ifaddrlist_8h-source.html +65 -0
  67. data/libnet/doc/html/in__systm_8h-source.html +90 -0
  68. data/libnet/doc/html/index.html +17 -0
  69. data/libnet/doc/html/libnet-asn1_8h-source.html +268 -0
  70. data/libnet/doc/html/libnet-functions_8h-source.html +742 -0
  71. data/libnet/doc/html/libnet-functions_8h.html +8844 -0
  72. data/libnet/doc/html/libnet-headers_8h-source.html +1655 -0
  73. data/libnet/doc/html/libnet-headers_8h.html +3053 -0
  74. data/libnet/doc/html/libnet-macros_8h-source.html +161 -0
  75. data/libnet/doc/html/libnet-macros_8h.html +358 -0
  76. data/libnet/doc/html/libnet-structures_8h-source.html +233 -0
  77. data/libnet/doc/html/libnet-types_8h-source.html +58 -0
  78. data/libnet/doc/html/libnet_8h-source.html +119 -0
  79. data/libnet/doc/html/libnet_8h.html +24 -0
  80. data/libnet/doc/html/structlibnet__802__1q__hdr.html +145 -0
  81. data/libnet/doc/html/structlibnet__802__1x__hdr.html +97 -0
  82. data/libnet/doc/libnet.doxygen.conf +1102 -0
  83. data/libnet/doc/man/CVS/Entries +1 -0
  84. data/libnet/doc/man/CVS/Repository +1 -0
  85. data/libnet/doc/man/CVS/Root +1 -0
  86. data/libnet/doc/man/man3/libnet-functions.h.3 +3136 -0
  87. data/libnet/doc/man/man3/libnet-headers.h.3 +1872 -0
  88. data/libnet/doc/man/man3/libnet-macros.h.3 +172 -0
  89. data/libnet/doc/man/man3/libnet.h.3 +17 -0
  90. data/libnet/doc/man/man3/libnet_802_1q_hdr.3 +53 -0
  91. data/libnet/doc/man/man3/libnet_802_1x_hdr.3 +41 -0
  92. data/libnet/include/CVS/Entries +10 -0
  93. data/libnet/include/CVS/Repository +1 -0
  94. data/libnet/include/CVS/Root +1 -0
  95. data/libnet/include/Makefile.am +7 -0
  96. data/libnet/include/Makefile.in +395 -0
  97. data/libnet/include/bpf.h +264 -0
  98. data/libnet/include/config.h.in +118 -0
  99. data/libnet/include/gnuc.h +43 -0
  100. data/libnet/include/ifaddrlist.h +52 -0
  101. data/libnet/include/libnet/CVS/Entries +9 -0
  102. data/libnet/include/libnet/CVS/Repository +1 -0
  103. data/libnet/include/libnet/CVS/Root +1 -0
  104. data/libnet/include/libnet/Makefile.am +12 -0
  105. data/libnet/include/libnet/Makefile.in +294 -0
  106. data/libnet/include/libnet/libnet-asn1.h +255 -0
  107. data/libnet/include/libnet/libnet-functions.h +2157 -0
  108. data/libnet/include/libnet/libnet-headers.h +1662 -0
  109. data/libnet/include/libnet/libnet-macros.h +186 -0
  110. data/libnet/include/libnet/libnet-structures.h +222 -0
  111. data/libnet/include/libnet/libnet-types.h +45 -0
  112. data/libnet/include/libnet.h.in +132 -0
  113. data/libnet/include/stamp-h.in +1 -0
  114. data/libnet/include/win32/CVS/Entries +5 -0
  115. data/libnet/include/win32/CVS/Repository +1 -0
  116. data/libnet/include/win32/CVS/Root +1 -0
  117. data/libnet/include/win32/config.h +112 -0
  118. data/libnet/include/win32/getopt.h +84 -0
  119. data/libnet/include/win32/in_systm.h +77 -0
  120. data/libnet/include/win32/libnet.h +106 -0
  121. data/libnet/install-sh +250 -0
  122. data/libnet/libnet-config.in +62 -0
  123. data/libnet/libnet.doxygen.conf +1102 -0
  124. data/libnet/man/CVS/Entries +1 -0
  125. data/libnet/man/CVS/Repository +1 -0
  126. data/libnet/man/CVS/Root +1 -0
  127. data/libnet/missing +283 -0
  128. data/libnet/mkinstalldirs +40 -0
  129. data/libnet/sample/CVS/Entries +47 -0
  130. data/libnet/sample/CVS/Repository +1 -0
  131. data/libnet/sample/CVS/Root +1 -0
  132. data/libnet/sample/Makefile.am +63 -0
  133. data/libnet/sample/Makefile.in +729 -0
  134. data/libnet/sample/arp-new.c +144 -0
  135. data/libnet/sample/arp.c +151 -0
  136. data/libnet/sample/bgp4_hdr.c +225 -0
  137. data/libnet/sample/bgp4_notification.c +242 -0
  138. data/libnet/sample/bgp4_open.c +266 -0
  139. data/libnet/sample/bgp4_update.c +337 -0
  140. data/libnet/sample/cdp.c +187 -0
  141. data/libnet/sample/dhcp_discover.c +257 -0
  142. data/libnet/sample/dns.c +260 -0
  143. data/libnet/sample/dot1x.c +113 -0
  144. data/libnet/sample/fddi_tcp1.c +213 -0
  145. data/libnet/sample/fddi_tcp2.c +209 -0
  146. data/libnet/sample/get_addr.c +112 -0
  147. data/libnet/sample/gre.c +410 -0
  148. data/libnet/sample/icmp6_echoreq.c +184 -0
  149. data/libnet/sample/icmp_echo_cq.c +201 -0
  150. data/libnet/sample/icmp_redirect.c +200 -0
  151. data/libnet/sample/icmp_timeexceed.c +190 -0
  152. data/libnet/sample/icmp_timestamp.c +157 -0
  153. data/libnet/sample/icmp_unreach.c +204 -0
  154. data/libnet/sample/ieee.c +177 -0
  155. data/libnet/sample/ip_link.c +201 -0
  156. data/libnet/sample/ip_raw.c +180 -0
  157. data/libnet/sample/isl.c +167 -0
  158. data/libnet/sample/libnet_test.h +60 -0
  159. data/libnet/sample/mpls.c +251 -0
  160. data/libnet/sample/ntp.c +193 -0
  161. data/libnet/sample/ospf_hello.c +179 -0
  162. data/libnet/sample/ospf_lsa.c +190 -0
  163. data/libnet/sample/ping_of_death.c +171 -0
  164. data/libnet/sample/rpc_tcp.c +214 -0
  165. data/libnet/sample/rpc_udp.c +213 -0
  166. data/libnet/sample/sebek.c +299 -0
  167. data/libnet/sample/smurf.c +194 -0
  168. data/libnet/sample/stp.c +227 -0
  169. data/libnet/sample/synflood.c +200 -0
  170. data/libnet/sample/synflood6.c +209 -0
  171. data/libnet/sample/synflood6_frag.c +234 -0
  172. data/libnet/sample/tcp1.c +227 -0
  173. data/libnet/sample/tcp2.c +192 -0
  174. data/libnet/sample/tftp.c +207 -0
  175. data/libnet/sample/tring_tcp1.c +214 -0
  176. data/libnet/sample/tring_tcp2.c +210 -0
  177. data/libnet/sample/udp1.c +223 -0
  178. data/libnet/sample/udp2.c +232 -0
  179. data/libnet/sample/win32/CVS/Entries +9 -0
  180. data/libnet/sample/win32/CVS/Repository +1 -0
  181. data/libnet/sample/win32/CVS/Root +1 -0
  182. data/libnet/sample/win32/arp/CVS/Entries +2 -0
  183. data/libnet/sample/win32/arp/CVS/Repository +1 -0
  184. data/libnet/sample/win32/arp/CVS/Root +1 -0
  185. data/libnet/sample/win32/arp/arp.vcproj +136 -0
  186. data/libnet/sample/win32/cdp/CVS/Entries +2 -0
  187. data/libnet/sample/win32/cdp/CVS/Repository +1 -0
  188. data/libnet/sample/win32/cdp/CVS/Root +1 -0
  189. data/libnet/sample/win32/cdp/cdp.vcproj +136 -0
  190. data/libnet/sample/win32/dhcp_discover/CVS/Entries +2 -0
  191. data/libnet/sample/win32/dhcp_discover/CVS/Repository +1 -0
  192. data/libnet/sample/win32/dhcp_discover/CVS/Root +1 -0
  193. data/libnet/sample/win32/dhcp_discover/dhcp_discover.vcproj +139 -0
  194. data/libnet/sample/win32/dns/CVS/Entries +2 -0
  195. data/libnet/sample/win32/dns/CVS/Repository +1 -0
  196. data/libnet/sample/win32/dns/CVS/Root +1 -0
  197. data/libnet/sample/win32/dns/dns.vcproj +139 -0
  198. data/libnet/sample/win32/get_addr/CVS/Entries +2 -0
  199. data/libnet/sample/win32/get_addr/CVS/Repository +1 -0
  200. data/libnet/sample/win32/get_addr/CVS/Root +1 -0
  201. data/libnet/sample/win32/get_addr/get_addr.vcproj +139 -0
  202. data/libnet/sample/win32/getopt.c +121 -0
  203. data/libnet/sample/win32/icmp_echo_cq/CVS/Entries +2 -0
  204. data/libnet/sample/win32/icmp_echo_cq/CVS/Repository +1 -0
  205. data/libnet/sample/win32/icmp_echo_cq/CVS/Root +1 -0
  206. data/libnet/sample/win32/icmp_echo_cq/icmp_echo_cq.vcproj +139 -0
  207. data/libnet/sample/win32/tcp1/CVS/Entries +2 -0
  208. data/libnet/sample/win32/tcp1/CVS/Repository +1 -0
  209. data/libnet/sample/win32/tcp1/CVS/Root +1 -0
  210. data/libnet/sample/win32/tcp1/tcp1.vcproj +142 -0
  211. data/libnet/sample/win32/udp1/CVS/Entries +3 -0
  212. data/libnet/sample/win32/udp1/CVS/Repository +1 -0
  213. data/libnet/sample/win32/udp1/CVS/Root +1 -0
  214. data/libnet/sample/win32/udp1/dns.vcproj +125 -0
  215. data/libnet/sample/win32/udp1/udp1.vcproj +139 -0
  216. data/libnet/src/CVS/Entries +60 -0
  217. data/libnet/src/CVS/Repository +1 -0
  218. data/libnet/src/CVS/Root +1 -0
  219. data/libnet/src/Makefile.am +71 -0
  220. data/libnet/src/Makefile.in +428 -0
  221. data/libnet/src/libnet_advanced.c +136 -0
  222. data/libnet/src/libnet_asn1.c +436 -0
  223. data/libnet/src/libnet_build_802.1q.c +115 -0
  224. data/libnet/src/libnet_build_802.1x.c +103 -0
  225. data/libnet/src/libnet_build_802.2.c +167 -0
  226. data/libnet/src/libnet_build_802.3.c +101 -0
  227. data/libnet/src/libnet_build_arp.c +169 -0
  228. data/libnet/src/libnet_build_bgp.c +350 -0
  229. data/libnet/src/libnet_build_cdp.c +191 -0
  230. data/libnet/src/libnet_build_data.c +90 -0
  231. data/libnet/src/libnet_build_dhcp.c +156 -0
  232. data/libnet/src/libnet_build_dns.c +129 -0
  233. data/libnet/src/libnet_build_ethernet.c +173 -0
  234. data/libnet/src/libnet_build_fddi.c +191 -0
  235. data/libnet/src/libnet_build_gre.c +427 -0
  236. data/libnet/src/libnet_build_icmp.c +437 -0
  237. data/libnet/src/libnet_build_igmp.c +112 -0
  238. data/libnet/src/libnet_build_ip.c +892 -0
  239. data/libnet/src/libnet_build_ipsec.c +232 -0
  240. data/libnet/src/libnet_build_isl.c +113 -0
  241. data/libnet/src/libnet_build_link.c +90 -0
  242. data/libnet/src/libnet_build_mpls.c +112 -0
  243. data/libnet/src/libnet_build_ntp.c +121 -0
  244. data/libnet/src/libnet_build_ospf.c +699 -0
  245. data/libnet/src/libnet_build_rip.c +108 -0
  246. data/libnet/src/libnet_build_rpc.c +138 -0
  247. data/libnet/src/libnet_build_sebek.c +108 -0
  248. data/libnet/src/libnet_build_snmp.c +52 -0
  249. data/libnet/src/libnet_build_stp.c +222 -0
  250. data/libnet/src/libnet_build_tcp.c +365 -0
  251. data/libnet/src/libnet_build_token_ring.c +193 -0
  252. data/libnet/src/libnet_build_udp.c +111 -0
  253. data/libnet/src/libnet_build_vrrp.c +117 -0
  254. data/libnet/src/libnet_checksum.c +376 -0
  255. data/libnet/src/libnet_cq.c +395 -0
  256. data/libnet/src/libnet_crc.c +113 -0
  257. data/libnet/src/libnet_dll.c +47 -0
  258. data/libnet/src/libnet_error.c +55 -0
  259. data/libnet/src/libnet_if_addr.c +415 -0
  260. data/libnet/src/libnet_init.c +234 -0
  261. data/libnet/src/libnet_internal.c +310 -0
  262. data/libnet/src/libnet_link_bpf.c +348 -0
  263. data/libnet/src/libnet_link_dlpi.c +785 -0
  264. data/libnet/src/libnet_link_linux.c +310 -0
  265. data/libnet/src/libnet_link_nit.c +125 -0
  266. data/libnet/src/libnet_link_none.c +66 -0
  267. data/libnet/src/libnet_link_pf.c +179 -0
  268. data/libnet/src/libnet_link_snit.c +149 -0
  269. data/libnet/src/libnet_link_snoop.c +166 -0
  270. data/libnet/src/libnet_link_win32.c +346 -0
  271. data/libnet/src/libnet_pblock.c +511 -0
  272. data/libnet/src/libnet_port_list.c +295 -0
  273. data/libnet/src/libnet_prand.c +106 -0
  274. data/libnet/src/libnet_raw.c +257 -0
  275. data/libnet/src/libnet_resolve.c +414 -0
  276. data/libnet/src/libnet_version.c +54 -0
  277. data/libnet/src/libnet_write.c +502 -0
  278. data/libnet/version.h.in +6 -0
  279. data/libnet/win32/CVS/Entries +15 -0
  280. data/libnet/win32/CVS/Repository +1 -0
  281. data/libnet/win32/CVS/Root +1 -0
  282. data/libnet/win32/Libnet-1.1.1-2002.sln +77 -0
  283. data/libnet/win32/Libnet-1.1.1-2003.ncb +0 -0
  284. data/libnet/win32/Libnet-1.1.1-2003.sln +84 -0
  285. data/libnet/win32/Libnet-1.1.1-2003.suo +0 -0
  286. data/libnet/win32/Libnet-1.1.1.vcproj +311 -0
  287. data/libnet/win32/Libnet-latest.ncb +0 -0
  288. data/libnet/win32/Libnet-latest.opt +0 -0
  289. data/libnet/win32/Libnet-latest.sln +77 -0
  290. data/libnet/win32/Libnet-latest.suo +0 -0
  291. data/libnet/win32/Libnet-latest.vcproj +311 -0
  292. data/libnet/win32/Libnet.dsp +337 -0
  293. data/libnet/win32/Libnet.dsw +32 -0
  294. data/libnet/win32/README.txt +57 -0
  295. data/libnet/win32/libnet_dll.def +164 -0
  296. data/test/tc_arp.rb +169 -0
  297. data/test/tc_class.rb +219 -0
  298. data/test/tc_ethernet.rb +97 -0
  299. data/test/tc_header.rb +163 -0
  300. data/test/tc_init.rb +25 -0
  301. data/test/tc_ipv4.rb +219 -0
  302. data/test/tc_ipv6.rb +235 -0
  303. data/test/tc_udp.rb +229 -0
  304. data/test/tc_vlan.rb +118 -0
  305. data/test/ts_all.rb +15 -0
  306. 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 */