summaryrefslogtreecommitdiffstats
path: root/src/packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/packet.h')
-rw-r--r--src/packet.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/packet.h b/src/packet.h
index 0960cce..b99f7de 100644
--- a/src/packet.h
+++ b/src/packet.h
@@ -28,7 +28,6 @@
#ifndef _FASTD_PACKET_H_
#define _FASTD_PACKET_H_
-#include <asm/byteorder.h>
#include <stdint.h>
@@ -39,7 +38,8 @@ typedef enum _fastd_packet_type {
} fastd_packet_type;
typedef enum _fastd_handshake_record_type {
- RECORD_REPLY_CODE = 0,
+ RECORD_HANDSHAKE_TYPE = 0,
+ RECORD_REPLY_CODE,
RECORD_ERROR_DETAIL,
RECORD_FLAGS,
RECORD_MODE,
@@ -47,6 +47,13 @@ typedef enum _fastd_handshake_record_type {
RECORD_MAX,
} fastd_handshake_record_type;
+typedef enum _fastd_handshake_type {
+ HANDSHAKE_REQUEST = 0,
+ HANDSHAKE_REPLY,
+ HANDSHAKE_REHANDSHAKE_REQUEST,
+ HANDSHAKE_MAX,
+} fastd_handshake_type;
+
typedef enum _fastd_reply_code {
REPLY_SUCCESS = 0,
REPLY_MANDATORY_MISSING,
@@ -56,18 +63,7 @@ typedef enum _fastd_reply_code {
typedef struct __attribute__ ((__packed__)) _fastd_packet {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- unsigned req_id : 6;
- unsigned cp : 1;
- unsigned reply : 1;
-#elif defined (__BIG_ENDIAN_BITFIELD)
- unsigned reply : 1;
- unsigned cp : 1;
- unsigned req_id : 6;
-#else
-#error "Bitfield endianess not defined."
-#endif
-
+ uint8_t req_id;
uint16_t rsv;
uint8_t tlv_data[];
} fastd_packet;