Permalink
Browse files

Files from initial public release 'embedded_ipsec_1.0.zip' added

Signed-off-by: Christian Scheurer <git@tinytux.ch>
  • Loading branch information...
tinytux committed Feb 22, 2017
1 parent 18c3ea9 commit 161e82d384735819f18931232f19f6b36523f1c0
Showing with 51,512 additions and 2 deletions.
  1. +11 −0 CHANGES
  2. +26 −0 LICENSE
  3. +9 −2 README.md
  4. +258 −0 doc/html/ah_8c-source.html
  5. +268 −0 doc/html/ah_8c.html
  6. +79 −0 doc/html/ah_8h-source.html
  7. +272 −0 doc/html/ah_8h.html
  8. +98 −0 doc/html/ah__test-sample__ah__packet_8h-source.html
  9. +169 −0 doc/html/ah__test-sample__ah__packet_8h.html
  10. +195 −0 doc/html/ah__test_8c-source.html
  11. +154 −0 doc/html/ah__test_8c.html
  12. +47 −0 doc/html/annotated.html
  13. +31 −0 doc/html/classes.html
  14. +167 −0 doc/html/debug_8h-source.html
  15. +531 −0 doc/html/debug_8h.html
  16. +1,090 −0 doc/html/des_8c-source.html
  17. +1,744 −0 doc/html/des_8c.html
  18. +86 −0 doc/html/des_8h-source.html
  19. +363 −0 doc/html/des_8h.html
  20. +234 −0 doc/html/des__test_8c-source.html
  21. +153 −0 doc/html/des__test_8c.html
  22. +171 −0 doc/html/doxygen.css
  23. BIN doc/html/doxygen.png
  24. +119 −0 doc/html/dumpdev-espdata_8h-source.html
  25. +382 −0 doc/html/dumpdev-espdata_8h.html
  26. +508 −0 doc/html/dumpdev-httpgetdata_8h-source.html
  27. +1,520 −0 doc/html/dumpdev-httpgetdata_8h.html
  28. +156 −0 doc/html/dumpdev-pingdata_8h-source.html
  29. +557 −0 doc/html/dumpdev-pingdata_8h.html
  30. +315 −0 doc/html/dumpdev_8c-source.html
  31. +524 −0 doc/html/dumpdev_8c.html
  32. +70 −0 doc/html/dumpdev_8h-source.html
  33. +281 −0 doc/html/dumpdev_8h.html
  34. +313 −0 doc/html/esp_8c-source.html
  35. +307 −0 doc/html/esp_8c.html
  36. +83 −0 doc/html/esp_8h-source.html
  37. +408 −0 doc/html/esp_8h.html
  38. +371 −0 doc/html/esp__test_8c-source.html
  39. +387 −0 doc/html/esp__test_8c.html
  40. +74 −0 doc/html/files.html
  41. +148 −0 doc/html/functions.html
  42. +148 −0 doc/html/functions_vars.html
  43. +498 −0 doc/html/globals.html
  44. +202 −0 doc/html/globals_defs.html
  45. +32 −0 doc/html/globals_enum.html
  46. +56 −0 doc/html/globals_eval.html
  47. +164 −0 doc/html/globals_func.html
  48. +58 −0 doc/html/globals_type.html
  49. +158 −0 doc/html/globals_vars.html
  50. +25 −0 doc/html/index.html
  51. +220 −0 doc/html/ipsec_8c-source.html
  52. +212 −0 doc/html/ipsec_8c.html
  53. +72 −0 doc/html/ipsec_8h-source.html
  54. +407 −0 doc/html/ipsec_8h.html
  55. +397 −0 doc/html/ipsecdev_8c-source.html
  56. +646 −0 doc/html/ipsecdev_8c.html
  57. +80 −0 doc/html/ipsecdev_8h-source.html
  58. +397 −0 doc/html/ipsecdev_8h.html
  59. +88 −0 doc/html/keil__1000__ah__md5_8h-source.html
  60. +186 −0 doc/html/keil__1000__ah__md5_8h.html
  61. +87 −0 doc/html/keil__1001__ah__sha1_8h-source.html
  62. +185 −0 doc/html/keil__1001__ah__sha1_8h.html
  63. +88 −0 doc/html/keil__1002__esp__3des_8h-source.html
  64. +186 −0 doc/html/keil__1002__esp__3des_8h.html
  65. +88 −0 doc/html/keil__1003__esp__3des__md5_8h-source.html
  66. +186 −0 doc/html/keil__1003__esp__3des__md5_8h.html
  67. +88 −0 doc/html/keil__1004__esp__3des__sha1_8h-source.html
  68. +186 −0 doc/html/keil__1004__esp__3des__sha1_8h.html
  69. +90 −0 doc/html/keil__bypass_8h-source.html
  70. +188 −0 doc/html/keil__bypass_8h.html
  71. +90 −0 doc/html/keil__netconfig_8h-source.html
  72. +188 −0 doc/html/keil__netconfig_8h.html
  73. BIN doc/html/logo_small.gif
  74. +130 −0 doc/html/main_8c-source.html
  75. +447 −0 doc/html/main_8c.html
  76. +617 −0 doc/html/md5_8c-source.html
  77. +1,139 −0 doc/html/md5_8c.html
  78. +82 −0 doc/html/md5_8h-source.html
  79. +463 −0 doc/html/md5_8h.html
  80. +228 −0 doc/html/md5__test_8c-source.html
  81. +210 −0 doc/html/md5__test_8c.html
  82. +27 −0 doc/html/pages.html
  83. +88 −0 doc/html/phy__2000__ah__md5_8h-source.html
  84. +186 −0 doc/html/phy__2000__ah__md5_8h.html
  85. +87 −0 doc/html/phy__2001__ah__sha1_8h-source.html
  86. +185 −0 doc/html/phy__2001__ah__sha1_8h.html
  87. +88 −0 doc/html/phy__2002__esp__3des_8h-source.html
  88. +186 −0 doc/html/phy__2002__esp__3des_8h.html
  89. +88 −0 doc/html/phy__2003__esp__3des__md5_8h-source.html
  90. +186 −0 doc/html/phy__2003__esp__3des__md5_8h.html
  91. +88 −0 doc/html/phy__2004__esp__3des__sha1_8h-source.html
  92. +186 −0 doc/html/phy__2004__esp__3des__sha1_8h.html
  93. +90 −0 doc/html/phy__bypass_8h-source.html
  94. +188 −0 doc/html/phy__bypass_8h.html
  95. +90 −0 doc/html/phy__netconfig_8h-source.html
  96. +188 −0 doc/html/phy__netconfig_8h.html
  97. +860 −0 doc/html/sa_8c-source.html
  98. +1,047 −0 doc/html/sa_8c.html
  99. +213 −0 doc/html/sa_8h-source.html
  100. +1,941 −0 doc/html/sa_8h.html
  101. +903 −0 doc/html/sa__test_8c-source.html
  102. +1,009 −0 doc/html/sa__test_8c.html
  103. +695 −0 doc/html/sha1_8c-source.html
  104. +1,555 −0 doc/html/sha1_8c.html
  105. +87 −0 doc/html/sha1_8h-source.html
  106. +426 −0 doc/html/sha1_8h.html
  107. +280 −0 doc/html/sha1__test_8c-source.html
  108. +187 −0 doc/html/sha1__test_8c.html
  109. +110 −0 doc/html/structDES__ks.html
  110. +240 −0 doc/html/structMD5state__st.html
  111. +266 −0 doc/html/structSHAstate__st.html
  112. +188 −0 doc/html/structah__hdr__struct.html
  113. +162 −0 doc/html/structdb__set__netif__struct.html
  114. +167 −0 doc/html/structdumpdev__packet__struct.html
  115. +63 −0 doc/html/structdumpdev__stats.html
  116. +110 −0 doc/html/structesp__packet__struct.html
  117. +84 −0 doc/html/structipsec__esp__header__struct.html
  118. +58 −0 doc/html/structipsec__in__addr.html
  119. +191 −0 doc/html/structipsec__in__ip__struct.html
  120. +63 −0 doc/html/structipsec__ip__addr.html
  121. +292 −0 doc/html/structipsec__ip__hdr__struct.html
  122. +240 −0 doc/html/structipsec__tcp__hdr__struct.html
  123. +136 −0 doc/html/structipsec__udp__hdr__struct.html
  124. +63 −0 doc/html/structipsecdev__stats.html
  125. +453 −0 doc/html/structsa__entry__struct.html
  126. +110 −0 doc/html/structsad__table__struct.html
  127. +344 −0 doc/html/structspd__entry__struct.html
  128. +141 −0 doc/html/structspd__table__struct.html
  129. +136 −0 doc/html/structtest__result__struct.html
  130. +80 −0 doc/html/structtest__set__struct.html
  131. +89 −0 doc/html/structural__test_8h-source.html
  132. +149 −0 doc/html/structural__test_8h.html
  133. +134 −0 doc/html/todo.html
  134. +141 −0 doc/html/types_8h-source.html
  135. +522 −0 doc/html/types_8h.html
  136. +385 −0 doc/html/util_8c-source.html
  137. +669 −0 doc/html/util_8c.html
  138. +105 −0 doc/html/util_8h-source.html
  139. +925 −0 doc/html/util_8h.html
  140. +155 −0 doc/html/util__test_8c-source.html
  141. +117 −0 doc/html/util__test_8c.html
  142. +309 −0 src/core/ah.c
  143. +1,104 −0 src/core/des.c
  144. +360 −0 src/core/esp.c
  145. +255 −0 src/core/ipsec.c
  146. +630 −0 src/core/md5.c
  147. +1,111 −0 src/core/sa.c
  148. +695 −0 src/core/sha1.c
  149. +489 −0 src/core/util.c
  150. 0 src/debug/.gitkeep
  151. 0 src/include/debug/.gitkeep
  152. +72 −0 src/include/ipsec/ah.h
  153. +182 −0 src/include/ipsec/debug.h
  154. +77 −0 src/include/ipsec/des.h
  155. +75 −0 src/include/ipsec/esp.h
  156. +65 −0 src/include/ipsec/ipsec.h
  157. +79 −0 src/include/ipsec/md5.h
  158. +226 −0 src/include/ipsec/sa.h
  159. +76 −0 src/include/ipsec/sha1.h
  160. +138 −0 src/include/ipsec/types.h
  161. +99 −0 src/include/ipsec/util.h
  162. +61 −0 src/include/netif/dumpdev.h
  163. +74 −0 src/include/netif/ipsecdev.h
  164. +69 −0 src/include/testing/config/keil_1000_ah_md5.h
  165. +67 −0 src/include/testing/config/keil_1001_ah_sha1.h
  166. +68 −0 src/include/testing/config/keil_1002_esp_3des.h
  167. +68 −0 src/include/testing/config/keil_1003_esp_3des_md5.h
  168. +68 −0 src/include/testing/config/keil_1004_esp_3des_sha1.h
  169. +70 −0 src/include/testing/config/keil_bypass.h
  170. +70 −0 src/include/testing/config/keil_netconfig.h
  171. +68 −0 src/include/testing/config/phy_2000_ah_md5.h
  172. +67 −0 src/include/testing/config/phy_2001_ah_sha1.h
  173. +68 −0 src/include/testing/config/phy_2002_esp_3des.h
  174. +68 −0 src/include/testing/config/phy_2003_esp_3des_md5.h
  175. +68 −0 src/include/testing/config/phy_2004_esp_3des_sha1.h
  176. +70 −0 src/include/testing/config/phy_bypass.h
  177. +70 −0 src/include/testing/config/phy_netconfig.h
  178. +110 −0 src/include/testing/functional/ipsec-lwip-integration/dumpdev-espdata.h
  179. BIN src/include/testing/functional/ipsec-lwip-integration/dumpdev-espdata.zip
  180. +498 −0 src/include/testing/functional/ipsec-lwip-integration/dumpdev-httpgetdata.h
  181. BIN src/include/testing/functional/ipsec-lwip-integration/dumpdev-httpgetdata.zip
  182. +145 −0 src/include/testing/functional/ipsec-lwip-integration/dumpdev-pingdata.h
  183. BIN src/include/testing/functional/ipsec-lwip-integration/dumpdev-pingdata.zip
  184. +94 −0 src/include/testing/structural/ah_test-sample_ah_packet.h
  185. BIN src/include/testing/structural/ah_test-sample_ah_packet.zip
  186. +82 −0 src/include/testing/structural/structural_test.h
  187. +423 −0 src/netif/dumpdev.c
  188. +486 −0 src/netif/ipsecdev.c
  189. 0 src/testing/functional/.gitkeep
  190. +205 −0 src/testing/structural/ah_test.c
  191. +243 −0 src/testing/structural/des_test.c
  192. +378 −0 src/testing/structural/esp_test.c
  193. +147 −0 src/testing/structural/main.c
  194. +246 −0 src/testing/structural/md5_test.c
  195. +934 −0 src/testing/structural/sa_test.c
  196. +293 −0 src/testing/structural/sha1_test.c
  197. +159 −0 src/testing/structural/util_test.c
