diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2015-08-21 11:59:29 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2015-08-21 11:59:29 +0000 |
commit | 86b9c46ebde8851690265b6a282106b07d4f788a (patch) | |
tree | c9579abca611f645dc913e355e5135df7bc78eb8 /sbin/iked/ikev2.h | |
parent | 152d4ca5419daed25c75de78a63b0227577e0669 (diff) |
Switch iked to C99-style fixed-width integer types.
OK mikeb@
Diffstat (limited to 'sbin/iked/ikev2.h')
-rw-r--r-- | sbin/iked/ikev2.h | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/sbin/iked/ikev2.h b/sbin/iked/ikev2.h index b79466501f1..be111fb4bb3 100644 --- a/sbin/iked/ikev2.h +++ b/sbin/iked/ikev2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.h,v 1.19 2015/06/11 18:49:09 reyk Exp $ */ +/* $OpenBSD: ikev2.h,v 1.20 2015/08/21 11:59:27 reyk Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -73,9 +73,9 @@ extern struct iked_constmap ikev2_flag_map[]; */ struct ikev2_payload { - u_int8_t pld_nextpayload; /* Next payload type */ - u_int8_t pld_reserved; /* Contains the critical bit */ - u_int16_t pld_length; /* Payload length with header */ + uint8_t pld_nextpayload; /* Next payload type */ + uint8_t pld_reserved; /* Contains the critical bit */ + uint16_t pld_length; /* Payload length with header */ } __packed; #define IKEV2_CRITICAL_PAYLOAD 0x01 /* First bit in the reserved field */ @@ -107,13 +107,13 @@ extern struct iked_constmap ikev2_payload_map[]; */ struct ikev2_sa_proposal { - u_int8_t sap_more; /* Last proposal or more */ - u_int8_t sap_reserved; /* Must be set to zero */ - u_int16_t sap_length; /* Proposal length */ - u_int8_t sap_proposalnr; /* Proposal number */ - u_int8_t sap_protoid; /* Protocol Id */ - u_int8_t sap_spisize; /* SPI size */ - u_int8_t sap_transforms; /* Number of transforms */ + uint8_t sap_more; /* Last proposal or more */ + uint8_t sap_reserved; /* Must be set to zero */ + uint16_t sap_length; /* Proposal length */ + uint8_t sap_proposalnr; /* Proposal number */ + uint8_t sap_protoid; /* Protocol Id */ + uint8_t sap_spisize; /* SPI size */ + uint8_t sap_transforms; /* Number of transforms */ /* Followed by variable-length SPI */ /* Followed by variable-length transforms */ } __packed; @@ -132,12 +132,12 @@ struct ikev2_sa_proposal { extern struct iked_constmap ikev2_saproto_map[]; struct ikev2_transform { - u_int8_t xfrm_more; /* Last transform or more */ - u_int8_t xfrm_reserved; /* Must be set to zero */ - u_int16_t xfrm_length; /* Transform length */ - u_int8_t xfrm_type; /* Transform type */ - u_int8_t xfrm_reserved1; /* Must be set to zero */ - u_int16_t xfrm_id; /* Transform Id */ + uint8_t xfrm_more; /* Last transform or more */ + uint8_t xfrm_reserved; /* Must be set to zero */ + uint16_t xfrm_length; /* Transform length */ + uint8_t xfrm_type; /* Transform type */ + uint8_t xfrm_reserved1; /* Must be set to zero */ + uint16_t xfrm_id; /* Transform Id */ /* Followed by variable-length transform attributes */ } __packed; @@ -252,8 +252,8 @@ extern struct iked_constmap ikev2_xformdh_map[]; extern struct iked_constmap ikev2_xformesn_map[]; struct ikev2_attribute { - u_int16_t attr_type; /* Attribute type */ - u_int16_t attr_length; /* Attribute length or value */ + uint16_t attr_type; /* Attribute type */ + uint16_t attr_length; /* Attribute length or value */ /* Followed by variable length (TLV) */ } __packed; @@ -269,8 +269,8 @@ extern struct iked_constmap ikev2_attrtype_map[]; */ struct ikev2_keyexchange { - u_int16_t kex_dhgroup; /* DH Group # */ - u_int16_t kex_reserved; /* Reserved */ + uint16_t kex_dhgroup; /* DH Group # */ + uint16_t kex_reserved; /* Reserved */ } __packed; /* @@ -278,9 +278,9 @@ struct ikev2_keyexchange { */ struct ikev2_notify { - u_int8_t n_protoid; /* Protocol Id */ - u_int8_t n_spisize; /* SPI size */ - u_int16_t n_type; /* Notify message type */ + uint8_t n_protoid; /* Protocol Id */ + uint8_t n_spisize; /* SPI size */ + uint16_t n_type; /* Notify message type */ /* Followed by variable length SPI */ /* Followed by variable length notification data */ } __packed; @@ -359,9 +359,9 @@ extern struct iked_constmap ikev2_n_map[]; */ struct ikev2_delete { - u_int8_t del_protoid; /* Protocol Id */ - u_int8_t del_spisize; /* SPI size */ - u_int16_t del_nspi; /* Number of SPIs */ + uint8_t del_protoid; /* Protocol Id */ + uint8_t del_spisize; /* SPI size */ + uint16_t del_nspi; /* Number of SPIs */ /* Followed by variable length SPIs */ } __packed; @@ -370,8 +370,8 @@ struct ikev2_delete { */ struct ikev2_id { - u_int8_t id_type; /* Id type */ - u_int8_t id_reserved[3]; /* Reserved */ + uint8_t id_type; /* Id type */ + uint8_t id_reserved[3]; /* Reserved */ /* Followed by the identification data */ } __packed; @@ -392,7 +392,7 @@ extern struct iked_constmap ikev2_id_map[]; */ struct ikev2_cert { - u_int8_t cert_type; /* Encoding */ + uint8_t cert_type; /* Encoding */ /* Followed by the certificate data */ } __packed; @@ -418,17 +418,17 @@ extern struct iked_constmap ikev2_cert_map[]; */ struct ikev2_tsp { - u_int8_t tsp_count; /* Number of TSs */ - u_int8_t tsp_reserved[3]; /* Reserved */ + uint8_t tsp_count; /* Number of TSs */ + uint8_t tsp_reserved[3]; /* Reserved */ /* Followed by the traffic selectors */ } __packed; struct ikev2_ts { - u_int8_t ts_type; /* TS type */ - u_int8_t ts_protoid; /* Protocol Id */ - u_int16_t ts_length; /* Length */ - u_int16_t ts_startport; /* Start port */ - u_int16_t ts_endport; /* End port */ + uint8_t ts_type; /* TS type */ + uint8_t ts_protoid; /* Protocol Id */ + uint16_t ts_length; /* Length */ + uint16_t ts_startport; /* Start port */ + uint16_t ts_endport; /* End port */ } __packed; #define IKEV2_TS_IPV4_ADDR_RANGE 7 /* RFC4306 */ @@ -442,8 +442,8 @@ extern struct iked_constmap ikev2_ts_map[]; */ struct ikev2_auth { - u_int8_t auth_method; /* Signature type */ - u_int8_t auth_reserved[3]; /* Reserved */ + uint8_t auth_method; /* Signature type */ + uint8_t auth_reserved[3]; /* Reserved */ /* Followed by the signature */ } __packed; @@ -474,8 +474,8 @@ extern struct iked_constmap ikev2_sighash_map[]; */ struct ikev2_cp { - u_int8_t cp_type; - u_int8_t cp_reserved[3]; + uint8_t cp_type; + uint8_t cp_reserved[3]; /* Followed by the attributes */ } __packed; @@ -487,8 +487,8 @@ struct ikev2_cp { extern struct iked_constmap ikev2_cp_map[]; struct ikev2_cfg { - u_int16_t cfg_type; /* first bit must be set to zero */ - u_int16_t cfg_length; + uint16_t cfg_type; /* first bit must be set to zero */ + uint16_t cfg_length; /* Followed by variable-length data */ } __packed; |