]> The Tcpdump Group git mirrors - tcpdump/blobdiff - ah.h
Makefile.in: don't remove configure and config.h.in in make distclean.
[tcpdump] / ah.h
diff --git a/ah.h b/ah.h
index 90c5601008a2cb383e3e5e43f4c29e776af2ec57..c60c56353f150713e81550623678ef939f5be91f 100644 (file)
--- a/ah.h
+++ b/ah.h
  */
 
 /*
- * RFC1826/2402 authentication header.
+ * RFC4302 authentication header.
  */
 
-#ifndef _NETINET6_AH_H_
-#define _NETINET6_AH_H_
+#ifndef ND_AH_H_
+#define ND_AH_H_
 
-struct ah {
-       nd_uint8_t      ah_nxt;         /* Next Header */
-       nd_uint8_t      ah_len;         /* Length of data, in 32bit */
-       nd_uint16_t     ah_reserve;     /* Reserved for future use */
-       nd_uint32_t     ah_spi;         /* Security parameter index */
-       /* variable size, 32bit bound*/ /* Authentication data */
-};
+/*
+ *     0                   1                   2                   3
+ *     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
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   | Next Header   |  Payload Len  |          RESERVED             |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   |                 Security Parameters Index (SPI)               |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   |                    Sequence Number Field                      |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   |                                                               |
+ *   +                Integrity Check Value-ICV (variable)           |
+ *   |                                                               |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ *                          Figure 1.  AH Format
+ */
 
-struct newah {
+struct ah {
        nd_uint8_t      ah_nxt;         /* Next Header */
-       nd_uint8_t      ah_len;         /* Length of data + 1, in 32bit */
-       nd_uint16_t     ah_reserve    /* Reserved for future use */
-       nd_uint32_t     ah_spi;         /* Security parameter index */
-       nd_uint32_t     ah_seq;         /* Sequence number field */
-       /* variable size, 32bit bound*/ /* Authentication data */
+       nd_uint8_t      ah_len;         /* Payload Len in 32bit words minus 2 */
+       nd_uint16_t     ah_reserved;    /* Reserved for future use */
+       nd_uint32_t     ah_spi;         /* Security Parameters Index */
+       nd_uint32_t     ah_seq;         /* Sequence Number Field */
+       /* variable size, 32bit bound*/ /* Integrity Check Value-ICV */
 };
 
-#endif /*_NETINET6_AH_H_*/
+#endif /* ND_AH_H_ */