summaryrefslogtreecommitdiff
path: root/cp
diff options
context:
space:
mode:
Diffstat (limited to 'cp')
-rw-r--r--cp/msg/src/cm/conn/msg_cm_conn_new_cnf.c82
-rw-r--r--cp/msg/src/cm/conn/msg_cm_conn_new_req.c70
-rw-r--r--cp/msg/src/cm/conn/msg_cm_conn_rel_ind.c74
3 files changed, 226 insertions, 0 deletions
diff --git a/cp/msg/src/cm/conn/msg_cm_conn_new_cnf.c b/cp/msg/src/cm/conn/msg_cm_conn_new_cnf.c
new file mode 100644
index 0000000000..d015dbb36b
--- /dev/null
+++ b/cp/msg/src/cm/conn/msg_cm_conn_new_cnf.c
@@ -0,0 +1,82 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_cm_conn_new_cnf.c
+ * \brief File Description
+ * \ingroup cp/conn
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+#include "cp/msg/inc/msg_field.h"
+
+void
+init_msg_cm_conn_new_cnf(msg_cm_conn_new_cnf_t* data)
+{
+ dbg_assert_ptr(data);
+
+ init_cid(&(data->cid));
+ data->llid_R = 0;
+ data->result = 0;
+ init_cspec( &(data->cspec_proposed));
+}
+
+
+void
+get_msg_cm_conn_new_cnf_from_mme_msg(msg_mme_t* msg, msg_cm_conn_new_cnf_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ dbg_assert_ptr(msg);
+
+ // get CID
+ len = get_cid_from_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // get LLID-R
+ data->llid_R = *local_stream;
+ local_stream ++;
+
+ // get Result
+ data->result = *local_stream;
+ local_stream ++;
+
+ // get CSPEC
+ get_cspec_from_stream(local_stream, &(data->cspec_proposed));
+
+}
+
+
+
+void
+set_msg_cm_conn_new_cnf_on_mme_msg(msg_mme_t* msg, msg_cm_conn_new_cnf_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ dbg_assert_ptr(msg);
+
+ // set CID
+ len = set_cid_on_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // set LLID-R
+ *local_stream = data->llid_R ;
+ local_stream ++;
+
+ // set Result
+ *local_stream = data->result;
+ local_stream ++;
+
+ // set CSPEC
+ set_cspec_on_stream(local_stream, &(data->cspec_proposed));
+
+}
diff --git a/cp/msg/src/cm/conn/msg_cm_conn_new_req.c b/cp/msg/src/cm/conn/msg_cm_conn_new_req.c
new file mode 100644
index 0000000000..a7c1989192
--- /dev/null
+++ b/cp/msg/src/cm/conn/msg_cm_conn_new_req.c
@@ -0,0 +1,70 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_cm_conn_new.c
+ * \brief File Description
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+
+void
+init_msg_cm_conn_new_req(msg_cm_conn_new_req_t* data)
+{
+ dbg_assert_ptr(data);
+
+ init_cid(&(data->cid));
+ init_classifier_rules( &(data->classifier_rule));
+ init_cspec( &(data->cspec));
+}
+
+
+void
+get_msg_cm_conn_new_req_from_mme_msg(msg_mme_t* msg, msg_cm_conn_new_req_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ dbg_assert_ptr(msg);
+
+ // get CID
+ len = get_cid_from_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // get CSPEC
+ len = get_cspec_from_stream(local_stream, &(data->cspec));
+ local_stream += len;
+
+ // get classifier rules
+ get_classifier_rules_from_stream(local_stream, &(data->classifier_rule));
+}
+
+
+void
+set_msg_cm_conn_new_req_on_mme_msg(msg_mme_t* msg, msg_cm_conn_new_req_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ dbg_assert_ptr(msg);
+
+ // set CID
+ len = set_cid_on_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // set CSPEC
+ len = set_cspec_on_stream(local_stream, &(data->cspec));
+ local_stream += len;
+
+ // set classifier rule
+ set_classifier_rules_on_stream( local_stream, &(data->classifier_rule));
+
+}
diff --git a/cp/msg/src/cm/conn/msg_cm_conn_rel_ind.c b/cp/msg/src/cm/conn/msg_cm_conn_rel_ind.c
new file mode 100644
index 0000000000..bb42ca55fb
--- /dev/null
+++ b/cp/msg/src/cm/conn/msg_cm_conn_rel_ind.c
@@ -0,0 +1,74 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_cm_conn_rel_ind.c
+ * \brief File Description
+ * \ingroup cp/conn
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+
+void
+init_msg_cm_conn_rel_ind(msg_cm_conn_rel_ind_t* data)
+{
+ dbg_assert_ptr(data);
+
+ init_cid(&(data->cid));
+ data->reason_code = 0;
+ init_cspec( &(data->violated_cspec));
+}
+
+
+void
+get_msg_cm_conn_rel_ind_from_mme_msg(msg_mme_t* msg, msg_cm_conn_rel_ind_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ dbg_assert_ptr(msg);
+
+ // get CID
+ len = get_cid_from_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // get Reason Code
+ data->reason_code = *local_stream;
+ local_stream ++;
+
+ // get violated CSPEC
+ get_cspec_from_stream(local_stream, &(data->violated_cspec));
+
+}
+
+
+
+void
+set_msg_cm_conn_rel_ind_on_mme_msg(msg_mme_t* msg, msg_cm_conn_rel_ind_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ dbg_assert_ptr(msg);
+
+ // set CID
+ len = set_cid_on_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // set Reason Code
+ *local_stream = data->reason_code;
+ local_stream ++;
+
+ // set violated CSPEC
+ set_cspec_on_stream(local_stream, &(data->violated_cspec));
+
+}
+
+