|
31 | 31 | */
|
32 | 32 |
|
33 | 33 | /*
|
34 |
| - * RFC1826/2402 authentication header. |
| 34 | + * RFC4302 authentication header. |
35 | 35 | */
|
36 | 36 |
|
37 | 37 | #ifndef ND_AH_H_
|
38 | 38 | #define ND_AH_H_
|
39 | 39 |
|
40 |
| -struct ah { |
41 |
| - nd_uint8_t ah_nxt; /* Next Header */ |
42 |
| - nd_uint8_t ah_len; /* Length of data, in 32bit */ |
43 |
| - nd_uint16_t ah_reserve; /* Reserved for future use */ |
44 |
| - nd_uint32_t ah_spi; /* Security parameter index */ |
45 |
| - /* variable size, 32bit bound*/ /* Authentication data */ |
46 |
| -}; |
| 40 | +/* |
| 41 | + * 0 1 2 3 |
| 42 | + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 |
| 43 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 44 | + * | Next Header | Payload Len | RESERVED | |
| 45 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 46 | + * | Security Parameters Index (SPI) | |
| 47 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 48 | + * | Sequence Number Field | |
| 49 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 50 | + * | | |
| 51 | + * + Integrity Check Value-ICV (variable) | |
| 52 | + * | | |
| 53 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 54 | + * |
| 55 | + * Figure 1. AH Format |
| 56 | + */ |
47 | 57 |
|
48 |
| -struct newah { |
| 58 | +struct ah { |
49 | 59 | nd_uint8_t ah_nxt; /* Next Header */
|
50 |
| - nd_uint8_t ah_len; /* Length of data + 1, in 32bit */ |
51 |
| - nd_uint16_t ah_reserve; /* Reserved for future use */ |
52 |
| - nd_uint32_t ah_spi; /* Security parameter index */ |
53 |
| - nd_uint32_t ah_seq; /* Sequence number field */ |
54 |
| - /* variable size, 32bit bound*/ /* Authentication data */ |
| 60 | + nd_uint8_t ah_len; /* Payload Len in 32bit words minus 2 */ |
| 61 | + nd_uint16_t ah_reserved; /* Reserved for future use */ |
| 62 | + nd_uint32_t ah_spi; /* Security Parameters Index */ |
| 63 | + nd_uint32_t ah_seq; /* Sequence Number Field */ |
| 64 | + /* variable size, 32bit bound*/ /* Integrity Check Value-ICV */ |
55 | 65 | };
|
56 | 66 |
|
57 | 67 | #endif /* ND_AH_H_ */
|
0 commit comments