View
11 CHANGES
@@ -0,0 +1,11 @@
*****************************************************************************
**
** Change log of the embedded IPsec Implementation
**
*****************************************************************************
* = public release versions
*Changes in 1.0 (12.12.2003) by CS&NS
- basic IPsec implementation for 16-bit embedded systems
- First public release
View
26 LICENSE
@@ -0,0 +1,26 @@
embedded IPsec
Copyright (c) 2003 Niklaus Schild and Christian Scheurer, HTI Biel/Bienne
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
View
@@ -1,2 +1,9 @@
# embeddedipsec
embedded IPsec - a lightweight IPsec implementation
embedded IPsec
==============
- [./src/](src/) - embedded IPsec library)
- [./doc/html/](https://cdn.rawgit.com/tinytux/embeddedipsec/master/doc/html/index.html) - source code documentation
Copyright (c) 2003-2004 Niklaus Schild and Christian Scheurer, HTI Biel/Bienne
All rights reserved.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,268 @@
<html>
<head>
<title>embedded IPsec - IPsec library</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="doxygen.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="98%" border="0" align="center">
<tr>
<td>
<h2 align="left"><img src="logo_small.gif" alt="embedded IPsec"> source
code documentation </h2>
<hr>
<!-- Generated by Doxygen 1.3.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>ah.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
RFC2402 - IP Authentication Header (AH).
<p>
<dl compact><dt><b>Author:</b></dt><dd>Christian Scheurer &lt;<a href="http://www.christianscheurer.ch">http://www.christianscheurer.ch</a>&gt;</dd></dl>
<b>OUTLINE:</b> The AH functions are used to authenticate IPsec traffic.<p>
<b>IMPLEMENTATION:</b> All functions work in-place (i.g. manipulate directly the original packet without copying any data). For the encapsulation routine, the caller must ensure that space for the new IP and AH header are available in front of the packet:<p>
<pre><div>
| pointer to packet header
____________________________\/_____________________________
| ¦ ¦ ¦ |
| Ethernet ¦ newIP ¦ AH, ICV ¦ original (inner) packet |
|__________¦_______¦_________¦______________________________|
¦ ¦
¦&lt;-- room for new headers --&gt;¦
</pre></div><p>
This document is part of <em>embedded IPsec<br>
Copyright (c) 2003 Niklaus Schild and Christian Scheurer, HTI Biel/Bienne<br>
All rights reserved.<br>
This file contains code from the OpenSSL Project<br>
portions Copyright (c) 1998-2003 OpenSSL (www.openssl.org) </em><hr>
<p>
Definition in file <a class="el" href="ah_8c-source.html">ah.c</a>.
<p>
<code>#include &lt;string.h&gt;</code><br>
<code>#include "<a class="el" href="ipsec_8h-source.html">ipsec/ipsec.h</a>"</code><br>
<code>#include "<a class="el" href="util_8h-source.html">ipsec/util.h</a>"</code><br>
<code>#include "<a class="el" href="debug_8h-source.html">ipsec/debug.h</a>"</code><br>
<code>#include "<a class="el" href="sa_8h-source.html">ipsec/sa.h</a>"</code><br>
<code>#include "<a class="el" href="md5_8h-source.html">ipsec/md5.h</a>"</code><br>
<code>#include "<a class="el" href="sha1_8h-source.html">ipsec/sha1.h</a>"</code><br>
<code>#include "<a class="el" href="ah_8h-source.html">ipsec/ah.h</a>"</code><br>
<p>
<a href="ah_8c-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ah_8c.html#a2">ipsec_ah_check</a> (<a class="el" href="structipsec__ip__hdr__struct.html">ipsec_ip_header</a> *outer_packet, int *payload_offset, int *payload_size, <a class="el" href="structsa__entry__struct.html">sad_entry</a> *sa)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ah_8c.html#a3">ipsec_ah_encapsulate</a> (<a class="el" href="structipsec__ip__hdr__struct.html">ipsec_ip_header</a> *inner_packet, int *payload_offset, int *payload_size, <a class="el" href="structsa__entry__struct.html">sad_entry</a> *sa, <a class="el" href="types_8h.html#a4">__u32</a> src, <a class="el" href="types_8h.html#a4">__u32</a> dst)</td></tr>
<tr><td colspan=2><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="types_8h.html#a4">__u32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ah_8c.html#a0">ipsec_ah_bitmap</a> = 0</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="types_8h.html#a4">__u32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ah_8c.html#a1">ipsec_ah_lastSeq</a> = 0</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="a2" doxytag="ah.c::ipsec_ah_check" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int ipsec_ah_check </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="structipsec__ip__hdr__struct.html">ipsec_ip_header</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>outer_packet</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int *&nbsp;</td>
<td class="mdname" nowrap> <em>payload_offset</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int *&nbsp;</td>
<td class="mdname" nowrap> <em>payload_size</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="structsa__entry__struct.html">sad_entry</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>sa</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Checks AH header and ICV (RFC 2402). Mutable fields of the outer IP header are set to zero prior to the ICV calculation.<p>
<dl compact><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>Extend function to support transport mode </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>outer_packet</em>&nbsp;</td><td>pointer used to access the (outer) IP packet which hast to be checked </td></tr>
<tr><td valign=top><em>payload_offset</em>&nbsp;</td><td>pointer used to return offset of inner (original) IP packet relative to the start of the outer header </td></tr>
<tr><td valign=top><em>payload_size</em>&nbsp;</td><td>pointer used to return total size of the inner (original) IP packet </td></tr>
<tr><td valign=top><em>sa</em>&nbsp;</td><td>pointer to security association holding the secret authentication key</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>IPSEC_STATUS_SUCCESS packet could be authenticated <p>
IPSEC_STATUS_FAILURE packet is corrupted or ICV does not match <p>
IPSEC_STATUS_NOT_IMPLEMENTED invalid mode (only IPSEC_TUNNEL mode is implemented) </dd></dl>
<p>
Definition at line <a class="el" href="ah_8c-source.html#l00100">100</a> of file <a class="el" href="ah_8c-source.html">ah.c</a>. </td>
</tr>
</table>
<a class="anchor" name="a3" doxytag="ah.c::ipsec_ah_encapsulate" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int ipsec_ah_encapsulate </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="structipsec__ip__hdr__struct.html">ipsec_ip_header</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>inner_packet</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int *&nbsp;</td>
<td class="mdname" nowrap> <em>payload_offset</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int *&nbsp;</td>
<td class="mdname" nowrap> <em>payload_size</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="structsa__entry__struct.html">sad_entry</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>sa</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="types_8h.html#a4">__u32</a>&nbsp;</td>
<td class="mdname" nowrap> <em>src</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="types_8h.html#a4">__u32</a>&nbsp;</td>
<td class="mdname" nowrap> <em>dst</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Adds AH and outer IP header, calculates ICV (RFC 2402).<p>
<dl compact><dt><b>Warning:</b></dt><dd>Attention: this function requires room (IPSEC_AH_HDR_SIZE + IPSEC_AUTH_ICV + IPSEC_MIN_IPHDR_SIZE) in front of the inner_packet pointer to add outer IP header and AH header. Depending on the TCP/IP stack implementation, additional space for the Link layer (Ethernet header) should be added).</dd></dl>
<p>
<dl compact><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>Extend function to support transport mode </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>inner_packet</em>&nbsp;</td><td>pointer used to access the (outer) IP packet which hast to be checked </td></tr>
<tr><td valign=top><em>payload_offset</em>&nbsp;</td><td>pointer used to return offset of inner (original) IP packet relative to the start of the outer header </td></tr>
<tr><td valign=top><em>payload_size</em>&nbsp;</td><td>pointer used to return total size of the inner (original) IP packet </td></tr>
<tr><td valign=top><em>src</em>&nbsp;</td><td>IP address of the local tunnel start point (external IP address) </td></tr>
<tr><td valign=top><em>dst</em>&nbsp;</td><td>IP address of the remote tunnel end point (external IP address) </td></tr>
<tr><td valign=top><em>sa</em>&nbsp;</td><td>pointer to security association holding the secret authentication key </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>IPSEC_STATUS_SUCCESS packet could be authenticated <p>
IPSEC_STATUS_FAILURE packet is corrupted or ICV does not match <p>
IPSEC_STATUS_NOT_IMPLEMENTED invalid mode (only IPSEC_TUNNEL mode is implemented)</dd></dl>
<dl compact><dt><b><a class="el" href="todo.html#_todo000003">Todo:</a></b></dt><dd>fix TTL update and checksum calculation <p>
id must be generated properly and incremented</dd></dl>
<p>
Definition at line <a class="el" href="ah_8c-source.html#l00214">214</a> of file <a class="el" href="ah_8c-source.html">ah.c</a>. </td>
</tr>
</table>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="a0" doxytag="ah.c::ipsec_ah_bitmap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="types_8h.html#a4">__u32</a> <a class="el" href="ah_8h.html#a2">ipsec_ah_bitmap</a> = 0
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
save session state to detect replays - must be 32 bits. Note: must be initialized with zero (0x00000000) when a new SA is established!
<p>
Definition at line <a class="el" href="ah_8c-source.html#l00076">76</a> of file <a class="el" href="ah_8c-source.html">ah.c</a>. </td>
</tr>
</table>
<a class="anchor" name="a1" doxytag="ah.c::ipsec_ah_lastSeq" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="types_8h.html#a4">__u32</a> <a class="el" href="ah_8h.html#a3">ipsec_ah_lastSeq</a> = 0
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
save session state to detect replays Note: must be initialized with zero (0x00000000) when a new SA is established!
<p>
Definition at line <a class="el" href="ah_8c-source.html#l00079">79</a> of file <a class="el" href="ah_8c-source.html">ah.c</a>. </td>
</tr>
</table>
</td>
</tr>
</table>
<hr>
<div align="center">Copyright 2003 by Christian Scheurer and Niklaus Schild</div>
</html>
Oops, something went wrong.

0 comments on commit 161e82d

Please sign in to comment.