summaryrefslogtreecommitdiff
path: root/cesar/cp/msg/inc/msg_cm.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/cp/msg/inc/msg_cm.h')
-rw-r--r--cesar/cp/msg/inc/msg_cm.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/cesar/cp/msg/inc/msg_cm.h b/cesar/cp/msg/inc/msg_cm.h
new file mode 100644
index 0000000000..9307d91ee5
--- /dev/null
+++ b/cesar/cp/msg/inc/msg_cm.h
@@ -0,0 +1,88 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/msg/inc/msg_cm.h
+ * \brief MME messages of CM type
+ * \ingroup cp_msg
+ */
+#ifndef MSG_CM_H_
+#define MSG_CM_H_
+
+#include "cp/cp_types.h"
+#include "cp/interf/inc/interf_types.h"
+#include "cp/msg/msg.h"
+#include "cp/secu/secu.h"
+
+//#include "cp/msg/inc/msg_cm_conn.h"
+#include "cp/msg/inc/msg_cm_convert.h"
+
+
+typedef struct cm_unassociated_sta_t // 11.5.1
+{
+ // TODO : set the real types
+ nid_t nid;
+ u8 cco_capability;
+} __attribute__ ((packed)) cm_unassociated_sta_t;
+
+typedef struct cm_encrypted_payload_t // 11.5.2
+{
+ peks_t peks;
+ u8 avln_status;
+ u8 pid;
+ u16 prn;
+ u8 pmn;
+ u8 iv[16];
+ u16 len;
+ u8 rf[15];
+} __attribute__ ((packed)) cm_encrypted_payload_t;
+
+typedef struct cm_encrypted_payload_sub_t // 11.5.2
+{
+ u32 crc;
+ u8 pid;
+ u16 prn;
+ u8 pmn;
+ u8 padding[15];
+ u8 rf_len;
+} __attribute__ ((packed)) cm_encrypted_payload_sub_t;
+
+typedef struct cm_set_key_req_t
+{
+ u8 key_type;
+ u32 my_nonce;
+ u32 your_nonce;
+ u8 pid;
+ u16 prn;
+ u8 pmn;
+ u8 cco_capa;
+ //nid_t nid;
+ u8 nid[7];
+ u8 new_eks;
+ u8 new_key[16];
+} __attribute__ ((packed)) cm_set_key_req_t;
+
+void
+msg_cm_init(void);
+
+//void msg_cm_unassociated_sta_ind_send(interf_id_t interf_id, mac_adresse_t oda);
+void
+msg_cm_unassociated_sta_ind_send(const mac_address_t oda);
+
+void
+msg_cm_encrypted_payload_ind_send(
+ const msg_mme_t *encapsulated_msg,
+ const msg_param_t encapsulated_msg_param,
+ const tei_t tei,
+ const bool last_msg_of_p_run,
+ const cp_pid_t pid,
+ const u16 msg_size
+ );
+
+
+
+#endif /*MSG_CM_H_*/