1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! IPsec Authentication Header (AH, RFC 4302) AST definitions.
//!
//! Defines the connectionless integrity, data origin authentication, and anti-replay protection
//! header specified in RFC 4302 (obsoleting RFC 2402) over IP protocol `51` (`0x33`). The variable-length
//! AH wire header consists of an 8-bit `Next Header` selector (`NEXT_HEADER`, default `59` No Next Header),
//! an 8-bit `Payload Len` in 32-bit words minus 2 (`4` for a 24-byte header), a 16-bit zeroed `Reserved`
//! field, a 32-bit Security Parameters Index (`SPI`, default `0x2000`), a 32-bit monotonically increasing
//! Sequence Number (`SEQ`, default `1`), and a variable-length Integrity Check Value (`ICV`, default 96-bit
//! HMAC digest) followed by the authenticated upper-layer payload.
//!
//! Canonical `.fasm` syntax:
//! `a -> b AH [SPI <u32>] [SEQ <u32>] [ICV "<hex>"] [NEXT_HEADER <u8>] [PAYLOAD "<str>" | HEXPAYLOAD "<hex>"]`
use Vec;
use PhantomData;
/// IPsec Authentication Header (RFC 4302) specification over IP protocol `51`.
///
/// Syntax mapping: `AH [SPI <u32>] [SEQ <u32>] [ICV "<hex>"] [NEXT_HEADER <u8>]`