summaryrefslogtreecommitdiff
path: root/cesar/cp/av/cco
diff options
context:
space:
mode:
authorThierry Carré2012-04-05 13:59:25 +0200
committerThierry Carré2012-05-10 17:02:57 +0200
commit87f9cac07558b7ba4515dcf7bf93f9778d24bf1c (patch)
treea2a5f9a58772b34894e6306091eab4820a888270 /cesar/cp/av/cco
parentb9816688dcf600e2ac65357691dd2e58ee47435d (diff)
cesar: AV code move to cp/av directory, refs #2928
Diffstat (limited to 'cesar/cp/av/cco')
-rw-r--r--cesar/cp/av/cco/action/Module3
-rw-r--r--cesar/cp/av/cco/action/cco_action.h361
-rw-r--r--cesar/cp/av/cco/action/cco_conn/Module1
-rw-r--r--cesar/cp/av/cco/action/cco_conn/cco_action.h515
-rwxr-xr-xcesar/cp/av/cco/action/cco_conn/doc/CCo Con.odtbin0 -> 304722 bytes
-rw-r--r--cesar/cp/av/cco/action/cco_conn/doc/cco_conn.xmi1755
-rw-r--r--cesar/cp/av/cco/action/cco_conn/inc/cco_action.h33
-rw-r--r--cesar/cp/av/cco/action/cco_conn/src/action.c330
-rw-r--r--cesar/cp/av/cco/action/cco_conn/test/Makefile13
-rw-r--r--cesar/cp/av/cco/action/cco_conn/test/ecos.ecc.sh5
-rw-r--r--cesar/cp/av/cco/action/cco_conn/test/src/cco_action_conn_test.c144
-rw-r--r--cesar/cp/av/cco/action/cco_conn/test/src/msg_stub.c463
-rw-r--r--cesar/cp/av/cco/action/doc/Makefile24
-rw-r--r--cesar/cp/av/cco/action/doc/assoc_procedure.sdl15
-rw-r--r--cesar/cp/av/cco/action/doc/auth_procedure.sdl4
-rw-r--r--cesar/cp/av/cco/action/doc/cco_action.odtbin0 -> 787089 bytes
-rw-r--r--cesar/cp/av/cco/action/doc/cco_action.xmi347
-rw-r--r--cesar/cp/av/cco/action/doc/cco_selection.sdl9
-rw-r--r--cesar/cp/av/cco/action/doc/fsm_handover.sdl7
-rw-r--r--cesar/cp/av/cco/action/doc/fsm_handover_cco.sdl29
-rw-r--r--cesar/cp/av/cco/action/doc/fsm_handover_cco_appoint.sdl23
-rw-r--r--cesar/cp/av/cco/action/doc/fsm_handover_cco_leave.sdl7
-rw-r--r--cesar/cp/av/cco/action/doc/fsm_handover_selection.sdl10
-rw-r--r--cesar/cp/av/cco/action/doc/fsm_handover_sta.sdl20
-rw-r--r--cesar/cp/av/cco/action/doc/fsm_handover_sta_appoint.sdl5
-rw-r--r--cesar/cp/av/cco/action/doc/handover_cco.sdl34
-rw-r--r--cesar/cp/av/cco/action/doc/handover_sta.sdl21
-rw-r--r--cesar/cp/av/cco/action/doc/leave.sdl5
-rw-r--r--cesar/cp/av/cco/action/doc/nek_change.sdl14
-rw-r--r--cesar/cp/av/cco/action/doc/snid.sdl3
-rw-r--r--cesar/cp/av/cco/action/doc/tei.sdl14
-rw-r--r--cesar/cp/av/cco/action/handover.h100
-rw-r--r--cesar/cp/av/cco/action/inc/cco_action.h77
-rw-r--r--cesar/cp/av/cco/action/src/cco_action.c1509
-rw-r--r--cesar/cp/av/cco/action/src/handover.c367
-rw-r--r--cesar/cp/av/cco/action/stub/Module3
-rw-r--r--cesar/cp/av/cco/action/stub/src/cco_action.c283
-rw-r--r--cesar/cp/av/cco/action/test/utest/Config2
-rw-r--r--cesar/cp/av/cco/action/test/utest/Makefile20
-rw-r--r--cesar/cp/av/cco/action/test/utest/inc/scenario_defs.h309
-rw-r--r--cesar/cp/av/cco/action/test/utest/inc/test_cco_action.h56
-rw-r--r--cesar/cp/av/cco/action/test/utest/override/cp/inc/context.h84
-rw-r--r--cesar/cp/av/cco/action/test/utest/override/cp/sta/core/defs.h57
-rw-r--r--cesar/cp/av/cco/action/test/utest/override/mac/sar/inc/sar_context.h23
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/assoc.c518
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/beacon_stub.c44
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/bsu_stub.c23
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/cp_stub.c28
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/dataplane_stub.c50
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/discover_list.c56
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/fsm_stub.c60
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/garbage.c183
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/handover.c456
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/msg_stub.c311
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/nek.c374
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/scenario_actions.c121
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/secu.c55
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/sta_action.c26
-rw-r--r--cesar/cp/av/cco/action/test/utest/src/test_cco_action.c103
-rw-r--r--cesar/cp/av/cco/action/test/utest2/Config1
-rw-r--r--cesar/cp/av/cco/action/test/utest2/Makefile52
-rw-r--r--cesar/cp/av/cco/action/test/utest2/doc/Makefile20
-rw-r--r--cesar/cp/av/cco/action/test/utest2/doc/cco_action.txt172
-rw-r--r--cesar/cp/av/cco/action/test/utest2/ecos.ecc.sh5
-rw-r--r--cesar/cp/av/cco/action/test/utest2/override/cp/inc/context.h82
-rw-r--r--cesar/cp/av/cco/action/test/utest2/override/cp/sta/core/defs.h57
-rw-r--r--cesar/cp/av/cco/action/test/utest2/override/mac/sar/inc/context.h23
-rw-r--r--cesar/cp/av/cco/action/test/utest2/src/action-test.c1385
-rw-r--r--cesar/cp/av/cco/action/test/utest2/src/action_gen_nek.c91
-rw-r--r--cesar/cp/av/cco/action/test/utest2/src/core_stub.c43
-rw-r--r--cesar/cp/av/cco/action/test/utest2/src/fsm_handover.c280
-rw-r--r--cesar/cp/av/cco/action/test/utest2/src/garbage.c462
-rw-r--r--cesar/cp/av/cco/action/test/utest2/src/pbproc_stub.c22
-rw-r--r--cesar/cp/av/cco/action/test/utest2/src/sar_stub.c45
-rw-r--r--cesar/cp/av/cco/action/test/utest2/src/secu_stub.c46
-rw-r--r--cesar/cp/av/cco/action/test/utest2/src/sta_action.c26
-rw-r--r--cesar/cp/av/cco/action/test/utest2/src/status.c316
-rw-r--r--cesar/cp/av/cco/bw/Module4
-rw-r--r--cesar/cp/av/cco/bw/stub/Module4
-rw-r--r--cesar/cp/av/cco/region/Module4
-rw-r--r--cesar/cp/av/cco/region/stub/Module4
81 files changed, 12652 insertions, 4 deletions
diff --git a/cesar/cp/av/cco/action/Module b/cesar/cp/av/cco/action/Module
new file mode 100644
index 0000000000..72ff1ad41f
--- /dev/null
+++ b/cesar/cp/av/cco/action/Module
@@ -0,0 +1,3 @@
+SOURCES := cco_action.c handover.c
+
+MODULES := cp/cco/action
diff --git a/cesar/cp/av/cco/action/cco_action.h b/cesar/cp/av/cco/action/cco_action.h
new file mode 100644
index 0000000000..db26a47e02
--- /dev/null
+++ b/cesar/cp/av/cco/action/cco_action.h
@@ -0,0 +1,361 @@
+#ifndef cp_av_cco_action_h
+#define cp_av_cco_action_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/cco/cco_action.h
+ * \brief CCo Public functions.
+ * \ingroup cp_cco
+ *
+ */
+
+#include "cp/cco/action/cco_action.h"
+#include "cp/cp.h"
+#include "cp/mme.h"
+#include "cp/av/beacon/beacon.h"
+#include "cp/sta/mgr/sta.h"
+
+
+BEGIN_DECLS
+
+/**
+ * Start UCCo role.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_ucco_start (cp_t *ctx);
+
+/**
+ * Stop UCCo role.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_ucco_stop (cp_t *ctx);
+
+/**
+ * Move from UCCO to CCO.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_ucco__to_cco (cp_t *ctx);
+
+/**
+ * Move from CCO to UCCO.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_cco__to_ucco (cp_t *ctx);
+
+/**
+ * Move from USTA to CCO.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_cco__unassoc_start (cp_t *ctx);
+
+/**
+ * Move from CCO to USTA.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_cco__unassoc_stop (cp_t *ctx);
+
+/**
+ * Move from STA to CCO.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_cco__assoc_start (cp_t *ctx);
+
+/**
+ * Move from CCO to STA.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_cco__assoc_stop (cp_t *ctx);
+
+/**
+ * Change the SNID using the beacon module.
+ * \param ctx the module context.
+ *
+ * It shall request the SNIDs in use from the station manager to choose
+ * one randomly in the available SNIDs
+ */
+void
+cp_av_cco_action_cco__cco_snid_conflict (cp_t *ctx);
+
+/**
+ * generate a new NEK value.
+ * \param ctx the module context.
+ *
+ * NEK shall be used no more than 1 hour, so must be changed after 1
+ * hour for that purpose, NEK expiration date is checked at every occurrence
+ * of the global garbage collector timer and if current NEK expiration
+ * date reached, a new NEK value shall be generated by calling this function
+ */
+void
+cp_av_cco_action_cco__cco_nek_change (cp_t *ctx);
+
+/**
+ * Send the TEI map with the data corresponding to the station leaving.
+ * \param ctx the CP context.
+ * \param sta the station which leaves the AVLN.
+ *
+ * It will not add a reference on the station and will not release it.
+ */
+void
+cp_av_cco_action_cco_sta_leave_send_tei_map (cp_t *ctx, cp_sta_t *sta);
+
+/**
+ * manage association of a station.
+ * \param ctx the module context.
+ * \param assoc_req CM_ASSOC.REQ MME msg having being received
+ */
+void
+cp_av_cco_action_cco__cc_assoc_req (cp_t *ctx, cp_mme_rx_t * assoc_req);
+
+/**
+ * manage association of a station.
+ * \param ctx the module context.
+ * \param assoc_req CM_ASSOC.REQ MME msg having being received
+ */
+void
+cp_av_cco_action_ucco__cc_assoc_req (cp_t *ctx, cp_mme_rx_t * assoc_req);
+
+/**
+ * manage authentication of a station.
+ * \param ctx the module context.
+ * \param get_key_req CM_GET_KEY.REQ MME msg having being decrypted
+ */
+void
+cp_av_cco_action_cco__cm_get_key_req_pid0 (cp_t *ctx, cp_mme_rx_t * get_key_req);
+
+/**
+ * manage key request from authenticated station.
+ * \param ctx the module context.
+ * \param get_key_req CM_GET_KEY.REQ MME msg having being decrypted
+ */
+void
+cp_av_cco_action_cco__cm_get_key_req_pid1 (cp_t *ctx, cp_mme_rx_t * get_key_req);
+
+/**
+ * Release a station.
+ * \param ctx the CP context.
+ * \param mme the MME received.
+ */
+void
+cp_av_cco_action_cco__cc_leave_req (cp_t *ctx, cp_mme_rx_t *mme);
+
+/**
+ * Stop acting as a CCo and become a unassociated station.
+ * \param ctx the module context.
+ *
+ * This function shall:
+ * - Change the station status.
+ * - Reprogram the beacon timer to expire a few time after the beacon period
+ * start date.
+ * - Stop the NEK generation.
+ * - Delete the AVLN.
+ * - Change the station authenticated status to not authenticated.
+ */
+void
+cp_av_cco_action_cco__unassoc_stop (cp_t *ctx);
+
+/**
+ * The Handover can not be done cause of a countdown in the central beacon.
+ * \param ctx the module context.
+ *
+ * This function will be called on each beacon timer expiration to send a
+ * central beacon and try to handover the CCo functionality to stop.
+ */
+void
+cp_av_cco_action_drv_mac_stop_suspend (cp_t *ctx);
+
+/**
+ * Stop the CCo activity.
+ * \param ctx the module context.
+ *
+ * Post event to_leave.
+ */
+void
+cp_av_cco_action_drv_mac_stop_ended (cp_t *ctx);
+
+/**
+ * Stop the UCCo activity.
+ * \param ctx the module context.
+ *
+ * Post event left.
+ */
+void
+cp_av_cco_action_ucco__to_stop (cp_t *ctx);
+
+/**
+ * Set the TEI in use.
+ * \param ctx the module context.
+ * \param tei the TEI already in use.
+ *
+ * Use this function for the handover to disallow the new CCo to use a TEI
+ * already in use.
+ */
+void
+cp_av_cco_action_tei_in_use (cp_t *ctx, cp_tei_t tei);
+
+/**
+ * Clear the TEI compute mechanism.
+ * \param ctx the module context.
+ *
+ * Use this function on the CCO stop.
+ */
+void
+cp_av_cco_action_tei_clear (cp_t *ctx);
+
+/**
+ * CCo STOP on the DRV_MAC_STOP MME.
+ * \param ctx the module context.
+ *
+ * This function shall produce a handover on the network to allow another
+ * station to become the network CCo. So it shall inform the beacon module to
+ * set the hoip flag in the central beacon and provide a handover in progress
+ * bentry in the central beacon.
+ *
+ * \warn This function will not stop the CCo. This shall be done once the
+ * handover has been done on the network.
+ */
+void
+cp_av_cco_action_drv_mac_stop (cp_t *ctx);
+
+/**
+ * CCo selection for the drv mac stop request.
+ * \param ctx the module context.
+ * \param sta the station to add.
+ */
+void
+cp_av_cco_action_cco_selection__mac_stop_sta_add (cp_t *ctx, cp_sta_t *sta);
+
+/**
+ * Clear the selection context.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_cco_selection__clear (cp_t *ctx);
+
+/**
+ * Add a station to the CCo selection procedure.
+ * \param ctx the module context.
+ * \param net the station's NET.
+ * \param sta the station to add.
+ *
+ * This function shall add the station only if it can be a better CCo and if
+ * out station is not CCo User appointed.
+ */
+void
+cp_av_cco_action_cco_selection__sta_add (cp_t *ctx, cp_net_t *net, cp_sta_t *sta);
+
+/**
+ * Handle SC_CCO => CC_ASSOC_REQ.
+ * \param ctx control plane context.
+ * \param mme the handled MME.
+ *
+ * If it's the STA with which we are doing the SC assoc, reply with ok,
+ * otherwise, reply with temporary failure.
+ */
+void
+cp_av_cco_action_sc__sc_cco__cc_assoc_req (cp_t *ctx, cp_mme_rx_t *mme);
+
+/**
+ * The handover is ended.
+ * \param ctx control plane context.
+ *
+ * Allow the ASSOC FSM to go to the authenticated state
+ */
+void
+cp_av_cco_action_handover__ended (cp_t *ctx);
+
+/**
+ * Start providing the NEK to the authenticated stations.
+ * \param ctx control plane context.
+ *
+ * CCO_NEK_CHANGE_IDLE -> CCO_NEK_CHANGE_WAIT_STA_CNF.
+ * This function should start a timer to check the timeout.
+ */
+void
+cp_av_cco_action_cco__cco_nek_change__nek_provide (cp_t *ctx);
+
+/**
+ * Timeout NEK exchange with a station.
+ * \param ctx control plane context.
+ *
+ * This should try to provide the nek to another station if the peered station
+ * was not the last of the AVLN, in the other case it should stop the FSM
+ * going to the IDLE state.
+ */
+void
+cp_av_cco_action_cco__cco_nek_change__nek_timeout__wait (cp_t *ctx);
+
+/**
+ * Timeout NEK exchange with a station.
+ * \param ctx control plane context.
+ *
+ * This should try to provide the nek to another station if the peered station
+ * was not the last of the AVLN, in the other case it should stop the FSM
+ * going to the IDLE state.
+ */
+void
+cp_av_cco_action_cco__cco_nek_change__timeout (cp_t *ctx);
+
+/**
+ * Received the CM_SET_KEY.CNF from the station.
+ * \param ctx control plane context.
+ * \param mme the handled MME.
+ *
+ * CCO_NEK_CHANGE_WAIT_STA_CNF -> CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF
+ * Check the security parameters and the prn.
+ */
+void
+cp_av_cco_action_cm_set_key_cnf_receive (cp_t *ctx, cp_mme_rx_t *mme);
+
+/**
+ * Call the beacon module to start inserting the EKS bentry in the central
+ * beacon.
+ * \param ctx control plane context.
+ */
+void
+cp_av_cco_action_nek_change_prevent (cp_t *ctx);
+
+/**
+ * Request a CC_DISCOVER_LIST.REQ to a station.
+ * \param ctx the module context.
+ * \param net the concerned network.
+ * \param sta the station to request the list.
+ */
+void
+cp_av_cco_action_cco__cc_discover_list_req (cp_t *ctx, cp_net_t *net,
+ cp_sta_t *sta);
+
+/**
+ * CCo receives a beacon from the same NID.
+ * \param ctx the module context.
+ * \param beacon the beacon.
+ * \param net the beacon's network.
+ * \param sta the source emitter.
+ */
+void
+cp_av_cco_action_beacon_with_same_nid (cp_t *ctx, bsu_beacon_t *beacon,
+ cp_net_t *net, cp_sta_t *sta);
+
+/**
+ * manage association of a station.
+ * \param ctx the module context.
+ * \param assoc_req CM_ASSOC.REQ MME msg having being received
+ */
+void
+cp_av_cco_action_sc_ucco__cc_assoc_req (cp_t *ctx, cp_mme_rx_t * assoc_req);
+
+END_DECLS
+
+#endif /* cp_av_cco_action_h */
diff --git a/cesar/cp/av/cco/action/cco_conn/Module b/cesar/cp/av/cco/action/cco_conn/Module
new file mode 100644
index 0000000000..01a15a16d5
--- /dev/null
+++ b/cesar/cp/av/cco/action/cco_conn/Module
@@ -0,0 +1 @@
+SOURCES := action.c
diff --git a/cesar/cp/av/cco/action/cco_conn/cco_action.h b/cesar/cp/av/cco/action/cco_conn/cco_action.h
new file mode 100644
index 0000000000..08a4ccf76b
--- /dev/null
+++ b/cesar/cp/av/cco/action/cco_conn/cco_action.h
@@ -0,0 +1,515 @@
+#ifndef cp_cco_action_h
+#define cp_cco_action_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp_cco_action.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "cp/mme.h"
+#include "lib/list.h"
+#include "cp/conn/conn.h"
+
+/**
+ * - Functions reacting to incoming MME related to global connection.
+ * - Treatment of those MME - Storage and validation of the global connections
+ * - Control of the Bandwidth Manager's actions - React to the connections'
+ * states to send IND or CNF MME
+ */
+struct cp_cco_action_conn_t
+{
+ cp_conn_cspec_t *proposed_cspec;
+};
+typedef struct cp_cco_action_conn_t cp_cco_action_conn_t;
+
+/**
+ * Checks the states of the connections. If then need to be warned of changes
+ * on their allocation this function will do so.
+ * \param ctx Control Plane Context
+ *
+ * Checks the states of the connections allocation status.
+ */
+void
+cp_cco_action_mme_glink_send (cp_t *ctx);
+
+/**
+ * Process a CC_LINK_NEW.
+ * \param ctx Control Plane Context
+ * \param mme Incoming mme
+ *
+ * Check the validity of the connection. Add the connection into
+ * the list of connections and the pending allocation list Call the bandwidth
+ * manager to redo the schedule Call cp_cco_action_mme_conn_cnf()
+ */
+void
+cp_cco_action_process_cc_link_new_req (cp_t* ctx, cp_mme_rx_t* mme);
+
+/*Managed by sta action :*/
+void
+cp_cco_action_process_cc_link_new_cnf (cp_t* ctx, cp_mme_rx_t* mme);
+
+/**
+ * Process a CC_LINK_REL.
+ * \param ctx Control Plane Context
+ * \param mme Incoming mme
+ *
+ * Release the connection from the connections list and the pending
+ * allocation list Send the MME that will release the connection Call
+ * the bandwidth manager to redo the schedule
+ */
+void
+cp_cco_action_process_cc_link_rel_req (cp_t* ctx, cp_mme_rx_t* mme);
+
+/*Managed by sta action :*/
+void
+cp_cco_action_process_cc_link_rel_ind (cp_t* ctx, cp_mme_rx_t* mme);
+
+/**
+ * Process a CC_LINK_MOD.
+ * \param ctx Control Plane Context
+ * \param mme Incoming mme
+ *
+ * Check the validity of the modifications Modify the connection's
+ * data Call the schedule function Check if the connection is still in
+ * the schedule Send the MME CNF with the result
+ */
+void
+cp_cco_action_process_cc_link_mod_req (cp_t* ctx, cp_mme_rx_t* mme);
+
+/*Managed by sta action :*/
+void
+cp_cco_action_process_cc_link_mod_cnf (cp_t* ctx, cp_mme_rx_t* mme);
+
+/**
+ * Process a CC_ALLOC_MOVE.
+ * \param ctx Control Plane Context
+ * \param mme Incoming mme
+ *
+ * Check the validity of the connection. Memorise the position of
+ * the allocation Call the function that can allocate a unique connection.
+ * If it has allocated it somewhere else we delete the old allocation
+ * if not we keep the old allocation Send the MME CNF with the result
+ * Add the connection into the list of connections and the pending allocation
+ * list Call the bandwidth manager to redo the schedule Call cp_cco_action_mme_conn_cnf()
+ */
+void
+cp_cco_action_process_cc_alloc_move_req (cp_t* ctx, cp_mme_rx_t* mme);
+
+/*Managed by sta action :*/
+void
+cp_cco_action_process_cc_alloc_move_cnf (cp_t* ctx, cp_mme_rx_t* mme);
+
+/**
+ * Process of a CC_BLE_UPDATE.
+ * \param ctx Control Plane Context.
+ * \param mme Incoming MME
+ *
+ * IND. Actualisation of the BLE of a specific GLID. Call the Bandwidth
+ * Manager to redo the schedule
+ */
+void
+cp_cco_action_process_cc_ble_update_ind (cp_t* ctx, cp_mme_rx_t* mme);
+
+/**
+ * Init function of the CCo.
+ * \param ctx Control Plane Context.
+ *
+ */
+void
+cp_cco_action_init (cp_t* ctx);
+
+/**
+ * Uninit the cco action module (call the uninit function of lower ctx).
+ * \param ctx Control Plane Context.
+ *
+ */
+void
+cp_cco_action_uninit (cp_t *ctx);
+
+/*****************************/
+/* STUBBED FUNCTIONS */
+/*****************************/
+
+/*****************************/
+/**** LINK NEW ****/
+/*****************************/
+
+struct cp_msg_cc_link_new_req_t
+{
+ /** Mac address of the initiating STA */
+ mac_t osa;
+
+ /** Mac address of the terminating STA */
+ mac_t oda;
+
+ /** Connection identifier */
+ u16 cid;
+
+ /** Forward BLE */
+ list_t ble_f;
+
+ /** Reverse BLE */
+ list_t ble_r;
+
+ /** CSPEC */
+ cp_conn_cspec_t *cspec;
+};
+typedef struct cp_msg_cc_link_new_req_t cp_msg_cc_link_new_req_t;
+
+struct cp_msg_cc_link_new_cnf_t
+{
+ /** Connection identifier */
+ u16 cid;
+
+ /** Forward GLID */
+ u8 glid_f;
+
+ /** Reverse GLID */
+ u8 glid_r;
+
+ /** Result */
+ u8 result;
+
+ /** Proposed CSPEC */
+ cp_conn_cspec_t *cspec;
+};
+typedef struct cp_msg_cc_link_new_cnf_t cp_msg_cc_link_new_cnf_t;
+
+void
+cp_msg_cc_link_new_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_new_req_t *data);
+bool
+cp_msg_cc_link_new_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_new_req_t *data);
+
+void
+cp_msg_cc_link_new_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_new_cnf_t *data);
+
+bool
+cp_msg_cc_link_new_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_new_cnf_t *data);
+
+/*****************************/
+/**** LINK REL ****/
+/*****************************/
+
+struct cp_msg_cc_link_rel_req_t
+{
+ /** Connection identifier */
+ u16 cid;
+
+ /** TEI of the requesting STA */
+ u8 tei;
+
+ /** Reason code */
+ u8 reason_code;
+
+ /** Violated CSPEC */
+ cp_conn_cspec_t *cspec;
+};
+typedef struct cp_msg_cc_link_rel_req_t cp_msg_cc_link_rel_req_t;
+
+struct cp_msg_cc_link_rel_ind_t
+{
+ /** Connection identifier */
+ u16 cid;
+
+ /** MAC address of the STA requesting the release */
+ mac_t mac;
+
+ /** Reason code */
+ u8 reason_code;
+
+ /** Proposed CSPEC */
+ cp_conn_cspec_t *cspec_proposed;
+
+ /** Violated CSPEC */
+ cp_conn_cspec_t *cspec_violated;
+};
+typedef struct cp_msg_cc_link_rel_ind_t cp_msg_cc_link_rel_ind_t;
+
+void
+cp_msg_cc_link_rel_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_rel_req_t *data);
+
+bool
+cp_msg_cc_link_rel_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_rel_req_t *data);
+
+void
+cp_msg_cc_link_rel_ind_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_rel_ind_t *data);
+
+bool
+cp_msg_cc_link_rel_ind_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_rel_ind_t *data);
+
+/*****************************/
+/**** LINK MOD ****/
+/*****************************/
+
+struct cp_msg_cc_link_mod_req_t
+{
+ /** Connection identifier */
+ u16 cid;
+
+ /** CSPEC */
+ cp_conn_cspec_t *cspec;
+
+ /** Forward ble */
+ list_t ble_f;
+
+ /** Reversr ble */
+ list_t ble_r;
+};
+typedef struct cp_msg_cc_link_mod_req_t cp_msg_cc_link_mod_req_t;
+
+struct cp_msg_cc_link_mod_cnf_t
+{
+ /** Connection identifier */
+ u16 cid;
+
+ /** Result */
+ u8 result;
+
+ /** Proposed CSPEC */
+ cp_conn_cspec_t *cspec;
+};
+typedef struct cp_msg_cc_link_mod_cnf_t cp_msg_cc_link_mod_cnf_t;
+
+void
+cp_msg_cc_link_mod_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_mod_req_t *data);
+
+bool
+cp_msg_cc_link_mod_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_mod_req_t *data);
+
+void
+cp_msg_cc_link_mod_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_mod_cnf_t *data);
+
+bool
+cp_msg_cc_link_mod_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_mod_cnf_t *data);
+/*************************/
+/*** LINK INFO ***/
+/*************************/
+
+struct cp_msg_cc_link_info_req_t
+{
+ /** */
+
+ /** CSPEC */
+ cp_conn_cspec_t *cspec;
+};
+typedef struct cp_msg_cc_link_info_req_t cp_msg_cc_link_info_req_t;
+
+struct cp_msg_cc_link_info_cnf_t
+{
+ /** */
+
+ /** CSPEC */
+ cp_conn_cspec_t *cspec;
+};
+typedef struct cp_msg_cc_link_info_cnf_t cp_msg_cc_link_info_cnf_t;
+
+struct cp_msg_cc_link_info_ind_t
+{
+ /** */
+
+ /** CSPEC */
+ cp_conn_cspec_t *cspec;
+};
+typedef struct cp_msg_cc_link_info_ind_t cp_msg_cc_link_info_ind_t;
+
+struct cp_msg_cc_link_info_rsp_t
+{
+ /** */
+
+ /** CSPEC */
+ cp_conn_cspec_t *cspec;
+};
+typedef struct cp_msg_cc_link_info_rsp_t cp_msg_cc_link_info_rsp_t;
+
+void
+cp_msg_cc_link_info_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_info_req_t *data);
+
+bool
+cp_msg_cc_link_info_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_info_req_t *data);
+
+void
+cp_msg_cc_link_info_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_info_cnf_t *data);
+
+bool
+cp_msg_cc_link_info_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_info_cnf_t *data);
+
+void
+cp_msg_cc_link_info_ind_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_info_ind_t *data);
+
+bool
+cp_msg_cc_link_info_ind_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_info_ind_t *data);
+
+void
+cp_msg_cc_link_info_rsp_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_info_rsp_t *data);
+
+bool
+cp_msg_cc_link_info_rsp_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_info_rsp_t *data);
+
+/*****************************/
+/**** LINK SQZ ****/
+/*****************************/
+
+struct cp_msg_cc_link_sqz_req_t
+{
+ /** Connection identifier */
+ u16 cid;
+
+ /** Modified CSPEC */
+ cp_conn_cspec_t *cspec;
+};
+typedef struct cp_msg_cc_link_sqz_req_t cp_msg_cc_link_sqz_req_t;
+
+struct cp_msg_cc_link_sqz_cnf_t
+{
+ /** Connection identifier */
+ u16 cid;
+
+ /** Result */
+ u8 result;
+
+ /** Proposed CSPEC */
+ cp_conn_cspec_t *cspec;
+};
+typedef struct cp_msg_cc_link_sqz_cnf_t cp_msg_cc_link_sqz_cnf_t;
+
+void
+cp_msg_cc_link_sqz_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_sqz_req_t *data);
+
+bool
+cp_msg_cc_link_sqz_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_sqz_req_t *data);
+void
+cp_msg_cc_link_sqz_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_sqz_cnf_t *data);
+bool
+cp_msg_cc_link_sqz_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_sqz_cnf_t *data);
+
+/*****************************/
+/**** BLE UPDATE ****/
+/*****************************/
+
+struct cp_msg_cc_ble_update_ind_t
+{
+ /** GLID */
+ u8 glid;
+
+ /** BLE */
+ list_t ble;
+};
+typedef struct cp_msg_cc_ble_update_ind_t cp_msg_cc_ble_update_ind_t;
+
+void
+cp_msg_cc_ble_update_ind_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_ble_update_ind_t *data);
+bool
+cp_msg_cc_ble_update_ind_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_ble_update_ind_t *data);
+
+/*****************************/
+/**** ALLOC MOVE ****/
+/*****************************/
+
+struct cp_msg_cc_alloc_move_req_t
+{
+ /** Connection identifier */
+ u16 cid;
+
+ /** Forward GLID */
+ u8 glid_f;
+
+ /** Reverse GLID */
+ u8 glid_r;
+
+ /** Forward BLE */
+ list_t ble_f;
+
+ /** Reverse BLE */
+ list_t ble_r;
+};
+typedef struct cp_msg_cc_alloc_move_req_t cp_msg_cc_alloc_move_req_t;
+
+struct cp_msg_cc_alloc_move_cnf_t
+{
+ /** Connection identifier */
+ u16 cid;
+
+ /** Result */
+ u8 result;
+};
+typedef struct cp_msg_cc_alloc_move_cnf_t cp_msg_cc_alloc_move_cnf_t;
+
+void
+cp_msg_cc_alloc_move_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_alloc_move_req_t *data);
+
+bool
+cp_msg_cc_alloc_move_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_alloc_move_req_t *data);
+void
+cp_msg_cc_alloc_move_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_alloc_move_cnf_t *data);
+bool
+cp_msg_cc_alloc_move_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_alloc_move_cnf_t *data);
+
+#endif /* cp_cco_action_h */
diff --git a/cesar/cp/av/cco/action/cco_conn/doc/CCo Con.odt b/cesar/cp/av/cco/action/cco_conn/doc/CCo Con.odt
new file mode 100755
index 0000000000..aed8db1cab
--- /dev/null
+++ b/cesar/cp/av/cco/action/cco_conn/doc/CCo Con.odt
Binary files differ
diff --git a/cesar/cp/av/cco/action/cco_conn/doc/cco_conn.xmi b/cesar/cp/av/cco/action/cco_conn/doc/cco_conn.xmi
new file mode 100644
index 0000000000..2e98a9400e
--- /dev/null
+++ b/cesar/cp/av/cco/action/cco_conn/doc/cco_conn.xmi
@@ -0,0 +1,1755 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="http://schema.omg.org/spec/UML/1.3" verified="false" timestamp="2008-08-06T11:31:34" xmi.version="1.2" >
+ <XMI.header>
+ <XMI.documentation>
+ <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+ <XMI.exporterVersion>1.5.8</XMI.exporterVersion>
+ <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
+ </XMI.documentation>
+ <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+ <UML:Model isSpecification="false" isLeaf="false" isRoot="false" xmi.id="m1" isAbstract="false" name="UML Model" >
+ <UML:Namespace.ownedElement>
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="folder" isRoot="false" isAbstract="false" name="folder" />
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="datatype" isRoot="false" isAbstract="false" name="datatype" />
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="enum" isRoot="false" isAbstract="false" name="enum" />
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="MSG Module" isRoot="false" isAbstract="false" name="MSG Module" />
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="CCo Action Module" isRoot="false" isAbstract="false" name="CCo Action Module" />
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Bandwidth Manager Module" isRoot="false" isAbstract="false" name="Bandwidth Manager Module" />
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Logical View" isRoot="false" isAbstract="false" name="Logical View" >
+ <UML:Namespace.ownedElement>
+ <UML:Package stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="Datatypes" isRoot="false" isAbstract="false" name="Datatypes" >
+ <UML:Namespace.ownedElement>
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="OqFNT55UVzVU" isRoot="false" isAbstract="false" name="int" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="0widC5QuvWxy" isRoot="false" isAbstract="false" name="char" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="irUbdfzRtLuy" isRoot="false" isAbstract="false" name="bool" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="OMTNsx2stiV3" isRoot="false" isAbstract="false" name="float" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="luyeQvc8m5hN" isRoot="false" isAbstract="false" name="double" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="kfod0hZO32mt" isRoot="false" isAbstract="false" name="short" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="xmmoTFsE9otX" isRoot="false" isAbstract="false" name="long" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="jTfTYNoH0asy" isRoot="false" isAbstract="false" name="unsigned int" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="HSMJS6CQrwCI" isRoot="false" isAbstract="false" name="unsigned short" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="C4WJsNrZpU0N" isRoot="false" isAbstract="false" name="unsigned long" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="pocpPVnex8xP" isRoot="false" isAbstract="false" name="string" />
+ <UML:DataType stereotype="datatype" comment="Start Time" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="huvuRoPtpoED" isRoot="false" isAbstract="false" name="cp_st_t" />
+ <UML:DataType stereotype="datatype" comment="End Time" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="TJR8rTv6HJGr" isRoot="false" isAbstract="false" name="cp_et_t" />
+ <UML:DataType stereotype="datatype" comment="Connection Specification" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="ZCvyT3nV6461" isRoot="false" isAbstract="false" name="cp_cspec_t*" />
+ <UML:DataType stereotype="datatype" comment="Connection information" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="BlOcERrdVcJi" isRoot="false" isAbstract="false" name="cp_cinfo_t*" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="nKah2FElYQjf" isRoot="false" isAbstract="false" name="undef" />
+ <UML:DataType stereotype="datatype" comment="Connection " isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="qpL5yhMnv5m5" isRoot="false" isAbstract="false" name="cp_conn_t*" />
+ <UML:DataType stereotype="datatype" comment="Control Plane Context" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="3Xrk8GDGycgY" isRoot="false" isAbstract="false" name="cp_t*" />
+ <UML:DataType stereotype="datatype" comment="connection allocation" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="M6xKR1cFPIwW" isRoot="false" isAbstract="false" name="cp_cco_bw_conn_alloc_t*" elementReference="nKah2FElYQjf" />
+ <UML:DataType stereotype="datatype" comment="Received MME" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="iSF0bbc1ufLz" isRoot="false" isAbstract="false" name="cp_mme_rx_t*" />
+ <UML:DataType stereotype="datatype" comment="Sending MME" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="rXf3L5yLNrBT" isRoot="false" isAbstract="false" name="cp_mme_tx_t*" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="9kqqNN6qIMaD" isRoot="false" isAbstract="false" name="u8" />
+ <UML:DataType stereotype="datatype" comment="heap of connection of a specific priority stored regarding their time arrival" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="S1gNUo1cYqQt" isRoot="false" isAbstract="false" name="cp_cco_bw_conn_prio_heap_t*" elementReference="nKah2FElYQjf" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="D9PiHaAGBCIb" isRoot="false" isAbstract="false" name="u32" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="qx03D9bX8Zse" isRoot="false" isAbstract="false" name="u16" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="eoUNxGuvIuwA" isRoot="false" isAbstract="false" name="cp_cco_bw_prio_conn_t*" elementReference="nKah2FElYQjf" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="LMD9GuDpzhxX" isRoot="false" isAbstract="false" name="cp_cco_bw_alloc_conn_t*" elementReference="nKah2FElYQjf" />
+ <UML:DataType stereotype="datatype" comment="interval of a BLE (time and BLE)" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="l4plA4WjZ5hz" isRoot="false" isAbstract="false" name="cp_ble_interval_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="28emhDJMNjju" isRoot="false" isAbstract="false" name="u64" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="CAMwXARcOr2q" isRoot="false" isAbstract="false" name="cp_cspec_field_status_t*" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="0FkJo3kMVDSV" isRoot="false" isAbstract="false" name="cp_link_t*" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="d21ZFkuCFK5X" isRoot="false" isAbstract="false" name="cp_link_cinfo_t*" elementReference="nKah2FElYQjf" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="y93NOeEZLD5e" isRoot="false" isAbstract="false" name="cp_link_qmp_t*" elementReference="3QNGiQmMsrXJ" />
+ </UML:Namespace.ownedElement>
+ </UML:Package>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="Z3fT7dhQPy4n" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="S3qSyHnpdPGE" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="3zrUNtrbiwjH" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="HtfvGG8l8Yj7" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="5NEvecI4g8We" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="PJR0hhFkh4E2" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="3SUL0HC3J5nD" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="x6cf0Ju4g8zI" aggregation="none" type="nKah2FElYQjf" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="jHMPOr1lARmr" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="2lGX5o190Fyn" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="8zap3oq0sSer" aggregation="composite" type="xnGQ9ti6LKXZ" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="lWvQfsgM71lV" aggregation="none" type="akTdL0BuuMIi" name="" multiplicity="*" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Enumeration stereotype="enum" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="mtZJnRKOO7ZU" isRoot="false" isAbstract="false" name="cp_conn_state_t" >
+ <UML:EnumerationLiteral comment="Connection actualy scheduled" isSpecification="false" isLeaf="false" visibility="public" namespace="mtZJnRKOO7ZU" xmi.id="OX2HniyXbXoO" isRoot="false" isAbstract="false" name="IN" />
+ <UML:EnumerationLiteral comment="connection just added to the schedule a MME to confirm its presence into the schedule is needed." isSpecification="false" isLeaf="false" visibility="public" namespace="mtZJnRKOO7ZU" xmi.id="neVJeoamoZ5F" isRoot="false" isAbstract="false" name="ADD" />
+ <UML:EnumerationLiteral comment="Connection out of the schedule. This connection has to be cleared form the list." isSpecification="false" isLeaf="false" visibility="public" namespace="mtZJnRKOO7ZU" xmi.id="cqyEfU3313Im" isRoot="false" isAbstract="false" name="OUT" />
+ <UML:EnumerationLiteral comment="Connection just released normaly." isSpecification="false" isLeaf="false" visibility="public" namespace="mtZJnRKOO7ZU" xmi.id="loGfKRYwIW8x" isRoot="false" isAbstract="false" name="REL_NOR" />
+ <UML:EnumerationLiteral comment="Connection just released because of lack of Bandwidth space. " isSpecification="false" isLeaf="false" visibility="public" namespace="mtZJnRKOO7ZU" xmi.id="80zKS1hCpxp7" isRoot="false" isAbstract="false" name="REL_BW" />
+ <UML:EnumerationLiteral comment="Connection just released because of connection specification pbs." isSpecification="false" isLeaf="false" visibility="public" namespace="mtZJnRKOO7ZU" xmi.id="eDMziEWTrzlV" isRoot="false" isAbstract="false" name="REL_CSPEC" />
+ <UML:EnumerationLiteral comment="Connection just released because it requested it." isSpecification="false" isLeaf="false" visibility="public" namespace="mtZJnRKOO7ZU" xmi.id="zRZGwOSgcWwz" isRoot="false" isAbstract="false" name="REL_REQ" />
+ </UML:Enumeration>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="t1BwC0faIOY6" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Cv13Ndu7AnVp" aggregation="aggregate" type="ySeTGJOMEmYM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="d9BkAuG0cV1m" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="X4PpSxvCxRZk" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Wp4WF9XR5YUQ" aggregation="aggregate" type="xnGQ9ti6LKXZ" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="CMVM709k8IVI" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="vFMsgta757Na" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="AjHkCGWi5YCK" aggregation="aggregate" type="xnGQ9ti6LKXZ" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="ihjlFCBPWhje" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Package stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="K35NPMr9taR3" isRoot="false" isAbstract="false" name="Classes" >
+ <UML:Namespace.ownedElement>
+ <UML:Class comment="Allocation of a connection" isSpecification="false" isLeaf="false" visibility="public" namespace="K35NPMr9taR3" xmi.id="akTdL0BuuMIi" isRoot="false" isAbstract="false" name="cp_cco_bw_alloc_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="Start Time of the allocation" isSpecification="false" visibility="public" xmi.id="WHgpgU3HDWsW" type="huvuRoPtpoED" name="st" />
+ <UML:Attribute comment="End Time of the allocation" isSpecification="false" visibility="public" xmi.id="2pv02ohjicc7" type="TJR8rTv6HJGr" name="et" />
+ <UML:Attribute comment="Pointer on the previous allocation" isSpecification="false" visibility="public" xmi.id="6CEonouBntNY" type="M6xKR1cFPIwW" name="prev_conn" />
+ <UML:Attribute comment="Pointer on the next allocation" isSpecification="false" visibility="public" xmi.id="6lmba4wqHNOl" type="M6xKR1cFPIwW" name="next_conn" />
+ <UML:Attribute comment="Persistence of the allocation. Value not defined yet (maybe regarding to the priority)" isSpecification="false" visibility="public" xmi.id="KtVJ3RkxxT7e" type="nKah2FElYQjf" name="presistence" />
+ <UML:Attribute comment="Start time persistent flag" isSpecification="false" visibility="public" xmi.id="dkbxTW5FavZS" type="irUbdfzRtLuy" name="stpf" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="jUHoqZsuISuy" type="9kqqNN6qIMaD" name="glid" />
+ <UML:Attribute isSpecification="false" visibility="private" xmi.id="9UW3dNtE8T9Z" type="qx03D9bX8Zse" name="cid" />
+ <UML:Attribute isSpecification="false" visibility="private" xmi.id="mVY4wQ05uW6V" type="9kqqNN6qIMaD" name="duration_persistence" />
+ <UML:Attribute isSpecification="false" visibility="private" xmi.id="rzhzQqWM5KrC" type="fn3T0g7mCdo8" name="node" />
+ <UML:Attribute isSpecification="false" visibility="private" xmi.id="3oBvIFO8C57d" type="vez0woDacG3c" name="set_node" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class stereotype="Bandwidth Manager Module" comment="Bandwidth Manager Module.
+- Create the schedule
+- Allocate a specific connection
+- finalise and return a schedule (used by the Beacon module only)" isSpecification="false" isLeaf="false" visibility="public" namespace="K35NPMr9taR3" xmi.id="xnGQ9ti6LKXZ" isRoot="false" isAbstract="false" name="cp_cco_bw_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="The actual schedule is the one is motion during the beacon period. It receives modifications regarding on the incoming MMEs. " isSpecification="false" visibility="public" xmi.id="8SVuiaBMFxkG" type="LMD9GuDpzhxX" name="actual_schedule" />
+ <UML:Attribute comment="the finalised schedule is the schedule final given to the Beacon module to be transformed into BENTRYs." isSpecification="false" visibility="public" xmi.id="IvjtyxL96U0O" type="LMD9GuDpzhxX" name="finalised_schedule" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="bMccUjua3QRe" type="tOgMBBDlVoLx" name="prio_heap[CP_CCO_BW_NB_PRIORITY_HEAPS]" />
+ <UML:Attribute comment="Number of persistent allocation in the actual schedule" isSpecification="false" visibility="private" xmi.id="qqpCp7AgWp2f" type="qx03D9bX8Zse" name="nb_alloc_pers_actual" />
+ <UML:Attribute comment="umber of non persistent alloaction in the actual schedule" isSpecification="false" visibility="private" xmi.id="yEOT2jRXwz6c" type="qx03D9bX8Zse" name="nb_alloc_no_pers_actual" />
+ <UML:Attribute comment="Number of persistent allocation in the finalised schedule" isSpecification="false" visibility="private" xmi.id="wHXJuWtlMix9" type="qx03D9bX8Zse" name="nb_alloc_pers_finalised" />
+ <UML:Attribute comment="Number of non persistent alloaction in the finalised schedule" isSpecification="false" visibility="private" xmi.id="o5qKsqxq4MK4" type="qx03D9bX8Zse" name="nb_alloc_no_pers_finalised" />
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="kZlArwfzKyf6" isRoot="false" isAbstract="false" isQuery="false" name="new_sched" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="ZMv7zjxAvhNM" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Allocate a complete Schedule
+" isSpecification="false" isLeaf="false" visibility="public" xmi.id="O87gKQtsw1DR" isRoot="false" isAbstract="false" isQuery="false" name="alloc_sched" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="Control Plane Context" isSpecification="false" visibility="private" xmi.id="6RTqCXJl2bsz" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Allocates a unique connection" isSpecification="false" isLeaf="false" visibility="public" xmi.id="6r5JBb3UvGb7" isRoot="false" isAbstract="false" isQuery="false" name="alloc" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="VpAthpuJcZuj" type="irUbdfzRtLuy" />
+ <UML:Parameter comment="Connection identifier" isSpecification="false" visibility="private" xmi.id="6m22OgadlX6q" value="" type="9kqqNN6qIMaD" name="cid" />
+ <UML:Parameter comment="Control Plane Context" isSpecification="false" visibility="private" xmi.id="SjnLGAlGZvwN" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8VFn5SRIJtio" isRoot="false" isAbstract="false" isQuery="false" name="finalise_sched" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="X8GAwAWf7KHR" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="uninit the bandwidth manager allocations" isSpecification="false" isLeaf="false" visibility="public" xmi.id="CX7QmGnNQfyu" isRoot="false" isAbstract="false" isQuery="false" name="uninit" />
+ <UML:Operation comment="Finalise and return the schedule. Fills the free fields with bonus allocation if there is not enough time for CSMA. Otherwise it fills with CSMA." isSpecification="false" isLeaf="false" visibility="public" xmi.id="N8I7BjZIOdlW" isRoot="false" isAbstract="false" isQuery="false" name="get_next_alloc" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="" type="LMD9GuDpzhxX" />
+ <UML:Parameter comment="Control Plane Context" isSpecification="false" visibility="private" xmi.id="2RCfo71rfqbl" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="4bO4EM12qaue" value="" type="LMD9GuDpzhxX" name="prev_alloc" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Init of the BW manager" isSpecification="false" isLeaf="false" visibility="public" xmi.id="qDTUjKdqN9vB" isRoot="false" isAbstract="false" isQuery="false" name="init" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="Control Plane Context" isSpecification="false" visibility="private" xmi.id="rztSWU4nfOxL" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="VNZrMxhseKAs" isRoot="false" isAbstract="false" isQuery="false" name="uninit" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="LhtoKuOr2e0y" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Clears the connections passing the new states to old and initiating the new to OUT state
+" isSpecification="false" isLeaf="false" visibility="public" xmi.id="REvc418qnVEv" isRoot="false" isAbstract="false" isQuery="false" name="clear_conn_state" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="3WKGgYni79mL" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="WlMKMGxlUqNX" isRoot="false" isAbstract="false" isQuery="false" name="set_next_free_time_space
+" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="eMmXZjl1djyO" type="irUbdfzRtLuy" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="sTLfzZY03sGh" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="Uu0wkMRapmDm" value="" type="O1PWAArevDzF" name="prev_alloc" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="LlkPcy60zUW8" value="" type="O1PWAArevDzF" name="next_alloc" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="5NytACfVvOsX" isRoot="false" isAbstract="false" isQuery="false" name="uninit_actual_sched" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="MxWKR0S3MCYu" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2dqv1jTNexf5" isRoot="false" isAbstract="false" isQuery="false" name="get_nb_alloc" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="vh1AX1VZcLUd" type="qx03D9bX8Zse" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="x76IKcCEw5lx" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Allocate at the beginning of the beacon period
+" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2vygqejoln43" isRoot="false" isAbstract="false" isQuery="false" name="alloc_beginning" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="QEHKJ3HEiGMF" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="5ZkoNosn277K" value="" type="qx03D9bX8Zse" name="duration" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="8MYqct3sinht" value="" type="9kqqNN6qIMaD" name="glid" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="release the finalised schedule when it has been used (triggered by the Beacon module)" isSpecification="false" isLeaf="false" visibility="public" xmi.id="29Uw34J8wOf4" isRoot="false" isAbstract="false" isQuery="false" name="release_sched" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="GbMzYAgg33TV" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Initiate the last ble and checks if the end of the free time has been reached." isSpecification="false" isLeaf="false" visibility="private" xmi.id="42UyQ92giMdG" isRoot="false" isAbstract="false" isQuery="false" name="get_alloc_ble" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="ZrY2nqzsglS3" type="irUbdfzRtLuy" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="DYfFa9DyHDdz" value="" type="JO1FHqi41DrK" name="first_ble" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="XEG2U9YoXX3m" value="" type="JO1FHqi41DrK" name="last_ble" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="NloMydf9BKMj" value="" type="qx03D9bX8Zse" name="nb_pb" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="5slaPoMkX84U" value="" type="TZfikGiIVwKz" name="alloc" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="lhdw1ydTVIBG" value="" type="TZfikGiIVwKz" name="next_alloc" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Calculate the best allocation time between 2 BLE" isSpecification="false" isLeaf="false" visibility="private" xmi.id="Xml5upZdXAZW" isRoot="false" isAbstract="false" isQuery="false" name="calculation_of_alloc_time" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="8AzeT9s00O2m" value="" type="JO1FHqi41DrK" name="first_ble" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="Ezeuk5xIpiLi" value="" type="JO1FHqi41DrK" name="last_ble" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="VuL02tV93UnW" value="" type="qx03D9bX8Zse" name="nb_pb" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="34UrkpZDhuEk" value="" type="bfUc1UOFU09C" name="alloc_st" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="njtpBeJnHoNI" value="" type="bfUc1UOFU09C" name="alloc_et" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="D9bu1ncnWTcg" value="" type="TZfikGiIVwKz" name="alloc" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="5vRMhocyV7gC" value="" type="TZfikGiIVwKz" name="next_alloc" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class stereotype="CCo Action Module" comment="- Functions reacting to incoming MME related to global connection.
+- Treatment of those MME
+- Storage and validation of the global connections
+- Control of the Bandwidth Manager's actions
+- React to the connections' states to send IND or CNF MME
+" isSpecification="false" isLeaf="false" visibility="public" namespace="K35NPMr9taR3" xmi.id="ySeTGJOMEmYM" isRoot="false" isAbstract="false" name="cp_cco_action_t" >
+ <UML:GeneralizableElement.generalization>
+ <UML:Generalization xmi.idref="he8aiM3PdmBs" />
+ </UML:GeneralizableElement.generalization>
+ <UML:Classifier.feature>
+ <UML:Operation comment="Function called after any allocation (complete schedule or single connection allocation)
+Study the state of the connections and send the MME related to those states.
+After sending those MMEs it clears the status.
+" isSpecification="false" isLeaf="false" visibility="private" xmi.id="QNnsMczV4BbV" isRoot="false" isAbstract="false" isQuery="false" name="mme_glink_send" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="Control Plane Context" isSpecification="false" visibility="private" xmi.id="Mwcl7hCpINk2" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Process a CC_LINK_NEW.REQ
+
+Check the validity of the connection.
+Add the connection into the list of connections and the pending allocation list
+Call the bandwidth manager to redo the schedule
+Call cp_cco_action_mme_conn_cnf()" isSpecification="false" isLeaf="false" visibility="public" xmi.id="4Jl61qfG7FdR" isRoot="false" isAbstract="false" isQuery="false" name="process_cc_link_new_req" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="Control Plane Context" isSpecification="false" visibility="private" xmi.id="JQWhk2qSS5T3" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter comment="Incoming mme" isSpecification="false" visibility="private" xmi.id="XgvJotVBjB3x" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Process a CC_LINK_REL.REQ
+
+Release the connection from the connections list and the pending allocation list
+Send the MME that will release the connection
+Call the bandwidth manager to redo the schedule " isSpecification="false" isLeaf="false" visibility="public" xmi.id="kWAzj2FfLSzz" isRoot="false" isAbstract="false" isQuery="false" name="process_cc_link_rel_req" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="Control Plane Context" isSpecification="false" visibility="private" xmi.id="Ysh6LPKcpqHZ" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter comment="Incoming mme" isSpecification="false" visibility="private" xmi.id="MfPA26ZPsMEE" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Process a CC_LINK_MOD.REQ
+
+Check the validity of the modifications
+Modify the connection's data
+Call the schedule function
+Check if the connection is still in the schedule
+Send the MME CNF with the result" isSpecification="false" isLeaf="false" visibility="public" xmi.id="7f6S84QwyS5a" isRoot="false" isAbstract="false" isQuery="false" name="process_cc_link_mod_req" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="twxoZyefgG9F" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter comment="Incoming mme" isSpecification="false" visibility="private" xmi.id="Js8VgHGBvBVj" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Process a CC_ALLOC_MOVE.REQ
+
+Check the validity of the connection.
+Memorise the position of the allocation
+Call the function that can allocate a unique connection.
+If it has allocated it somewhere else we delete the old allocation
+if not we keep the old allocation
+Send the MME CNF with the result
+Add the connection into the list of connections and the pending allocation list
+Call the bandwidth manager to redo the schedule
+Call cp_cco_action_mme_conn_cnf()" isSpecification="false" isLeaf="false" visibility="public" xmi.id="VChtJRri78Bp" isRoot="false" isAbstract="false" isQuery="false" name="process_cc_alloc_move_req" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="K8VzP5bG2Y5Z" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="WjCAzMPBDokO" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Process of a CC_BLE_UPDATE.IND. Actualisation of the BLE of a specific GLID. Call the Bandwidth Manager to redo the schedule." isSpecification="false" isLeaf="false" visibility="public" xmi.id="seYRAqbe0Jvw" isRoot="false" isAbstract="false" isQuery="false" name="process_cc_ble_update_ind" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="control plane context" isSpecification="false" visibility="private" xmi.id="e4ZuZ9iDlUSB" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter comment="Incoming MME" isSpecification="false" visibility="private" xmi.id="7C9DGhT6JzVU" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Init function of the CCo" isSpecification="false" isLeaf="false" visibility="public" xmi.id="DNsf89jKgseb" isRoot="false" isAbstract="false" isQuery="false" name="init" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="Control Plane Context" isSpecification="false" visibility="private" xmi.id="d9I6Xsav4TQb" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Uninit the cco action module (call the uninit function of lower ctx)" isSpecification="false" isLeaf="false" visibility="public" xmi.id="tR7lNfHrBJvJ" isRoot="false" isAbstract="false" isQuery="false" name="uninit" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class comment="Structure of a link." isSpecification="false" isLeaf="false" visibility="public" namespace="K35NPMr9taR3" xmi.id="Dd5IhQuqhODL" isRoot="false" isAbstract="false" name="cp_link_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="RP4g6QESrIGR" type="nKah2FElYQjf" name="status" />
+ <UML:Attribute comment="global link identifier" isSpecification="false" visibility="public" xmi.id="R4lfEOk34S06" type="9kqqNN6qIMaD" name="llid" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="sQEhgV9JJ0Rv" type="9kqqNN6qIMaD" name="glid" />
+ <UML:Attribute comment="connection information" isSpecification="false" visibility="public" xmi.id="y3j2Tj7pa9ls" type="BlOcERrdVcJi" name="cinfo" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="naiC13Fgjvwp" type="y93NOeEZLD5e" name="qmp" />
+ <UML:Attribute comment="forward BLE" isSpecification="false" visibility="public" xmi.id="2IFWtWCrXvs0" type="hQ7UEYOzATqF" name="list_ble" />
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="FMPxocle20Jj" isRoot="false" isAbstract="false" isQuery="false" name="init" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="TS2kQReD1MO2" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="Ndi6WcvlwJhi" isRoot="false" isAbstract="false" isQuery="false" name="uninit" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="tQKvOecr4caV" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class comment="Table that stores the pending connection in order of arrival.
+Each table has a specific priority level assigned (0 to 3).
+It manages the order and return the most prior connection" isSpecification="false" isLeaf="false" visibility="public" namespace="K35NPMr9taR3" xmi.id="pEl1C68UjFRR" isRoot="false" isAbstract="false" name="cp_cco_bw_prio_heap_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="level of priority of the heap (4 different levels)" isSpecification="false" visibility="public" xmi.id="ooF6vpsKuOw1" type="9kqqNN6qIMaD" name="table_priority_level" />
+ <UML:Attribute comment="first connection of the heap" isSpecification="false" visibility="public" xmi.id="BoTNcsVT3vk5" type="hQ7UEYOzATqF" name="conns" />
+ <UML:Attribute comment="stage of the allocation. Faster to get to the next connection to allocate." isSpecification="false" visibility="public" xmi.id="AhBRVaG2kt6W" type="D9PiHaAGBCIb" name="nb_conn_allocated" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="vlplg1EMIh54" type="D9PiHaAGBCIb" name="nb_conn" />
+ <UML:Operation comment="gets the most prior pending connection return its CID" isSpecification="false" isLeaf="false" visibility="public" xmi.id="BuYs8zIb3uMF" isRoot="false" isAbstract="false" isQuery="false" name="get_most_prior_conn" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="qSDgfvHVlaaj" type="9kqqNN6qIMaD" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="delete a connection" isSpecification="false" isLeaf="false" visibility="public" xmi.id="ArL3GjV2Yl6R" isRoot="false" isAbstract="false" isQuery="false" name="del_conn" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="Connection identifier" isSpecification="false" visibility="private" xmi.id="pjWQWF5WMF9W" value="" type="9kqqNN6qIMaD" name="cid" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="add a connection" isSpecification="false" isLeaf="false" visibility="public" xmi.id="YyjQMfR7LmP8" isRoot="false" isAbstract="false" isQuery="false" name="add_conn" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="Connection identifier" isSpecification="false" visibility="private" xmi.id="p5JBnSFxHYyV" value="" type="9kqqNN6qIMaD" name="cid" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Clears the status of the allocation" isSpecification="false" isLeaf="false" visibility="public" xmi.id="FG15yw3gMB8Z" isRoot="false" isAbstract="false" isQuery="false" name="clear_conn" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="hWWrzM6s8tcm" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="uq9DVEHiSGoP" isRoot="false" isAbstract="false" isQuery="false" name="init" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="Cr3X0B4hgaZd" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="udW0X6nRwucP" isRoot="false" isAbstract="false" isQuery="false" name="uninit" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="6r5Z8twIjzph" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class comment="connection storage regarding to its priority and time arrival." isSpecification="false" isLeaf="false" visibility="public" namespace="K35NPMr9taR3" xmi.id="niNHo3iBMi93" isRoot="false" isAbstract="false" name="cp_cco_bw_prio_conn_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="connection identifier
+" isSpecification="false" visibility="public" xmi.id="kC9bWRewTRAy" type="9kqqNN6qIMaD" name="cid" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="me7r6SxasvES" type="irUbdfzRtLuy" name="alloc_status" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="iHTllYAzskuy" type="fn3T0g7mCdo8" name="node" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class comment="Connection Specification" isSpecification="false" isLeaf="false" visibility="public" namespace="K35NPMr9taR3" xmi.id="d8mKKcTJhtMZ" isRoot="false" isAbstract="false" name="cp_link_qmp_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="Delay Bound" isSpecification="false" visibility="public" xmi.id="gTg5YO0BUnWp" type="D9PiHaAGBCIb" name="delay" />
+ <UML:Attribute comment="jitter bound" isSpecification="false" visibility="public" xmi.id="Px64qTbAFKMM" type="D9PiHaAGBCIb" name="jitter" />
+ <UML:Attribute comment="Average MPDU size" isSpecification="false" visibility="public" xmi.id="hmYsthba8Gdh" type="qx03D9bX8Zse" name="av_MPDU_size" />
+ <UML:Attribute comment="Maximum MPDU size" isSpecification="false" visibility="public" xmi.id="eds9OOwnK2pA" type="qx03D9bX8Zse" name="max_MPDU_size" />
+ <UML:Attribute comment="Average data rate" isSpecification="false" visibility="public" xmi.id="TRLilh2QRZHL" type="qx03D9bX8Zse" name="av_data_rate" />
+ <UML:Attribute comment="Minimum data rate" isSpecification="false" visibility="public" xmi.id="nR9txDa68QcP" type="qx03D9bX8Zse" name="min_data_rate" />
+ <UML:Attribute comment="Maximum data rate" isSpecification="false" visibility="public" xmi.id="Cw0z3lDbs9ub" type="qx03D9bX8Zse" name="max_data_rate" />
+ <UML:Attribute comment="Maximum inter-TXOP time" isSpecification="false" visibility="public" xmi.id="8ZogWKRHjaAg" type="qx03D9bX8Zse" name="max_inter_TXOP" />
+ <UML:Attribute comment="Minimum inter TXOP time" isSpecification="false" visibility="public" xmi.id="mlls9LFKFFJI" type="qx03D9bX8Zse" name="min_inter_TXOP" />
+ <UML:Attribute comment="Maximum burst time" isSpecification="false" visibility="public" xmi.id="0UtqdlSmLEQp" type="qx03D9bX8Zse" name="max_burst" />
+ <UML:Attribute comment="Exception Policy" isSpecification="false" visibility="public" xmi.id="Xp6GQEvAxe07" type="9kqqNN6qIMaD" name="exception" />
+ <UML:Attribute comment="Inatictivity interval" isSpecification="false" visibility="public" xmi.id="zFRFUiXUCPJp" type="D9PiHaAGBCIb" name="inactivity" />
+ <UML:Attribute comment="MSDU error rate" isSpecification="false" visibility="public" xmi.id="AlZTxyIUnMlB" type="qx03D9bX8Zse" name="MSDU_error_rate" />
+ <UML:Attribute comment="Convergence Layer SAP Type" isSpecification="false" visibility="public" xmi.id="ZeJWIJbFY2U0" type="9kqqNN6qIMaD" name="CLST" />
+ <UML:Attribute comment="ATS tolerance" isSpecification="false" visibility="public" xmi.id="i0TuNmiXVFzS" type="qx03D9bX8Zse" name="ATS" />
+ <UML:Attribute comment="Smallest Tolerable Average Data rate" isSpecification="false" visibility="public" xmi.id="DHxzcgABIUha" type="qx03D9bX8Zse" name="min_tol_data" />
+ <UML:Attribute comment="Original average Data rate" isSpecification="false" visibility="public" xmi.id="nHpKJIK2Gnub" type="qx03D9bX8Zse" name="ori_av_data_rate" />
+ <UML:Attribute comment="RX window size" isSpecification="false" visibility="public" xmi.id="Xa82q7T1NOyx" type="qx03D9bX8Zse" name="rx_window" />
+ <UML:Attribute comment="Smoothing buffer size" isSpecification="false" visibility="public" xmi.id="498MbnuM4hgM" type="D9PiHaAGBCIb" name="smoothing:24" />
+ <UML:Attribute comment="Bidirectional burst" isSpecification="false" visibility="public" xmi.id="xzMBkEmIptId" type="9kqqNN6qIMaD" name="bidir_burst" />
+ <UML:Attribute comment="Number of TXOPs per beacon" isSpecification="false" visibility="public" xmi.id="ylcJ9bGBiMVJ" type="9kqqNN6qIMaD" name="nb_TXOP" />
+ <UML:Attribute comment="Average number of PBs per TXOP" isSpecification="false" visibility="public" xmi.id="8NdA5IU0HqCz" type="qx03D9bX8Zse" name="av_nb_pb" />
+ <UML:Attribute comment="Maximum number of PBs per TXOP" isSpecification="false" visibility="public" xmi.id="3wFspYTmH35P" type="qx03D9bX8Zse" name="max_nb_pb" />
+ <UML:Attribute comment="Pending PB threshold" isSpecification="false" visibility="public" xmi.id="eKaKe4bmRFvU" type="qx03D9bX8Zse" name="ppb_threshold" />
+ <UML:Attribute comment="Surplus of Bandwidth" isSpecification="false" visibility="public" xmi.id="XPVmEflHbz7P" type="qx03D9bX8Zse" name="surplus_bw" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class comment="cinfo structure" isSpecification="false" isLeaf="false" visibility="public" namespace="K35NPMr9taR3" xmi.id="Q60RU8Qxt2jh" isRoot="false" isAbstract="false" name="cp_link_cinfo_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="Validity : 0x00 not valid ; 0x01 valid" isSpecification="false" visibility="public" xmi.id="BCj7uWVLsuTg" type="9kqqNN6qIMaD" name="valid_cinfo" />
+ <UML:Attribute comment="type of connection requested" isSpecification="false" visibility="public" xmi.id="OMIbwSMKXMj1" type="9kqqNN6qIMaD" name="mac_service_t" />
+ <UML:Attribute comment="CAP" isSpecification="false" visibility="public" xmi.id="Eu76mal8u3ho" type="9kqqNN6qIMaD" name="user_priority" />
+ <UML:Attribute comment="Transfer of the ATS to the HLE : 0x00 not 0x01 passed" isSpecification="false" visibility="public" xmi.id="U38zOryr0uB8" type="9kqqNN6qIMaD" name="ats" />
+ <UML:Attribute comment="0x00 no smoothing 0x01 smoothing if possible" isSpecification="false" visibility="public" xmi.id="ZCRPvpA9hHET" type="9kqqNN6qIMaD" name="smoothing" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class comment="Structure of a connection. Add, delete, return a link." isSpecification="false" isLeaf="false" visibility="public" namespace="K35NPMr9taR3" xmi.id="adjwEdq884ob" isRoot="false" isAbstract="false" name="cp_conn_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="Connection identifier" isSpecification="false" visibility="public" xmi.id="Iz4rTWTxS3n0" type="9kqqNN6qIMaD" name="cid" />
+ <UML:Attribute comment="Forward link id (global or local)" isSpecification="false" visibility="public" xmi.id="bdStR08xCgmF" type="0FkJo3kMVDSV" name="flink" />
+ <UML:Attribute comment="Reverse link id (local or global)" isSpecification="false" visibility="public" xmi.id="PKGfk5LGn3bJ" type="0FkJo3kMVDSV" name="rlink" />
+ <UML:Attribute comment="connection state" isSpecification="false" visibility="public" xmi.id="q86HxGHLiEfh" type="mtZJnRKOO7ZU" name="old_conn_state" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="WeNEbK4sTNyR" type="Bv4qUQAgGcnc" name="type" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="eptSFkclMxyx" type="F2oiQk9bfCP9" name="conn_info" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="aYoq8ZSkOLCb" type="mtZJnRKOO7ZU" name="new_conn_state" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="cBHp8bzlZhfx" type="9kqqNN6qIMaD" name="request_id" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="lsIYD0TogXRd" type="6sEW3jvdsAQ0" name="osa" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="lNlK5PFoHXMS" type="6sEW3jvdsAQ0" name="oda" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="gr9Y2XYluI6x" type="fLjwr6MNuZXD" name="violated_cspec" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="EKdjKZFyRMXT" type="fLjwr6MNuZXD" name="modified_cspec" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="t3ElLIjycSsT" type="fn3T0g7mCdo8" name="node" />
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="WFqOmNayfDhz" isRoot="false" isAbstract="false" isQuery="false" name="init_conn" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="AYmkyfDTs3re" type="qpL5yhMnv5m5" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="nuwEETf5Wrrq" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="OPd3dI1QBxcP" isRoot="false" isAbstract="false" isQuery="false" name="add_conn" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="OHVu8KiGsV0q" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="8BJ0C9eaYFcB" value="" type="qpL5yhMnv5m5" name="conn" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="YdZhYB6wQZoX" isRoot="false" isAbstract="false" isQuery="false" name="del_conn" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="tVllymc6vt68" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="0kiZyIiWvIDR" value="" type="qx03D9bX8Zse" name="cid" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="RHNsrCNkh8Uf" isRoot="false" isAbstract="false" isQuery="false" name="get_conn" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="sJQKu9biFdAR" type="qpL5yhMnv5m5" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="s4loxpwyZcVV" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="vD1oTCGtSbjJ" value="" type="qx03D9bX8Zse" name="cid" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="n61SEV75ZqtV" isRoot="false" isAbstract="false" isQuery="false" name="check_conn_validity" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="SdoXJt4CCUU5" type="9kqqNN6qIMaD" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="fnRDPuiI7i5Z" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="6GWe4N9kAYvY" value="" type="qpL5yhMnv5m5" name="conn" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="d6nqhvGn9kPE" isRoot="false" isAbstract="false" isQuery="false" name="get_free_glid" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="V8MvjMfCSZn1" type="9kqqNN6qIMaD" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="8WwG4rmUSb2k" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="S6wdZOiCST19" isRoot="false" isAbstract="false" isQuery="false" name="get_free_llid" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="yVCOyDYKSRoR" type="9kqqNN6qIMaD" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="MHvW1Ik7peOr" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class comment="connection list manager. add, delete, return, modify and check the validity of the connections." isSpecification="false" isLeaf="false" visibility="public" namespace="K35NPMr9taR3" xmi.id="Ffpcevz092To" isRoot="false" isAbstract="false" name="cp_conn_mgr_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute isSpecification="false" visibility="private" xmi.id="bYj9JToa9uKf" type="hQ7UEYOzATqF" name="conns" />
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="9kRYzQhfAceh" isRoot="false" isAbstract="false" isQuery="false" name="garbage_conn" />
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="wiccWDa1IGB0" isRoot="false" isAbstract="false" isQuery="false" name="process_cm_conn_new_req" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="s7Ltc57HQDvY" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="wM97NSNHAxte" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="ARdRgpRYumPW" isRoot="false" isAbstract="false" isQuery="false" name="process_cm_conn_new_cnf" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="rWlFjgoe0vlL" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="O8dW5U9Ewkdc" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="X48RoXwe1hti" isRoot="false" isAbstract="false" isQuery="false" name="process_cm_conn_rel_ind" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="OfMMb5ixDJRH" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="nYThH6Jo8PEu" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="uAWvrOeD1yYc" isRoot="false" isAbstract="false" isQuery="false" name="process_cm_conn_rel_rsp" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="4EXFXxUITv0k" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="zHX7hj0brWVg" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="u7uw5QW7e2LB" isRoot="false" isAbstract="false" isQuery="false" name="process_cm_conn_mod_req" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="xpTQjR9ijeoO" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="NozCISsDZm7f" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="Cbkob5zYtRxc" isRoot="false" isAbstract="false" isQuery="false" name="process_cm_conn_mod_cnf" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="s4KZi6x3uvFD" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="N7OxsTa22Kre" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="OoAFD7r499dr" isRoot="false" isAbstract="false" isQuery="false" name="process_cm_conn_info_req" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="8M19fqn3fxIq" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="37uCEY2U5sbZ" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="yuO7aB8gV7pA" isRoot="false" isAbstract="false" isQuery="false" name="process_cm_conn_info_cnf" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="ycBbYRRbYMll" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="snFxeqUcjshJ" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="3nxXunhqNtRt" isRoot="false" isAbstract="false" isQuery="false" name="process_apcm_conn_add_req" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="IrSpDEa3znyd" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="eSDNIueKfbra" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="MYQkPqdgh6Vs" isRoot="false" isAbstract="false" isQuery="false" name="process_apcm_conn_add_rsp" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="I5vHsrtUH6pZ" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="zTte3iEPFd7c" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="TjI8pn05stMj" isRoot="false" isAbstract="false" isQuery="false" name="process_apcm_conn_mod_req" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="kFD1K1YJSQxV" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="8AtNl00CjGKW" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="4KbuDwdv9pwT" isRoot="false" isAbstract="false" isQuery="false" name="process_apcm_conn_mod_rsp" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="qSkIsimzqfMb" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="dKnLb7pdPPXc" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="J9VSwPumre2k" isRoot="false" isAbstract="false" isQuery="false" name="process_apcm_conn_rel_req" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="KmjAP3l3MYMv" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="dBY2Y3crA7I6" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="WCqMot49dnJ3" isRoot="false" isAbstract="false" isQuery="false" name="process_cc_link_sqz_req_rx" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="o368ZQ3DZZD8" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="bqxlvFqQPgmE" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="XqLBbcEPfIWF" isRoot="false" isAbstract="false" isQuery="false" name="process_cc_link_sqz_cnf_rx" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="iXQF7dNgRLRN" value="" type="3Xrk8GDGycgY" name="ctx" />
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="YHnywZATPVc0" value="" type="iSF0bbc1ufLz" name="mme" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="7qNl6tymRO2W" isRoot="false" isAbstract="false" isQuery="false" name="init" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="zNCRgboFrbBl" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="M9nDiyyqHBL5" isRoot="false" isAbstract="false" isQuery="false" name="uninit" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter isSpecification="false" visibility="private" xmi.id="0ozdebNMCsR8" value="" type="3Xrk8GDGycgY" name="ctx" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class comment="ble interval values" isSpecification="false" isLeaf="false" visibility="public" namespace="K35NPMr9taR3" xmi.id="oE5CCxttNgAF" isRoot="false" isAbstract="false" name="cp_ble_interval_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="ble value" isSpecification="false" visibility="public" xmi.id="7MBbDW5Dfddz" type="9kqqNN6qIMaD" name="ble" />
+ <UML:Attribute comment="end time" isSpecification="false" visibility="public" xmi.id="rWKEXa4Lo7W0" type="qx03D9bX8Zse" name="et" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="yi3iuDTAFpl9" type="fn3T0g7mCdo8" name="node" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ </UML:Namespace.ownedElement>
+ </UML:Package>
+ <UML:Package stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="vQr3syDVnjwt" isRoot="false" isAbstract="false" name="Class Diagram" >
+ <UML:Namespace.ownedElement/>
+ <XMI.extension xmi.extender="umbrello" >
+ <diagrams>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="46" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="1785" snapy="10" showatts="1" xmi.id="4HFzWQZSTZhP" documentation="" type="1" showops="1" showpackage="0" name="conn" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1839" >
+ <widgets>
+ <classwidget usesdiagramfillcolor="0" width="447" showattsigs="601" x="0" fillcolor="#ffffc0" y="0" showopsigs="601" linewidth="none" height="360" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="Ffpcevz092To" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="386" showattsigs="601" x="541" fillcolor="#ffffc0" y="0" showopsigs="601" linewidth="none" height="378" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="adjwEdq884ob" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <enumwidget usesdiagramfillcolor="0" width="128" x="1052" fillcolor="#ffffc0" y="113" linewidth="none" height="162" usefillcolor="1" isinstance="0" xmi.id="mtZJnRKOO7ZU" showpackage="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="149" showattsigs="601" x="361" fillcolor="#ffffc0" y="605" showopsigs="601" linewidth="none" height="117" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="Q60RU8Qxt2jh" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="173" showattsigs="601" x="0" fillcolor="#ffffc0" y="407" showopsigs="601" linewidth="none" height="477" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="d8mKKcTJhtMZ" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="173" showattsigs="601" x="349" fillcolor="#ffffc0" y="772" showopsigs="601" linewidth="none" height="162" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="Dd5IhQuqhODL" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="142" showattsigs="601" x="387" fillcolor="#ffffc0" y="991" showopsigs="601" linewidth="none" height="81" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="oE5CCxttNgAF" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" />
+ <enumwidget usesdiagramfillcolor="0" width="162" x="587" fillcolor="#ffffc0" y="799" linewidth="none" height="108" usefillcolor="1" isinstance="0" xmi.id="K9Fc7ya6eboZ" showpackage="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="187" showattsigs="601" x="342" fillcolor="#ffffc0" y="441" showopsigs="601" linewidth="none" height="117" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="fLjwr6MNuZXD" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages/>
+ <associations>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="adjwEdq884ob" widgetaid="Ffpcevz092To" xmi.id="AnXqp1nebv8V" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="447" starty="180" />
+ <endpoint endx="541" endy="189" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="2" totalcountb="3" indexb="2" linewidth="none" widgetbid="Dd5IhQuqhODL" widgetaid="adjwEdq884ob" xmi.id="1ZrlQBx4omHB" type="501" linecolor="none" >
+ <linepath>
+ <startpoint startx="798" starty="378" />
+ <endpoint endx="464" endy="772" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="fLjwr6MNuZXD" widgetaid="adjwEdq884ob" xmi.id="ZLxwL8UTBdI7" type="501" linecolor="none" >
+ <linepath>
+ <startpoint startx="669" starty="378" />
+ <endpoint endx="435" endy="441" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="1" visibilityB="200" totalcountb="3" indexb="1" linewidth="none" widgetbid="mtZJnRKOO7ZU" widgetaid="adjwEdq884ob" xmi.id="q86HxGHLiEfh" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="927" starty="126" />
+ <endpoint endx="1052" endy="167" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="117" x="944" fillcolor="none" y="170" linewidth="none" posttext="" role="710" height="22" usefillcolor="1" pretext="+" isinstance="0" xmi.id="hZY39ReOzCOM" text="old_conn_state" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="2" visibilityB="200" totalcountb="3" indexb="2" linewidth="none" widgetbid="mtZJnRKOO7ZU" widgetaid="adjwEdq884ob" xmi.id="aYoq8ZSkOLCb" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="927" starty="252" />
+ <endpoint endx="1052" endy="221" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="124" x="937" fillcolor="none" y="223" linewidth="none" posttext="" role="710" height="22" usefillcolor="1" pretext="+" isinstance="0" xmi.id="TOXZoZaWNmBv" text="new_conn_state" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="Q60RU8Qxt2jh" widgetaid="Dd5IhQuqhODL" xmi.id="qzZi0HXSKdRg" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="406" starty="772" />
+ <endpoint endx="435" endy="722" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="16" x="443" fillcolor="none" y="788" linewidth="none" posttext="" role="701" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="0UiHpihUHFXO" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ <floatingtext usesdiagramfillcolor="1" width="16" x="435" fillcolor="none" y="741" linewidth="none" posttext="" role="702" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="e9neJ90mXVKM" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="Q60RU8Qxt2jh" widgetaid="fLjwr6MNuZXD" xmi.id="ap8aOZNHajls" type="501" linecolor="none" >
+ <linepath>
+ <startpoint startx="435" starty="558" />
+ <endpoint endx="435" endy="605" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" linewidth="none" widgetbid="Dd5IhQuqhODL" widgetaid="d8mKKcTJhtMZ" xmi.id="yR77gv82Dngk" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="173" starty="725" />
+ <endpoint endx="349" endy="853" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" linewidth="none" widgetbid="d8mKKcTJhtMZ" widgetaid="fLjwr6MNuZXD" xmi.id="OlUNXhoPpodj" type="501" linecolor="none" >
+ <linepath>
+ <startpoint startx="342" starty="499" />
+ <endpoint endx="173" endy="566" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="oE5CCxttNgAF" widgetaid="Dd5IhQuqhODL" xmi.id="VqiqgPP0C8zY" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="435" starty="934" />
+ <endpoint endx="458" endy="991" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="16" x="391" fillcolor="none" y="935" linewidth="none" posttext="" role="701" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="3sqQf1MdV2sK" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ <floatingtext usesdiagramfillcolor="1" width="16" x="411" fillcolor="none" y="967" linewidth="none" posttext="" role="702" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="lZm0pHPRRC5k" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="K9Fc7ya6eboZ" widgetaid="Dd5IhQuqhODL" xmi.id="yN55b1ltFiLX" type="501" linecolor="none" >
+ <linepath>
+ <startpoint startx="522" starty="853" />
+ <endpoint endx="587" endy="853" />
+ </linepath>
+ </assocwidget>
+ </associations>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="64" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="1313" snapy="10" showatts="1" xmi.id="Vi7xSEHjGpDi" documentation="" type="1" showops="1" showpackage="0" name="bw" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1347" >
+ <widgets>
+ <classwidget usesdiagramfillcolor="0" width="433" showattsigs="601" x="258" fillcolor="#ffffc0" y="489" showopsigs="601" linewidth="none" height="171" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="ySeTGJOMEmYM" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="1309" showattsigs="601" x="0" fillcolor="#ffffc0" y="0" showopsigs="601" linewidth="none" height="432" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="xnGQ9ti6LKXZ" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="447" showattsigs="601" x="0" fillcolor="#ffffc0" y="778" showopsigs="601" linewidth="none" height="360" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="Ffpcevz092To" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="201" showattsigs="601" x="715" fillcolor="#ffffc0" y="673" showopsigs="601" linewidth="none" height="198" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="pEl1C68UjFRR" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="179" showattsigs="601" x="707" fillcolor="#ffffc0" y="933" showopsigs="601" linewidth="none" height="81" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="niNHo3iBMi93" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="271" showattsigs="601" x="1009" fillcolor="#ffffc0" y="477" showopsigs="601" linewidth="none" height="225" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="akTdL0BuuMIi" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <enumwidget usesdiagramfillcolor="0" width="307" x="985" fillcolor="#ffffc0" y="761" linewidth="none" height="90" usefillcolor="1" isinstance="0" xmi.id="0AFakTbKOjhV" showpackage="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages/>
+ <associations>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" linewidth="none" widgetbid="Ffpcevz092To" widgetaid="ySeTGJOMEmYM" xmi.id="U9HR73bnbWVt" type="512" linecolor="none" >
+ <linepath>
+ <startpoint startx="474" starty="660" />
+ <endpoint endx="298" endy="778" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="5" indexa="4" totalcountb="2" indexb="1" linewidth="none" widgetbid="akTdL0BuuMIi" widgetaid="xnGQ9ti6LKXZ" xmi.id="2lGX5o190Fyn" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="1047" starty="432" />
+ <endpoint endx="1009" endy="589" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="16" x="1049" fillcolor="none" y="434" linewidth="none" posttext="" role="701" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="2NvVPoo8Na9A" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ <floatingtext usesdiagramfillcolor="1" width="15" x="992" fillcolor="none" y="565" linewidth="none" posttext="" role="702" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="sYcJkf13jWsH" text="*" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="5" indexa="3" totalcountb="2" indexb="1" linewidth="none" widgetbid="pEl1C68UjFRR" widgetaid="xnGQ9ti6LKXZ" xmi.id="w2GO5CvfhZ6h" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="785" starty="432" />
+ <endpoint endx="815" endy="673" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="16" x="767" fillcolor="none" y="434" linewidth="none" posttext="" role="701" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="J3rx2sF2FBYd" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ <floatingtext usesdiagramfillcolor="1" width="16" x="817" fillcolor="none" y="649" linewidth="none" posttext="" role="702" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="xMlIwuRoQ158" text="4" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="1" totalcountb="5" indexb="1" linewidth="none" widgetbid="xnGQ9ti6LKXZ" widgetaid="Ffpcevz092To" xmi.id="iYWkSGRVz8hL" type="512" linecolor="none" >
+ <linepath>
+ <startpoint startx="149" starty="778" />
+ <endpoint endx="261" endy="432" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="pEl1C68UjFRR" widgetaid="Ffpcevz092To" xmi.id="F2c5R39MF9xW" type="512" linecolor="none" >
+ <linepath>
+ <startpoint startx="447" starty="958" />
+ <endpoint endx="715" endy="772" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="niNHo3iBMi93" widgetaid="pEl1C68UjFRR" xmi.id="iFQH9XCi3DbL" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="815" starty="871" />
+ <endpoint endx="796" endy="933" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="16" x="818" fillcolor="none" y="902" linewidth="none" posttext="" role="701" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="g5AOb2ft4Wo6" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ <floatingtext usesdiagramfillcolor="1" width="15" x="777" fillcolor="none" y="928" linewidth="none" posttext="" role="702" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="P39cChD71xQx" text="*" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="0AFakTbKOjhV" widgetaid="akTdL0BuuMIi" xmi.id="3qIL60CD7SL5" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="1144" starty="702" />
+ <endpoint endx="1138" endy="761" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="5" indexb="2" linewidth="none" widgetbid="xnGQ9ti6LKXZ" widgetaid="ySeTGJOMEmYM" xmi.id="pV8BBjAtfG0U" type="512" linecolor="none" >
+ <linepath>
+ <startpoint startx="474" starty="489" />
+ <endpoint endx="523" endy="432" />
+ </linepath>
+ </assocwidget>
+ </associations>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="46" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="1785" snapy="10" showatts="1" xmi.id="wDaoEutt1heF" documentation="" type="1" showops="1" showpackage="0" name="cco_action" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1839" >
+ <widgets>
+ <classwidget usesdiagramfillcolor="0" width="433" showattsigs="601" x="2" fillcolor="#ffffc0" y="552" showopsigs="601" linewidth="none" height="171" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="ySeTGJOMEmYM" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="1309" showattsigs="601" x="0" fillcolor="#ffffc0" y="0" showopsigs="601" linewidth="none" height="432" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="xnGQ9ti6LKXZ" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="447" showattsigs="601" x="622" fillcolor="#ffffc0" y="500" showopsigs="601" linewidth="none" height="360" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="Ffpcevz092To" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages/>
+ <associations>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="ySeTGJOMEmYM" widgetaid="Ffpcevz092To" xmi.id="REz0iVtn4vkj" type="512" linecolor="none" >
+ <linepath>
+ <startpoint startx="622" starty="680" />
+ <endpoint endx="435" endy="637" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" linewidth="none" widgetbid="xnGQ9ti6LKXZ" widgetaid="Ffpcevz092To" xmi.id="iYWkSGRVz8hL" type="512" linecolor="none" >
+ <linepath>
+ <startpoint startx="845" starty="500" />
+ <endpoint endx="436" endy="432" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="ySeTGJOMEmYM" widgetaid="xnGQ9ti6LKXZ" xmi.id="LcsLN0ze8QIE" type="512" linecolor="none" >
+ <linepath>
+ <startpoint startx="436" starty="432" />
+ <endpoint endx="218" endy="552" />
+ </linepath>
+ </assocwidget>
+ </associations>
+ </diagram>
+ </diagrams>
+ </XMI.extension>
+ </UML:Package>
+ <UML:Enumeration stereotype="enum" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="K9Fc7ya6eboZ" isRoot="false" isAbstract="false" name="cp_link_type_t" >
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="K9Fc7ya6eboZ" xmi.id="15F3QKNkRcLY" isRoot="false" isAbstract="false" name="CP_LINK_TYPE_NONE" />
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="K9Fc7ya6eboZ" xmi.id="sSSMYaHXdXb3" isRoot="false" isAbstract="false" name="CP_LINK_TYPE_LOCAL" />
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="K9Fc7ya6eboZ" xmi.id="k4qPW77MaXi6" isRoot="false" isAbstract="false" name="CP_LINK_TYPE_GLOBAL" />
+ </UML:Enumeration>
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="fLjwr6MNuZXD" isRoot="false" isAbstract="false" name="cp_conn_cspec_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="hUapPz7FvDlL" type="qx03D9bX8Zse" name="cspec_len_oct" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="zURtIMQaYz3T" type="d21ZFkuCFK5X" name="f_cinfo" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="eU5DT9ejQFbr" type="d21ZFkuCFK5X" name="r_cinfo" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="AhzYLwKyyJVB" type="y93NOeEZLD5e" name="f_qmp" />
+ <UML:Attribute isSpecification="false" visibility="public" xmi.id="7Na3g6CkUZ0C" type="y93NOeEZLD5e" name="r_qmp" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Enumeration stereotype="enum" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="0AFakTbKOjhV" isRoot="false" isAbstract="false" name="cp_cco_bw_persistence_t" >
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="0AFakTbKOjhV" xmi.id="0sn2w94wHHV1" isRoot="false" isAbstract="false" name="CP_CCO_BW_PERSISTENCE_NOT_PERSISTENT" />
+ <UML:EnumerationLiteral comment="
+" isSpecification="false" isLeaf="false" visibility="public" namespace="0AFakTbKOjhV" xmi.id="HGkt98I7y37u" isRoot="false" isAbstract="false" name="CP_CCO_BW_PERSISTENCE_PERSISTENT" />
+ </UML:Enumeration>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="SE4drlhQgGnK" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="ppkGqnOUsYsS" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="ZVJd07jN8sxL" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="5N0jdm3LnaNE" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="XBQY8qUvfEBT" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="zYys4qIdMbGK" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="b7KNffbX2W2O" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="g0hoqe9Mpauv" aggregation="aggregate" type="akTdL0BuuMIi" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="OMp2Y0VYWTOb" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="fpbgLd4VX8IR" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="KgEeFVwvTdjH" aggregation="aggregate" type="ySeTGJOMEmYM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Hrd5PWynsnnP" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="kz0I7IjzeXWP" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="mJxIkJr2z4eC" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Xa70DqFTftW4" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="nVqR2Kp5JL6z" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="NSqFGde0uZGf" aggregation="aggregate" type="ySeTGJOMEmYM" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="s6fpAK1hu6f6" aggregation="none" type="Dd5IhQuqhODL" name="" multiplicity="*" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="FuUBzFE99m1F" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="xuZal3f8VVMj" aggregation="aggregate" type="ySeTGJOMEmYM" name="" multiplicity="0" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="6yjzYycO4HCE" aggregation="none" type="pEl1C68UjFRR" name="" multiplicity="4" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="aRjAdPOlJ8Zo" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="ZDtUKYYFS7pC" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="ASKdvgN2f4zB" aggregation="none" type="pEl1C68UjFRR" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="iFQH9XCi3DbL" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="2bX4qjGQv9sF" aggregation="composite" type="pEl1C68UjFRR" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="hQS8VFKdieGd" aggregation="none" type="niNHo3iBMi93" name="" multiplicity="*" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="mfAF1Et9RgMb" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Jddwia5i9cn0" aggregation="none" type="nKah2FElYQjf" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="M3OHBEUqeuy7" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="8NatufiLOVge" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="9GkptyTCa46G" aggregation="none" type="akTdL0BuuMIi" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="fBwonjm7l8Mu" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="1V4Vw7QgAqng" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Mqkyij5sxnhq" aggregation="composite" type="ySeTGJOMEmYM" name="" multiplicity="0" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="k80KB6YqHUc3" aggregation="none" type="pEl1C68UjFRR" name="" multiplicity="4" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="rG6FnLTUU3xX" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="CN8vVVpsJZo2" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="GusEfX4Ng5hr" aggregation="none" type="pEl1C68UjFRR" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="w2GO5CvfhZ6h" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="9DfPiFQucYn6" aggregation="composite" type="xnGQ9ti6LKXZ" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="1cwJ9kJQcBeI" aggregation="none" type="pEl1C68UjFRR" name="" multiplicity="4" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Generalization isSpecification="false" child="ySeTGJOMEmYM" visibility="public" namespace="Logical View" xmi.id="he8aiM3PdmBs" parent="xnGQ9ti6LKXZ" discriminator="" name="" />
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="RdSzOM9ws9pF" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="igfMjLBtYoIE" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="4i6eEtkGVeZd" aggregation="none" type="nKah2FElYQjf" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="TjLJsBY0YHzZ" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Ps311fHhLx45" aggregation="composite" type="nKah2FElYQjf" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="GDwm2E14u5g8" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="FZnmqkJSolys" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="zPOS3v5Sl6Sm" aggregation="composite" type="nKah2FElYQjf" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="ljU5eWAuj4fj" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="A4CznApzfO14" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="IgnAjSIirf9u" aggregation="composite" type="Dd5IhQuqhODL" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="aCLMJn64Wa9B" aggregation="none" type="nKah2FElYQjf" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="5MhNVwbXrStj" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="4H3oJiVZMHj6" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="j2mahvSF8nZP" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="yGvogmXTI20E" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="YgR5EZEJoH58" aggregation="none" type="pEl1C68UjFRR" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="0ahMrRSaTF88" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="yR77gv82Dngk" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="8bLEMvdvZ3yl" aggregation="composite" type="d8mKKcTJhtMZ" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="cC2QR7YRgGmV" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="qzZi0HXSKdRg" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="hC68PCEYlZk8" aggregation="composite" type="Dd5IhQuqhODL" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="SM1zPzj19lRa" aggregation="none" type="Q60RU8Qxt2jh" name="" multiplicity="1" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="Ytu0ZEZIt40G" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="t00XEm2vy61O" aggregation="none" type="nKah2FElYQjf" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="JFu4meAD0BAP" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="yIAhg4g39Wum" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="8tOFfqqWoo32" aggregation="aggregate" type="ySeTGJOMEmYM" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="a5vYCwuT9oXt" aggregation="none" type="adjwEdq884ob" name="" multiplicity="*" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="1ZrlQBx4omHB" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Rg6RpFpy8DBl" aggregation="aggregate" type="adjwEdq884ob" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="1zHpnIpNOkuY" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="SgCGphSMnicE" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="eo1nbWf2CjR2" aggregation="none" type="adjwEdq884ob" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="yGy5S9qT98Hw" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="4n7CxO4qepqv" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="Q4ImpCITyJFZ" aggregation="none" type="pEl1C68UjFRR" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="ouZ0d10aFwfh" aggregation="none" type="adjwEdq884ob" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="a1oSjxPd5iaz" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="6V9DbO70SPkH" aggregation="none" type="adjwEdq884ob" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Z3jYKw58of7P" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="VqiqgPP0C8zY" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="g5zt2cb68iHh" aggregation="composite" type="Dd5IhQuqhODL" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="6OfYmQoJRVpl" aggregation="none" type="oE5CCxttNgAF" name="" multiplicity="1" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="hTFpkGG8AM5T" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="PtsDYxaC2a52" aggregation="composite" type="d8mKKcTJhtMZ" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Ce8IMNyQkdxU" aggregation="none" type="nKah2FElYQjf" name="" multiplicity="1" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="U9HR73bnbWVt" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="1jnSEbCbU4m0" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="1MC1wF47sANE" aggregation="none" type="Ffpcevz092To" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="REz0iVtn4vkj" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="YJdGxakwJXPV" aggregation="none" type="Ffpcevz092To" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="6Z6adqacCkb7" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="iYWkSGRVz8hL" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="yfCqoZ2Ktfao" aggregation="none" type="Ffpcevz092To" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="DKkWp7zwg3UH" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="eYhdhOxPg2Vx" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="t3r6nTDj6PZu" aggregation="composite" type="adjwEdq884ob" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="waCnFmbT4Kxs" aggregation="none" type="Ffpcevz092To" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="AnXqp1nebv8V" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Pxm60ELsHDy3" aggregation="composite" type="Ffpcevz092To" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="g9mmWMfSupE7" aggregation="none" type="adjwEdq884ob" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Package stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="8IfFoRAxojCs" isRoot="false" isAbstract="false" name="Sequence diagram" >
+ <UML:Namespace.ownedElement/>
+ <XMI.extension xmi.extender="umbrello" >
+ <diagrams>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="837" snapy="10" showatts="1" xmi.id="fHTon9X3gX1E" documentation="" type="3" showops="1" showpackage="0" name="cco_action_cc_link_new_req_valid" localid="g2KjDIEXFsVO" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="862" >
+ <widgets>
+ <objectwidget usesdiagramfillcolor="0" width="39" x="46" fillcolor="#ffffc0" y="17" instancename="" linewidth="none" height="63" usefillcolor="1" isinstance="0" xmi.id="pRzkrBbewp0R" decon="0" localid="r0ebcYhsDved" multipleinstance="0" drawasactor="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="125" x="272" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ySeTGJOMEmYM" decon="0" localid="5ZRolH9OYbCJ" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="120" x="520" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="Ffpcevz092To" decon="0" localid="w4LrTD0CdDEH" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="104" x="717" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="xnGQ9ti6LKXZ" decon="0" localid="g2KjDIEXFsVO" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages>
+ <messagewidget usesdiagramfillcolor="1" width="277" x="65" fillcolor="none" y="123" operation="4Jl61qfG7FdR" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="256" usefillcolor="1" seqnum="" textid="nLlyGNbJw07g" widgetaid="r0ebcYhsDved" isinstance="0" xmi.id="4Jl61qfG7FdR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="405" x="70" fillcolor="none" y="101" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="nLlyGNbJw07g" text=": process_cc_link_new_req(ctx : cp_t*, mme : cp_mme_rx_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="254" x="334" fillcolor="none" y="155" operation="reovd9ZsoNSR" linewidth="none" widgetbid="w4LrTD0CdDEH" height="33" usefillcolor="1" seqnum="" textid="2V22C0q93ByU" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="reovd9ZsoNSR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="301" x="339" fillcolor="none" y="133" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="2V22C0q93ByU" text=": reovd9ZsoNSR" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="254" x="334" fillcolor="none" y="215" operation="PxHXpaAgEwbp" linewidth="none" widgetbid="w4LrTD0CdDEH" height="32" usefillcolor="1" seqnum="" textid="swhpBXfC0iED" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="PxHXpaAgEwbp" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="237" x="339" fillcolor="none" y="193" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="swhpBXfC0iED" text=": PxHXpaAgEwbp" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="443" x="334" fillcolor="none" y="273" operation="O87gKQtsw1DR" linewidth="none" widgetbid="g2KjDIEXFsVO" height="32" usefillcolor="1" seqnum="" textid="grDhZQuFSExg" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="O87gKQtsw1DR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="168" x="339" fillcolor="none" y="251" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="grDhZQuFSExg" text=": alloc_sched(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="50" x="332" fillcolor="none" y="335" operation="QNnsMczV4BbV" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="32" usefillcolor="1" seqnum="" textid="XtFP4RQkGeRn" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="QNnsMczV4BbV" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="203" x="337" fillcolor="none" y="313" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="XtFP4RQkGeRn" text=": mme_glink_send(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ </messages>
+ <associations/>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="837" snapy="10" showatts="1" xmi.id="yhmIJA8o3LB5" documentation="" type="3" showops="1" showpackage="0" name="cco_action_cc_link_new_req_not_valid" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="862" >
+ <widgets>
+ <objectwidget usesdiagramfillcolor="0" width="39" x="46" fillcolor="#ffffc0" y="17" instancename="" linewidth="none" height="63" usefillcolor="1" isinstance="0" xmi.id="pRzkrBbewp0R" decon="0" localid="r0ebcYhsDved" multipleinstance="0" drawasactor="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="120" x="520" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="Ffpcevz092To" decon="0" localid="w4LrTD0CdDEH" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="125" x="272" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ySeTGJOMEmYM" decon="0" localid="5ZRolH9OYbCJ" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages>
+ <messagewidget usesdiagramfillcolor="1" width="277" x="65" fillcolor="none" y="123" operation="4Jl61qfG7FdR" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="89" usefillcolor="1" seqnum="" textid="nLlyGNbJw07g" widgetaid="r0ebcYhsDved" isinstance="0" xmi.id="4Jl61qfG7FdR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="405" x="70" fillcolor="none" y="101" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="nLlyGNbJw07g" text=": process_cc_link_new_req(ctx : cp_t*, mme : cp_mme_rx_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="254" x="334" fillcolor="none" y="155" operation="reovd9ZsoNSR" linewidth="none" widgetbid="w4LrTD0CdDEH" height="33" usefillcolor="1" seqnum="" textid="2V22C0q93ByU" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="reovd9ZsoNSR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="301" x="339" fillcolor="none" y="133" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="2V22C0q93ByU" text=": reovd9ZsoNSR" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ </messages>
+ <associations/>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="837" snapy="10" showatts="1" xmi.id="ok2jsyqCdw9J" documentation="" type="3" showops="1" showpackage="0" name="cco_action_cc_link_rel_req" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="862" >
+ <widgets>
+ <objectwidget usesdiagramfillcolor="0" width="39" x="0" fillcolor="#ffffc0" y="17" instancename="" linewidth="none" height="63" usefillcolor="1" isinstance="0" xmi.id="pRzkrBbewp0R" decon="0" localid="r0ebcYhsDved" multipleinstance="0" drawasactor="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="120" x="449" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="Ffpcevz092To" decon="0" localid="w4LrTD0CdDEH" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="104" x="594" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="xnGQ9ti6LKXZ" decon="0" localid="g2KjDIEXFsVO" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="125" x="220" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ySeTGJOMEmYM" decon="0" localid="5ZRolH9OYbCJ" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages>
+ <messagewidget usesdiagramfillcolor="1" width="271" x="19" fillcolor="none" y="123" operation="kWAzj2FfLSzz" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="215" usefillcolor="1" seqnum="" textid="nLlyGNbJw07g" widgetaid="r0ebcYhsDved" isinstance="0" xmi.id="kWAzj2FfLSzz" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="395" x="24" fillcolor="none" y="101" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="nLlyGNbJw07g" text=": process_cc_link_rel_req(ctx : cp_t*, mme : cp_mme_rx_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="235" x="282" fillcolor="none" y="160" operation="FXWnEhmm5mhN" linewidth="none" widgetbid="w4LrTD0CdDEH" height="32" usefillcolor="1" seqnum="" textid="swhpBXfC0iED" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="FXWnEhmm5mhN" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="131" x="287" fillcolor="none" y="138" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="swhpBXfC0iED" text=": FXWnEhmm5mhN" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="372" x="282" fillcolor="none" y="222" operation="O87gKQtsw1DR" linewidth="none" widgetbid="g2KjDIEXFsVO" height="32" usefillcolor="1" seqnum="" textid="grDhZQuFSExg" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="O87gKQtsw1DR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="168" x="287" fillcolor="none" y="200" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="grDhZQuFSExg" text=": alloc_sched(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="50" x="280" fillcolor="none" y="286" operation="QNnsMczV4BbV" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="32" usefillcolor="1" seqnum="" textid="XtFP4RQkGeRn" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="QNnsMczV4BbV" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="203" x="285" fillcolor="none" y="264" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="XtFP4RQkGeRn" text=": mme_glink_send(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ </messages>
+ <associations/>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="837" snapy="10" showatts="1" xmi.id="zbNIHnq6ICv9" documentation="" type="3" showops="1" showpackage="0" name="cco_action_cc_link_mod_req_valid" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="862" >
+ <widgets>
+ <objectwidget usesdiagramfillcolor="0" width="39" x="0" fillcolor="#ffffc0" y="17" instancename="" linewidth="none" height="63" usefillcolor="1" isinstance="0" xmi.id="pRzkrBbewp0R" decon="0" localid="r0ebcYhsDved" multipleinstance="0" drawasactor="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="120" x="423" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="Ffpcevz092To" decon="0" localid="w4LrTD0CdDEH" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="104" x="584" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="xnGQ9ti6LKXZ" decon="0" localid="g2KjDIEXFsVO" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="125" x="155" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ySeTGJOMEmYM" decon="0" localid="5ZRolH9OYbCJ" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages>
+ <messagewidget usesdiagramfillcolor="1" width="206" x="19" fillcolor="none" y="123" operation="7f6S84QwyS5a" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="256" usefillcolor="1" seqnum="" textid="nLlyGNbJw07g" widgetaid="r0ebcYhsDved" isinstance="0" xmi.id="7f6S84QwyS5a" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="407" x="24" fillcolor="none" y="101" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="nLlyGNbJw07g" text=": process_cc_link_mod_req(ctx : cp_t*, mme : cp_mme_rx_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="274" x="217" fillcolor="none" y="155" operation="reovd9ZsoNSR" linewidth="none" widgetbid="w4LrTD0CdDEH" height="33" usefillcolor="1" seqnum="" textid="2V22C0q93ByU" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="reovd9ZsoNSR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="301" x="222" fillcolor="none" y="133" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="2V22C0q93ByU" text=": reovd9ZsoNSR" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="274" x="217" fillcolor="none" y="215" operation="NKdd4j45iVaX" linewidth="none" widgetbid="w4LrTD0CdDEH" height="32" usefillcolor="1" seqnum="" textid="swhpBXfC0iED" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="NKdd4j45iVaX" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="290" x="222" fillcolor="none" y="193" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="swhpBXfC0iED" text=": NKdd4j45iVaX" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="427" x="217" fillcolor="none" y="273" operation="O87gKQtsw1DR" linewidth="none" widgetbid="g2KjDIEXFsVO" height="32" usefillcolor="1" seqnum="" textid="grDhZQuFSExg" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="O87gKQtsw1DR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="168" x="306" fillcolor="none" y="251" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="grDhZQuFSExg" text=": alloc_sched(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="50" x="215" fillcolor="none" y="335" operation="QNnsMczV4BbV" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="32" usefillcolor="1" seqnum="" textid="XtFP4RQkGeRn" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="QNnsMczV4BbV" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="203" x="220" fillcolor="none" y="313" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="XtFP4RQkGeRn" text=": mme_glink_send(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ </messages>
+ <associations/>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="837" snapy="10" showatts="1" xmi.id="jqjnWJ3RcZok" documentation="" type="3" showops="1" showpackage="0" name="cco_action_cc_link_mod_req_not_valid" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="862" >
+ <widgets>
+ <objectwidget usesdiagramfillcolor="0" width="39" x="0" fillcolor="#ffffc0" y="17" instancename="" linewidth="none" height="63" usefillcolor="1" isinstance="0" xmi.id="pRzkrBbewp0R" decon="0" localid="r0ebcYhsDved" multipleinstance="0" drawasactor="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="120" x="406" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="Ffpcevz092To" decon="0" localid="w4LrTD0CdDEH" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="125" x="182" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ySeTGJOMEmYM" decon="0" localid="5ZRolH9OYbCJ" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages>
+ <messagewidget usesdiagramfillcolor="1" width="233" x="19" fillcolor="none" y="123" operation="7f6S84QwyS5a" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="89" usefillcolor="1" seqnum="" textid="nLlyGNbJw07g" widgetaid="r0ebcYhsDved" isinstance="0" xmi.id="7f6S84QwyS5a" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="407" x="24" fillcolor="none" y="101" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="nLlyGNbJw07g" text=": process_cc_link_mod_req(ctx : cp_t*, mme : cp_mme_rx_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="230" x="244" fillcolor="none" y="155" operation="reovd9ZsoNSR" linewidth="none" widgetbid="w4LrTD0CdDEH" height="33" usefillcolor="1" seqnum="" textid="2V22C0q93ByU" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="reovd9ZsoNSR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="301" x="249" fillcolor="none" y="133" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="2V22C0q93ByU" text=": reovd9ZsoNSR" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ </messages>
+ <associations/>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="837" snapy="10" showatts="1" xmi.id="So6DeCWo8dXw" documentation="" type="3" showops="1" showpackage="0" name="cco_action_cc_link_sqz_req_rx_valid" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="862" >
+ <widgets>
+ <objectwidget usesdiagramfillcolor="0" width="39" x="0" fillcolor="#ffffc0" y="17" instancename="" linewidth="none" height="63" usefillcolor="1" isinstance="0" xmi.id="pRzkrBbewp0R" decon="0" localid="r0ebcYhsDved" multipleinstance="0" drawasactor="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="120" x="407" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="Ffpcevz092To" decon="0" localid="w4LrTD0CdDEH" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="104" x="599" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="xnGQ9ti6LKXZ" decon="0" localid="g2KjDIEXFsVO" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="125" x="190" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ySeTGJOMEmYM" decon="0" localid="5ZRolH9OYbCJ" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages>
+ <messagewidget usesdiagramfillcolor="1" width="241" x="19" fillcolor="none" y="123" operation="RfHVkGwVk5ST" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="256" usefillcolor="1" seqnum="" textid="nLlyGNbJw07g" widgetaid="r0ebcYhsDved" isinstance="0" xmi.id="RfHVkGwVk5ST" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="420" x="24" fillcolor="none" y="101" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="nLlyGNbJw07g" text=": RfHVkGwVk5ST" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="223" x="252" fillcolor="none" y="155" operation="reovd9ZsoNSR" linewidth="none" widgetbid="w4LrTD0CdDEH" height="33" usefillcolor="1" seqnum="" textid="2V22C0q93ByU" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="reovd9ZsoNSR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="301" x="257" fillcolor="none" y="133" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="2V22C0q93ByU" text=": reovd9ZsoNSR" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="223" x="252" fillcolor="none" y="215" operation="NKdd4j45iVaX" linewidth="none" widgetbid="w4LrTD0CdDEH" height="32" usefillcolor="1" seqnum="" textid="swhpBXfC0iED" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="NKdd4j45iVaX" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="290" x="257" fillcolor="none" y="193" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="swhpBXfC0iED" text=": NKdd4j45iVaX" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="407" x="252" fillcolor="none" y="273" operation="O87gKQtsw1DR" linewidth="none" widgetbid="g2KjDIEXFsVO" height="32" usefillcolor="1" seqnum="" textid="grDhZQuFSExg" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="O87gKQtsw1DR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="168" x="257" fillcolor="none" y="251" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="grDhZQuFSExg" text=": alloc_sched(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="50" x="250" fillcolor="none" y="335" operation="QNnsMczV4BbV" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="32" usefillcolor="1" seqnum="" textid="XtFP4RQkGeRn" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="QNnsMczV4BbV" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="203" x="255" fillcolor="none" y="313" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="XtFP4RQkGeRn" text=": mme_glink_send(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ </messages>
+ <associations/>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="837" snapy="10" showatts="1" xmi.id="0erZURpXzgym" documentation="" type="3" showops="1" showpackage="0" name="cco_action_cc_link_sqz_req_rx_not_valid" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="862" >
+ <widgets>
+ <objectwidget usesdiagramfillcolor="0" width="39" x="0" fillcolor="#ffffc0" y="17" instancename="" linewidth="none" height="63" usefillcolor="1" isinstance="0" xmi.id="pRzkrBbewp0R" decon="0" localid="r0ebcYhsDved" multipleinstance="0" drawasactor="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="120" x="471" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="Ffpcevz092To" decon="0" localid="w4LrTD0CdDEH" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="125" x="185" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ySeTGJOMEmYM" decon="0" localid="5ZRolH9OYbCJ" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages>
+ <messagewidget usesdiagramfillcolor="1" width="236" x="19" fillcolor="none" y="123" operation="RfHVkGwVk5ST" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="89" usefillcolor="1" seqnum="" textid="nLlyGNbJw07g" widgetaid="r0ebcYhsDved" isinstance="0" xmi.id="RfHVkGwVk5ST" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="420" x="24" fillcolor="none" y="101" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="nLlyGNbJw07g" text=": RfHVkGwVk5ST" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="292" x="247" fillcolor="none" y="155" operation="reovd9ZsoNSR" linewidth="none" widgetbid="w4LrTD0CdDEH" height="33" usefillcolor="1" seqnum="" textid="2V22C0q93ByU" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="reovd9ZsoNSR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="301" x="252" fillcolor="none" y="133" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="2V22C0q93ByU" text=": reovd9ZsoNSR" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ </messages>
+ <associations/>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="837" snapy="10" showatts="1" xmi.id="xd1PHMGXFtVt" documentation="" type="3" showops="1" showpackage="0" name="cco_action_cc_alloc_move_req" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="862" >
+ <widgets>
+ <objectwidget usesdiagramfillcolor="0" width="39" x="0" fillcolor="#ffffc0" y="17" instancename="" linewidth="none" height="63" usefillcolor="1" isinstance="0" xmi.id="pRzkrBbewp0R" decon="0" localid="r0ebcYhsDved" multipleinstance="0" drawasactor="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="104" x="504" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="xnGQ9ti6LKXZ" decon="0" localid="g2KjDIEXFsVO" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="125" x="173" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ySeTGJOMEmYM" decon="0" localid="5ZRolH9OYbCJ" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages>
+ <messagewidget usesdiagramfillcolor="1" width="224" x="19" fillcolor="none" y="123" operation="VChtJRri78Bp" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="93" usefillcolor="1" seqnum="" textid="nLlyGNbJw07g" widgetaid="r0ebcYhsDved" isinstance="0" xmi.id="VChtJRri78Bp" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="422" x="24" fillcolor="none" y="101" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="nLlyGNbJw07g" text=": process_cc_alloc_move_req(ctx : cp_t*, mme : cp_mme_rx_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="329" x="235" fillcolor="none" y="158" operation="6r5JBb3UvGb7" linewidth="none" widgetbid="g2KjDIEXFsVO" height="36" usefillcolor="1" seqnum="" textid="grDhZQuFSExg" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="6r5JBb3UvGb7" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="218" x="240" fillcolor="none" y="136" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="grDhZQuFSExg" text=": alloc(cid : u8, ctx : cp_t*) : bool" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ </messages>
+ <associations/>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="837" snapy="10" showatts="1" xmi.id="l4MAtt7XrtF1" documentation="" type="3" showops="1" showpackage="0" name="cco_action_cc_ble_update_ind" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="862" >
+ <widgets>
+ <objectwidget usesdiagramfillcolor="0" width="39" x="0" fillcolor="#ffffc0" y="17" instancename="" linewidth="none" height="63" usefillcolor="1" isinstance="0" xmi.id="pRzkrBbewp0R" decon="0" localid="r0ebcYhsDved" multipleinstance="0" drawasactor="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="120" x="468" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="Ffpcevz092To" decon="0" localid="w4LrTD0CdDEH" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="104" x="633" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="xnGQ9ti6LKXZ" decon="0" localid="g2KjDIEXFsVO" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="125" x="200" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ySeTGJOMEmYM" decon="0" localid="5ZRolH9OYbCJ" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages>
+ <messagewidget usesdiagramfillcolor="1" width="251" x="19" fillcolor="none" y="123" operation="seYRAqbe0Jvw" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="216" usefillcolor="1" seqnum="" textid="nLlyGNbJw07g" widgetaid="r0ebcYhsDved" isinstance="0" xmi.id="seYRAqbe0Jvw" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="418" x="24" fillcolor="none" y="101" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="nLlyGNbJw07g" text=": process_cc_ble_update_ind(ctx : cp_t*, mme : cp_mme_rx_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="274" x="262" fillcolor="none" y="158" operation="NKdd4j45iVaX" linewidth="none" widgetbid="w4LrTD0CdDEH" height="32" usefillcolor="1" seqnum="" textid="swhpBXfC0iED" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="NKdd4j45iVaX" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="290" x="267" fillcolor="none" y="136" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="swhpBXfC0iED" text=": NKdd4j45iVaX" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="431" x="262" fillcolor="none" y="218" operation="O87gKQtsw1DR" linewidth="none" widgetbid="g2KjDIEXFsVO" height="32" usefillcolor="1" seqnum="" textid="grDhZQuFSExg" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="O87gKQtsw1DR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="168" x="267" fillcolor="none" y="196" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="grDhZQuFSExg" text=": alloc_sched(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="50" x="260" fillcolor="none" y="282" operation="QNnsMczV4BbV" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="32" usefillcolor="1" seqnum="" textid="XtFP4RQkGeRn" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="QNnsMczV4BbV" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="203" x="265" fillcolor="none" y="260" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="XtFP4RQkGeRn" text=": mme_glink_send(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ </messages>
+ <associations/>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="837" snapy="10" showatts="1" xmi.id="WTr0EIIjIoGN" documentation="" type="3" showops="1" showpackage="0" name="cco_action_cc_link_sqz_req_tx" localid="ay4ioc8tsonO" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="862" >
+ <widgets>
+ <objectwidget usesdiagramfillcolor="0" width="104" x="505" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="xnGQ9ti6LKXZ" decon="0" localid="g2KjDIEXFsVO" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="125" x="226" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ySeTGJOMEmYM" decon="0" localid="5ZRolH9OYbCJ" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ <objectwidget usesdiagramfillcolor="0" width="39" x="32" fillcolor="#ffffc0" y="17" instancename="" linewidth="none" height="63" usefillcolor="1" isinstance="0" xmi.id="pRzkrBbewp0R" decon="0" localid="ay4ioc8tsonO" multipleinstance="0" drawasactor="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages>
+ <messagewidget usesdiagramfillcolor="1" width="277" x="288" fillcolor="none" y="117" operation="O87gKQtsw1DR" linewidth="none" widgetbid="g2KjDIEXFsVO" height="32" usefillcolor="1" seqnum="" textid="grDhZQuFSExg" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="O87gKQtsw1DR" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="168" x="293" fillcolor="none" y="95" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="grDhZQuFSExg" text=": alloc_sched(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="50" x="286" fillcolor="none" y="213" operation="QNnsMczV4BbV" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="32" usefillcolor="1" seqnum="" textid="XtFP4RQkGeRn" widgetaid="5ZRolH9OYbCJ" isinstance="0" xmi.id="QNnsMczV4BbV" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="203" x="291" fillcolor="none" y="191" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="XtFP4RQkGeRn" text=": mme_glink_send(ctx : cp_t*)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="267" x="289" fillcolor="none" y="181" operation="qu2Ac479Q7k0" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="8" usefillcolor="1" seqnum="" textid="6CZqYDJIqvG9" widgetaid="g2KjDIEXFsVO" isinstance="0" xmi.id="qu2Ac479Q7k0" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="420" x="294" fillcolor="none" y="159" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="6CZqYDJIqvG9" text=": qu2Ac479Q7k0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ <messagewidget usesdiagramfillcolor="1" width="245" x="51" fillcolor="none" y="101" operation="any operation asking for scheduling" linewidth="none" widgetbid="5ZRolH9OYbCJ" height="163" usefillcolor="1" seqnum="" textid="MdxFt60R459q" widgetaid="ay4ioc8tsonO" isinstance="0" xmi.id="sFO9cMFov5K9" sequencemessagetype="1000" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
+ <floatingtext usesdiagramfillcolor="1" width="249" x="56" fillcolor="none" y="79" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="MdxFt60R459q" text=": any operation asking for scheduling" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </messagewidget>
+ </messages>
+ <associations/>
+ </diagram>
+ </diagrams>
+ </XMI.extension>
+ </UML:Package>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="F2c5R39MF9xW" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="TwHk9DnnMaYs" aggregation="none" type="Ffpcevz092To" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="uDJo2XtcKSFQ" aggregation="none" type="pEl1C68UjFRR" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="O1PWAArevDzF" isRoot="false" isAbstract="false" name="cp_cco_bw_alloc_t**" />
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="JSU2EBtENyKy" isRoot="false" isAbstract="false" name="cp_cco_bw_conn_prio_heap_t" />
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="tOgMBBDlVoLx" isRoot="false" isAbstract="false" name="cp_cco_bw_prio_heap_t" />
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="fn3T0g7mCdo8" isRoot="false" isAbstract="false" name="list_node_t" />
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="vez0woDacG3c" isRoot="false" isAbstract="false" name="set_node_t" />
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="3qIL60CD7SL5" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="NSgzMRVmxQaX" aggregation="composite" type="akTdL0BuuMIi" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="SxNOhmkKgU0K" aggregation="none" type="0AFakTbKOjhV" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="hQ7UEYOzATqF" isRoot="false" isAbstract="false" name="list_t" />
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="JO1FHqi41DrK" isRoot="false" isAbstract="false" name="cp_link_ble_interval_t*" />
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="TZfikGiIVwKz" isRoot="false" isAbstract="false" name="cp_cco_bw_alloc_t*" />
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="bfUc1UOFU09C" isRoot="false" isAbstract="false" name="u16*" />
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="Bv4qUQAgGcnc" isRoot="false" isAbstract="false" name="cp_conn_type_t" />
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="F2oiQk9bfCP9" isRoot="false" isAbstract="false" name="cp_conn_info_t" />
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="6sEW3jvdsAQ0" isRoot="false" isAbstract="false" name="mac_t" />
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="3QNGiQmMsrXJ" isRoot="false" isAbstract="false" name="cp_link_qmp_t" />
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="OlUNXhoPpodj" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="aBcLnoJLZtqz" aggregation="aggregate" type="fLjwr6MNuZXD" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Xlw6y6vhwzy6" aggregation="none" type="d8mKKcTJhtMZ" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="ap8aOZNHajls" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="7FMFEEfoNF88" aggregation="aggregate" type="fLjwr6MNuZXD" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="4RTbKKap5Uv1" aggregation="none" type="Q60RU8Qxt2jh" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="g8cNqwVSwwE6" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="aogUocbtpx83" aggregation="aggregate" type="d8mKKcTJhtMZ" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="9lqU0yd4P6dh" aggregation="none" type="Dd5IhQuqhODL" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="ZLxwL8UTBdI7" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="QDUThQSGC6i0" aggregation="aggregate" type="adjwEdq884ob" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="iJrVFzZMiNrj" aggregation="none" type="fLjwr6MNuZXD" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="yN55b1ltFiLX" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="LSliYPNxarOG" aggregation="aggregate" type="Dd5IhQuqhODL" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="HpWUvCScUK7j" aggregation="none" type="K9Fc7ya6eboZ" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="N6VU8JNOwH9n" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="He301shMKQ2r" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="nPmOFAcWz6yt" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="pV8BBjAtfG0U" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="IPVmjcTyHXwG" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Pdbk4dbp1NBG" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="jiAAt6MpIubW" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="VnkTthKC6pyn" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="PSjexgvMJU6L" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="LcsLN0ze8QIE" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="3aaR5dmS62Zr" aggregation="none" type="xnGQ9ti6LKXZ" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="mmKkWrMpTD8p" aggregation="none" type="ySeTGJOMEmYM" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ </UML:Namespace.ownedElement>
+ <XMI.extension xmi.extender="umbrello" >
+ <diagrams>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="46" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="1811" snapy="10" showatts="1" xmi.id="niq745CwWtmB" documentation="CCo action module" type="1" showops="1" showpackage="0" name="class_diagram_cco_conn_global" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1839" >
+ <widgets>
+ <classwidget usesdiagramfillcolor="0" width="1309" showattsigs="601" x="498" fillcolor="#ffffc0" y="0" showopsigs="601" linewidth="none" height="432" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="xnGQ9ti6LKXZ" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="433" showattsigs="601" x="0" fillcolor="#ffffc0" y="0" showopsigs="601" linewidth="none" height="171" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="ySeTGJOMEmYM" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="278" showattsigs="601" x="1129" fillcolor="#ffffc0" y="485" showopsigs="601" linewidth="none" height="225" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="akTdL0BuuMIi" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="173" showattsigs="601" x="82" fillcolor="#ffffc0" y="1063" showopsigs="601" linewidth="none" height="162" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="Dd5IhQuqhODL" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <enumwidget usesdiagramfillcolor="0" width="128" x="433" fillcolor="#ffffc0" y="585" linewidth="none" height="162" usefillcolor="1" isinstance="0" xmi.id="mtZJnRKOO7ZU" showpackage="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="201" showattsigs="601" x="618" fillcolor="#ffffc0" y="464" showopsigs="601" linewidth="none" height="198" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="pEl1C68UjFRR" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="179" showattsigs="601" x="872" fillcolor="#ffffc0" y="558" showopsigs="601" linewidth="none" height="81" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="niNHo3iBMi93" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="173" showattsigs="601" x="637" fillcolor="#ffffc0" y="930" showopsigs="601" linewidth="none" height="477" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="d8mKKcTJhtMZ" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="149" showattsigs="601" x="425" fillcolor="#ffffc0" y="956" showopsigs="601" linewidth="none" height="117" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="Q60RU8Qxt2jh" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="386" showattsigs="601" x="0" fillcolor="#ffffc0" y="598" showopsigs="601" linewidth="none" height="378" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="adjwEdq884ob" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="142" showattsigs="601" x="79" fillcolor="#ffffc0" y="1303" showopsigs="601" linewidth="none" height="81" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="oE5CCxttNgAF" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="447" showattsigs="601" x="0" fillcolor="#ffffc0" y="199" showopsigs="601" linewidth="none" height="360" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="Ffpcevz092To" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <enumwidget usesdiagramfillcolor="0" width="307" x="1116" fillcolor="#ffffc0" y="791" linewidth="none" height="90" usefillcolor="1" isinstance="0" xmi.id="0AFakTbKOjhV" showpackage="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="187" showattsigs="601" x="594" fillcolor="#ffffc0" y="702" showopsigs="601" linewidth="none" height="117" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="fLjwr6MNuZXD" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <enumwidget usesdiagramfillcolor="0" width="162" x="325" fillcolor="#ffffc0" y="1279" linewidth="none" height="108" usefillcolor="1" isinstance="0" xmi.id="K9Fc7ya6eboZ" showpackage="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages/>
+ <associations>
+ <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="akTdL0BuuMIi" widgetaid="xnGQ9ti6LKXZ" xmi.id="2lGX5o190Fyn" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="934" starty="432" />
+ <endpoint endx="1268" endy="485" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="17" x="925" fillcolor="none" y="434" linewidth="none" posttext="" role="701" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="7f960KKU83x1" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ <floatingtext usesdiagramfillcolor="1" width="15" x="1261" fillcolor="none" y="460" linewidth="none" posttext="" role="702" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="kHBo48ZRYI6V" text="*" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" linewidth="none" widgetbid="niNHo3iBMi93" widgetaid="pEl1C68UjFRR" xmi.id="iFQH9XCi3DbL" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="819" starty="596" />
+ <endpoint endx="872" endy="598" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="17" x="902" fillcolor="none" y="625" linewidth="none" posttext="" role="701" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="wzrETwXYZgdY" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ <floatingtext usesdiagramfillcolor="1" width="15" x="840" fillcolor="none" y="578" linewidth="none" posttext="" role="702" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="1x290x8iCKUE" text="*" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="2" totalcountb="3" indexb="1" linewidth="none" widgetbid="pEl1C68UjFRR" widgetaid="xnGQ9ti6LKXZ" xmi.id="w2GO5CvfhZ6h" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="1370" starty="432" />
+ <endpoint endx="819" endy="530" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="17" x="255" fillcolor="none" y="685" linewidth="none" posttext="" role="701" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="Q3fyKjREgGS7" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ <floatingtext usesdiagramfillcolor="1" width="17" x="826" fillcolor="none" y="474" linewidth="none" posttext="" role="702" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="A0gkgHGfEGoD" text="4" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="ySeTGJOMEmYM" widgetaid="xnGQ9ti6LKXZ" xmi.id="5MhNVwbXrStj" type="512" linecolor="none" >
+ <linepath>
+ <startpoint startx="498" starty="144" />
+ <endpoint endx="433" endy="85" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="Dd5IhQuqhODL" widgetaid="adjwEdq884ob" xmi.id="1ZrlQBx4omHB" type="501" linecolor="none" >
+ <linepath>
+ <startpoint startx="193" starty="976" />
+ <endpoint endx="168" endy="1063" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="oE5CCxttNgAF" widgetaid="Dd5IhQuqhODL" xmi.id="VqiqgPP0C8zY" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="168" starty="1225" />
+ <endpoint endx="150" endy="1303" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="16" x="172" fillcolor="none" y="606" linewidth="none" posttext="" role="701" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="DvtNFObdPEbh" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="none" />
+ <floatingtext usesdiagramfillcolor="1" width="16" x="126" fillcolor="none" y="441" linewidth="none" posttext="" role="702" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="w0wcGOkRMO93" text="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="ySeTGJOMEmYM" widgetaid="Ffpcevz092To" xmi.id="REz0iVtn4vkj" type="512" linecolor="none" >
+ <linepath>
+ <startpoint startx="223" starty="199" />
+ <endpoint endx="216" endy="171" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="1" totalcountb="3" indexb="2" linewidth="none" widgetbid="xnGQ9ti6LKXZ" widgetaid="Ffpcevz092To" xmi.id="iYWkSGRVz8hL" type="512" linecolor="none" >
+ <linepath>
+ <startpoint startx="447" starty="319" />
+ <endpoint endx="498" endy="288" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="adjwEdq884ob" widgetaid="Ffpcevz092To" xmi.id="AnXqp1nebv8V" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="223" starty="559" />
+ <endpoint endx="193" endy="598" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" linewidth="none" widgetbid="pEl1C68UjFRR" widgetaid="Ffpcevz092To" xmi.id="F2c5R39MF9xW" type="512" linecolor="none" >
+ <linepath>
+ <startpoint startx="447" starty="439" />
+ <endpoint endx="618" endy="563" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="0AFakTbKOjhV" widgetaid="akTdL0BuuMIi" xmi.id="3qIL60CD7SL5" type="510" linecolor="none" >
+ <linepath>
+ <startpoint startx="1268" starty="710" />
+ <endpoint endx="1269" endy="791" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="4" indexa="1" visibilityB="200" totalcountb="2" indexb="1" linewidth="none" widgetbid="mtZJnRKOO7ZU" widgetaid="adjwEdq884ob" xmi.id="aYoq8ZSkOLCb" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="386" starty="692" />
+ <endpoint endx="433" endy="666" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="124" x="318" fillcolor="none" y="668" linewidth="none" posttext="" role="710" height="22" usefillcolor="1" pretext="+" isinstance="0" xmi.id="fPirfV2qQwBd" text="new_conn_state" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" linewidth="none" widgetbid="d8mKKcTJhtMZ" widgetaid="fLjwr6MNuZXD" xmi.id="OlUNXhoPpodj" type="501" linecolor="none" >
+ <linepath>
+ <startpoint startx="718" starty="819" />
+ <endpoint endx="723" endy="930" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="Q60RU8Qxt2jh" widgetaid="fLjwr6MNuZXD" xmi.id="ap8aOZNHajls" type="501" linecolor="none" >
+ <linepath>
+ <startpoint startx="656" starty="819" />
+ <endpoint endx="499" endy="956" />
+ </linepath>
+ </assocwidget>
+ <assocwidget totalcounta="5" indexa="2" visibilityB="200" totalcountb="3" indexb="2" linewidth="none" widgetbid="mtZJnRKOO7ZU" widgetaid="adjwEdq884ob" xmi.id="q86HxGHLiEfh" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="386" starty="749" />
+ <endpoint endx="433" endy="693" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="117" x="325" fillcolor="none" y="695" linewidth="none" posttext="" role="710" height="22" usefillcolor="1" pretext="+" isinstance="0" xmi.id="KmGhypPupLX5" text="old_conn_state" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="4" indexa="2" visibilityB="200" totalcountb="3" indexb="1" linewidth="none" widgetbid="fLjwr6MNuZXD" widgetaid="adjwEdq884ob" xmi.id="gr9Y2XYluI6x" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="386" starty="787" />
+ <endpoint endx="594" endy="741" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="116" x="487" fillcolor="none" y="743" linewidth="none" posttext="" role="710" height="22" usefillcolor="1" pretext="+" isinstance="0" xmi.id="hFU4dd5I0n7d" text="violated_cspec" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="4" indexa="3" visibilityB="200" totalcountb="3" indexb="2" linewidth="none" widgetbid="fLjwr6MNuZXD" widgetaid="adjwEdq884ob" xmi.id="EKdjKZFyRMXT" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="386" starty="881" />
+ <endpoint endx="594" endy="780" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="121" x="482" fillcolor="none" y="752" linewidth="none" posttext="" role="710" height="22" usefillcolor="1" pretext="+" isinstance="0" xmi.id="GATg6eHOOX5N" text="modified_cspec" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="K9Fc7ya6eboZ" widgetaid="Dd5IhQuqhODL" xmi.id="yN55b1ltFiLX" type="501" linecolor="none" >
+ <linepath>
+ <startpoint startx="255" starty="1144" />
+ <endpoint endx="406" endy="1279" />
+ </linepath>
+ </assocwidget>
+ </associations>
+ </diagram>
+ </diagrams>
+ </XMI.extension>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Use Case View" isRoot="false" isAbstract="false" name="Use Case View" >
+ <UML:Namespace.ownedElement>
+ <UML:Actor isSpecification="false" isLeaf="false" visibility="public" namespace="Use Case View" xmi.id="pRzkrBbewp0R" isRoot="false" isAbstract="false" name="CP" />
+ </UML:Namespace.ownedElement>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Component View" isRoot="false" isAbstract="false" name="Component View" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Deployment View" isRoot="false" isAbstract="false" name="Deployment View" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Entity Relationship Model" isRoot="false" isAbstract="false" name="Entity Relationship Model" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ </UML:Namespace.ownedElement>
+ </UML:Model>
+ </XMI.content>
+ <XMI.extensions xmi.extender="umbrello" >
+ <docsettings viewid="wDaoEutt1heF" documentation="" uniqueid="mmKkWrMpTD8p" />
+ <listview>
+ <listitem open="1" type="800" label="Views" >
+ <listitem open="1" type="801" id="Logical View" >
+ <listitem open="1" type="803" id="vQr3syDVnjwt" >
+ <listitem open="0" type="807" id="Vi7xSEHjGpDi" label="bw" />
+ <listitem open="0" type="807" id="wDaoEutt1heF" label="cco_action" />
+ <listitem open="0" type="807" id="niq745CwWtmB" label="class_diagram_cco_conn_global" />
+ <listitem open="0" type="807" id="4HFzWQZSTZhP" label="conn" />
+ </listitem>
+ <listitem open="1" type="803" id="K35NPMr9taR3" >
+ <listitem open="0" type="813" id="oE5CCxttNgAF" >
+ <listitem open="0" type="814" id="7MBbDW5Dfddz" />
+ <listitem open="0" type="814" id="rWKEXa4Lo7W0" />
+ <listitem open="0" type="814" id="yi3iuDTAFpl9" />
+ </listitem>
+ <listitem open="0" type="813" id="ySeTGJOMEmYM" >
+ <listitem open="0" type="815" id="QNnsMczV4BbV" />
+ <listitem open="0" type="815" id="4Jl61qfG7FdR" />
+ <listitem open="0" type="815" id="kWAzj2FfLSzz" />
+ <listitem open="0" type="815" id="7f6S84QwyS5a" />
+ <listitem open="0" type="815" id="VChtJRri78Bp" />
+ <listitem open="0" type="815" id="seYRAqbe0Jvw" />
+ <listitem open="0" type="815" id="DNsf89jKgseb" />
+ <listitem open="0" type="815" id="tR7lNfHrBJvJ" />
+ </listitem>
+ <listitem open="0" type="813" id="akTdL0BuuMIi" >
+ <listitem open="0" type="814" id="WHgpgU3HDWsW" />
+ <listitem open="0" type="814" id="2pv02ohjicc7" />
+ <listitem open="0" type="814" id="6CEonouBntNY" />
+ <listitem open="0" type="814" id="6lmba4wqHNOl" />
+ <listitem open="0" type="814" id="KtVJ3RkxxT7e" />
+ <listitem open="0" type="814" id="dkbxTW5FavZS" />
+ <listitem open="0" type="814" id="jUHoqZsuISuy" />
+ <listitem open="0" type="814" id="9UW3dNtE8T9Z" />
+ <listitem open="0" type="814" id="mVY4wQ05uW6V" />
+ <listitem open="0" type="814" id="rzhzQqWM5KrC" />
+ <listitem open="0" type="814" id="3oBvIFO8C57d" />
+ </listitem>
+ <listitem open="0" type="813" id="niNHo3iBMi93" >
+ <listitem open="0" type="814" id="kC9bWRewTRAy" />
+ <listitem open="0" type="814" id="me7r6SxasvES" />
+ <listitem open="0" type="814" id="iHTllYAzskuy" />
+ </listitem>
+ <listitem open="0" type="813" id="pEl1C68UjFRR" >
+ <listitem open="0" type="814" id="ooF6vpsKuOw1" />
+ <listitem open="0" type="814" id="BoTNcsVT3vk5" />
+ <listitem open="0" type="814" id="AhBRVaG2kt6W" />
+ <listitem open="0" type="814" id="vlplg1EMIh54" />
+ <listitem open="0" type="815" id="BuYs8zIb3uMF" />
+ <listitem open="0" type="815" id="ArL3GjV2Yl6R" />
+ <listitem open="0" type="815" id="YyjQMfR7LmP8" />
+ <listitem open="0" type="815" id="FG15yw3gMB8Z" />
+ <listitem open="0" type="815" id="uq9DVEHiSGoP" />
+ <listitem open="0" type="815" id="udW0X6nRwucP" />
+ </listitem>
+ <listitem open="0" type="813" id="xnGQ9ti6LKXZ" >
+ <listitem open="0" type="814" id="8SVuiaBMFxkG" />
+ <listitem open="0" type="814" id="IvjtyxL96U0O" />
+ <listitem open="0" type="814" id="bMccUjua3QRe" />
+ <listitem open="0" type="814" id="qqpCp7AgWp2f" />
+ <listitem open="0" type="814" id="yEOT2jRXwz6c" />
+ <listitem open="0" type="814" id="wHXJuWtlMix9" />
+ <listitem open="0" type="814" id="o5qKsqxq4MK4" />
+ <listitem open="0" type="815" id="kZlArwfzKyf6" />
+ <listitem open="0" type="815" id="O87gKQtsw1DR" />
+ <listitem open="0" type="815" id="6r5JBb3UvGb7" />
+ <listitem open="0" type="815" id="8VFn5SRIJtio" />
+ <listitem open="0" type="815" id="CX7QmGnNQfyu" />
+ <listitem open="0" type="815" id="N8I7BjZIOdlW" />
+ <listitem open="0" type="815" id="qDTUjKdqN9vB" />
+ <listitem open="0" type="815" id="VNZrMxhseKAs" />
+ <listitem open="0" type="815" id="REvc418qnVEv" />
+ <listitem open="0" type="815" id="WlMKMGxlUqNX" />
+ <listitem open="0" type="815" id="5NytACfVvOsX" />
+ <listitem open="0" type="815" id="2dqv1jTNexf5" />
+ <listitem open="0" type="815" id="2vygqejoln43" />
+ <listitem open="0" type="815" id="29Uw34J8wOf4" />
+ <listitem open="0" type="815" id="42UyQ92giMdG" />
+ <listitem open="0" type="815" id="Xml5upZdXAZW" />
+ </listitem>
+ <listitem open="0" type="813" id="Ffpcevz092To" >
+ <listitem open="0" type="814" id="bYj9JToa9uKf" />
+ <listitem open="0" type="815" id="9kRYzQhfAceh" />
+ <listitem open="0" type="815" id="wiccWDa1IGB0" />
+ <listitem open="0" type="815" id="ARdRgpRYumPW" />
+ <listitem open="0" type="815" id="X48RoXwe1hti" />
+ <listitem open="0" type="815" id="uAWvrOeD1yYc" />
+ <listitem open="0" type="815" id="u7uw5QW7e2LB" />
+ <listitem open="0" type="815" id="Cbkob5zYtRxc" />
+ <listitem open="0" type="815" id="OoAFD7r499dr" />
+ <listitem open="0" type="815" id="yuO7aB8gV7pA" />
+ <listitem open="0" type="815" id="3nxXunhqNtRt" />
+ <listitem open="0" type="815" id="MYQkPqdgh6Vs" />
+ <listitem open="0" type="815" id="TjI8pn05stMj" />
+ <listitem open="0" type="815" id="4KbuDwdv9pwT" />
+ <listitem open="0" type="815" id="J9VSwPumre2k" />
+ <listitem open="0" type="815" id="WCqMot49dnJ3" />
+ <listitem open="0" type="815" id="XqLBbcEPfIWF" />
+ <listitem open="0" type="815" id="7qNl6tymRO2W" />
+ <listitem open="0" type="815" id="M9nDiyyqHBL5" />
+ </listitem>
+ <listitem open="0" type="813" id="adjwEdq884ob" >
+ <listitem open="0" type="814" id="Iz4rTWTxS3n0" />
+ <listitem open="0" type="814" id="bdStR08xCgmF" />
+ <listitem open="0" type="814" id="PKGfk5LGn3bJ" />
+ <listitem open="0" type="814" id="q86HxGHLiEfh" />
+ <listitem open="0" type="814" id="WeNEbK4sTNyR" />
+ <listitem open="0" type="814" id="eptSFkclMxyx" />
+ <listitem open="0" type="814" id="aYoq8ZSkOLCb" />
+ <listitem open="0" type="814" id="cBHp8bzlZhfx" />
+ <listitem open="0" type="814" id="lsIYD0TogXRd" />
+ <listitem open="0" type="814" id="lNlK5PFoHXMS" />
+ <listitem open="0" type="814" id="gr9Y2XYluI6x" />
+ <listitem open="0" type="814" id="EKdjKZFyRMXT" />
+ <listitem open="0" type="814" id="t3ElLIjycSsT" />
+ <listitem open="0" type="815" id="WFqOmNayfDhz" />
+ <listitem open="0" type="815" id="OPd3dI1QBxcP" />
+ <listitem open="0" type="815" id="YdZhYB6wQZoX" />
+ <listitem open="0" type="815" id="RHNsrCNkh8Uf" />
+ <listitem open="0" type="815" id="n61SEV75ZqtV" />
+ <listitem open="0" type="815" id="d6nqhvGn9kPE" />
+ <listitem open="0" type="815" id="S6wdZOiCST19" />
+ </listitem>
+ <listitem open="0" type="813" id="Q60RU8Qxt2jh" >
+ <listitem open="0" type="814" id="BCj7uWVLsuTg" />
+ <listitem open="0" type="814" id="OMIbwSMKXMj1" />
+ <listitem open="0" type="814" id="Eu76mal8u3ho" />
+ <listitem open="0" type="814" id="U38zOryr0uB8" />
+ <listitem open="0" type="814" id="ZCRPvpA9hHET" />
+ </listitem>
+ <listitem open="0" type="813" id="d8mKKcTJhtMZ" >
+ <listitem open="0" type="814" id="gTg5YO0BUnWp" />
+ <listitem open="0" type="814" id="Px64qTbAFKMM" />
+ <listitem open="0" type="814" id="hmYsthba8Gdh" />
+ <listitem open="0" type="814" id="eds9OOwnK2pA" />
+ <listitem open="0" type="814" id="TRLilh2QRZHL" />
+ <listitem open="0" type="814" id="nR9txDa68QcP" />
+ <listitem open="0" type="814" id="Cw0z3lDbs9ub" />
+ <listitem open="0" type="814" id="8ZogWKRHjaAg" />
+ <listitem open="0" type="814" id="mlls9LFKFFJI" />
+ <listitem open="0" type="814" id="0UtqdlSmLEQp" />
+ <listitem open="0" type="814" id="Xp6GQEvAxe07" />
+ <listitem open="0" type="814" id="zFRFUiXUCPJp" />
+ <listitem open="0" type="814" id="AlZTxyIUnMlB" />
+ <listitem open="0" type="814" id="ZeJWIJbFY2U0" />
+ <listitem open="0" type="814" id="i0TuNmiXVFzS" />
+ <listitem open="0" type="814" id="DHxzcgABIUha" />
+ <listitem open="0" type="814" id="nHpKJIK2Gnub" />
+ <listitem open="0" type="814" id="Xa82q7T1NOyx" />
+ <listitem open="0" type="814" id="498MbnuM4hgM" />
+ <listitem open="0" type="814" id="xzMBkEmIptId" />
+ <listitem open="0" type="814" id="ylcJ9bGBiMVJ" />
+ <listitem open="0" type="814" id="8NdA5IU0HqCz" />
+ <listitem open="0" type="814" id="3wFspYTmH35P" />
+ <listitem open="0" type="814" id="eKaKe4bmRFvU" />
+ <listitem open="0" type="814" id="XPVmEflHbz7P" />
+ </listitem>
+ <listitem open="0" type="813" id="Dd5IhQuqhODL" >
+ <listitem open="0" type="814" id="RP4g6QESrIGR" />
+ <listitem open="0" type="814" id="R4lfEOk34S06" />
+ <listitem open="0" type="814" id="sQEhgV9JJ0Rv" />
+ <listitem open="0" type="814" id="y3j2Tj7pa9ls" />
+ <listitem open="0" type="814" id="naiC13Fgjvwp" />
+ <listitem open="0" type="814" id="2IFWtWCrXvs0" />
+ <listitem open="0" type="815" id="FMPxocle20Jj" />
+ <listitem open="0" type="815" id="Ndi6WcvlwJhi" />
+ </listitem>
+ </listitem>
+ <listitem open="1" type="803" id="8IfFoRAxojCs" >
+ <listitem open="0" type="810" id="xd1PHMGXFtVt" label="cco_action_cc_alloc_move_req" />
+ <listitem open="0" type="810" id="l4MAtt7XrtF1" label="cco_action_cc_ble_update_ind" />
+ <listitem open="0" type="810" id="jqjnWJ3RcZok" label="cco_action_cc_link_mod_req_not_valid" />
+ <listitem open="0" type="810" id="zbNIHnq6ICv9" label="cco_action_cc_link_mod_req_valid" />
+ <listitem open="0" type="810" id="yhmIJA8o3LB5" label="cco_action_cc_link_new_req_not_valid" />
+ <listitem open="0" type="810" id="fHTon9X3gX1E" label="cco_action_cc_link_new_req_valid" />
+ <listitem open="0" type="810" id="ok2jsyqCdw9J" label="cco_action_cc_link_rel_req" />
+ <listitem open="0" type="810" id="0erZURpXzgym" label="cco_action_cc_link_sqz_req_rx_not_valid" />
+ <listitem open="0" type="810" id="So6DeCWo8dXw" label="cco_action_cc_link_sqz_req_rx_valid" />
+ <listitem open="0" type="810" id="WTr0EIIjIoGN" label="cco_action_cc_link_sqz_req_tx" />
+ </listitem>
+ <listitem open="0" type="813" id="fLjwr6MNuZXD" >
+ <listitem open="0" type="814" id="hUapPz7FvDlL" />
+ <listitem open="0" type="814" id="zURtIMQaYz3T" />
+ <listitem open="0" type="814" id="eU5DT9ejQFbr" />
+ <listitem open="0" type="814" id="AhzYLwKyyJVB" />
+ <listitem open="0" type="814" id="7Na3g6CkUZ0C" />
+ </listitem>
+ <listitem open="1" type="813" id="TZfikGiIVwKz" />
+ <listitem open="1" type="813" id="O1PWAArevDzF" />
+ <listitem open="1" type="813" id="JSU2EBtENyKy" />
+ <listitem open="1" type="813" id="tOgMBBDlVoLx" />
+ <listitem open="1" type="813" id="F2oiQk9bfCP9" />
+ <listitem open="1" type="813" id="Bv4qUQAgGcnc" />
+ <listitem open="1" type="813" id="JO1FHqi41DrK" />
+ <listitem open="1" type="813" id="3QNGiQmMsrXJ" />
+ <listitem open="1" type="813" id="fn3T0g7mCdo8" />
+ <listitem open="1" type="813" id="hQ7UEYOzATqF" />
+ <listitem open="1" type="813" id="6sEW3jvdsAQ0" />
+ <listitem open="1" type="813" id="vez0woDacG3c" />
+ <listitem open="1" type="813" id="bfUc1UOFU09C" />
+ <listitem open="1" type="830" id="Datatypes" >
+ <listitem open="1" type="829" id="irUbdfzRtLuy" />
+ <listitem open="1" type="829" id="0widC5QuvWxy" />
+ <listitem open="1" type="829" id="l4plA4WjZ5hz" />
+ <listitem open="0" type="829" id="LMD9GuDpzhxX" />
+ <listitem open="0" type="829" id="M6xKR1cFPIwW" />
+ <listitem open="0" type="829" id="S1gNUo1cYqQt" />
+ <listitem open="0" type="829" id="eoUNxGuvIuwA" />
+ <listitem open="1" type="829" id="BlOcERrdVcJi" />
+ <listitem open="1" type="829" id="qpL5yhMnv5m5" />
+ <listitem open="1" type="829" id="CAMwXARcOr2q" />
+ <listitem open="1" type="829" id="ZCvyT3nV6461" />
+ <listitem open="1" type="829" id="TJR8rTv6HJGr" />
+ <listitem open="0" type="829" id="d21ZFkuCFK5X" />
+ <listitem open="1" type="829" id="y93NOeEZLD5e" />
+ <listitem open="1" type="829" id="0FkJo3kMVDSV" />
+ <listitem open="1" type="829" id="iSF0bbc1ufLz" />
+ <listitem open="1" type="829" id="rXf3L5yLNrBT" />
+ <listitem open="1" type="829" id="huvuRoPtpoED" />
+ <listitem open="1" type="829" id="3Xrk8GDGycgY" />
+ <listitem open="1" type="829" id="luyeQvc8m5hN" />
+ <listitem open="1" type="829" id="OMTNsx2stiV3" />
+ <listitem open="1" type="829" id="OqFNT55UVzVU" />
+ <listitem open="1" type="829" id="xmmoTFsE9otX" />
+ <listitem open="1" type="829" id="kfod0hZO32mt" />
+ <listitem open="1" type="829" id="pocpPVnex8xP" />
+ <listitem open="1" type="829" id="qx03D9bX8Zse" />
+ <listitem open="1" type="829" id="D9PiHaAGBCIb" />
+ <listitem open="1" type="829" id="28emhDJMNjju" />
+ <listitem open="1" type="829" id="9kqqNN6qIMaD" />
+ <listitem open="0" type="829" id="nKah2FElYQjf" />
+ <listitem open="1" type="829" id="jTfTYNoH0asy" />
+ <listitem open="1" type="829" id="C4WJsNrZpU0N" />
+ <listitem open="1" type="829" id="HSMJS6CQrwCI" />
+ </listitem>
+ <listitem open="1" type="831" id="0AFakTbKOjhV" >
+ <listitem open="0" type="839" id="0sn2w94wHHV1" />
+ <listitem open="0" type="839" id="HGkt98I7y37u" />
+ </listitem>
+ <listitem open="1" type="831" id="K9Fc7ya6eboZ" >
+ <listitem open="0" type="839" id="15F3QKNkRcLY" />
+ <listitem open="0" type="839" id="sSSMYaHXdXb3" />
+ <listitem open="0" type="839" id="k4qPW77MaXi6" />
+ </listitem>
+ <listitem open="0" type="831" id="mtZJnRKOO7ZU" >
+ <listitem open="0" type="839" id="OX2HniyXbXoO" />
+ <listitem open="0" type="839" id="neVJeoamoZ5F" />
+ <listitem open="0" type="839" id="cqyEfU3313Im" />
+ <listitem open="0" type="839" id="loGfKRYwIW8x" />
+ <listitem open="0" type="839" id="80zKS1hCpxp7" />
+ <listitem open="0" type="839" id="eDMziEWTrzlV" />
+ <listitem open="0" type="839" id="zRZGwOSgcWwz" />
+ </listitem>
+ </listitem>
+ <listitem open="1" type="802" id="Use Case View" >
+ <listitem open="1" type="811" id="pRzkrBbewp0R" />
+ </listitem>
+ <listitem open="1" type="821" id="Component View" />
+ <listitem open="1" type="827" id="Deployment View" />
+ <listitem open="1" type="836" id="Entity Relationship Model" />
+ </listitem>
+ </listview>
+ <codegeneration>
+ <codegenerator language="Java" />
+ </codegeneration>
+ </XMI.extensions>
+</XMI>
diff --git a/cesar/cp/av/cco/action/cco_conn/inc/cco_action.h b/cesar/cp/av/cco/action/cco_conn/inc/cco_action.h
new file mode 100644
index 0000000000..4e9e50473f
--- /dev/null
+++ b/cesar/cp/av/cco/action/cco_conn/inc/cco_action.h
@@ -0,0 +1,33 @@
+#ifndef cp_cco_action_private_h
+#define cp_cco_action_private_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file inc/cp_cco_action_private.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+/**
+ * - Functions reacting to incoming MME related to global connection.
+ * - Treatment of those MME - Storage and validation of the global connections
+ * - Control of the Bandwidth Manager's actions - React to the connections'
+ * states to send IND or CNF MME
+ */
+struct cp_cco_action_private_t
+{
+ /** Public data. */
+ cp_cco_action_t public_data;
+
+};
+typedef struct cp_cco_action_private_t cp_cco_action_private_t;
+
+
+#endif /* cp_cco_action_private_h */
diff --git a/cesar/cp/av/cco/action/cco_conn/src/action.c b/cesar/cp/av/cco/action/cco_conn/src/action.c
new file mode 100644
index 0000000000..93326ce549
--- /dev/null
+++ b/cesar/cp/av/cco/action/cco_conn/src/action.c
@@ -0,0 +1,330 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cco_action.c
+ * \brief Control the MMEs in relation with the CCo 1
+ * \ingroup cp_cco_action
+ *
+ */
+#include "common/std.h"
+#include "lib/blk.h"
+
+#include "cp/inc/context.h"
+#include "cp/cp.h"
+
+#include "string.h"
+
+#include "lib/list.h"
+
+#include "cp/conn/conn.h"
+#include "cp/conn/inc/conn.h"
+#include "cp/conn/link.h"
+#include "cp/conn/inc/link.h"
+#include "cp/conn/conn_mgr.h"
+
+#include "cp/cco/action/cco_conn/cco_action.h"
+
+#include "cp/cco/bw/bw_prio_heap.h"
+#include "cp/cco/bw/inc/bw_prio_heap.h"
+#include "cp/cco/bw/bw.h"
+#include "cp/cco/bw/inc/bw.h"
+
+#include "cl/inc/cl_mactotei.h"
+
+#include "cp/sta/mgr/sta_own_data.h"
+#include "cp/sta/mgr/sta_mgr.h"
+
+void
+cp_cco_action_mme_glink_send (cp_t *ctx)
+{
+ cp_msg_cc_link_new_cnf_t new_cnf;
+ cp_msg_cc_link_rel_ind_t rel_ind;
+
+ cp_cco_bw_prio_conn_t *prior_conn;
+ cp_conn_t *conn;
+ u8 nb_heap = 0;
+
+ while(nb_heap < CP_CCO_BW_NB_PRIORITY_HEAPS)
+ {
+ prior_conn = cp_cco_bw_prio_heap_get_first_conn(ctx->bw.prio_heap[nb_heap]);
+
+ while (prior_conn)
+ {
+ conn = cp_conn_get_conn(ctx, prior_conn->cid);
+
+ if(conn->new_conn_state != CP_CONN_STATE_IN)
+ {
+ if(conn->new_conn_state == CP_CONN_STATE_ADD
+ || conn->new_conn_state == CP_CONN_STATE_OUT)
+ {
+ new_cnf.cid = conn->conn_info.cid;
+ new_cnf.glid_f = conn->flink->glid;
+ new_cnf.glid_r = conn->rlink->glid;
+ new_cnf.cspec = NULL;
+
+ if(conn->new_conn_state == CP_CONN_STATE_ADD)
+ {
+ /*Result success*/
+ new_cnf.result = 0x00;
+ conn->new_conn_state = CP_CONN_STATE_IN;
+ }
+ else if (conn->new_conn_state == CP_CONN_STATE_OUT)
+ {
+ /*Result : not enough bandwidth*/
+ new_cnf.result = 0x01;
+ //TODO init the proposed_cspec
+ //new_cnf.cspec = proposed_cspec;
+ }
+ cp_msg_cc_link_new_cnf_send(ctx, CP_MME_PEER(conn->osa, conn->conn_info.stei), &new_cnf);
+ cp_msg_cc_link_new_cnf_send(ctx, CP_MME_PEER(conn->oda, conn->conn_info.dtei), &new_cnf);
+ }
+ else
+ {
+ rel_ind.cid = conn->conn_info.cid;
+ rel_ind.mac = cp_sta_own_data_get_mac_address(ctx);
+ rel_ind.cspec_proposed = NULL;
+ rel_ind.cspec_violated = NULL;
+
+ if(conn->new_conn_state == CP_CONN_STATE_REL_BW)
+ {
+ /*Result : not enough bandwidth*/
+ rel_ind.reason_code = 0x02;
+ //TODO initiate proposed_cspec
+ //rel_ind.violated_cspec = violated_cspec;
+ }
+ else if(conn->new_conn_state == CP_CONN_STATE_REL_CSPEC)
+ {
+ /*Result : CSPEC problem*/
+ rel_ind.reason_code = 0x01;
+ //TODO initiate the cspec
+ //rel_ind.cspec_violated = cspec;
+ }
+ else if(conn->new_conn_state == CP_CONN_STATE_REL_NOR)
+ {
+ /*Result : Normal release*/
+ rel_ind.reason_code = 0x00;
+ }
+ cp_msg_cc_link_rel_ind_send(ctx, CP_MME_PEER(conn->osa, conn->conn_info.stei), &rel_ind);
+ cp_msg_cc_link_rel_ind_send(ctx, CP_MME_PEER(conn->oda, conn->conn_info.dtei), &rel_ind);
+ }
+ }
+ prior_conn = cp_cco_bw_prio_heap_get_next_conn(ctx->bw.prio_heap[nb_heap], prior_conn);
+
+ if(conn->new_conn_state != CP_CONN_STATE_IN)
+ cp_conn_del_conn(ctx, conn->conn_info.cid);
+ }
+ nb_heap++;
+ }
+}
+
+void
+cp_cco_action_process_cc_link_new_req (cp_t* ctx, cp_mme_rx_t* mme)
+{
+ cp_msg_cc_link_new_req_t received_data;
+ cp_msg_cc_link_new_cnf_t send_data;
+ cp_conn_t *conn;
+ u8 validity;
+
+ cp_msg_cc_link_new_req_receive(ctx, mme, &received_data);
+
+ /*TODO Check if the conn doesn't already exist TODO*/
+ //cp_conn_exist(ctx, cid);
+
+ /** Initiate the new connection */
+ conn = cp_conn_init_conn(ctx);
+
+ conn->osa = received_data.osa;
+ conn->oda = received_data.oda;
+
+ conn->conn_info.cspec.cspec_len_oct = received_data.cspec->cspec_len_oct;
+ conn->conn_info.stei = cl_mactotei_table_find_tei_from_mac(NULL, received_data.osa);
+ conn->conn_info.dtei = cl_mactotei_table_find_tei_from_mac(NULL, received_data.oda);
+
+ /*Forward link info*/
+ conn->flink->cinfo = received_data.cspec->f_cinfo;
+ conn->flink->qmp = received_data.cspec->f_qmp;
+ conn->flink->list_ble = received_data.ble_f;
+ conn->flink->llid = 0;
+ conn->flink->glid = 0;
+ conn->flink->status = CP_LINK_TYPE_LOCAL;
+
+ /*Reverse link info*/
+ conn->rlink->cinfo = received_data.cspec->r_cinfo;
+ conn->rlink->qmp = received_data.cspec->r_qmp;
+ conn->rlink->list_ble = received_data.ble_r;
+ conn->rlink->llid = 0;
+ conn->rlink->glid = 0;
+ conn->rlink->status = CP_LINK_TYPE_LOCAL;
+
+ validity = cp_conn_check_conn_validity(ctx, conn);
+
+ /*Connection Valid*/
+ if(!validity)
+ {
+ /** If the connection is valid we add it */
+ cp_conn_add_conn(ctx, conn);
+
+ /** We reinitiate the allocation*/
+ cp_cco_bw_alloc_sched(ctx);
+
+ /** We check the mme to send*/
+ cp_cco_action_mme_glink_send (ctx);
+ }
+ /*Connection not Valid*/
+ else
+ {
+ send_data.cid = conn->conn_info.cid;
+ send_data.glid_r = 0;
+ send_data.glid_f = 0;
+ send_data.result = validity;
+ send_data.cspec = NULL;
+
+ cp_msg_cc_link_new_cnf_send(ctx, mme->peer,&send_data);
+ }
+
+}
+
+void
+cp_cco_action_process_cc_link_new_cnf (cp_t* ctx, cp_mme_rx_t* mme)
+{
+ cp_msg_cc_link_new_cnf_t received_data;
+
+ cp_msg_cc_link_new_cnf_receive(ctx, mme, &received_data);
+
+}
+
+void
+cp_cco_action_process_cc_link_rel_req (cp_t* ctx, cp_mme_rx_t* mme)
+{
+ cp_msg_cc_link_rel_req_t received_data;
+ cp_msg_cc_link_rel_ind_t send_data;
+
+ cp_msg_cc_link_rel_req_receive(ctx, mme, &received_data);
+
+ /** Initiate the ind mme*/
+ send_data.cid = received_data.cid;
+ send_data.mac = cp_sta_get_mac_address(cp_net_get_sta(ctx,
+ cp_sta_mgr_get_our_avln(ctx),
+ received_data.cid));
+ send_data.reason_code= received_data.reason_code;
+ send_data.cspec_violated = received_data.cspec;
+ send_data.cspec_proposed = NULL;
+
+ /** Delete the connection*/
+ cp_conn_del_conn(ctx, received_data.cid);
+
+ /** Schedule */
+ cp_cco_bw_alloc_sched(ctx);
+
+ /**Check if MME has to be sent*/
+ cp_cco_action_mme_glink_send(ctx);
+
+ /** Send the cnf mme*/
+ cp_msg_cc_link_rel_ind_send(ctx, mme->peer, &send_data);
+}
+
+void
+cp_cco_action_process_cc_link_rel_ind (cp_t* ctx, cp_mme_rx_t* mme)
+{
+ cp_msg_cc_link_rel_ind_t received_data;
+ cp_msg_apcm_conn_rel_ind_t send_ind_data;
+
+ cp_msg_cc_link_rel_ind_receive(ctx, mme, &received_data);
+
+ /* Init the IND to the HLE */
+ send_ind_data.cid = received_data.cid;
+ send_ind_data.reason_code = received_data.reason_code;
+ send_ind_data.releasing_mac_add = mme->peer.mac;
+ send_ind_data.proposed_cspec = NULL;
+ send_ind_data.violated_cspec = received_data.cspec_violated;
+
+ /* Send MME IND to HLE*/
+ cp_msg_apcm_conn_rel_ind_send(ctx,
+ CP_MME_PEER(mme->peer.mac),
+ &send_ind_data);
+
+ /* Release conn */
+ cp_conn_del_conn(ctx, received_data.cid);
+}
+
+/*Maybe part of the conn module*/
+void
+cp_cco_action_process_cc_link_sqz_req_rx (cp_t* ctx, cp_mme_rx_t* mme)
+{
+ cp_msg_cc_link_sqz_req_t received_data;
+
+ cp_msg_cc_link_sqz_req_receive(ctx, mme, &received_data);
+}
+
+void
+cp_cco_action_process_cc_link_sqz_cnf_rx (cp_t* ctx, cp_mme_rx_t* mme)
+{
+ cp_msg_cc_link_sqz_cnf_t received_data;
+
+ cp_msg_cc_link_sqz_cnf_receive(ctx, mme, &received_data);
+}
+
+void
+cp_cco_action_process_cc_link_mod_req (cp_t* ctx, cp_mme_rx_t* mme)
+{
+ cp_msg_cc_link_mod_req_t received_data;
+
+ cp_msg_cc_link_mod_req_receive(ctx, mme, &received_data);
+
+ /** Get acutal allocation */
+// cp_cco_bw_alloc_get_first_txop(ctx, received_data.cid);
+
+ /** Try to allocate else where */
+// cp_cco_bw_alloc(ctx,);
+
+ /** New Allocation found */
+ /** No new allocation found*/
+}
+
+void
+cp_cco_action_process_cc_link_mod_cnf (cp_t* ctx, cp_mme_rx_t* mme)
+{
+ cp_msg_cc_link_mod_cnf_t received_data;
+
+ cp_msg_cc_link_mod_cnf_receive(ctx, mme, &received_data);
+}
+
+void
+cp_cco_action_process_cc_alloc_move_req (cp_t* ctx, cp_mme_rx_t* mme)
+{
+ cp_msg_cc_alloc_move_req_t received_data;
+
+ cp_msg_cc_alloc_move_req_receive(ctx, mme, &received_data);
+}
+
+void
+cp_cco_action_process_cc_alloc_move_cnf (cp_t* ctx, cp_mme_rx_t* mme)
+{
+ cp_msg_cc_alloc_move_cnf_t received_data;
+
+ cp_msg_cc_alloc_move_cnf_receive(ctx, mme, &received_data);
+}
+
+void
+cp_cco_action_process_cc_ble_update_ind (cp_t* ctx, cp_mme_rx_t* mme)
+{
+ cp_msg_cc_ble_update_ind_t received_data;
+
+ cp_msg_cc_ble_update_ind_receive(ctx, mme, &received_data);
+}
+
+void
+cp_cco_action_init (cp_t* ctx)
+{
+}
+
+void
+cp_cco_action_uninit (cp_t *ctx)
+{
+}
+
diff --git a/cesar/cp/av/cco/action/cco_conn/test/Makefile b/cesar/cp/av/cco/action/cco_conn/test/Makefile
new file mode 100644
index 0000000000..19fcd181d9
--- /dev/null
+++ b/cesar/cp/av/cco/action/cco_conn/test/Makefile
@@ -0,0 +1,13 @@
+BASE= ../../../../..
+
+ECOS=y
+INCLUDES=cp/conn/test/overide/
+
+TARGET_PROGRAMS = cco_action_conn_test
+
+cco_action_conn_test_SOURCES = cco_action_conn_test.c msg_stub.c
+cco_action_conn_test_MODULES = lib cp/cco/bw cp/cco/action/cco_conn cp/conn \
+ cp/sta/mgr cp/av/fsm/stub mac/common cl
+
+include $(BASE)/common/make/top.mk
+
diff --git a/cesar/cp/av/cco/action/cco_conn/test/ecos.ecc.sh b/cesar/cp/av/cco/action/cco_conn/test/ecos.ecc.sh
new file mode 100644
index 0000000000..8253d98c9a
--- /dev/null
+++ b/cesar/cp/av/cco/action/cco_conn/test/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/cp/av/cco/action/cco_conn/test/src/cco_action_conn_test.c b/cesar/cp/av/cco/action/cco_conn/test/src/cco_action_conn_test.c
new file mode 100644
index 0000000000..b38b32dd12
--- /dev/null
+++ b/cesar/cp/av/cco/action/cco_conn/test/src/cco_action_conn_test.c
@@ -0,0 +1,144 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file bw.c
+ * \brief bandwidth manager module
+ * \ingroup cp_cco_bw
+ *
+ * Control the schedule of the becon period
+ */
+#include "common/std.h"
+#include "cp/cp.h"
+#include "cp/inc/context.h"
+
+#include "cp/cco/bw/bw.h"
+#include "cp/cco/bw/inc/bw.h"
+#include "cp/cco/action/cco_conn/cco_action.h"
+
+#include "cp/conn/link.h"
+#include "cp/conn/inc/link.h"
+#include "cp/conn/conn.h"
+#include "cp/conn/inc/conn.h"
+#include "cp/conn/conn_mgr.h"
+
+#include "cp/pwl/pwl.h"
+#include "mac/common/timings.h"
+
+#include "lib/blk.h"
+#include "lib/list.h"
+#include "lib/test.h"
+
+#include <stdio.h>
+
+cp_mme_peer_t link_new_cnf_peer;
+cp_msg_cc_link_new_cnf_t link_new_cnf_data;
+
+cp_mme_peer_t link_rel_ind_peer;
+cp_msg_cc_link_rel_ind_t link_rel_ind_data;
+
+void
+cp_msg_cc_link_new_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_new_cnf_t *data)
+{
+ link_new_cnf_peer = peer;
+ link_new_cnf_data = *data;
+}
+
+void
+cp_msg_cc_link_rel_ind_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_rel_ind_t *data)
+{
+ link_rel_ind_peer = peer;
+ link_rel_ind_data = *data;
+}
+
+void
+test_case_action_init(test_t test, cp_t *ctx)
+{
+ test_case_begin(test, "action init");
+
+ cp_conn_mgr_init(ctx);
+ cp_cco_bw_init(ctx);
+
+ test_begin(test, "action init")
+ {
+ }
+ test_end;
+}
+
+void
+test_case_send_glink_mme(test_t test)
+{
+ cp_t ctx;
+ u16 i;
+
+ test_case_action_init(test, &ctx);
+
+ cp_conn_t *conn[6];
+ cp_conn_t *conn_test;
+
+ test_case_begin(test, "glink mme");
+
+ for(i = 0; i<6 ;i++)
+ {
+ conn[i] = cp_conn_init_conn(&ctx);
+ conn[i]->conn_info.cid = (i+1)*100;
+ conn[i]->flink->cinfo->valid_cinfo = 0x01;
+ conn[i]->flink->qmp->av_nb_pb = 10;
+ conn[i]->flink->qmp->nb_txop = 1;
+ conn[i]->rlink->cinfo->valid_cinfo = 0x00;
+ conn[i]->flink->cinfo->user_priority = 0;
+ conn[i]->rlink->cinfo->user_priority = 0;
+ conn[i]->new_conn_state = CP_CONN_STATE_IN;
+ conn[i]->osa = i+1;
+ conn[i]->oda = i+101;
+ cp_conn_add_conn(&ctx, conn[i]);
+ }
+
+ conn[1]->new_conn_state = CP_CONN_STATE_ADD;
+ conn[2]->new_conn_state = CP_CONN_STATE_OUT;
+ conn[3]->new_conn_state = CP_CONN_STATE_REL_BW;
+ conn[4]->new_conn_state = CP_CONN_STATE_REL_NOR;
+ conn[5]->new_conn_state = CP_CONN_STATE_REL_CSPEC;
+
+ cp_cco_action_mme_glink_send(&ctx);
+ conn_test = cp_conn_get_next_conn(&ctx, conn[1]);
+
+ test_begin(test, "glink mme check ")
+ {
+ test_fail_if(conn[0]->new_conn_state != CP_CONN_STATE_IN,
+ "Wrong new state should be IN");
+ test_fail_if(conn[1]->new_conn_state != CP_CONN_STATE_IN,
+ "Wrong new state should be IN");
+ test_fail_if(conn[2] == conn_test,
+ "There shouldnt be more connections 2");
+ test_fail_if(conn[3] == conn_test,
+ "There shouldnt be more connections 3");
+ test_fail_if(conn[4] == conn_test,
+ "There shouldnt be more connections 4");
+ test_fail_if(conn[5] == conn_test,
+ "There shouldnt be more connections 5");
+ }
+ test_end;
+
+}
+
+int
+main (void){
+ test_t test;
+
+ test_init(test, 0, NULL);
+ test_case_send_glink_mme(test);
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+
+}
diff --git a/cesar/cp/av/cco/action/cco_conn/test/src/msg_stub.c b/cesar/cp/av/cco/action/cco_conn/test/src/msg_stub.c
new file mode 100644
index 0000000000..bdd3aa078f
--- /dev/null
+++ b/cesar/cp/av/cco/action/cco_conn/test/src/msg_stub.c
@@ -0,0 +1,463 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file bw.c
+ * \brief bandwidth manager module
+ * \ingroup cp_cco_bw
+ *
+ * Control the schedule of the becon period
+ */
+#include "common/std.h"
+#include "cp/cp.h"
+#include "cp/inc/context.h"
+
+#include "cp/cco/bw/bw.h"
+#include "cp/cco/bw/inc/bw.h"
+#include "cp/cco/action/cco_conn/cco_action.h"
+
+#include "cp/conn/link.h"
+#include "cp/conn/inc/link.h"
+#include "cp/conn/conn.h"
+#include "cp/conn/inc/conn.h"
+#include "cp/conn/conn_mgr.h"
+
+#include "cp/pwl/pwl.h"
+#include "mac/common/timings.h"
+
+#include "lib/blk.h"
+#include "lib/list.h"
+#include "lib/test.h"
+
+#include <stdio.h>
+
+void
+cp_msg_cc_link_new_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_new_req_t *data)
+{
+}
+bool
+cp_msg_cc_link_new_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_new_req_t *data)
+{
+ return true;
+}
+
+
+bool
+cp_msg_cc_link_new_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_new_cnf_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_cc_link_rel_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_rel_req_t *data)
+{
+}
+
+bool
+cp_msg_cc_link_rel_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_rel_req_t *data)
+{
+ return true;
+}
+
+
+bool
+cp_msg_cc_link_rel_ind_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_rel_ind_t *data)
+{
+ return true;
+}
+bool
+cp_msg_cc_link_mod_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_mod_req_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_cc_link_mod_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_mod_cnf_t *data)
+{
+}
+
+bool
+cp_msg_cc_link_mod_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_mod_cnf_t *data)
+{
+ return true;
+}
+
+
+void
+cp_msg_cc_link_info_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_info_req_t *data)
+{
+}
+
+bool
+cp_msg_cc_link_info_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_info_req_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_cc_link_info_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_info_cnf_t *data)
+{
+}
+
+bool
+cp_msg_cc_link_info_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_info_cnf_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_cc_link_info_ind_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_info_ind_t *data)
+{
+}
+
+bool
+cp_msg_cc_link_info_ind_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_info_ind_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_cc_link_info_rsp_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_info_rsp_t *data)
+{
+}
+
+bool
+cp_msg_cc_link_info_rsp_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_info_rsp_t *data)
+{
+ return true;
+}
+
+
+void
+cp_msg_cc_link_sqz_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_sqz_req_t *data)
+{
+}
+
+bool
+cp_msg_cc_link_sqz_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_sqz_req_t *data)
+{
+ return true;
+}
+void
+cp_msg_cc_link_sqz_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_link_sqz_cnf_t *data)
+{
+}
+bool
+cp_msg_cc_link_sqz_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_link_sqz_cnf_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_cc_ble_update_ind_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_ble_update_ind_t *data)
+{
+}
+bool
+cp_msg_cc_ble_update_ind_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_ble_update_ind_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_cc_alloc_move_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_alloc_move_req_t *data)
+{
+}
+
+bool
+cp_msg_cc_alloc_move_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_alloc_move_req_t *data)
+{
+ return true;
+}
+void
+cp_msg_cc_alloc_move_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cc_alloc_move_cnf_t *data)
+{
+}
+bool
+cp_msg_cc_alloc_move_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cc_alloc_move_cnf_t *data)
+{
+ return true;
+}
+/*************************/
+/*** CONN NEW ***/
+/*************************/
+
+void
+cp_msg_cm_conn_new_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cm_conn_new_req_t *data)
+{
+}
+
+bool
+cp_msg_cm_conn_new_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cm_conn_new_req_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_cm_conn_new_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cm_conn_new_cnf_t *data)
+{
+}
+
+bool
+cp_msg_cm_conn_new_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cm_conn_new_cnf_t *data)
+{
+ return true;
+}
+
+/*************************/
+/*** CONN REL ***/
+/*************************/
+
+void
+cp_msg_cm_conn_rel_ind_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cm_conn_rel_ind_t *data)
+{
+}
+
+bool
+cp_msg_cm_conn_rel_ind_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cm_conn_rel_ind_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_cm_conn_rel_rsp_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cm_conn_rel_rsp_t *data)
+{
+}
+
+bool
+cp_msg_cm_conn_rel_rsp_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cm_conn_rel_rsp_t *data)
+{
+ return true;
+}
+
+/*************************/
+/*** CONN MOD ***/
+/*************************/
+
+void
+cp_msg_cm_conn_mod_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cm_conn_mod_req_t *data)
+{
+}
+
+bool
+cp_msg_cm_conn_mod_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cm_conn_mod_req_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_cm_conn_mod_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cm_conn_mod_cnf_t *data)
+{
+}
+
+bool
+cp_msg_cm_conn_mod_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cm_conn_mod_cnf_t *data)
+{
+ return true;
+}
+
+/*************************/
+/*** CONN INFO ***/
+/*************************/
+void
+cp_msg_cm_conn_info_req_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cm_conn_info_req_t *data)
+{
+}
+
+bool
+cp_msg_cm_conn_info_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cm_conn_info_req_t *data)
+{
+ return true;
+}
+void
+cp_msg_cm_conn_info_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_cm_conn_info_cnf_t *data)
+{
+}
+bool
+cp_msg_cm_conn_info_cnf_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_cm_conn_info_cnf_t *data)
+{
+ return true;
+}
+/*************************/
+/*** APCM Family ***/
+/*************************/
+
+/*************************/
+/*** APCM CONN ADD ***/
+/*************************/
+
+bool
+cp_msg_apcm_conn_add_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_apcm_conn_add_req_t *data)
+{
+ return true;
+}
+void
+cp_msg_apcm_conn_add_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_apcm_conn_add_cnf_t *data)
+{
+}
+
+void
+cp_msg_apcm_conn_add_ind_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_apcm_conn_add_ind_t *data)
+{
+}
+
+bool
+cp_msg_apcm_conn_add_rsp_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_apcm_conn_add_rsp_t *data)
+{
+ return true;
+}
+/*************************/
+/*** APCM CONN REL ***/
+/*************************/
+
+bool
+cp_msg_apcm_conn_rel_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_apcm_conn_rel_req_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_apcm_conn_rel_ind_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_apcm_conn_rel_ind_t *data)
+{
+}
+
+void
+cp_msg_apcm_conn_rel_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_apcm_conn_rel_cnf_t *data)
+{
+}
+/*************************/
+/*** APCM CONN MOD ***/
+/*************************/
+bool
+cp_msg_apcm_conn_mod_req_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_apcm_conn_mod_req_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_apcm_conn_mod_ind_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_apcm_conn_mod_ind_t *data)
+{
+}
+
+bool
+cp_msg_apcm_conn_mod_rsp_receive(cp_t *ctx,
+ cp_mme_rx_t *mme,
+ cp_msg_apcm_conn_mod_rsp_t *data)
+{
+ return true;
+}
+
+void
+cp_msg_apcm_conn_mod_cnf_send(cp_t *ctx,
+ cp_mme_peer_t peer,
+ cp_msg_apcm_conn_mod_cnf_t *data)
+{
+}
+
diff --git a/cesar/cp/av/cco/action/doc/Makefile b/cesar/cp/av/cco/action/doc/Makefile
new file mode 100644
index 0000000000..16174f2ce6
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/Makefile
@@ -0,0 +1,24 @@
+PAGES = tei snid assoc_procedure auth_procedure leave \
+ handover_cco handover_sta cco_selection \
+ fsm_handover_selection fsm_handover_cco \
+ fsm_handover_cco_leave fsm_handover_cco_appoint \
+ fsm_handover_sta fsm_handover_sta_appoint \
+ fsm_handover nek_change
+
+TOOLS_DIR = ../../../../common/tools
+DOTFLAGS = -Gbgcolor='\#f7f7f7' -Nstyle=filled -Nfillcolor=white
+CONVERTFLAGS = -border 1 -bordercolor '\#d7d7d7'
+
+
+png: $(PAGES:%=%.png)
+ps: $(PAGES:%=%.ps)
+
+%.png: %.ps
+ convert $(CONVERTFLAGS) $< $@
+ rm -f $<
+
+%.ps: %.sdl $(TOOLS_DIR)/sdl.ps $(TOOLS_DIR)/sdl2dot
+ $(TOOLS_DIR)/sdl2dot $< | dot $(DOTFLAGS) -Tps -l $(TOOLS_DIR)/sdl.ps -o $@
+
+clean:
+ rm -f $(PAGES:%=%.png)
diff --git a/cesar/cp/av/cco/action/doc/assoc_procedure.sdl b/cesar/cp/av/cco/action/doc/assoc_procedure.sdl
new file mode 100644
index 0000000000..898ef270ed
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/assoc_procedure.sdl
@@ -0,0 +1,15 @@
+(|CC_ASSOC.REQ|) -join-> |Get TEI|
+(|CC_ASSOC.REQ|) -renew-> |Get STA|
+
+|Get TEI| -> <Valid TEI>
+<Valid TEI> -yes-> |Add station|
+|Add station| -> |CC_ASSOC.CNF \n Succeed|
+|CC_ASSOC.CNF \n Succeed| -> |Send TEI MAP to STA|
+|Send TEI MAP to STA| -> |Send TEI MAP to STAs|
+
+<Valid TEI> -no-> |Add UnAssoc STA|
+|Add UnAssoc STA| -> |CC_ASSOC.CNF \nFailure|
+
+|Get STA| -> |Update TEI Lease|
+|Update TEI Lease| -> |Release STA|
+|Release STA| -> |CC_ASSOC.CNF \nSucceed|
diff --git a/cesar/cp/av/cco/action/doc/auth_procedure.sdl b/cesar/cp/av/cco/action/doc/auth_procedure.sdl
new file mode 100644
index 0000000000..bc14ccab05
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/auth_procedure.sdl
@@ -0,0 +1,4 @@
+|CM_GET_KEY.REQ| -> <station known>
+<station known> -yes-> |CM_GET_KEY.CNF|
+
+<station known> -no-> |CM_GET_KEY.CNF\nResult = request refused|
diff --git a/cesar/cp/av/cco/action/doc/cco_action.odt b/cesar/cp/av/cco/action/doc/cco_action.odt
new file mode 100644
index 0000000000..d5454d9159
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/cco_action.odt
Binary files differ
diff --git a/cesar/cp/av/cco/action/doc/cco_action.xmi b/cesar/cp/av/cco/action/doc/cco_action.xmi
new file mode 100644
index 0000000000..ad3bbf1ee9
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/cco_action.xmi
@@ -0,0 +1,347 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="http://schema.omg.org/spec/UML/1.3" verified="false" timestamp="2008-05-21T15:43:17" xmi.version="1.2" >
+ <XMI.header>
+ <XMI.documentation>
+ <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+ <XMI.exporterVersion>1.5.8</XMI.exporterVersion>
+ <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
+ </XMI.documentation>
+ <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+ <UML:Model isSpecification="false" isLeaf="false" isRoot="false" xmi.id="m1" isAbstract="false" name="Modèle UML" >
+ <UML:Namespace.ownedElement>
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="folder" isRoot="false" isAbstract="false" name="folder" />
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="datatype" isRoot="false" isAbstract="false" name="datatype" />
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="enum" isRoot="false" isAbstract="false" name="enum" />
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Logical View" isRoot="false" isAbstract="false" name="Logical View" >
+ <UML:Namespace.ownedElement>
+ <UML:Package stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="Datatypes" isRoot="false" isAbstract="false" name="Datatypes" >
+ <UML:Namespace.ownedElement>
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="WHsGhr6cL3qV" isRoot="false" isAbstract="false" name="int" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="1lLAIoXrLdtJ" isRoot="false" isAbstract="false" name="char" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="BsXuVmQldfSS" isRoot="false" isAbstract="false" name="bool" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="l2nnsImcbvsP" isRoot="false" isAbstract="false" name="float" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="Shk6a1xmtUeN" isRoot="false" isAbstract="false" name="double" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="G46rjYKTY5EP" isRoot="false" isAbstract="false" name="short" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="O01xtrLMY3S6" isRoot="false" isAbstract="false" name="long" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="5NqwrUH5XNxE" isRoot="false" isAbstract="false" name="unsigned int" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="tFhSKvrguqen" isRoot="false" isAbstract="false" name="unsigned short" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="hz7D2ZH5u80l" isRoot="false" isAbstract="false" name="unsigned long" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="aHp7fmMY11yJ" isRoot="false" isAbstract="false" name="string" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="oZHHg64PKBaq" isRoot="false" isAbstract="false" name="uint" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="nnvOyvzkSE17" isRoot="false" isAbstract="false" name="u8" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="J5WdE6USg2qD" isRoot="false" isAbstract="false" name="u16" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="X7Q5Iud3fXPb" isRoot="false" isAbstract="false" name="u32" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="QPMsbNxuTUYh" isRoot="false" isAbstract="false" name="u64" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="Q4TYO2bRfXJq" isRoot="false" isAbstract="false" name="mac_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="vofGM4owR1PQ" isRoot="false" isAbstract="false" name="cco_action_t *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="7IVPdQ5yFmJq" isRoot="false" isAbstract="false" name="tei_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="pTgoiQ7YHojW" isRoot="false" isAbstract="false" name="cp_beacon_desc_t *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="CQBdOKlCTu2N" isRoot="false" isAbstract="false" name="mme_rx_t *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="AdYl289wjpBd" isRoot="false" isAbstract="false" name="undef" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="3JjrtT9nxOIX" isRoot="false" isAbstract="false" name="set_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="Kx1VvXVji5mn" isRoot="false" isAbstract="false" name="set_node_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="ClVcxKp0dXpU" isRoot="false" isAbstract="false" name="set_node_t *" />
+ </UML:Namespace.ownedElement>
+ </UML:Package>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="BzDeGrof35i3" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="PIGRVoQWdLhk" aggregation="aggregate" type="AdYl289wjpBd" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="DjXUjdEzH0Zj" aggregation="none" type="AdYl289wjpBd" name="" multiplicity="8" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="DWwHbcINxulG" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="6A9PNiJm0ZBV" aggregation="aggregate" type="L2ASUCoHdFZ0" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="Nbzzwej7LFb4" aggregation="none" type="AdYl289wjpBd" name="" multiplicity="1" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="UODsawo5TGgC" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="qn17nZqsjxH6" aggregation="aggregate" type="AdYl289wjpBd" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="faqdA16Vd5SX" aggregation="none" type="AdYl289wjpBd" name="" multiplicity="*" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="c6v3mGeXVqXR" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="hCf3PG5F27Kp" aggregation="none" type="L2ASUCoHdFZ0" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="e8hN6zSlXIPf" aggregation="none" type="AdYl289wjpBd" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="T1xzpUO46GR3" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="IVBvZdSGn7HA" aggregation="none" type="L2ASUCoHdFZ0" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="MLNOShB4qtRw" aggregation="none" type="AdYl289wjpBd" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="8xImlyaBNYwN" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="qtfLA41SYAL5" aggregation="aggregate" type="AdYl289wjpBd" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="nlJZrbjDw5ZM" aggregation="none" type="AdYl289wjpBd" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="fVlZqtZMrzdT" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="mkQabpUPhAlr" aggregation="aggregate" type="AdYl289wjpBd" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="CmHiuanhL7EC" aggregation="none" type="L2ASUCoHdFZ0" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="2uIgsGr4ejEG" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="gwNc1wwlfKME" aggregation="aggregate" type="L2ASUCoHdFZ0" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="9qeo0PdB9st3" aggregation="none" type="AdYl289wjpBd" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="0UqhrhEJ8WDS" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="ShioovyUrM4s" aggregation="aggregate" type="AdYl289wjpBd" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="GydtIx8PomCm" aggregation="none" type="AdYl289wjpBd" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="Vd6MhjybKlo7" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="9pxGirHAYzwK" aggregation="composite" type="L2ASUCoHdFZ0" name="" multiplicity="1" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="utmjFqZTmBL4" aggregation="none" type="AdYl289wjpBd" name="" multiplicity="1" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="JD1yKqZUviuE" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="8TRuDdhKTeY9" aggregation="none" type="L2ASUCoHdFZ0" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="VpH1oEJh75OK" aggregation="none" type="AdYl289wjpBd" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="Dv7QUbCmB2YY" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="tylf76hFX9Ai" aggregation="none" type="L2ASUCoHdFZ0" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="kr0BTYKxNcyA" aggregation="none" type="AdYl289wjpBd" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="L2ASUCoHdFZ0" isRoot="false" isAbstract="false" name="cp_cco_action_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="The set containing the STA ordered by the TEI lease." isSpecification="false" visibility="private" xmi.id="wJK4orddFvYy" type="3JjrtT9nxOIX" name="tei_lease_expiration" />
+ <UML:Attribute comment="List of the TEI already in use." isSpecification="false" visibility="private" xmi.id="IVOTagMalq8Q" type="oZHHg64PKBaq" name="tei_flags [8]" />
+ <UML:Operation comment="initialisation of CCo action module." isSpecification="false" isLeaf="false" visibility="public" xmi.id="qHxkg2dtESUh" isRoot="false" isAbstract="false" isQuery="false" name="init" />
+ <UML:Operation comment="Uninitialisation of CCo action module." isSpecification="false" isLeaf="false" visibility="public" xmi.id="2gQknmKqTzYm" isRoot="false" isAbstract="false" isQuery="false" name="uninit" />
+ <UML:Operation comment="Change the SNID.
+It shall request the SNIDs in use from the station manager to choose one randomly in the available SNIDs." isSpecification="false" isLeaf="false" visibility="public" xmi.id="Wf52IeS60CA2" isRoot="false" isAbstract="false" isQuery="false" name="snid_change" />
+ <UML:Operation comment="generate a new NEK value. NEK shall be used no more than 1 hour, so must be changed after 1 hour for that purpose, NEK expiration date is checked at every occurrence of the global garbage collector timer and if current NEK expiration date reached, a new NEK value shall be generated by calling this function
+" isSpecification="false" isLeaf="false" visibility="public" xmi.id="RhTqdgLYcIeT" isRoot="false" isAbstract="false" isQuery="false" name="gen_nek" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="security level" isSpecification="false" visibility="private" xmi.id="2OY7BT7QLV4m" value="" type="nnvOyvzkSE17" name="sl" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="perform garbage actions of CCo's responsability.
+
+Call the tei_lease_check function.
+" isSpecification="false" isLeaf="false" visibility="public" xmi.id="TgOyCXvyx6rl" isRoot="false" isAbstract="false" isQuery="false" name="garbage" />
+ <UML:Operation comment="manage association of a station." isSpecification="false" isLeaf="false" visibility="public" xmi.id="SwOagcKvW3p0" isRoot="false" isAbstract="false" isQuery="false" name="manage_sta_assoc" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="CM_ASSOC.REQ MME msg having being received" isSpecification="false" visibility="private" xmi.id="189hS5VszsSf" value="" type="CQBdOKlCTu2N" name="assoc_req" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="manage authentication of a station." isSpecification="false" isLeaf="false" visibility="public" xmi.id="PU4v0VmG0hH6" isRoot="false" isAbstract="false" isQuery="false" name="manage_sta_auth" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="CM_GET_KEY.REQ MME msg having being decrypted" isSpecification="false" visibility="private" xmi.id="owYtQQqIsWkd" value="" type="CQBdOKlCTu2N" name="get_key_req" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="manage explicit leave request of a station. Remove the station from the station manager." isSpecification="false" isLeaf="false" visibility="public" xmi.id="wZIl1SxKS9HT" isRoot="false" isAbstract="false" isQuery="false" name="manage_sta_leave" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="The MME leave req message." isSpecification="false" visibility="private" xmi.id="SQ8diR5NEycA" value="" type="CQBdOKlCTu2N" name="leave_req" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Search for an available TEI in the AVLN list.
+Get the AVLN from the station manager (our AVLN).
+Lookup in the station a hole of TEIs. It no hole is found and no more STAs are available it means that all the TEIs are used in the AVLN.
+\Warn The TEI = 0 is reserved and 255 too." isSpecification="false" isLeaf="false" visibility="private" xmi.id="zsD44qakozbG" isRoot="false" isAbstract="false" isQuery="false" name="tei_compute" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="Wr6j2wz4Mytl" type="nnvOyvzkSE17" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Release a TEI." isSpecification="false" isLeaf="false" visibility="private" xmi.id="pzdLQr60HhdP" isRoot="false" isAbstract="false" isQuery="false" name="tei_release" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="The TEI value to release." isSpecification="false" visibility="private" xmi.id="6mggkLl0L6nY" value="" type="nnvOyvzkSE17" name="tei" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Return true if the left node is lesser than the right node. This function shall compare the expuiration lease of the stations." isSpecification="false" isLeaf="false" visibility="private" xmi.id="uUHWZwfWD0Yz" isRoot="false" isAbstract="false" isQuery="false" name="tei_lease_less" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="pBa3681kSBrD" type="BsXuVmQldfSS" />
+ <UML:Parameter comment="The left node." isSpecification="false" visibility="private" xmi.id="ft1vqSvak3XH" value="" type="ClVcxKp0dXpU" name="left" />
+ <UML:Parameter comment="The right node." isSpecification="false" visibility="private" xmi.id="SxpSSK1tnd7i" value="" type="ClVcxKp0dXpU" name="right" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class comment="Association request data." isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="7z9AcGCqg0oV" isRoot="false" isAbstract="false" name="cc_assoc_req_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="Request type." isSpecification="false" visibility="public" xmi.id="w9oABNcQk8tU" type="LYg9EevkY5Yi" name="request_type" />
+ <UML:Attribute comment="The NID of the AVLN." isSpecification="false" visibility="public" xmi.id="q1U9qSCXi0ay" type="QPMsbNxuTUYh" name="nid" />
+ <UML:Attribute comment="The Station CCo Capability." isSpecification="false" visibility="public" xmi.id="rwYL7p0EYPAf" type="nnvOyvzkSE17" name="cco_cap" />
+ <UML:Attribute comment="The Station proxy capability." isSpecification="false" visibility="public" xmi.id="DdCYvWsjWLqK" type="nnvOyvzkSE17" name="Proxy_cap" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Enumeration stereotype="enum" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="LYg9EevkY5Yi" isRoot="false" isAbstract="false" name="cc_assoc_req_request_type_t" >
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="LYg9EevkY5Yi" xmi.id="ke44NNWgvApA" isRoot="false" isAbstract="false" name="CC_ASSOC_REQ_NEW" />
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="LYg9EevkY5Yi" xmi.id="iDwUjrOSWSWr" isRoot="false" isAbstract="false" name="CC_ASSOC_REQ_RENEW" />
+ </UML:Enumeration>
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="h7zBSqWEqMgp" isRoot="false" isAbstract="false" name="cc_assoc_cnf_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="The result of the previous request." isSpecification="false" visibility="public" xmi.id="k6g55qVry99W" type="iTyn7lva5s2U" name="result" />
+ <UML:Attribute comment="AVLN's NID." isSpecification="false" visibility="public" xmi.id="w8HLJYczfZA6" type="QPMsbNxuTUYh" name="nid" />
+ <UML:Attribute comment="SNID's AVLN." isSpecification="false" visibility="public" xmi.id="PeKEyy1j4fo8" type="J5WdE6USg2qD" name="snid" />
+ <UML:Attribute comment="The station TEI." isSpecification="false" visibility="public" xmi.id="TKzSR9yNFDhZ" type="nnvOyvzkSE17" name="sta_tei" />
+ <UML:Attribute comment="The lease time for the TEI." isSpecification="false" visibility="public" xmi.id="jHWMqeSGHkSF" type="J5WdE6USg2qD" name="lease_time" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Enumeration stereotype="enum" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="iTyn7lva5s2U" isRoot="false" isAbstract="false" name="cc_assoc_cnf_result_t" >
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="iTyn7lva5s2U" xmi.id="ufuBQKP6mNrt" isRoot="false" isAbstract="false" name="SUCCESS" />
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="iTyn7lva5s2U" xmi.id="3ZQrpdViHOrh" isRoot="false" isAbstract="false" name="FAILURE_TEMPORARY_RESSOURCE_EXHAUSTION" />
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="iTyn7lva5s2U" xmi.id="DYZb2M95wYuj" isRoot="false" isAbstract="false" name="FAILURE_PERMANENT_RESSOURCE_EXHAUSTION" />
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="iTyn7lva5s2U" xmi.id="HsihwnbZgPL4" isRoot="false" isAbstract="false" name="FAILURE_OTHER_REASON" />
+ </UML:Enumeration>
+ </UML:Namespace.ownedElement>
+ <XMI.extension xmi.extender="umbrello" >
+ <diagrams>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="973" snapy="10" showatts="1" xmi.id="bZ62yFKbgidF" documentation="" type="1" showops="1" showpackage="0" name="diagramme de classes" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="844" >
+ <widgets>
+ <classwidget usesdiagramfillcolor="0" width="395" showattsigs="601" x="73" fillcolor="#ffffc0" y="56" showopsigs="601" linewidth="none" height="224" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="L2ASUCoHdFZ0" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="303" showattsigs="601" x="37" fillcolor="#ffffc0" y="586" showopsigs="601" linewidth="none" height="88" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="7z9AcGCqg0oV" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <enumwidget usesdiagramfillcolor="0" width="203" x="86" fillcolor="#ffffc0" y="464" linewidth="none" height="64" usefillcolor="1" isinstance="0" xmi.id="LYg9EevkY5Yi" showpackage="0" usesdiagramusefillcolor="0" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="209" showattsigs="601" x="417" fillcolor="#ffffc0" y="594" showopsigs="601" linewidth="none" height="104" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="h7zBSqWEqMgp" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <enumwidget usesdiagramfillcolor="0" width="303" x="369" fillcolor="#ffffc0" y="448" linewidth="none" height="96" usefillcolor="1" isinstance="0" xmi.id="iTyn7lva5s2U" showpackage="0" usesdiagramusefillcolor="0" font="Sans Serif,9,-1,5,75,1,0,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages/>
+ <associations>
+ <assocwidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="2" indexb="1" linewidth="none" widgetbid="LYg9EevkY5Yi" widgetaid="7z9AcGCqg0oV" xmi.id="w9oABNcQk8tU" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="188" starty="586" />
+ <endpoint endx="187" endy="528" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="100" x="189" fillcolor="none" y="530" linewidth="none" posttext="" role="710" height="20" usefillcolor="1" pretext="+" isinstance="0" xmi.id="lTFpXPAlnj95" text="request_type" usesdiagramusefillcolor="1" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="2" indexb="1" linewidth="none" widgetbid="iTyn7lva5s2U" widgetaid="h7zBSqWEqMgp" xmi.id="k6g55qVry99W" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="521" starty="594" />
+ <endpoint endx="520" endy="544" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="54" x="522" fillcolor="none" y="546" linewidth="none" posttext="" role="710" height="20" usefillcolor="1" pretext="+" isinstance="0" xmi.id="8lQ5tHhbMgmg" text="result" usesdiagramusefillcolor="1" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ </associations>
+ </diagram>
+ </diagrams>
+ </XMI.extension>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Use Case View" isRoot="false" isAbstract="false" name="Use Case View" >
+ <UML:Namespace.ownedElement>
+ <UML:Actor isSpecification="false" isLeaf="false" visibility="public" namespace="Use Case View" xmi.id="g2RmQlkG6CqM" isRoot="false" isAbstract="false" name="CP" />
+ </UML:Namespace.ownedElement>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Component View" isRoot="false" isAbstract="false" name="Component View" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Deployment View" isRoot="false" isAbstract="false" name="Deployment View" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Entity Relationship Model" isRoot="false" isAbstract="false" name="Entity Relationship Model" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ </UML:Namespace.ownedElement>
+ </UML:Model>
+ </XMI.content>
+ <XMI.extensions xmi.extender="umbrello" >
+ <docsettings viewid="bZ62yFKbgidF" documentation="actions of CCo responsability.
+
+CCo action module implements actions of CCo responsability
+
+manage SNID &quot;collisions&quot; (if SNID conflict, a new SNID value shall be chosen)
+
+manage TEI leases (create, suppress, expire)
+
+manage sta association
+
+manage authentication with relevant keys (NEK, NMK) and security-level
+
+Initialisation of SNID &amp; management of SNID conflicts" uniqueid="A09EO9VnalKh" />
+ <listview>
+ <listitem open="1" type="800" label="Vues" >
+ <listitem open="1" type="801" id="Logical View" >
+ <listitem open="0" type="807" id="bZ62yFKbgidF" label="diagramme de classes" />
+ <listitem open="1" type="813" id="h7zBSqWEqMgp" >
+ <listitem open="0" type="814" id="k6g55qVry99W" />
+ <listitem open="0" type="814" id="w8HLJYczfZA6" />
+ <listitem open="0" type="814" id="PeKEyy1j4fo8" />
+ <listitem open="0" type="814" id="TKzSR9yNFDhZ" />
+ <listitem open="0" type="814" id="jHWMqeSGHkSF" />
+ </listitem>
+ <listitem open="1" type="813" id="7z9AcGCqg0oV" >
+ <listitem open="0" type="814" id="w9oABNcQk8tU" />
+ <listitem open="0" type="814" id="q1U9qSCXi0ay" />
+ <listitem open="0" type="814" id="rwYL7p0EYPAf" />
+ <listitem open="0" type="814" id="DdCYvWsjWLqK" />
+ </listitem>
+ <listitem open="1" type="813" id="L2ASUCoHdFZ0" >
+ <listitem open="0" type="814" id="wJK4orddFvYy" />
+ <listitem open="0" type="814" id="IVOTagMalq8Q" />
+ <listitem open="0" type="815" id="qHxkg2dtESUh" />
+ <listitem open="0" type="815" id="2gQknmKqTzYm" />
+ <listitem open="0" type="815" id="Wf52IeS60CA2" />
+ <listitem open="0" type="815" id="RhTqdgLYcIeT" />
+ <listitem open="0" type="815" id="TgOyCXvyx6rl" />
+ <listitem open="0" type="815" id="SwOagcKvW3p0" />
+ <listitem open="0" type="815" id="PU4v0VmG0hH6" />
+ <listitem open="0" type="815" id="wZIl1SxKS9HT" />
+ <listitem open="0" type="815" id="zsD44qakozbG" />
+ <listitem open="0" type="815" id="pzdLQr60HhdP" />
+ <listitem open="0" type="815" id="uUHWZwfWD0Yz" />
+ </listitem>
+ <listitem open="1" type="830" id="Datatypes" >
+ <listitem open="1" type="829" id="BsXuVmQldfSS" />
+ <listitem open="1" type="829" id="vofGM4owR1PQ" />
+ <listitem open="1" type="829" id="1lLAIoXrLdtJ" />
+ <listitem open="1" type="829" id="pTgoiQ7YHojW" />
+ <listitem open="1" type="829" id="Shk6a1xmtUeN" />
+ <listitem open="1" type="829" id="l2nnsImcbvsP" />
+ <listitem open="1" type="829" id="WHsGhr6cL3qV" />
+ <listitem open="1" type="829" id="O01xtrLMY3S6" />
+ <listitem open="1" type="829" id="Q4TYO2bRfXJq" />
+ <listitem open="1" type="829" id="CQBdOKlCTu2N" />
+ <listitem open="1" type="829" id="Kx1VvXVji5mn" />
+ <listitem open="1" type="829" id="ClVcxKp0dXpU" />
+ <listitem open="1" type="829" id="3JjrtT9nxOIX" />
+ <listitem open="1" type="829" id="G46rjYKTY5EP" />
+ <listitem open="1" type="829" id="aHp7fmMY11yJ" />
+ <listitem open="1" type="829" id="7IVPdQ5yFmJq" />
+ <listitem open="1" type="829" id="J5WdE6USg2qD" />
+ <listitem open="1" type="829" id="X7Q5Iud3fXPb" />
+ <listitem open="1" type="829" id="QPMsbNxuTUYh" />
+ <listitem open="1" type="829" id="nnvOyvzkSE17" />
+ <listitem open="1" type="829" id="oZHHg64PKBaq" />
+ <listitem open="0" type="829" id="AdYl289wjpBd" />
+ <listitem open="1" type="829" id="5NqwrUH5XNxE" />
+ <listitem open="1" type="829" id="hz7D2ZH5u80l" />
+ <listitem open="1" type="829" id="tFhSKvrguqen" />
+ </listitem>
+ <listitem open="1" type="831" id="iTyn7lva5s2U" >
+ <listitem open="0" type="839" id="ufuBQKP6mNrt" />
+ <listitem open="0" type="839" id="3ZQrpdViHOrh" />
+ <listitem open="0" type="839" id="DYZb2M95wYuj" />
+ <listitem open="0" type="839" id="HsihwnbZgPL4" />
+ </listitem>
+ <listitem open="1" type="831" id="LYg9EevkY5Yi" >
+ <listitem open="0" type="839" id="ke44NNWgvApA" />
+ <listitem open="0" type="839" id="iDwUjrOSWSWr" />
+ </listitem>
+ </listitem>
+ <listitem open="1" type="802" id="Use Case View" >
+ <listitem open="1" type="811" id="g2RmQlkG6CqM" />
+ </listitem>
+ <listitem open="1" type="821" id="Component View" />
+ <listitem open="1" type="827" id="Deployment View" />
+ <listitem open="1" type="836" id="Entity Relationship Model" />
+ </listitem>
+ </listview>
+ <codegeneration>
+ <codegenerator language="Java" />
+ </codegeneration>
+ </XMI.extensions>
+</XMI>
diff --git a/cesar/cp/av/cco/action/doc/cco_selection.sdl b/cesar/cp/av/cco/action/doc/cco_selection.sdl
new file mode 100644
index 0000000000..1d6d5d17a5
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/cco_selection.sdl
@@ -0,0 +1,9 @@
+(|CCo Selection|) -> <Is user appointed ?>
+
+<Is user appointed ?> -yes-> |end|
+<Is user appointed ?> -no-> <Is set empty ?>
+
+<Is set empty ?> -yes-> |end|
+<Is set empty ?> -no-> |set begin| -> |CC_HANDOVER.REQ> -> (wait) -> >CC_HANDOVER.CNF| -> (handover)
+
+(wait) -timeout\nrefuse-> |set remove| -> <Is set empty ?>
diff --git a/cesar/cp/av/cco/action/doc/fsm_handover.sdl b/cesar/cp/av/cco/action/doc/fsm_handover.sdl
new file mode 100644
index 0000000000..ac4f490e9b
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/fsm_handover.sdl
@@ -0,0 +1,7 @@
+(CCO) -HANDOVER_DISCOVER_PROCESS_DONE-> |CCo post trigger\nHANDOVER_START| -> (Handover\nCCO)
+(Handover\nCCO) -HANDOVER_FAILURE-> (CCO)
+(Handover\nCCO) -HANDOVER_SUCCESS-> (STA)
+
+(STA) -CC_HANDOVER_REQ-> |STA post trigger\nHANDOVER_START| -> (HANDOVER\nSTA)
+(HANDOVER\nSTA) -HANDOVER_FAILURE-> (STA)
+(HANDOVER\nSTA) -HANDOVER_SUCCESS-> (CCO)
diff --git a/cesar/cp/av/cco/action/doc/fsm_handover_cco.sdl b/cesar/cp/av/cco/action/doc/fsm_handover_cco.sdl
new file mode 100644
index 0000000000..e12c51230e
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/fsm_handover_cco.sdl
@@ -0,0 +1,29 @@
+(CCO_HANDOVER_IDLE) -HANDOVER_START-> <Own STA greater CCo 0?>
+
+<Own STA greater CCo 0?> -no-> (wait cc_handover.cnf)
+<Own STA greater CCo 0?> -yes-> <STA Support\nSoft handover?>
+<STA Support\nSoft handover?> -no-> (wait cc_handover.cnf)
+<STA Support\nSoft handover?> -yes-> (wait cc_handover.cnf\nSoft)
+
+(wait cc_handover.cnf) -HANDOVER_TIMEOUT-> <Another STA ?>
+(wait cc_handover.cnf) -HANDOVER_CNF-> <Accept ?>
+
+<Accept ?> -no-> <Another STA ?>
+<Accept ?> -yes-> (wait\nhandover_info.rsp)
+
+<Another STA ?> -no-> |Post trigger\nHANDOVER_FAILURE| -> (CCO_HANDOVER_IDLE)
+<Another STA ?> -yes-> <Own STA greater CCo 0?>
+
+(wait\nhandover_info.rsp) -HANDOVER_TIMEOUT-> <Another STA ?>
+(wait\nhandover_info.rsp) -HANDOVER_INFO_RSP-> (wait\nhoip countdown)
+
+(wait\nhoip countdown) -HOIP_EXPIRED-> |Post trigger\nHANDOVER_SUCCESS| -> (CCO_HANDOVER_IDLE)
+
+(wait cc_handover.cnf\nSoft) -HANDOVER_TIMEOUT-> <Another STA ?>
+(wait cc_handover.cnf\nSoft) -HANDOVER_CNF-> <Accept?>
+
+<Accept?> -no-> <Another STA ?>
+<Accept?> -yes-> (wait cc_link_info.rsp)
+
+(wait cc_link_info.rsp) -HANDOVER_TIMEOUT-> <Another STA ?>
+(wait cc_link_info.rsp) -LINK_INFO_RSP-> (wait\nhandover_info.rsp)
diff --git a/cesar/cp/av/cco/action/doc/fsm_handover_cco_appoint.sdl b/cesar/cp/av/cco/action/doc/fsm_handover_cco_appoint.sdl
new file mode 100644
index 0000000000..0906a256d0
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/fsm_handover_cco_appoint.sdl
@@ -0,0 +1,23 @@
+(|CCO AP|) -AP_STA-> (Appoint STA)
+(Appoint STA) -AP_STA:HANDOVER_REASON0-> (wait handover_cnf)
+(Appoint STA) -AP_STA:UNKNOWN_STA-> (Fail AP_STA)
+(Appoint STA) -AP_STA:ALREADY_USER_APED-> (Fail AP_STA)
+(wait handover_cnf) -AP_STA:TIMEOUT-> (Fail AP_STA)
+(wait handover_cnf) -AP_STA:REJECT-> (Fail AP_STA)
+(wait handover_cnf) -AP_STA:STA_ACCEPT-> (Success AP_STA)
+
+(|CCO AP|) -UNAP-> (Un-Appoint)
+(Un-Appoint) -UNAP:WAS_NOT-> (Success UNAP)
+(Un-Appoint) -UNAP:OK-> (Success UNAP)
+(Un-Appoint) -UNAP:OTHER-> (Fail UNAP)
+
+(|CCO AP|) -UNAP_CCO_AP_STA-> (Appoint STA)
+(Appoint STA) -UNAP_CCO_AP_STA:HANDOVER_REASON0-> (wait handover_cnf)
+(Appoint STA) -UNAP_CCO_AP_STA:UNKNOWN_STA-> (Fail AP_STA\nUNAP_CCO)
+(Appoint STA) -UNAP_CCO_AP_STA:ALREADY_USER_APED-> (Fail AP_STA\nUNAP_CCO)
+(wait handover_cnf) -UNAP_CCO_AP_STA:TIMEOUT-> (Fail AP_STA\nUNAP_CCO)
+(wait handover_cnf) -UNAP_CCO_AP_STA:REJECT-> (Fail AP_STA\nUNAP_CCO)
+(wait handover_cnf) -UNAP_CCO_AP_STA:STA_ACCEPT-> (Un-Appoint)
+(Un-Appoint) -UNAP_CCO_AP_STA:WAS_NOT-> (Success AP_STA\nUNAP_CCO)
+(Un-Appoint) -UNAP_CCO_AP_STA:OK-> (Success AP_STA\nUNAP_CCO)
+(Un-Appoint) -UNAP_CCO_AP_STA:OTHER-> (Fail AP_STA\nUNAP_CCO)
diff --git a/cesar/cp/av/cco/action/doc/fsm_handover_cco_leave.sdl b/cesar/cp/av/cco/action/doc/fsm_handover_cco_leave.sdl
new file mode 100644
index 0000000000..497afb8e7b
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/fsm_handover_cco_leave.sdl
@@ -0,0 +1,7 @@
+(|CC_LEAVE|) -HANDOVER_REQ-> (wait cc_handover_cnf)
+(wait cc_handover_cnf) -TIMEOUT-> (unselect STA)
+(wait cc_handover_cnf) -CC_HANDOVER_CNF:REFUSE-> (unselect STA)
+(wait cc_handover_cnf) -CC_HANDOVER_CNF:ACCEPT-> (|handover_start|)
+
+(unselect STA) -NO_MORE-> (End)
+(unselect STA) -HANDOVER_REQ-> (wait cc_handover_cnf)
diff --git a/cesar/cp/av/cco/action/doc/fsm_handover_selection.sdl b/cesar/cp/av/cco/action/doc/fsm_handover_selection.sdl
new file mode 100644
index 0000000000..f2f7649a1c
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/fsm_handover_selection.sdl
@@ -0,0 +1,10 @@
+(|CCO|) -DISCOVER_DONE-> (cco selection)
+(cco selection) -SELECTION:NONE-> (end)
+(cco selection) -SELECTION:USER_APPOINTED-> (end)
+(cco selection) -HANDOVER_REQ-> (wait cc_handover_cnf)
+(wait cc_handover_cnf) -TIMEOUT-> (end)
+(wait cc_handover_cnf) -HANDOVER_CNF:ACCEPT-> (|handover start|)
+(wait cc_handover_cnf) -HANDOVER_CNF:REFUSE-> (unselect STA)
+(unselect STA) -HANDOVER_REQ-> (wait cc_handover_cnf)
+(unselect STA) -NO_MORE-> (end)
+
diff --git a/cesar/cp/av/cco/action/doc/fsm_handover_sta.sdl b/cesar/cp/av/cco/action/doc/fsm_handover_sta.sdl
new file mode 100644
index 0000000000..3617e483f6
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/fsm_handover_sta.sdl
@@ -0,0 +1,20 @@
+(STA_HANDOVER_IDLE) -HANDOVER_START-> <soft ?>
+
+<soft ?> -yes-> <Soft supported ?>
+
+<Soft supported ?> -no-> (STA_HANDOVER_IDLE)
+<Soft supported ?> -yes-> <User appoint?>
+
+<User appoint?> -yes-> (STA_HANDOVER_IDLE)
+<User appoint?> -no-> (wait\nlink_info)
+
+(wait\nlink_info) -CC_LINK_INFO_IND-> (wait\nhandover_info)
+(wait\nlink_info) -HANDOVER_TIMEOUT-> |Post trigger\nHANDOVER_FAILURE| -> (STA_HANDOVER_IDLE)
+
+(wait\nhandover_info) -CC_HANDOVER_INFO_IND-> (wait\ncountdown expired)
+(wait\nhandover_info) -HANDOVER_TIMEOUT-> |Post trigger\nHANDOVER_FAILURE|
+(wait\ncountdown expired) -HOIP_EXPIRED-> |Post trigger\nHANDOVER_SUCCESS| -> (STA_HANDOVER_IDLE)
+
+<soft ?> -no-> <User\nappoint>
+<User\nappoint> -yes-> (STA_HANDOVER_IDLE)
+<User\nappoint> -no-> (wait\nhandover_info)
diff --git a/cesar/cp/av/cco/action/doc/fsm_handover_sta_appoint.sdl b/cesar/cp/av/cco/action/doc/fsm_handover_sta_appoint.sdl
new file mode 100644
index 0000000000..1230377829
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/fsm_handover_sta_appoint.sdl
@@ -0,0 +1,5 @@
+(|Appoint|) -DVR_APPOINT_REQ_RECV-> (Wait CCo)
+(Wait CCo) -TIMEOUT-> (Fail)
+(Wait CCo) -RECV-> (Inform user)
+
+
diff --git a/cesar/cp/av/cco/action/doc/handover_cco.sdl b/cesar/cp/av/cco/action/doc/handover_cco.sdl
new file mode 100644
index 0000000000..d52883fb2d
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/handover_cco.sdl
@@ -0,0 +1,34 @@
+(|CCo|) -discover done-> <is User Appointed?> -no-> |CCo Selection|
+
+|CCo Selection| -best CCo available-> |CC_HANDOVER.REQ> -> (Wait\ncc_handover.cnf)
+(Wait\ncc_handover.cnf) -timeout or refused-> |Unselect Sta| -> |CCo Selection|
+(Wait\ncc_handover.cnf) -user ap-> |CC_CCO_APPOINT.CNF\nFail>
+(Wait\ncc_handover.cnf) -> >CC_HANDOVER.CNF\nAccept|
+>CC_HANDOVER.CNF\nAccept| -user ap-> |CC_CCO_APPOINT.CNF\nUser Appoint Success> -> <Soft handover\nsupported?>
+
+(|CCo|) -> >CC_CCO_APPOINT.REQ\nReq type =0x1| -> |Store in flash| -> |CC_CCO_APPOINT.CNF> -> |CCo Selection|
+
+(|CCo|) -> >mac_stop| -> |CCo Selection\nForce new CCo|
+|CCo Selection\nForce new CCo| -> |CC_HANDOVER.REQ\nReason 0x2> -> (wait\ncc_handover.cnf\nmac stop)
+|CCo Selection\nForce new CCo| -no more-> |Mac Stop\nFail>
+(wait\ncc_handover.cnf\nmac stop) -timeout or refuse-> | Unselect Sta | -> |CCo Selection\nForce new CCo|
+(wait\ncc_handover.cnf\nmac stop) -> >CC_HANDOVER.CNF\nAccept|
+
+>CC_HANDOVER.CNF\nAccept| -> <Soft handover\nsupported?>
+<Soft handover\nsupported?> -no-> |CC_HANDOVER_INFO.IND>
+<Soft handover\nsupported?> -yes-> |CC_LINK_INFO.IND> -> (Wait\ncc_link_info.rsp)
+(Wait\ncc_link_info.rsp) -> >CC_LINK_INFO.RSP| -> |CC_HANDOVER_INFO.IND> -> (Wait\ncc_handover_info.rsp)
+(Wait\ncc_link_info.rsp) -timeout Mac stop-> |CCo Selection\nForce new CCo|
+(Wait\ncc_link_info.rsp) -timeout-> |CCo Selection|
+
+(Wait\ncc_handover_info.rsp) -> >CC_HANDOVER_INFO.RSP| -> |Inform Beacon| -> (Wait Event\nCCo stop) -> (CCo Stop)
+(Wait\ncc_handover_info.rsp) -timeout Mac stop-> |CCo Selection\nForce new CCo|
+(Wait\ncc_handover_info.rsp) -timeout-> |CCo Selection|
+
+
+(|CCo|) -> >CC_CCO_APPOINT.REQ\nReq type =0x2| -> |CC_CCO_APPOINT.REQ\nreq type=0x1> -> (wait\ncc_cco_appoint.cnf)
+(wait\ncc_cco_appoint.cnf) -timeout-> |CC_CCO_APPOINT.CNF\nFail>
+(wait\ncc_cco_appoint.cnf) -> >CC_CCO_APPOINT.CNF\nReq type = 0x1 Success| -> | Store in flash | -> |CC_CCO_APPOINT.CNF\nSuccess>
+|CC_CCO_APPOINT.CNF\nSuccess> -> |CC_HANDOVER.REQ>
+
+(|CCo|) -> >CC_CCO_APPOINT.REQ\nReq type=0x0| -> | Store in Flash | -> |CC_HANDOVER.REQ>
diff --git a/cesar/cp/av/cco/action/doc/handover_sta.sdl b/cesar/cp/av/cco/action/doc/handover_sta.sdl
new file mode 100644
index 0000000000..30c53276ee
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/handover_sta.sdl
@@ -0,0 +1,21 @@
+(|STA|) -> >CC_HANDOVER.REQ\nSoft handover| -> <Soft handover supported ?>
+<Soft handover supported ?> -yes-> |CC_HANDOVER_CNF\nACCEPT> -> (wait cc_link_info.ind)
+<Soft handover supported ?> -no-> |CC_HANDOVER.CNF\nFailure>
+
+(wait cc_link_info.ind) -> >CC_LINK_INFO.IND| -> |Store link info| -> |CC_LINK_INFO.RSP>
+(wait cc_link_info.ind) -timeout-> (Stay STA)
+|CC_LINK_INFO.RSP> -> (Wait\ncc_handover_info.ind)
+
+(|STA|) -> >CC_HANDOVER.REQ\nHard handover| -> >CC_HANDOVER.CNF\nACCEPT| -> (Wait\ncc_handover_info.ind)
+
+(Wait\ncc_handover_info.ind) -timeout-> (Stay STA)
+(Wait\ncc_handover_info.ind) -> >CC_HANDOVER_INFO.IND| -> |Store handover info| -> |CC_HANDOVER_INFO.RSP> -> (Wait\nhandover timout expires) -> (Beacon CCO)
+
+(|STA|) -> >DRV_CCO_APPOINT.REQ\nMac Address|
+>DRV_CCO_APPOINT.REQ\nMac Address| -> |CC_CCO_APPOINT.REQ\nMac address>
+|CC_CCO_APPOINT.REQ\nMac address> -> (Sta Wait Conf)
+
+(Sta Wait Conf) -timeout-> |DRV_CCO_APPOINT.CNF\nTimeout, fail>
+(Sta Wait Conf) -> >CC_CCO_APPOINT.CNF\nAccept| -> |DRV_CCO_APPOINT.CNF\nAccept>
+(Sta Wait Conf) -> >CC_CCO_APPOINT.CNF\nRefuse| -> |DRV_CCO_APPOINT.CNF\nRefuse>
+
diff --git a/cesar/cp/av/cco/action/doc/leave.sdl b/cesar/cp/av/cco/action/doc/leave.sdl
new file mode 100644
index 0000000000..75a83c35c5
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/leave.sdl
@@ -0,0 +1,5 @@
+|CC_LEAVE.REQ| -> <known station>
+
+<known station> -no-> |End|
+<known station> -yes-> |Remove sta\nfrom sta mgr|
+|Remove sta\nfrom sta mgr| -> |CC_LEAVE.IND|
diff --git a/cesar/cp/av/cco/action/doc/nek_change.sdl b/cesar/cp/av/cco/action/doc/nek_change.sdl
new file mode 100644
index 0000000000..1af935d7e0
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/nek_change.sdl
@@ -0,0 +1,14 @@
+(CCo) -change_nek-> |gen nek\nPost event provide_nek| -> (CCo)
+
+(CCO_NEK_CHANGE_IDLE) -nek_provide-> |CM_SET_KEY_REQ> -> (CCO_NEK_CHANGE_WAIT_STA_CNF)
+
+(CCO_NEK_CHANGE_WAIT_STA_CNF) -> >CM_SET_KEY_CNF_PID1| -> (CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF)
+(CCO_NEK_CHANGE_WAIT_STA_CNF) -nek_timeout-> <More STA?>
+
+<More STA?> -no-> (CCO_NEK_CHANGE_IDLE)
+<More STA?> -yes-> |CM_SET_KEY_REQ>
+
+(CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF) -nek_timeout-> <More STA?>
+(CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF) -nek_cm_set_key_cnf_pid1-> <ok ?>
+<ok ?> -ok_continue-> |CM_ENCRYPTED_PAYLOAD.IND\nCM_SET_KEY.REQ> -> (CCO_NEK_CHANGE_WAIT_STA_CNF)
+<ok ?> -end-> <More STA?>
diff --git a/cesar/cp/av/cco/action/doc/snid.sdl b/cesar/cp/av/cco/action/doc/snid.sdl
new file mode 100644
index 0000000000..c8b1edce9a
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/snid.sdl
@@ -0,0 +1,3 @@
+(|SNID|) -> |get snid flags \nfrom sta mgr|
+|get snid flags \nfrom sta mgr| -> |Init random|
+|Init random| -> |return SNID|
diff --git a/cesar/cp/av/cco/action/doc/tei.sdl b/cesar/cp/av/cco/action/doc/tei.sdl
new file mode 100644
index 0000000000..c372d320b0
--- /dev/null
+++ b/cesar/cp/av/cco/action/doc/tei.sdl
@@ -0,0 +1,14 @@
+(|TEI Managing|) -> |init counter of word|
+
+|init counter of word| -> |Get first TEI flag word|
+|Get first TEI flag word| -> <TEI Available>
+
+<TEI Available> -yes-> |Set bit in flag TEI word|
+|Set bit in flag TEI word| -> |Return TEI|
+
+<TEI Available> -no-> <counter == max TEI flags Table>
+
+<counter == max TEI flags Table> -yes-> |Return 0|
+<counter == max TEI flags Table> -no-> |get next TEI flag word|
+|get next TEI flag word| -> <TEI Available>
+
diff --git a/cesar/cp/av/cco/action/handover.h b/cesar/cp/av/cco/action/handover.h
new file mode 100644
index 0000000000..064b3abd09
--- /dev/null
+++ b/cesar/cp/av/cco/action/handover.h
@@ -0,0 +1,100 @@
+#ifndef cp_av_cco_action_handover_h
+#define cp_av_cco_action_handover_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/cco/action/handover.h
+ * \brief Handover functions.
+ * \ingroup cp_cco_action
+ *
+ * All the functions for the handover described by the FSM in the doc
+ * directory.
+ */
+#include "cp/cp.h"
+#include "cp/sta/mgr/sta.h"
+
+BEGIN_DECLS
+
+/* FSM HANDOVER */
+
+/**
+ * Start the handover procedure,
+ * \param ctx the module context.
+ *
+ * The FSM calls this function once the discover procedure is ended (the event
+ * is posted by the beacon module).
+ * The CCo selection shall be done and the cc_handover.req sent to the
+ * station.
+ * If the station is a user appointed CCo, this shall ends the handover
+ * procedure.
+ *
+ * If a station is elected to be the NEW CCo, and if booth the actual CCo and
+ * the new CCo can handle the soft handover it shall start a soft handover.
+ * In the other case a hard handover is initiated.
+ */
+void
+cp_av_cco_action_handover__start (cp_t *ctx);
+
+/**
+ * Start the handover.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_handover__discover_done (cp_t *ctx);
+
+/**
+ * Received the cc_handover_cnf from the peer station.
+ * \param ctx the module context.
+ * \param mme the MME received.
+ *
+ * This function shall continue the procedure if the peer station accepted the
+ * request or abort it.
+ */
+void
+cp_av_cco_action_handover__cc_handover_cnf_receive (cp_t *ctx,
+ cp_mme_rx_t *mme);
+
+/**
+ * The procedure timeout for the cc_handover_cnf.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_handover__timeout_cc_handover_cnf (cp_t *ctx);
+
+/**
+ * The procedure timeout for the cc_handover_cnf.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_handover__timeout_cc_handover_info_rsp (cp_t *ctx);
+
+/**
+ * Receives a CC_HANDOVER.RSP from the peer station.
+ * \param ctx the module context.
+ * \param mme the MME received.
+ *
+ * This function shall inform the Beacon module to start the handover
+ * countdown and insert it in the central beacon.
+ */
+void
+cp_av_cco_action_handover__cc_handover_info_rsp_receive (cp_t *ctx,
+ cp_mme_rx_t *mme);
+
+/**
+ * Countdown expires.
+ * \param ctx the module context.
+ *
+ * This function shall stop the CCo function of the station and clear the
+ * selection set.
+ */
+void
+cp_av_cco_action_handover__hoip_countdown_expired (cp_t *ctx);
+
+END_DECLS
+
+#endif /* cp_av_cco_action_handover_h */
diff --git a/cesar/cp/av/cco/action/inc/cco_action.h b/cesar/cp/av/cco/action/inc/cco_action.h
new file mode 100644
index 0000000000..f47bca7a93
--- /dev/null
+++ b/cesar/cp/av/cco/action/inc/cco_action.h
@@ -0,0 +1,77 @@
+#ifndef cp_av_cco_inc_cco_action_h
+#define cp_av_cco_inc_cco_action_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/cco/inc/cco_action.h
+ * \brief CCo private functions.
+ * \ingroup cp_cco
+ *
+ */
+#include "lib/set.h"
+#include "lib/rnd.h"
+
+#include "cp/msg/msg.h"
+#include "cp/sta/core/core.h"
+#include "cp/sta/core/defs.h"
+#include "cp/cco/action/cco_action.h"
+
+/* Timeout value for the EKS exchange MME. */
+#define CP_CCO_ACTION_EKS_TIMEOUT_MS 1000
+
+BEGIN_DECLS
+
+/**
+ * Search for an available TEI in the AVLN list.
+ * \param ctx the module context.
+ * \return return the TEI found.
+ *
+ * Get the AVLN from the station manager (our AVLN). Lookup in the station
+ * a hole of TEIs. It no hole is found and no more STAs are available
+ * it means that all the TEIs are used in the AVLN. \Warn The TEI = 0
+ * is reserved and 255 too
+ */
+cp_tei_t
+cp_av_cco_action_tei_compute (cp_t *ctx);
+
+/**
+ * Return true if the left node is lesser than the right node.
+ * \param left The left node.
+ * \param right The right node.
+ * \return true if left is lesser than right.
+ *
+ * This function shall compare the expiration lease of the stations
+ */
+bool
+cp_av_cco_action_tei_lease_less (set_node_t * left, set_node_t * right);
+
+
+/**
+ * Removes a station from the CCo selection procedure.
+ * \param ctx the module context.
+ * \param sta the station to remove.
+ *
+ * This function shall remove a station from the CCO selection procedure. It
+ * shall be called when the station refuse to become the New CCo or a timeout
+ * on the handover procedure.
+ */
+void
+cp_av_cco_action_cco_selection__sta_remove (cp_t *ctx, cp_sta_t *sta);
+
+/**
+ * Selects the Next CCo on the AVLN.
+ * \param ctx the module context.
+ * \return the station elected or NULL.
+ */
+cp_sta_t *
+cp_av_cco_action_cco_selection__selection (cp_t *ctx);
+
+END_DECLS
+
+#endif /* cp_av_cco_inc_cco_action_h */
+
diff --git a/cesar/cp/av/cco/action/src/cco_action.c b/cesar/cp/av/cco/action/src/cco_action.c
new file mode 100644
index 0000000000..0bba780ee6
--- /dev/null
+++ b/cesar/cp/av/cco/action/src/cco_action.c
@@ -0,0 +1,1509 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/av/cco/action/src/cco_action.c
+ * \brief CCo Action functions.
+ * \ingroup cp_av_cco
+ *
+ */
+#include <string.h>
+#include "common/std.h"
+#include "common/defs/homeplugAV.h"
+
+#include "lib/set.h"
+#include "lib/utils.h"
+#include "lib/rnd.h"
+#include "lib/slab.h"
+
+#include "common/defs/ethernet.h"
+
+#include "cl/cl_mactotei.h"
+
+#include "mac/common/timings.h"
+
+#include "cp/defs.h"
+#include "cp/cp.h"
+#include "cp/fsm/fsm.h"
+#include "cp/msg/msg.h"
+
+#include "cp/cco/action/cco_action.h"
+#include "cp/av/cco/action/cco_action.h"
+#include "cp/sta/mgr/sta_mgr.h"
+#include "cp/sta/mgr/net.h"
+#include "cp/sta/mgr/sta.h"
+#include "cp/beacon/beacon.h"
+#include "cp/av/beacon/discover.h"
+#include "cp/sta/core/core.h"
+#include "cp/beacon/beacon.h"
+#include "cp/cco/region/region.h"
+#include "cp/av/cco/region/region.h"
+#include "cp/cco/bw/bw.h"
+#include "cp/av/cco/bw/bw.h"
+#include "cp/av/beacon/beacon.h"
+
+#include "cp/inc/context.h"
+#include "cp/inc/trace.h"
+#include "cp/cco/action/inc/cco_action.h"
+#include "cp/av/cco/action/inc/cco_action.h"
+
+#include "bsu/bsu.h"
+
+/**
+ * Progam a timer to post a cco__nek_change event
+ * \param ctx the module context.
+ */
+static void
+cp_av_cco_action_nek_change_timer_program (cp_t *ctx)
+{
+ /* Prepare next change. */
+ cp_fsm_event_t *event =
+ cp_fsm_event_bare_new (ctx, CP_FSM_EVENT_TYPE_cco__nek_change);
+ cp_sta_core_gen_timed_event (ctx, &ctx->cco_action.nek_change,
+ event, HPAV_NEK_CHANGE_MS);
+}
+
+/**
+ * Choose a SNID between the ones available.
+ * \param ctx the CP context.
+ */
+static cp_snid_t
+cp_av_cco_action_snid_choose (cp_t *ctx)
+{
+ u16 flags;
+ u16 table [16];
+ uint nb_elem;
+ uint i;
+ dbg_assert (ctx);
+
+ // Get the present flags.
+ flags = ~cp_sta_mgr_get_present_snids (ctx);
+
+ // fill the table.
+ for (i = 0, nb_elem = 0; i < 16; i++)
+ {
+ if ((flags >> i) & true)
+ {
+ table[nb_elem] = i;
+ nb_elem ++;
+ }
+ }
+
+
+ // Chose the new SNID.
+ i = lib_rnd32 (&ctx->rnd) % nb_elem;
+
+ return table[i];
+}
+
+/**
+ * Function to sort the station in the CCo selection set.
+ * \param left the left node.
+ * \param right the right node.
+ */
+static inline bool
+cp_av_cco_action_cco_selection__less (heap_node_t *left, heap_node_t *right)
+{
+ cp_sta_t *stal;
+ cp_sta_t *star;
+
+ dbg_assert (left);
+ dbg_assert (right);
+
+ stal = PARENT_OF (cp_sta_t, cco_selection_node, left);
+ star = PARENT_OF (cp_sta_t, cco_selection_node, right);
+
+ if (stal->cco_cap > star->cco_cap)
+ return true;
+ return false;
+}
+
+
+/**
+ * Search for an available TEI in the AVLN list.
+ * \param ctx the module context.
+ * \return return the TEI found.
+ *
+ */
+cp_tei_t
+cp_av_cco_action_tei_compute (cp_t *ctx)
+{
+ uint row;
+ uint tei;
+ uint i;
+ dbg_assert (ctx);
+
+ for (i = MAC_TEI_STA_MIN; MAC_TEI_IS_STA (i); i++)
+ {
+ row = i / CP_CCO_ACTION_TEI_FLAGS_ROW_SIZE_BITS;
+ tei = ctx->cco_action.tei_flags[row] >>
+ ((i % CP_CCO_ACTION_TEI_FLAGS_ROW_SIZE_BITS)- 1);
+ if ((tei & true) == false)
+ {
+ tei = i;
+ cp_av_cco_action_tei_in_use (ctx, tei);
+ break;
+ }
+ else
+ tei = MAC_TEI_UNASSOCIATED;
+ }
+
+ // No TEI are available.
+ return tei;
+}
+
+void
+cp_av_cco_action_tei_in_use (cp_t *ctx, cp_tei_t tei)
+{
+ uint row;
+
+ dbg_assert (ctx);
+ dbg_assert (MAC_TEI_IS_STA (tei));
+
+ row = tei / CP_CCO_ACTION_TEI_FLAGS_ROW_SIZE_BITS;
+
+ ctx->cco_action.tei_flags[row] |= (1 << ((tei
+ % CP_CCO_ACTION_TEI_FLAGS_ROW_SIZE_BITS) - 1));
+}
+
+void
+cp_av_cco_action_tei_clear (cp_t *ctx)
+{
+ dbg_assert (ctx);
+
+ memset (&ctx->cco_action.tei_flags, 0,
+ sizeof (uint) * CP_CCO_ACTION_TEI_FLAGS_ROW);
+}
+
+/**
+ * Start common operations.
+ * \param ctx the CP context.
+ *
+ * This should promote the station as CCo.
+ * Program the nek change timer.
+ * Untrack the old CCo.
+ * Update beacon module.
+ * Initialise the discover procedure.
+ */
+static void
+cp_av_cco_action_cco_start_common (cp_t *ctx)
+{
+ /* Set the CCo status in the station own data. */
+ cp_sta_own_data_set_authenticated_status (ctx, true);
+ cp_sta_own_data_set_cco_status (ctx, true);
+ // Program the timer to change the NEKs.
+ cp_av_cco_action_nek_change_timer_program (ctx);
+ cp_beacon_process_untracked_avln (ctx);
+ cp_net_t *net = cp_sta_mgr_get_our_avln (ctx);
+ bsu_update_nid_snid (ctx->bsu, cp_net_get_nid (ctx, net),
+ cp_net_get_snid (ctx, net));
+ cp_beacon_cco_update_beacon_data (ctx);
+ cp_beacon_reconfigure_timer (ctx, true);
+ cp_av_beacon_discover_init (ctx);
+}
+
+/**
+ * Start to act as a CCo coming from the unassociated state.
+ * \param ctx the module context.
+ *
+ * This function shall:
+ * - Choose a TEI if the station don't have one yet.
+ * - Create and set our AVLN in the station manager.
+ * - Generate the current NEK and order to change it.
+ * - Clear schedules and set the network mode to CSMA_ONLY.
+ * - Set the station's CCo and authenticate status.
+ * - Program the NEK change timer.
+ * - Clear tracking data.
+ * - Update the beacon for BSU.
+ * - Initialise the discover procedure context.
+ */
+static void
+cp_av_cco_action_start (cp_t *ctx)
+{
+ cp_tei_t tei;
+ cp_net_t *net;
+ cp_nid_t nid;
+ cp_snid_t snid;
+ dbg_assert (ctx);
+ /* Verify if the station does not already have a TEI. */
+ snid = cp_sta_own_data_get_snid (ctx);
+ nid = cp_sta_own_data_get_nid (ctx);
+ if (!cp_sta_own_data_get_tei(ctx))
+ {
+ tei = cp_av_cco_action_tei_compute (ctx);
+ cp_sta_own_data_set_tei (ctx, tei);
+ /* Clear the AVLN. */
+ cp_sta_mgr_remove_avln (ctx, snid, nid);
+ }
+ /* Set our AVLN. */
+ net = cp_sta_mgr_add_avln (ctx, snid, nid);
+ cp_sta_mgr_set_our_avln (ctx, net);
+ cp_cco_action_gen_nek_now (ctx);
+ /* Reinitialise schedules and regions. */
+ cp_cco_region_alloc_clean (ctx, &ctx->region.region_list);
+ cp_av_cco_region_default (ctx);
+ cp_cco_bw_alloc_clean (ctx, &ctx->bw.alloc_list);
+ cp_av_cco_bw_schedules_default (ctx);
+ /* Set network mode as CSMA only mode. */
+ cp_net_set_nm (ctx, net, MAC_NM_CSMA_ONLY);
+ /* Set hybrid mode to Full hybrid mode. */
+ cp_sta_own_data_t *own = cp_sta_mgr_get_sta_own_data (ctx);
+ own->hybrid_mode = MAC_COEXISTENCE_HYBRID_DELIMITERS_MODE;
+ cp_av_cco_action_cco_start_common (ctx);
+}
+
+/**
+ * Stop acting as a CCo and become a simple station.
+ * \param ctx the module context.
+ *
+ * This function shall:
+ * - Change the station CCo status.
+ * - Stop the NEK timer.
+ * - Clear the TEI table attribution.
+ * - Clear the CCo selection context (handover).
+ * - Reconfigure becon timer.
+ * - Update the beacon to act as a STA.
+ * - Uninitialise discover procedure.
+ */
+static void
+cp_av_cco_action_stop (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ /* Change the CCo status to false, the station leave the CCo status. */
+ cp_sta_own_data_set_cco_status (ctx, false);
+ /* Stop the timer for the NEK generation keys. */
+ cp_sta_core_stop_timed_or_cyclic_event (ctx, &ctx->cco_action.nek_change);
+ /* clear the TEI list. */
+ cp_av_cco_action_tei_clear (ctx);
+ cp_av_cco_action_cco_selection__clear (ctx);
+ cp_beacon_reconfigure_timer (ctx, false);
+ cp_av_beacon_sta_update_beacon_data (ctx);
+ cp_av_beacon_discover_uninit (ctx);
+}
+
+
+/**
+ * initialisation of CCo action module.
+ * \param ctx the module context.
+ *
+ */
+void
+cp_av_cco_action_init (cp_t *ctx)
+{
+ dbg_assert (ctx);
+
+ memset (&ctx->cco_action, 0, sizeof (cp_cco_action_t));
+
+ /* Initialise the SET. */
+ heap_init (&ctx->cco_action.selection_heap,
+ cp_av_cco_action_cco_selection__less);
+ /* Create default region. */
+ cp_av_cco_region_default (ctx);
+}
+
+/**
+ * Uninitialisation of CCo action module.
+ * \param ctx the module context.
+ *
+ */
+void
+cp_av_cco_action_uninit (cp_t *ctx)
+{
+ dbg_assert (ctx);
+
+ cp_av_cco_action_cco_selection__clear (ctx);
+}
+
+void
+cp_av_cco_action_ucco_start (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_av_cco_action_start (ctx);
+}
+
+void
+cp_av_cco_action_ucco_stop (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_av_cco_action_stop (ctx);
+ cp_sta_own_data_set_authenticated_status (ctx, false);
+ /* Set our AVLN as null. */
+ cp_sta_mgr_set_our_avln (ctx, NULL);
+ /* Leave our TEI. */
+ cp_sta_own_data_set_tei (ctx, MAC_TEI_UNASSOCIATED);
+ cp_fsm_trigger_new_event (ctx, bare, assoc_cco_leave);
+}
+
+void
+cp_av_cco_action_ucco__to_cco (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_fsm_trigger_new_event (ctx, bare, assoc_become_cco);
+}
+
+void
+cp_av_cco_action_cco__to_ucco (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_fsm_trigger_new_event (ctx, bare, assoc_become_ucco);
+}
+
+void
+cp_av_cco_action_cco__unassoc_start (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ /* Take a snid. */
+ cp_snid_t snid = cp_av_cco_action_snid_choose (ctx);
+ cp_sta_own_data_set_snid (ctx, snid);
+ bsu_power_on (ctx->bsu, snid);
+ cp_av_cco_action_start (ctx);
+ cp_fsm_trigger_new_event (ctx, bare, assoc_become_cco);
+}
+
+void
+cp_av_cco_action_cco__assoc_start (cp_t *ctx)
+{
+ cp_av_cco_action_cco_start_common (ctx);
+ /* Clear tracking data. */
+ cp_fsm_trigger_new_event (ctx, bare, assoc_become_cco);
+}
+
+void
+cp_av_cco_action_cco__assoc_stop (cp_t *ctx)
+{
+ cp_av_cco_action_stop (ctx);
+ cp_fsm_trigger_new_event (ctx, bare, assoc_become_sta);
+}
+
+void
+cp_av_cco_action_cco__unassoc_stop (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_av_cco_action_stop (ctx);
+ cp_fsm_trigger_new_event (ctx, bare, assoc_cco_leave);
+}
+
+/**
+ * Change the SNID.
+ * \param ctx the module context.
+ *
+ * It shall request the SNIDs in use from the station manager to choose
+ * one randomly in the available SNIDs
+ */
+void
+cp_av_cco_action_cco__cco_snid_conflict (cp_t *ctx)
+{
+ cp_snid_t snid;
+ dbg_assert (ctx);
+
+ snid = cp_av_cco_action_snid_choose (ctx);
+
+ // Provide the SNID to the beacon module.
+ cp_beacon_change_snid (ctx, snid);
+}
+
+/**
+ * manage explicit leave request of a station.
+ * \param ctx the module context.
+ * \param sta provided by the garbage function to send a CC_LEAVE_IND.
+ *
+ * Remove the station from the station manager.
+ * \warn It does not release the reference of the station provided
+ * in parameters.
+ */
+void
+cp_av_cco_action_tei_expired (cp_t *ctx, cp_sta_t *sta)
+{
+ cp_mme_peer_t peer;
+ cp_net_t *net;
+
+ dbg_assert (ctx);
+
+ /* Get the network of the station. */
+ net = cp_sta_mgr_get_our_avln (ctx);
+
+ cp_sta_get_peer (sta, &peer);
+
+ cp_msg_cc_leave_ind_send (ctx, &peer,
+ CP_MSG_CC_LEAVE_IND_REASON_TEI_LEASE_EXPIRED,
+ cp_net_get_nid(ctx, net));
+ CP_TRACE (CCO_TEI_EXPIRED, TRACE_U64 (peer.mac), peer.tei);
+
+ cp_av_cco_action_cco_sta_leave_send_tei_map (ctx, sta);
+ cp_sta_mgr_release_station (ctx, cp_sta_get_tei (sta));
+}
+
+/**
+ * perform garbage actions of CCo's responsibility.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_garbage (cp_t *ctx)
+{
+ cp_sta_t *sta;
+ cp_sta_t *sta_next;
+ cp_net_t *net;
+ dbg_assert (ctx);
+
+ if (cp_sta_own_data_get_tei (ctx))
+ {
+ net = cp_sta_mgr_get_our_avln (ctx);
+
+ sta = cp_net_sta_get_first (ctx, net, CP_NET_STA_ASSOC);
+ while (sta)
+ {
+ slab_addref (sta);
+ sta_next = cp_net_sta_get_next (ctx, net, sta);
+ u32 date_ms = cp_sta_core_get_date_ms (ctx);
+ if (less_mod2p32(sta->tei_lease_date_ms, date_ms)
+ || less_mod2p32 (sta->expired_date_ms, date_ms))
+ {
+ // Remove the node from the tei lease.
+ cp_av_cco_action_tei_expired (ctx, sta);
+ }
+ slab_release (sta);
+ sta = sta_next;
+ }
+
+ cp_sta_mgr__assoc__timeout (ctx, cp_sta_core_get_date_ms (ctx));
+ }
+}
+
+/**
+ * generate a new NEK value.
+ * \param ctx the module context.
+ *
+ * NEK shall be used no more than 1 hour, so must be changed after 1
+ * hour for that purpose, NEK expiration date is checked at every occurrence
+ * of the global garbage collector timer and if current NEK expiration
+ * date reached, a new NEK value shall be generated by calling this function
+ */
+void
+cp_av_cco_action_cco__cco_nek_change (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_secu_generate_key (ctx, lib_rnd32 (&ctx->rnd),
+ CP_SECU_PBKDF1_ITERATION_NEK,
+ &ctx->cco_action.nek_new);
+
+ /* Prepare next change. */
+ cp_av_cco_action_nek_change_timer_program (ctx);
+ /* POST the FSM event. */
+ cp_fsm_post_new_event (ctx, bare, cco_nek_change__nek_provide);
+}
+
+/**
+ * Send the SET tei map IND to all the station with the TEI of the new one.
+ * \param ctx the CP context.
+ * \param tei the tei of the station which has joined the AVLN.
+ * \param mac the station mac address.
+ */
+static void
+cp_av_cco_action_send_set_tei_map_to_new_sta (cp_t *ctx, cp_tei_t tei,
+ mac_t mac)
+{
+ cp_mme_tx_t *mme_tx;
+ cp_sta_t *sta_list;
+ cp_mme_peer_t *peer;
+ cp_net_t *net;
+
+ dbg_assert (ctx);
+ dbg_assert (tei);
+ dbg_assert (mac);
+
+ // Send unicast.
+ // It will send all the TEI MAP to the station just associated.
+ net = cp_sta_mgr_get_our_avln (ctx);
+ peer = &CP_MME_PEER (mac, tei);
+
+ // +1 For our own station which is not in the AVLN.
+ mme_tx = cp_msg_cc_set_tei_map_ind_send_begin (ctx, peer,
+ CP_MSG_CC_SET_TEI_MAP_IND_MODE_UPDATE,
+ cp_net_get_num_stas (ctx, net) + 1);
+
+ // Add our station first.
+ cp_msg_cc_set_tei_map_ind_send_sta (ctx, mme_tx,
+ cp_sta_own_data_get_tei(ctx),
+ cp_sta_own_data_get_mac_address (ctx),
+ CP_MSG_CC_SET_TEI_MAP_IND_STATUS_AUTHENTICATED);
+
+ sta_list = cp_net_sta_get_first (ctx, net, CP_NET_STA_ASSOC);
+ while (sta_list)
+ {
+ enum cp_msg_cc_set_tei_map_ind_status_t station_status;
+
+ if (cp_sta_get_authenticated (ctx, sta_list))
+ {
+ station_status =
+ CP_MSG_CC_SET_TEI_MAP_IND_STATUS_AUTHENTICATED;
+ }
+ else if (cp_sta_get_tei (sta_list))
+ {
+ station_status = CP_MSG_CC_SET_TEI_MAP_IND_STATUS_ASSOCIATED;
+ }
+ else
+ {
+ station_status =
+ CP_MSG_CC_SET_TEI_MAP_IND_STATUS_DISASSOCIATED;
+ }
+ cp_msg_cc_set_tei_map_ind_send_sta (ctx, mme_tx,
+ cp_sta_get_tei (sta_list),
+ cp_sta_get_mac_address (sta_list),
+ station_status);
+
+ sta_list = cp_net_sta_get_next (ctx, net, sta_list);
+
+ }
+ cp_msg_cc_set_tei_map_ind_send_end (ctx, mme_tx);
+}
+
+/**
+ * Send the SET TEI MAP to all the station of the NET.
+ * \param ctx the CP context.
+ * \param tei the new station tei.
+ * \param mac the station mac address.
+ */
+static void
+cp_av_cco_action_send_set_tei_map_to_all_sta (cp_t *ctx, cp_tei_t tei,
+ mac_t mac)
+{
+ cp_mme_peer_t *peer;
+ cp_mme_tx_t *mme_tx;
+ dbg_assert (ctx);
+ dbg_assert (tei);
+ dbg_assert (mac);
+
+ peer = &CP_MME_PEER_ALL_STA;
+ mme_tx = cp_msg_cc_set_tei_map_ind_send_begin (ctx, peer,
+ CP_MSG_CC_SET_TEI_MAP_IND_MODE_ADD, 1);
+
+ cp_msg_cc_set_tei_map_ind_send_sta (ctx, mme_tx,
+ tei, mac,
+ CP_MSG_CC_SET_TEI_MAP_IND_STATUS_ASSOCIATED);
+
+ cp_msg_cc_set_tei_map_ind_send_end (ctx, mme_tx);
+}
+
+/**
+ * Assoc type join.
+ * \param ctx the CP context.
+ * \param msg the assoc MME message.
+ * \param assoc the assoc data read from the MME.
+ */
+static void
+cp_av_cco_action__assoc__join (cp_t *ctx, cp_mme_rx_t *msg,
+ cp_msg_cc_assoc_req_t *assoc)
+{
+ cp_net_t *net;
+ cp_sta_t *sta;
+ cp_tei_t tei = MAC_TEI_UNASSOCIATED;
+ cp_msg_cc_assoc_cnf_t cnf;
+
+ dbg_assert (ctx);
+ dbg_assert (msg);
+ dbg_assert (assoc);
+
+ /* Add the station to the AVLN. */
+ net = cp_sta_mgr_get_our_avln (ctx);
+
+ cnf.nid = cp_net_get_nid (ctx, net);
+ cnf.snid = cp_net_get_snid (ctx, net);
+
+ /* Try to get the TEI from the STA manager if we already know it. */
+ sta = cp_sta_mgr_sta_get_from_mac (ctx, msg->peer.mac);
+ /* If the station is known. */
+ if (sta)
+ {
+ /* If the station is currently in our AVLN/net. */
+ if (net == cp_sta_get_net (sta))
+ {
+ // The station already exists get the TEI.
+ tei = cp_sta_get_tei (sta);
+ }
+ /* Remove the station from the station manager and the mac store. */
+ cp_sta_mgr_sta_remove (ctx, sta);
+ slab_release (sta);
+ }
+ /* If the station has no TEI, try to generate one. */
+ if (!MAC_TEI_IS_STA (tei))
+ {
+ /* Try to get a TEI. */
+ tei = cp_av_cco_action_tei_compute (ctx);
+ }
+
+ /* If we manage to have a TEI, it's a success. */
+ if (MAC_TEI_IS_STA (tei))
+ {
+ cnf.result = CP_MSG_CC_ASSOC_CNF_RESULT_SUCCESS;
+ cnf.lease_time_min = CP_LEASE_ASSOC_MIN;
+ }
+ /* Otherwise, it's an error. */
+ else
+ {
+ cnf.result =
+ CP_MSG_CC_ASSOC_CNF_RESULT_FAILURE_TEMPORARY_RESSOURCE_EXHAUSTION;
+ }
+
+ /* Send the answer. */
+ cnf.sta_tei = tei;
+ cp_msg_cc_assoc_cnf_send (ctx, &msg->peer, &cnf);
+ CP_TRACE (CCO_ASSOC, TRACE_U64 (msg->peer.mac), tei);
+
+ if (tei)
+ {
+ /* Send TEI MAP to all STA except the new one (need to do it before
+ * adding the new STA to the STA manager). */
+ cp_av_cco_action_send_set_tei_map_to_all_sta (ctx, tei, msg->peer.mac);
+ sta = cp_sta_mgr_sta_add (ctx, net, tei, msg->peer.mac);
+ /* Add the TEI lease corresponding to an unassociated STA. */
+ cp_sta_mgr_commit_to_dataplane (ctx);
+ u32 date_ms = cp_sta_core_get_date_ms (ctx);
+ sta->tei_lease_date_ms = date_ms +
+ MAC_SEC_TO_MS(CP_LEASE_ASSOC_MIN * 60);
+
+ /* Update the last request date in the sta. */
+ cp_sta_set_assoc_confirmed (ctx, sta, false);
+ sta->assoc_req_last_ms = cp_sta_core_get_date_ms (ctx);
+ /* A new STA has joined an AVLN for the first time, generate an
+ * event. */
+ cp_fsm_event_t *event = cp_fsm_event_sta_new
+ (ctx, CP_FSM_EVENT_TYPE_new_sta_associated, net,
+ (cp_sta_t *) sta);
+ cp_fsm_post (ctx, event);
+
+ /* Release the reference on the station. */
+ slab_release (sta);
+ }
+ if (!tei)
+ {
+ sta = cp_sta_mgr_sta_add (ctx, net, 0, msg->peer.mac);
+ /* Release the reference on the station. */
+ slab_release (sta);
+ }
+}
+
+/**
+ * Assoc type renew.
+ * \param ctx the CP context.
+ * \param msg the assoc MME message.
+ * \param assoc the assoc data read from the MME.
+ */
+static void
+cp_av_cco_action__assoc__renew (cp_t *ctx, cp_mme_rx_t *msg,
+ cp_msg_cc_assoc_req_t *assoc)
+{
+ cp_net_t *net;
+ cp_sta_t *sta;
+ cp_msg_cc_assoc_cnf_t cnf;
+
+ dbg_assert (ctx);
+ dbg_assert (msg);
+ dbg_assert (assoc);
+
+ /* Add the station to the AVLN. */
+ net = cp_sta_mgr_get_our_avln (ctx);
+
+ cnf.nid = cp_net_get_nid (ctx, net);
+ cnf.snid = cp_net_get_snid (ctx, net);
+
+ /* Renew the TEI. */
+ sta = cp_sta_mgr_sta_get_assoc (ctx, net, msg->peer.tei);
+
+ if (sta)
+ {
+ /* Renew the TEI. */
+ u32 date_ms = cp_sta_core_get_date_ms (ctx);
+ sta->tei_lease_date_ms = date_ms +
+ MAC_SEC_TO_MS(CP_LEASE_AUTH_MIN * 60);
+ cnf.result = CP_MSG_CC_ASSOC_CNF_RESULT_SUCCESS;
+ cnf.sta_tei = cp_sta_get_tei (sta);
+ cnf.lease_time_min = CP_LEASE_AUTH_MIN;
+
+ slab_release (sta);
+ }
+ else
+ {
+ cnf.result = CP_MSG_CC_ASSOC_CNF_RESULT_FAILURE_OTHER_REASON;
+ cnf.sta_tei = 0;
+ cnf.lease_time_min = 0;
+ }
+
+ /* Send the answer. */
+ cp_msg_cc_assoc_cnf_send (ctx, &msg->peer, &cnf);
+ CP_TRACE (CCO_ASSOC_RENEW, TRACE_U64 (msg->peer.mac), msg->peer.tei);
+}
+
+/**
+ * Static function part.
+ * \param ctx the CP module context.
+ * \param assoc_req the MME context.
+ * \param assoc The mme in the processor format.
+ */
+static void
+cp_av_cco_action_manage_sta_assoc_common (cp_t *ctx, cp_mme_rx_t *assoc_req,
+ cp_msg_cc_assoc_req_t *assoc)
+{
+ dbg_assert (ctx);
+ dbg_assert (assoc_req);
+ dbg_assert (assoc);
+ dbg_assert (ctx->mac_store);
+
+
+ if (assoc->request_type == CP_MSG_CC_ASSOC_REQ_TYPE_NEW)
+ cp_av_cco_action__assoc__join (ctx, assoc_req, assoc);
+ else if (assoc->request_type == CP_MSG_CC_ASSOC_REQ_TYPE_RENEW)
+ cp_av_cco_action__assoc__renew (ctx, assoc_req, assoc);
+ else
+ dbg_assert (assoc->request_type == CP_MSG_CC_ASSOC_REQ_TYPE_NB);
+}
+
+/**
+ * manage association of a station.
+ * \param ctx the module context.
+ * \param assoc_req CM_ASSOC.REQ MME msg having being received
+ */
+void
+cp_av_cco_action_cco__cc_assoc_req (cp_t *ctx, cp_mme_rx_t * assoc_req)
+{
+ cp_msg_cc_assoc_req_t assoc;
+
+ dbg_assert (ctx);
+ dbg_assert (assoc_req);
+
+ /* Reading the data in the MME. */
+ if (cp_msg_cc_assoc_req_receive(ctx, assoc_req, &assoc))
+ cp_av_cco_action_manage_sta_assoc_common (ctx, assoc_req, &assoc);
+}
+
+static void
+cp_av_cco_action_ucco__cc_assoc_req_common (
+ cp_t *ctx, cp_mme_rx_t * assoc_req, cp_fsm_branch_t branch_ok,
+ cp_fsm_branch_t branch_nok)
+{
+ cp_msg_cc_assoc_req_t assoc;
+ dbg_assert (ctx);
+ dbg_assert (assoc_req);
+ dbg_assert (cp_sta_own_data_get_tei (ctx));
+ dbg_assert (cp_sta_own_data_get_authenticated_status (ctx));
+ dbg_assert (cp_sta_own_data_get_cco_status (ctx));
+ /* Reading the data in the MME. */
+ cp_msg_cc_assoc_req_receive(ctx, assoc_req, &assoc);
+ /* The MME is not for the station, it shall answer to the source station
+ * with a Failure for others reason. */
+ if ((assoc.request_type == CP_MSG_CC_ASSOC_REQ_TYPE_NEW)
+ && (assoc.nid == cp_sta_own_data_get_nid (ctx)))
+ {
+ /* Become CCo. */
+ cp_av_cco_action_ucco__to_cco (ctx);
+ /* Continue the association procedure. */
+ cp_av_cco_action_manage_sta_assoc_common (ctx, assoc_req, &assoc);
+ cp_fsm_branch_ (ctx, branch_ok);
+ }
+ else
+ cp_fsm_branch_ (ctx, branch_nok);
+}
+
+void
+cp_av_cco_action_ucco__cc_assoc_req (cp_t *ctx, cp_mme_rx_t * assoc_req)
+{
+ cp_av_cco_action_ucco__cc_assoc_req_common (
+ ctx, assoc_req, CP_FSM_BRANCH (UCCO, CC_ASSOC_REQ, ok),
+ CP_FSM_BRANCH (UCCO, CC_ASSOC_REQ, nok));
+}
+
+void
+cp_av_cco_action_sc_ucco__cc_assoc_req (cp_t *ctx, cp_mme_rx_t * assoc_req)
+{
+ cp_av_cco_action_ucco__cc_assoc_req_common (
+ ctx, assoc_req, CP_FSM_BRANCH (SC_UCCO, CC_ASSOC_REQ, ok),
+ CP_FSM_BRANCH (SC_UCCO, CC_ASSOC_REQ, nok));
+}
+
+/**
+ * manage authentication of a station.
+ * \param ctx the module context.
+ * \param get_key_req CM_GET_KEY.REQ MME msg having being decrypted
+ */
+void
+cp_av_cco_action_cco__cm_get_key_req_pid0 (cp_t *ctx, cp_mme_rx_t * get_key_req)
+{
+ cp_msg_cm_get_key_req_t req;
+ cp_msg_cm_get_key_cnf_t cnf;
+ cp_net_t *net;
+ cp_sta_t *sta;
+ memset (&cnf, 0, sizeof (cp_msg_cm_get_key_cnf_t));
+ cnf.eks = MAC_EKS_CLEAR;
+ dbg_assert (ctx);
+ dbg_assert (get_key_req);
+
+ // get the data in the payload of the mme.
+ if (cp_msg_cm_get_key_req_receive (ctx, get_key_req, &req)
+ && (cp_secu_protocol_check
+ (NULL, &get_key_req->prun,
+ CP_SECU_PROTOCOL_RUN_CHECK_RESULT_NEW))
+ && (req.key_type == CP_MSG_KEY_NEK)
+ && MAC_TEI_IS_STA (get_key_req->peer.tei))
+ {
+ // Get the network.
+ net = cp_sta_mgr_get_our_avln (ctx);
+ // Get the station.
+ sta = cp_sta_mgr_sta_get_assoc (ctx, net, get_key_req->peer.tei);
+
+ if (sta)
+ {
+ uint nb_sta;
+ cnf.result = CP_MSG_CM_GET_KEY_CNF_RESULT_KEY_GRANTED;
+ cp_sta_set_assoc_confirmed (ctx, sta, true);
+
+ if (req.key_type == CP_MSG_KEY_NEK)
+ {
+ uint i;
+ uint index = bsu_nek_index_current (ctx->bsu);
+ cnf.eks = ctx->mac_config->nek[index].eks;
+ for (i = 0; i < COUNT (ctx->mac_config->nek[0].nek_enc); i++)
+ cnf.key.key[i] =
+ ctx->mac_config->nek[index].nek_enc[i];
+ }
+
+ /* Send the TEI map. */
+ nb_sta = cp_net_get_num_stas (ctx, net);
+ if (nb_sta)
+ {
+ cp_av_cco_action_send_set_tei_map_to_new_sta (ctx,
+ cp_sta_get_tei(sta),
+ get_key_req->peer.mac);
+ }
+
+ slab_release (sta);
+ }
+ else
+ cnf.result = CP_MSG_CM_GET_KEY_CNF_RESULT_REQUEST_REFUSED;
+ }
+ // Refuse the request.
+ else
+ cnf.result = CP_MSG_CM_GET_KEY_CNF_RESULT_REQUEST_REFUSED;
+
+ cnf.key_type = req.key_type;
+ cnf.nid = req.nid;
+ cp_secu_protocol_next (&get_key_req->prun, &ctx->rnd, true);
+ cp_msg_cm_get_key_cnf_send (ctx, &get_key_req->peer, get_key_req->peks,
+ &get_key_req->prun, &cnf);
+}
+
+void
+cp_av_cco_action_cco__cm_get_key_req_pid1 (cp_t *ctx, cp_mme_rx_t * get_key_req)
+{
+ dbg_assert (ctx);
+ dbg_assert (get_key_req);
+
+ cp_msg_cm_get_key_req_t req;
+ cp_msg_cm_get_key_cnf_t cnf;
+ memset (&cnf, 0, sizeof (cp_msg_cm_get_key_cnf_t));
+ cnf.eks = MAC_EKS_CLEAR;
+
+ if (cp_msg_cm_get_key_req_receive (ctx, get_key_req, &req)
+ && (cp_secu_protocol_check
+ (NULL, &get_key_req->prun,
+ CP_SECU_PROTOCOL_RUN_CHECK_RESULT_NEW))
+ && MAC_TEI_IS_STA (get_key_req->peer.tei))
+ {
+ if (req.key_type == CP_MSG_KEY_NEK)
+ {
+ cnf.result = CP_MSG_CM_GET_KEY_CNF_RESULT_KEY_GRANTED;
+
+ uint i;
+ uint index = bsu_nek_index_next (ctx->bsu);
+ cnf.eks = ctx->mac_config->nek[index].eks;
+ for (i = 0; i < COUNT (ctx->mac_config->nek[0].nek_enc); i++)
+ cnf.key.key[i] =
+ ctx->mac_config->nek[index].nek_enc[i];
+ }
+ else
+ cnf.result =
+ CP_MSG_CM_GET_KEY_CNF_RESULT_UNSUPPORTED_METHOD_KEY_TYPE;
+ }
+ else
+ cnf.result = CP_MSG_CM_GET_KEY_CNF_RESULT_REQUEST_REFUSED;
+
+ cnf.key_type = req.key_type;
+ cnf.nid = req.nid;
+ cp_secu_protocol_next (&get_key_req->prun, &ctx->rnd, true);
+ cp_msg_cm_get_key_cnf_send (ctx, &get_key_req->peer, get_key_req->peks,
+ &get_key_req->prun, &cnf);
+}
+
+void
+cp_av_cco_action_cco_sta_leave_send_tei_map (cp_t *ctx, cp_sta_t *sta)
+{
+ cp_mme_peer_t *peer;
+ cp_net_t *net = NULL;
+ uint status;
+ cp_mme_tx_t *mme;
+
+ dbg_assert (ctx);
+ dbg_assert (sta);
+
+ // Send the TEI MAP to the station.
+ net = cp_sta_mgr_get_our_avln (ctx);
+
+ if (!cp_net_is_empty (ctx, net))
+ {
+ peer = &CP_MME_PEER_ALL_STA;
+
+ if (cp_sta_get_authenticated (ctx, sta))
+ {
+ status = CP_MSG_CC_SET_TEI_MAP_IND_STATUS_AUTHENTICATED;
+ }
+ else if (cp_sta_get_tei (sta))
+ {
+ status = CP_MSG_CC_SET_TEI_MAP_IND_STATUS_ASSOCIATED;
+ }
+ else
+ status = CP_MSG_CC_SET_TEI_MAP_IND_STATUS_DISASSOCIATED;
+
+ mme = cp_msg_cc_set_tei_map_ind_send_begin (ctx, peer,
+ CP_MSG_CC_SET_TEI_MAP_IND_MODE_DELETE,
+ 1);
+ cp_msg_cc_set_tei_map_ind_send_sta (ctx, mme, cp_sta_get_tei (sta),
+ cp_sta_get_mac_address (sta),
+ status);
+ cp_msg_cc_set_tei_map_ind_send_end (ctx, mme);
+ }
+}
+
+void
+cp_av_cco_action_cco__cc_leave_req (cp_t *ctx, cp_mme_rx_t *mme)
+{
+ cp_sta_t *sta;
+ cp_net_t *net;
+ bool res_read;
+ enum cp_msg_cc_leave_req_reason_t reason_req;
+ cp_nid_t nid;
+ enum cp_msg_cc_leave_ind_reason_t reason_ind;
+
+
+ dbg_assert (ctx);
+ dbg_assert (mme);
+
+ dbg_assert (mme->peer.tei);
+
+ switch (mme->mmtype)
+ {
+ case CC_LEAVE_REQ:
+ res_read = cp_msg_cc_leave_req_receive (ctx, mme, &reason_req);
+ break;
+ case CC_LEAVE_IND:
+ res_read = cp_msg_cc_leave_ind_receive (ctx, mme, &reason_ind,
+ &nid);
+ break;
+ default:
+ dbg_assert_default ();
+ }
+
+ if (res_read)
+ {
+ net = cp_sta_mgr_get_our_avln (ctx);
+ if (mme->mmtype == CC_LEAVE_REQ)
+ cp_msg_cc_leave_cnf_send (ctx, &mme->peer);
+ else
+ cp_msg_cc_leave_rsp_send (ctx, &mme->peer);
+ /* Get the station. */
+ sta = cp_sta_mgr_sta_get_assoc (ctx, net, mme->peer.tei);
+ if (sta)
+ {
+ cp_sta_mgr_release_station (ctx, cp_sta_get_tei (sta));
+ cp_av_cco_action_cco_sta_leave_send_tei_map (ctx, sta);
+ slab_release (sta);
+ }
+ }
+}
+
+void
+cp_av_cco_action_drv_mac_stop (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ dbg_assert (cp_sta_own_data_get_cco_status (ctx));
+
+ if (!cp_net_is_empty (ctx, cp_sta_mgr_get_our_avln (ctx))
+ && (!cp_beacon_any_countdown_active (ctx)))
+ {
+ cp_sta_t *sta;
+ cp_net_t *net;
+
+ /* Clear the SET of cco selection. */
+ cp_av_cco_action_cco_selection__clear (ctx);
+ ctx->handover.reason = CP_HANDOVER_REASON_CCO_LEAVING;
+
+ net = cp_sta_mgr_get_our_avln (ctx);
+ for (sta = cp_net_sta_get_first (ctx, net, CP_NET_STA_ASSOC);
+ sta;
+ sta = cp_net_sta_get_next (ctx, net, sta))
+ {
+ if (cp_sta_get_authenticated (ctx, sta))
+ cp_av_cco_action_cco_selection__mac_stop_sta_add (ctx, sta);
+ }
+
+ /* Trigger the event to start the handover CCo FSM. */
+ cp_fsm_trigger_new_event (ctx, bare, CCO_HANDOVER_START);
+ /* Trigger an event to change the Main FSM to go to the
+ * CCO_LEAVING_HOIP state. */
+ cp_fsm_trigger_new_event (ctx, bare, CCO_LEAVING_HANDOVER);
+ }
+ else if (cp_net_is_empty (ctx, cp_sta_mgr_get_our_avln (ctx))
+ && (!cp_beacon_any_countdown_active (ctx)))
+ cp_fsm_trigger_new_event (ctx, bare, cco__all_sta_leaved);
+}
+
+void
+cp_av_cco_action_drv_mac_stop_suspend (cp_t *ctx)
+{
+ cp_beacon_cco_update_beacon_data (ctx);
+ cp_av_cco_action_drv_mac_stop (ctx);
+}
+
+void
+cp_av_cco_action_drv_mac_stop_ended (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_av_cco_action_cco__assoc_stop (ctx);
+ cp_fsm_trigger_new_event (ctx, bare, to_stop);
+}
+
+void
+cp_av_cco_action_ucco__to_stop (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_av_cco_action_ucco_stop (ctx);
+ cp_fsm_trigger_new_event (ctx, bare, to_stop);
+}
+
+void
+cp_av_cco_action_cco_selection__mac_stop_sta_add (cp_t *ctx, cp_sta_t *sta)
+{
+ dbg_assert (ctx);
+ dbg_assert (sta);
+
+ slab_addref (sta);
+ heap_node_init (&sta->cco_selection_node);
+ heap_insert (&ctx->cco_action.selection_heap,
+ &sta->cco_selection_node);
+}
+
+
+void
+cp_av_cco_action_cco_selection__sta_add (cp_t *ctx, cp_net_t *net, cp_sta_t *sta)
+{
+ cp_sta_own_data_t *own;
+ dbg_assert (ctx);
+ dbg_assert (net);
+ dbg_assert (sta);
+
+ if ((net == cp_sta_mgr_get_our_avln (ctx))
+ && (MAC_TEI_IS_STA (cp_sta_get_tei (sta)))
+ && (cp_sta_get_authenticated (ctx, sta)))
+ {
+ own = cp_sta_mgr_get_sta_own_data (ctx);
+ if (own->cco_prefered == false
+ && sta->cco_cap > CP_CCO_LEVEL)
+ {
+ slab_addref (sta);
+ heap_node_init (&sta->cco_selection_node);
+ heap_insert (&ctx->cco_action.selection_heap,
+ &sta->cco_selection_node);
+ }
+ }
+}
+
+void
+cp_av_cco_action_cco_selection__sta_remove (cp_t *ctx, cp_sta_t *sta)
+{
+ dbg_assert (ctx);
+ dbg_assert (sta);
+
+ dbg_assert (!heap_empty (&ctx->cco_action.selection_heap));
+
+ heap_remove (&ctx->cco_action.selection_heap, &sta->cco_selection_node);
+ heap_node_init (&sta->cco_selection_node);
+ slab_release (sta);
+}
+
+void
+cp_av_cco_action_cco_selection__clear (cp_t *ctx)
+{
+ cp_sta_t *sta;
+ heap_node_t *node;
+
+ dbg_assert (ctx);
+
+ /* Verify the set. */
+ while (!heap_empty (&ctx->cco_action.selection_heap))
+ {
+ node = heap_get_root (&ctx->cco_action.selection_heap);
+ dbg_assert (node);
+
+ sta = PARENT_OF (cp_sta_t, cco_selection_node, node);
+ dbg_assert (sta);
+
+ /* Remove the node from the heap. */
+ heap_remove (&ctx->cco_action.selection_heap, &sta->cco_selection_node);
+ heap_node_init (&sta->cco_selection_node);
+ slab_release (sta);
+ }
+}
+
+cp_sta_t *
+cp_av_cco_action_cco_selection__selection (cp_t *ctx)
+{
+ cp_sta_own_data_t *own;
+ cp_sta_t *sta = NULL;
+ heap_node_t *node;
+ dbg_assert (ctx);
+
+ own = cp_sta_mgr_get_sta_own_data (ctx);
+
+ if ((!own->cco_prefered)
+ && (!heap_empty (&ctx->cco_action.selection_heap)))
+ {
+ node = heap_get_root (&ctx->cco_action.selection_heap);
+ dbg_assert (node);
+
+ sta = PARENT_OF (cp_sta_t, cco_selection_node, node);
+ dbg_assert (sta);
+ slab_addref (sta);
+ }
+
+ return sta;
+}
+
+void
+cp_av_cco_action_sc__sc_cco__cc_assoc_req (cp_t *ctx, cp_mme_rx_t *mme)
+{
+ /* Check parameters. */
+ dbg_assert (ctx);
+ dbg_assert (mme);
+
+ /* Check received MME. */
+ cp_msg_cc_assoc_req_t req;
+ if (!cp_msg_cc_assoc_req_receive (ctx, mme, &req))
+ {
+ /* Error in the MME, do nothing. */
+ }
+ else
+ {
+ if (req.request_type == CP_MSG_CC_ASSOC_REQ_TYPE_NEW)
+ {
+ /* Request of association. */
+ /* Peer is SC? */
+ if (mme->peer.mac == ctx->sta_action.sc.peer.mac)
+ {
+ /* Ok, reply */
+ cp_av_cco_action__assoc__join (ctx, mme, &req);
+ cp_sta_t *sta = cp_sta_mgr_sta_get_from_mac (ctx, ctx->sta_action.sc.peer.mac);
+ ctx->sta_action.sc.peer.tei = cp_sta_get_tei (sta);
+ slab_release (sta);
+ }
+ else
+ {
+ /* Deny assoc request. */
+ cp_msg_cc_assoc_cnf_t cnf;
+ cnf.result = CP_MSG_CC_ASSOC_CNF_RESULT_FAILURE_OTHER_REASON;
+ /* Get our net. */
+ cp_net_t *net = cp_sta_mgr_get_our_avln (ctx);
+ /* Set NID/SNID. */
+ cnf.nid = cp_net_get_nid (ctx, net);
+ cnf.snid = cp_net_get_snid (ctx, net);
+ /* No TEI for the STA. */
+ cnf.sta_tei = 0;
+ /* Lease default value. */
+ cnf.lease_time_min = CP_LEASE_ASSOC_MIN;
+ /* Send reply. */
+ cp_msg_cc_assoc_cnf_send (ctx, &mme->peer, &cnf);
+ }
+ }
+ else if (req.request_type == CP_MSG_CC_ASSOC_REQ_TYPE_RENEW)
+ /* Renew is ok. */
+ cp_av_cco_action__assoc__renew (ctx, mme, &req);
+ else
+ /* Should not occur. */
+ dbg_assert (req.request_type == CP_MSG_CC_ASSOC_REQ_TYPE_NB);
+ }
+}
+
+void
+cp_av_cco_action_handover__ended (cp_t *ctx)
+{
+ cp_av_cco_action_cco_selection__clear (ctx);
+ cp_av_cco_action_cco__assoc_stop (ctx);
+}
+
+/**
+ * Last transaction ends try next STA.
+ * \param ctx the module context.
+ * \return The next station to start a transaction with.
+ */
+static cp_sta_t*
+cp_av_cco_action_nek_next_sta (cp_t *ctx)
+{
+ cp_sta_t *sta;
+ cp_sta_t *sta_next;
+ cp_net_t *net;
+ dbg_assert (ctx);
+
+ net = cp_sta_mgr_get_our_avln (ctx);
+
+ if ((sta = cp_sta_mgr_sta_get_from_mac (ctx,
+ ctx->cco_action.eks_sta_current_peer.mac)))
+ {
+ sta_next = cp_net_sta_get_next (ctx, net, sta);
+
+ if (sta_next)
+ {
+ cp_sta_get_peer (sta_next, &ctx->cco_action.eks_sta_current_peer);
+ return sta_next;
+ }
+ return NULL;
+ }
+
+ return NULL;
+}
+
+/**
+ * Request the station for the NEK change.
+ * \param ctx the module context.
+ * \param sta the station to start the NEK exchange.
+ */
+static void
+cp_av_cco_action_nek_change_start_transaction (cp_t *ctx, cp_sta_t *sta)
+
+{
+ cp_msg_cm_set_key_req_t data;
+ cp_fsm_event_t *event;
+
+ dbg_assert (ctx);
+ dbg_assert (sta);
+
+ /* Get the station peer to send the MME. */
+ cp_sta_get_peer (sta, &ctx->cco_action.eks_sta_current_peer);
+
+ /* Initialise the protocol run. */
+ cp_secu_protocol_run_new (&ctx->cco_action.eks_prun, 1,
+ &ctx->rnd);
+
+ /* Fill the data structure with key type == NONCE_ONLY. */
+ memset (&data, 0, sizeof (cp_msg_cm_set_key_req_t));
+ data.key_type = CP_MSG_KEY_NONCE_ONLY;
+ data.cco_cap = CP_CCO_LEVEL;
+ data.nid = cp_sta_own_data_get_nid (ctx);
+
+ /* Send the MME. */
+ cp_msg_cm_set_key_req_send (ctx,
+ &ctx->cco_action.eks_sta_current_peer,
+ CP_MME_PEKS_NONE,
+ &ctx->cco_action.eks_prun,
+ &data);
+
+ /* Start the timeout timer. */
+ event = cp_fsm_event_bare_new (ctx, CP_FSM_EVENT_TYPE_cco_nek_change__nek_timeout);
+ cp_sta_core_gen_timed_event(ctx,
+ &ctx->cco_action.eks_timer,
+ event,
+ CP_CCO_ACTION_EKS_TIMEOUT_MS);
+}
+
+void
+cp_av_cco_action_cco__cco_nek_change__nek_provide (cp_t *ctx)
+{
+ cp_net_t *net;
+ cp_sta_t *sta;
+ dbg_assert (ctx);
+ net = cp_sta_mgr_get_our_avln (ctx);
+ sta = cp_net_sta_get_first (ctx, net, CP_NET_STA_ASSOC);
+ /* If the current STA is not authenticated, it is not necessary to send
+ * the MME. */
+ while (sta && !cp_sta_get_authenticated (ctx, sta))
+ sta = cp_net_sta_get_next (ctx, net, sta);
+ if (sta)
+ {
+ cp_av_cco_action_nek_change_start_transaction (ctx, sta);
+ slab_release (sta);
+ /* Change branch. */
+ cp_fsm_branch (ctx, CCO_NEK_CHANGE_IDLE, cco_nek_change__nek_provide, sta);
+ }
+ else
+ cp_fsm_branch (ctx, CCO_NEK_CHANGE_IDLE, cco_nek_change__nek_provide, nosta);
+}
+
+void
+cp_av_cco_action_cco__cco_nek_change__nek_timeout__wait (cp_t *ctx)
+{
+ cp_sta_t *sta;
+ dbg_assert (ctx);
+
+ /* Stop the time out timer. */
+ cp_sta_core_stop_timed_or_cyclic_event (ctx, &ctx->cco_action.eks_timer);
+
+ if ((sta = cp_av_cco_action_nek_next_sta (ctx)))
+ {
+ cp_av_cco_action_nek_change_start_transaction (ctx, sta);
+ slab_release (sta);
+
+ cp_fsm_branch (ctx, CCO_NEK_CHANGE_WAIT_STA_CNF,
+ cco_nek_change__nek_timeout, yes);
+ }
+ else
+ {
+ cp_fsm_branch (ctx, CCO_NEK_CHANGE_WAIT_STA_CNF,
+ cco_nek_change__nek_timeout, no);
+ }
+}
+
+void
+cp_av_cco_action_cco__cco_nek_change__timeout (cp_t *ctx)
+{
+ cp_sta_t *sta;
+ dbg_assert (ctx);
+
+ /* Stop the time out timer. */
+ cp_sta_core_stop_timed_or_cyclic_event (ctx, &ctx->cco_action.eks_timer);
+
+ if ((sta = cp_av_cco_action_nek_next_sta (ctx)))
+ {
+ cp_av_cco_action_nek_change_start_transaction (ctx, sta);
+ slab_release (sta);
+
+ cp_fsm_branch (ctx, CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF,
+ cco_nek_change__nek_timeout, yes);
+ }
+ else
+ {
+ cp_fsm_branch (ctx, CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF,
+ cco_nek_change__nek_timeout, no);
+ }
+}
+
+void
+cp_av_cco_action_cm_set_key_cnf_receive (cp_t *ctx, cp_mme_rx_t *mme)
+{
+ cp_msg_cm_set_key_cnf_t data;
+ dbg_assert (ctx);
+ dbg_assert (mme);
+
+ /* Stop the time out timer. */
+ cp_sta_core_stop_timed_or_cyclic_event (ctx, &ctx->cco_action.eks_timer);
+
+ if ((cp_msg_cm_set_key_cnf_receive (ctx, mme, &data)
+ && (cp_secu_protocol_check
+ (&ctx->cco_action.eks_prun, &mme->prun,
+ CP_SECU_PROTOCOL_RUN_CHECK_RESULT_NEXT)))
+ && ((mme->prun.pid == 1) && (mme->prun.pmn == 2)))
+ {
+ uint i;
+ cp_msg_cm_set_key_req_t data_req;
+ cp_fsm_event_t *event;
+
+ data_req.key_type = CP_MSG_KEY_NEK;
+ data_req.cco_cap = CP_CCO_LEVEL;
+ data_req.nid = cp_sta_own_data_get_nid (ctx);
+ data_req.new_eks = CP_CCO_ACTION_EKS_NEXT
+ (ctx->cco_action.eks_current);
+ for (i = 0; i < COUNT (ctx->cco_action.nek_new.key); i++)
+ data_req.new_key.key[i] = ctx->cco_action.nek_new.key[i];
+
+
+ /* Prepare the EKS NEK exchange. */
+ ctx->cco_action.eks_prun = mme->prun;
+ cp_secu_protocol_next (&ctx->cco_action.eks_prun, &ctx->rnd,
+ false /* not last*/);
+
+ cp_msg_cm_set_key_req_send (ctx,
+ &ctx->cco_action.eks_sta_current_peer,
+ CP_MME_PEKS_NMK,
+ &ctx->cco_action.eks_prun,
+ &data_req);
+
+ /* Start the timeout timer. */
+ event = cp_fsm_event_bare_new (
+ ctx, CP_FSM_EVENT_TYPE_cco_nek_change__nek_timeout);
+ cp_sta_core_gen_timed_event(ctx,
+ &ctx->cco_action.eks_timer,
+ event,
+ CP_CCO_ACTION_EKS_TIMEOUT_MS);
+ }
+ /* Last message or error, try the next station.
+ * If it was an error the STA is responsible to request the key when it
+ * see the EKS bentry in the central beacon. */
+ else
+ {
+ cp_sta_t *sta = cp_sta_mgr_sta_get_from_mac (ctx, mme->peer.mac);
+ cp_net_t *net = cp_sta_mgr_get_our_avln (ctx);
+ sta = cp_net_sta_get_next (ctx, net, sta);
+ /* If the current STA is not authenticated, it is not necessary to send
+ * the MME. */
+ while (sta && !cp_sta_get_authenticated (ctx, sta))
+ sta = cp_net_sta_get_next (ctx, net, sta);
+ if (sta)
+ {
+ cp_av_cco_action_nek_change_start_transaction (ctx, sta);
+ slab_release (sta);
+
+ cp_fsm_branch (ctx, CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF,
+ CM_SET_KEY_CNF_PID1, ok_continue);
+ }
+ else
+ {
+ cp_fsm_branch (ctx, CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF,
+ CM_SET_KEY_CNF_PID1, end);
+ }
+ }
+}
+
+void
+cp_av_cco_action_nek_change_prevent (cp_t *ctx)
+{
+ dbg_assert (ctx);
+
+ /* If there is no new EKS then do not change it.
+ * This disallow the stations to store a false nek in mac config. */
+ if (cp_sta_own_data_get_cco_status (ctx))
+ {
+ cp_beacon_change_nek (ctx,
+ CP_CCO_ACTION_EKS_NEXT(ctx->cco_action.eks_current),
+ ctx->cco_action.nek_new,
+ false /* central beacon change. */);
+
+ /* Set the EKS_current to the new one. */
+ ctx->cco_action.eks_current =
+ CP_CCO_ACTION_EKS_NEXT(ctx->cco_action.eks_current);
+ }
+}
+
+void
+cp_av_cco_action_cco__cc_discover_list_req (cp_t *ctx, cp_net_t *net,
+ cp_sta_t *sta)
+{
+ dbg_assert (ctx);
+ cp_mme_peer_t peer;
+ cp_sta_get_peer (sta, &peer);
+ cp_msg_cc_discover_list_req_send (ctx, &peer);
+}
+
+void
+cp_av_cco_action_beacon_with_same_nid (
+ cp_t *ctx, bsu_beacon_t *beacon, cp_net_t *net, cp_sta_t *sta)
+{
+ dbg_assert (beacon);
+
+ /* If we have the highest mac address we do nothing. */
+ if (beacon->bmis.mac_address.present)
+ if (MAC_REVERSE (beacon->bmis.mac_address.mac_address) <
+ MAC_REVERSE (cp_sta_own_data_get_mac_address (ctx)))
+ return;
+
+ /* To merge the two avlns we shut our network by turning the cco into
+ * an unassociated sta. */
+ cp_fsm_post_new_event (ctx, bare, cco_leave_merge_avln);
+}
diff --git a/cesar/cp/av/cco/action/src/handover.c b/cesar/cp/av/cco/action/src/handover.c
new file mode 100644
index 0000000000..e1188e7d49
--- /dev/null
+++ b/cesar/cp/av/cco/action/src/handover.c
@@ -0,0 +1,367 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/cco/action/src/handover.c
+ * \brief Handover function corresponding to the FSM.
+ * \ingroup cp_cco_action
+ *
+ * See the documentation for more details.
+ */
+#include "common/std.h"
+#include "cp/cp.h"
+#include "cp/cco/action/cco_action.h"
+#include "cp/av/cco/action/cco_action.h"
+#include "cp/av/cco/action/inc/cco_action.h"
+#include "cp/msg/msg.h"
+#include "cp/sta/mgr/sta_mgr.h"
+#include "cp/sta/action/action.h"
+#include "cp/msg/msg.h"
+#include "cp/fsm/fsm.h"
+#include "cp/av/beacon/beacon.h"
+#include "cp/av/sta/action/assoc.h"
+
+#include "cp/inc/context.h"
+
+/**
+ * Prepare the Handover request to the station.
+ * \param ctx the module context.
+ * \param sta the station peer.
+ *
+ * Prepare and send a cc_handover.req MME to the peer station.
+ */
+static inline void
+cp_av_cco_action_handover__cc_handover_req_prepare (cp_t *ctx,
+ cp_sta_t *sta)
+{
+ dbg_assert (ctx);
+ dbg_assert (sta);
+ cp_fsm_event_t *event;
+ cp_msg_cc_handover_req_reason_t reason;
+ cp_msg_cc_handover_req_reason_t soft_hard;
+
+ cp_mme_peer_t peer = CP_MME_PEER (cp_sta_get_mac_address (sta),
+ cp_sta_get_tei (sta));
+
+ if ((CP_CCO_LEVEL > 0) && (sta->soft_handover))
+ {
+ ctx->handover.soft_hard = CP_HANDOVER_SOFT_HARD_SOFT;
+ soft_hard = CP_MSG_CC_HANDOVER_REQ_HANDOVER_SOFT;
+ }
+ else
+ {
+ ctx->handover.soft_hard = CP_HANDOVER_SOFT_HARD_HARD;
+ soft_hard = CP_MSG_CC_HANDOVER_REQ_HANDOVER_HARD;
+ }
+
+ switch (ctx->handover.reason)
+ {
+ case CP_HANDOVER_REASON_CCO_LEAVING:
+ reason = CP_MSG_CC_HANDOVER_REQ_REASON_CCO_LEAVING;
+ break;
+ case CP_HANDOVER_REASON_CCO_SELECTION:
+ reason = CP_MSG_CC_HANDOVER_REQ_REASON_CCO_SELECTION;
+ break;
+ case CP_HANDOVER_REASON_USER_APPOINT:
+ reason = CP_MSG_CC_HANDOVER_REQ_REASON_USER_APPOINT;
+ break;
+ default:
+ dbg_assert_default ();
+ }
+
+ cp_msg_cc_handover_req_send (ctx, &peer, soft_hard, reason);
+
+ /* Program the timer for the timeout. */
+ event = cp_fsm_event_bare_new (ctx, CP_FSM_EVENT_TYPE_HANDOVER_TIMEOUT);
+ cp_sta_core_gen_timed_event (ctx, &ctx->handover.handover_timeout,
+ event, CP_TIMEOUT_MS);
+}
+
+/**
+ * The Peer station Refuse the handover of the peer station did not respond.
+ * \param ctx the module context.
+ * \return true if a new station has been requested to become CCo.
+ *
+ * It shall select the next station in the selection set and send a handover
+ * request.
+ * The station provided in parameter is used to remove it from the CCo
+ * selection set.
+ */
+static inline bool
+cp_av_cco_action_handover__try_next_sta (cp_t *ctx)
+{
+ cp_sta_t *cco;
+ dbg_assert (ctx);
+
+ /* Get the new station. */
+ cco = cp_av_cco_action_cco_selection__selection (ctx);
+
+ if (cco)
+ {
+ cp_av_cco_action_handover__cc_handover_req_prepare (ctx, cco);
+ slab_release (cco);
+
+ return true;
+ }
+ else
+ return false;
+}
+
+void
+cp_av_cco_action_handover__start (cp_t *ctx)
+{
+ cp_sta_t *sta;
+ dbg_assert (ctx);
+
+ if (!cp_beacon_any_countdown_active (ctx))
+ {
+ /* Get the best station to be elect as CCo. */
+ sta = cp_av_cco_action_cco_selection__selection (ctx);
+
+ if (sta)
+ {
+ cp_av_cco_action_handover__cc_handover_req_prepare (ctx, sta);
+ slab_release (sta);
+ cp_fsm_branch (ctx, CCO_HANDOVER_IDLE, CCO_HANDOVER_START, sta);
+ }
+ else
+ {
+ cp_fsm_event_t *event;
+ cp_fsm_branch (ctx, CCO_HANDOVER_IDLE, CCO_HANDOVER_START, no_sta);
+ event = cp_fsm_event_bare_new (ctx,
+ CP_FSM_EVENT_TYPE_HANDOVER_FAILURE);
+ cp_fsm_trigger (ctx, event);
+ }
+ }
+ else
+ {
+ cp_av_cco_action_cco_selection__clear (ctx);
+ cp_fsm_branch (ctx, CCO_HANDOVER_IDLE, CCO_HANDOVER_START, no_sta);
+ }
+}
+
+
+void
+cp_av_cco_action_handover__cc_handover_cnf_receive (cp_t *ctx, cp_mme_rx_t *mme)
+{
+ cp_mme_tx_t *mme_tx;
+ cp_net_t *net;
+ cp_sta_t *sta;
+ uint nb_sta;
+ cp_sta_t *current_sta;
+ bool res;
+ cp_msg_cc_handover_cnf_result_t result;
+
+ dbg_assert (ctx);
+ dbg_assert (mme);
+
+ sta = cp_sta_mgr_sta_get_from_mac (ctx, mme->peer.mac);
+ res = cp_msg_cc_handover_cnf_receive (ctx, mme, &result);
+
+ if (res && (result == CP_MSG_CC_HANDOVER_CNF_RESULT_ACCEPT))
+ {
+ cp_fsm_event_t *event;
+
+ net = cp_sta_mgr_get_our_avln (ctx);
+
+ /* Set the handover flag in the central beacon. */
+ cp_av_beacon_handover_hoipflag (ctx, CP_BEACON_HOIP_TRUE);
+
+ /* All the AVLN stations without the new CCo STA.
+ * cp_net_num_sta_associated returns the number of associated stations
+ * including the new CCo, the new CCo must know that I'm in the list,
+ * nb_sta = cp_net_num_sta_associated (ctx, net) - 1 + 1;
+ * The first -1 is the new CCo, the +1 is the old CCo.
+ */
+ nb_sta = cp_net_num_sta_associated (ctx, net);
+ mme_tx = cp_msg_cc_handover_info_ind_send_begin (ctx, &mme->peer,
+ CP_MSG_CC_HANDOVER_INFO_IND_RSC_HOIP,
+ MAC_TEI_UNASSOCIATED,
+ nb_sta);
+
+ cp_msg_cc_handover_info_ind_send (ctx, mme_tx,
+ cp_sta_own_data_get_tei (ctx),
+ cp_sta_own_data_get_mac_address (ctx),
+ true, false);
+
+ for (current_sta = cp_net_sta_get_first (ctx, net, CP_NET_STA_ASSOC);
+ current_sta;
+ current_sta = cp_net_sta_get_next (ctx, net, current_sta))
+ {
+ if (current_sta != sta)
+ {
+ cp_msg_cc_handover_info_ind_send (
+ ctx, mme_tx, cp_sta_get_tei (current_sta),
+ cp_sta_get_mac_address (current_sta),
+ cp_sta_get_authenticated (ctx, current_sta),
+ current_sta->pco);
+ }
+ }
+
+ if (ctx->handover.soft_hard == CP_HANDOVER_SOFT_HARD_HARD)
+ cp_fsm_branch (ctx, CCO_HANDOVER_WAIT_CC_HANDOVER_CNF,
+ CC_HANDOVER_CNF, hard_accept);
+
+ cp_msg_cc_handover_info_ind_send_end (ctx, mme_tx);
+
+ /* Program the timer for the timeout. */
+ cp_sta_core_stop_timed_or_cyclic_event (
+ ctx, &ctx->handover.handover_timeout);
+ event = cp_fsm_event_bare_new (
+ ctx, CP_FSM_EVENT_TYPE_HANDOVER_TIMEOUT);
+ cp_sta_core_gen_timed_event (ctx, &ctx->handover.handover_timeout,
+ event, CP_TIMEOUT_MS);
+ }
+ else
+ {
+ if (sta)
+ cp_av_cco_action_cco_selection__sta_remove (ctx, sta);
+
+ /* Try another station to become the new CCo. */
+ res = cp_av_cco_action_handover__try_next_sta (ctx);
+
+ if (res)
+ /* The new station has been requested, the current station shall
+ * wait the confirmation. */
+ cp_fsm_branch (ctx, CCO_HANDOVER_WAIT_CC_HANDOVER_CNF,
+ CC_HANDOVER_CNF, another_sta);
+ else
+ {
+ /* No more station can become CCo, the current station stay CCo. */
+ cp_fsm_branch (ctx, CCO_HANDOVER_WAIT_CC_HANDOVER_CNF,
+ CC_HANDOVER_CNF, no_more_sta);
+ cp_fsm_event_t *event;
+ event = cp_fsm_event_bare_new (
+ ctx, CP_FSM_EVENT_TYPE_HANDOVER_FAILURE);
+ cp_fsm_trigger (ctx, event);
+ }
+
+ /* Cancel the timer. */
+ cp_sta_core_stop_timed_or_cyclic_event (ctx,
+ &ctx->handover.handover_timeout);
+ }
+ if (sta)
+ slab_release (sta);
+}
+
+/**
+ * Try another station.
+ * \param ctx the module context.
+ * \return true if another station has been requested.
+ */
+static inline bool
+cp_av_cco_action_handover__timeout (cp_t *ctx)
+{
+ bool res;
+ cp_sta_t *sta;
+
+ dbg_assert (ctx);
+
+ /* Cancel the timer. */
+ cp_sta_core_stop_timed_or_cyclic_event (ctx,
+ &ctx->handover.handover_timeout);
+
+ /* Remove the first station of the selection set. This station timed out. */
+ sta = cp_av_cco_action_cco_selection__selection (ctx);
+ cp_av_cco_action_cco_selection__sta_remove (ctx, sta);
+ slab_release (sta);
+
+ /* Reset the handover flag in the central beacon. */
+ cp_av_beacon_handover_hoipflag (ctx, CP_BEACON_HOIP_FALSE);
+
+ res = cp_av_cco_action_handover__try_next_sta (ctx);
+ return res;
+}
+
+void
+cp_av_cco_action_handover__timeout_cc_handover_cnf (cp_t *ctx)
+{
+ dbg_assert (ctx);
+
+ if (cp_av_cco_action_handover__timeout (ctx))
+ cp_fsm_branch (ctx, CCO_HANDOVER_WAIT_CC_HANDOVER_CNF,
+ HANDOVER_TIMEOUT, another_sta);
+ else
+ {
+ cp_fsm_event_t *event;
+ cp_fsm_branch (ctx, CCO_HANDOVER_WAIT_CC_HANDOVER_CNF,
+ HANDOVER_TIMEOUT, no_more_sta);
+ event = cp_fsm_event_bare_new (ctx, CP_FSM_EVENT_TYPE_HANDOVER_FAILURE);
+ cp_fsm_trigger (ctx, event);
+ }
+}
+
+void
+cp_av_cco_action_handover__timeout_cc_handover_info_rsp (cp_t *ctx)
+{
+ dbg_assert (ctx);
+
+ if (cp_av_cco_action_handover__timeout (ctx))
+ cp_fsm_branch (ctx, CCO_HANDOVER_WAIT_CC_HANDOVER_INFO_RSP,
+ HANDOVER_TIMEOUT, another_sta);
+ else
+ {
+ cp_fsm_event_t *event;
+ cp_fsm_branch (ctx, CCO_HANDOVER_WAIT_CC_HANDOVER_INFO_RSP,
+ HANDOVER_TIMEOUT, no_more_sta);
+ event = cp_fsm_event_bare_new (ctx, CP_FSM_EVENT_TYPE_HANDOVER_FAILURE);
+ cp_fsm_trigger (ctx, event);
+ }
+}
+
+void
+cp_av_cco_action_handover__discover_done (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_sta_t *sta;
+ cp_net_t *net = cp_sta_mgr_get_our_avln (ctx);
+ cp_av_cco_action_cco_selection__clear (ctx);
+ for (sta = cp_net_sta_get_first (ctx, net, CP_NET_STA_ASSOC);
+ sta;
+ sta = cp_net_sta_get_next (ctx, net, sta))
+ cp_av_cco_action_cco_selection__sta_add (ctx, net, sta);
+ if (!heap_empty (&ctx->cco_action.selection_heap))
+ {
+ ctx->handover.reason = CP_HANDOVER_REASON_CCO_SELECTION;
+ cp_fsm_branch (ctx, CCO, HANDOVER_DISCOVER_PROCESS_DONE, sta);
+ cp_fsm_post_new_event (ctx, bare, CCO_HANDOVER_START);
+ }
+ else
+ cp_fsm_branch (ctx, CCO, HANDOVER_DISCOVER_PROCESS_DONE, no_sta);
+}
+
+
+void
+cp_av_cco_action_handover__cc_handover_info_rsp_receive (cp_t *ctx,
+ cp_mme_rx_t *mme)
+{
+ dbg_assert (ctx);
+ dbg_assert (mme);
+
+ if (cp_msg_cc_handover_info_rsp_receive (ctx, mme))
+ {
+ cp_av_beacon_handover (ctx, mme->peer.tei);
+ }
+
+ /* Cancel the timer. */
+ cp_sta_core_stop_timed_or_cyclic_event (ctx,
+ &ctx->handover.handover_timeout);
+}
+
+void
+cp_av_cco_action_handover__hoip_countdown_expired (cp_t *ctx)
+{
+ cp_fsm_event_t *event;
+ dbg_assert (ctx);
+ /* Reset the handover flag in the central beacon. */
+ cp_av_beacon_handover_hoipflag (ctx, CP_BEACON_HOIP_FALSE);
+ cp_av_cco_action_cco__assoc_stop (ctx);
+ if (ctx->handover.reason == CP_HANDOVER_REASON_CCO_SELECTION)
+ cp_av_sta_action_assoc__authenticated__renew (ctx);
+ event = cp_fsm_event_bare_new (ctx, CP_FSM_EVENT_TYPE_HANDOVER_SUCCESS);
+ cp_fsm_trigger (ctx, event);
+}
diff --git a/cesar/cp/av/cco/action/stub/Module b/cesar/cp/av/cco/action/stub/Module
new file mode 100644
index 0000000000..bfa10465da
--- /dev/null
+++ b/cesar/cp/av/cco/action/stub/Module
@@ -0,0 +1,3 @@
+SOURCES := cco_action.c
+
+MODULES := cp/cco/action/stub
diff --git a/cesar/cp/av/cco/action/stub/src/cco_action.c b/cesar/cp/av/cco/action/stub/src/cco_action.c
new file mode 100644
index 0000000000..93f7bdb545
--- /dev/null
+++ b/cesar/cp/av/cco/action/stub/src/cco_action.c
@@ -0,0 +1,283 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/cco_action.c
+ * \brief CCo functions stub.
+ * \ingroup cp_cco_action
+ *
+ * Stub function for the unit test of the other modules.
+ */
+#include "common/std.h"
+
+#include "cp/av/cco/action/cco_action.h"
+
+/**
+ * initialisation of CCo action module.
+ * \param ctx the module context.
+ *
+ */
+void
+cp_av_cco_action_init (cp_t *ctx) __attribute__((weak));
+void
+cp_av_cco_action_init (cp_t *ctx)
+{
+}
+
+/**
+ * Uninitialisation of CCo action module.
+ * \param ctx the module context.
+ *
+ */
+void
+cp_av_cco_action_uninit (cp_t *ctx) __attribute__((weak));
+void
+cp_av_cco_action_uninit (cp_t *ctx)
+{
+}
+
+/**
+ * Change the SNID.
+ * \param ctx the module context.
+ *
+ * It shall request the SNIDs in use from the station manager to choose
+ * one randomly in the available SNIDs
+ */
+void
+cp_av_cco_action_cco__cco_snid_conflict (cp_t *ctx) __attribute__((weak));
+void
+cp_av_cco_action_cco__cco_snid_conflict (cp_t *ctx)
+{
+}
+
+/**
+ * perform garbage actions of CCo's responsibility.
+ * \param ctx the module context.
+ */
+void
+cp_av_cco_action_garbage (cp_t *ctx) __attribute__((weak));
+void
+cp_av_cco_action_garbage (cp_t *ctx)
+{
+}
+
+/**
+ * generate a new NEK value.
+ * \param ctx the module context.
+ *
+ * NEK shall be used no more than 1 hour, so must be changed after 1
+ * hour for that purpose, NEK expiration date is checked at every occurrence
+ * of the global garbage collector timer and if current NEK expiration
+ * date reached, a new NEK value shall be generated by calling this function
+ */
+void
+cp_av_cco_action_cco__cco_nek_change (cp_t *ctx) __attribute__((weak));
+
+void
+cp_av_cco_action_cco__cco_nek_change (cp_t *ctx)
+{
+}
+
+/**
+ * manage association of a station.
+ * \param ctx the module context.
+ * \param assoc_req CM_ASSOC.REQ MME msg having being received
+ */
+void
+cp_av_cco_action_cco__cc_assoc_req (cp_t *ctx,
+ cp_mme_rx_t * assoc_req) __attribute__((weak));
+void
+cp_av_cco_action_cco__cc_assoc_req (cp_t *ctx,
+ cp_mme_rx_t * assoc_req)
+{
+}
+
+/**
+ * manage association of a station.
+ * \param ctx the module context.
+ * \param assoc_req CM_ASSOC.REQ MME msg having being received
+ */
+void
+cp_av_cco_action_ucco__cc_assoc_req (cp_t *ctx,
+ cp_mme_rx_t * assoc_req) __attribute__((weak));
+void
+cp_av_cco_action_ucco__cc_assoc_req (cp_t *ctx,
+ cp_mme_rx_t * assoc_req)
+{
+}
+
+/**
+ * manage association of a station.
+ * \param ctx the module context.
+ * \param assoc_req CM_ASSOC.REQ MME msg having being received
+ */
+void
+cp_av_cco_action_sc_ucco__cc_assoc_req (cp_t *ctx,
+ cp_mme_rx_t * assoc_req) __attribute__((weak));
+void
+cp_av_cco_action_sc_ucco__cc_assoc_req (cp_t *ctx,
+ cp_mme_rx_t * assoc_req)
+{
+}
+
+
+/**
+ * manage authentication of a station.
+ * \param ctx the module context.
+ * \param get_key_req CM_GET_KEY.REQ MME msg having being decrypted
+ */
+void
+cp_av_cco_action_cco__cm_get_key_req_pid0 (cp_t *ctx,
+ cp_mme_rx_t * get_key_req) __attribute__((weak));
+void
+cp_av_cco_action_cco__cm_get_key_req_pid0 (cp_t *ctx,
+ cp_mme_rx_t * get_key_req)
+{
+}
+
+/**
+ * Release a station.
+ * \param ctx the CP context.
+ * \param mme the MME received.
+ */
+void
+cp_av_cco_action__cco__cc_leave_req (cp_t *ctx,
+ cp_mme_rx_t *mme) __attribute__((weak));
+void
+cp_av_cco_action__cco__cc_leave_req (cp_t *ctx, cp_mme_rx_t *mme)
+{
+}
+
+/**
+ * Start to act as a CCo coming from the unassociated state..
+ * \param ctx the module context.
+ *
+ * This function shall:
+ * - Change the station CCo status.
+ * - Generate the NEK.
+ * - Program the NEK change timer (to change in few minutes).
+ * - Program the beacon timer to send a central beacon at the beginning of
+ * the next beacon period.
+ */
+void
+cp_av_cco_action__assoc__cco_start (cp_t *ctx) __attribute__((weak));
+void
+cp_av_cco_action__assoc__cco_start (cp_t *ctx)
+{
+}
+
+/**
+ * Stop acting as a CCo and become a unassociated station.
+ * \param ctx the module context.
+ *
+ * This function shall:
+ * - Change the station status.
+ * - Reprogram the beacon timer to expire a few time after the beacon period
+ * start date.
+ * - Stop the NEK generation.
+ * - Delete the AVLN.
+ * - Change the station authenticated status to not authenticated.
+ */
+void
+cp_av_cco_action_cco__unassoc_stop (cp_t *ctx) __attribute__((weak));
+void
+cp_av_cco_action_cco__unassoc_stop (cp_t *ctx)
+{
+}
+
+void
+cp_av_cco_action_handover__discover_done (cp_t *ctx) __attribute__((weak));
+
+void
+cp_av_cco_action_handover__discover_done (cp_t *ctx) {}
+
+void
+cp_av_cco_action_handover__cc_handover_cnf_receive (cp_t *ctx,
+ cp_mme_rx_t *mme) __attribute__((weak));
+
+void
+cp_av_cco_action_handover__cc_handover_cnf_receive (cp_t *ctx,
+ cp_mme_rx_t *mme) {}
+
+void
+cp_av_cco_action_handover__timeout (cp_t *ctx)__attribute__((weak));
+
+void
+cp_av_cco_action_handover__timeout (cp_t *ctx) {}
+
+void
+cp_av_cco_action_handover__cc_handover_info_rsp_receive (cp_t *ctx,
+ cp_mme_rx_t *mme)__attribute__((weak));
+
+void
+cp_av_cco_action_handover__cc_handover_info_rsp_receive (cp_t *ctx,
+ cp_mme_rx_t *mme) {}
+
+void
+cp_av_cco_action_handover__hoip_countdown_expired (cp_t
+ *ctx)__attribute__((weak));
+
+void
+cp_av_cco_action_handover__hoip_countdown_expired (cp_t *ctx) {}
+
+void
+cp_av_cco_action_cco_selection__sta_add (cp_t *ctx, cp_net_t *net, cp_sta_t *sta)
+ __attribute__((weak));
+
+void
+cp_av_cco_action_cco_selection__sta_add (cp_t *ctx, cp_net_t *net, cp_sta_t *sta)
+{}
+
+void
+cp_av_cco_action_sc__sc_cco__cc_assoc_req (cp_t *ctx, cp_mme_rx_t *mme)
+ __attribute__((weak));
+
+void
+cp_av_cco_action_sc__sc_cco__cc_assoc_req (cp_t *ctx, cp_mme_rx_t *mme)
+{
+}
+
+void
+cp_av_cco_action_cco_sta_leave_send_tei_map (cp_t *ctx, cp_sta_t *sta) __attribute__((weak));
+
+void
+cp_av_cco_action_cco_sta_leave_send_tei_map (cp_t *ctx, cp_sta_t *sta) {}
+
+void
+cp_av_cco_action_drv_mac_stop (cp_t *ctx)__attribute__((weak));
+void
+cp_av_cco_action_drv_mac_stop_suspend (cp_t *ctx)__attribute__((weak));
+void
+cp_av_cco_action_drv_mac_stop_ended (cp_t *ctx)__attribute__((weak));
+void
+cp_av_cco_action_handover__ended (cp_t *ctx)__attribute__((weak));
+void
+cp_av_cco_action_handover__timeout_cc_handover_cnf (cp_t *ctx)__attribute__((weak));
+void
+cp_av_cco_action_handover__timeout_cc_handover_info_rsp (cp_t *ctx)__attribute__((weak));
+
+void
+cp_av_cco_action_drv_mac_stop (cp_t *ctx){}
+void
+cp_av_cco_action_drv_mac_stop_suspend (cp_t *ctx){}
+void
+cp_av_cco_action_drv_mac_stop_ended (cp_t *ctx){}
+void
+cp_av_cco_action_handover__ended (cp_t *ctx){}
+void
+cp_av_cco_action_handover__timeout_cc_handover_cnf (cp_t *ctx){}
+void
+cp_av_cco_action_handover__timeout_cc_handover_info_rsp (cp_t *ctx){}
+
+void
+cp_av_cco_action_beacon_with_same_nid (
+ cp_t *ctx, bsu_beacon_t *beacon, cp_net_t *net, cp_sta_t *sta)
+ __attribute__ ((weak));
+void
+cp_av_cco_action_beacon_with_same_nid (
+ cp_t *ctx, bsu_beacon_t *beacon, cp_net_t *net, cp_sta_t *sta) { }
+
diff --git a/cesar/cp/av/cco/action/test/utest/Config b/cesar/cp/av/cco/action/test/utest/Config
new file mode 100644
index 0000000000..feb64caf5e
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/Config
@@ -0,0 +1,2 @@
+CONFIG_RESTRACK=y
+CONFIG_CP_AV = y
diff --git a/cesar/cp/av/cco/action/test/utest/Makefile b/cesar/cp/av/cco/action/test/utest/Makefile
new file mode 100644
index 0000000000..3d7a121f63
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/Makefile
@@ -0,0 +1,20 @@
+BASE = ../../../../../..
+
+INCLUDES = cp/av/cco/action/test/utest cp/av/cco/action/test/utest/override
+
+HOST_PROGRAMS = test_cco_action
+test_cco_action_SOURCES = test_cco_action.c handover.c nek.c discover_list.c \
+ assoc.c garbage.c msg_stub.c fsm_stub.c \
+ cp_stub.c scenario_actions.c \
+ dataplane_stub.c beacon_stub.c \
+ sta_action.c secu.c bsu_stub.c
+
+test_cco_action_MODULES = lib lib/scenario cp/av/cco/action cp/av/sta/mgr \
+ cp/av/fsm/stub mac/common cl/stub \
+ cp/av/beacon/stub cp/av/cco/region/stub cp/av/cco/bw/stub \
+ cp/sta/core/stub cp/msg/stub bsu/stub cp/av/beacon/stub \
+ cp/av/cco/region/stub cp/av/cco/bw/stub
+
+test_cco_action_CONFIG_MODULES = cp mac/sar
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/cp/av/cco/action/test/utest/inc/scenario_defs.h b/cesar/cp/av/cco/action/test/utest/inc/scenario_defs.h
new file mode 100644
index 0000000000..00c079b810
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/inc/scenario_defs.h
@@ -0,0 +1,309 @@
+#ifndef inc_scenario_defs_h
+#define inc_scenario_defs_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file inc/scenario_defs.h
+ * \brief Scenario definitions.
+ * \ingroup test
+ */
+
+#include "cp/msg/msg.h"
+#include "cp/sta/mgr/sta.h"
+#include "cp/sta/mgr/net.h"
+#include "cp/fsm/fsm.h"
+
+/* Scenario globals. */
+#define SCENARIO_DEFS_GLOBALS \
+ cp_t *cp; \
+ u16 prn; \
+ u32 my_nonce; \
+ u32 your_nonce; \
+ cp_mme_tx_t *mme;
+
+/* Scenario actions. */
+#define SCENARIO_DEFS_ACTIONS \
+ handover__cc_handover_cnf_receive, \
+ handover__timeout_cc_handover_cnf, \
+ handover__cc_handover_info_rsp_receive, \
+ handover__timeout_cc_handover_info_rsp, \
+ handover__hoip_countdown_expired, \
+ handover__discover_done, \
+ handover__ended, \
+ cco__cc_discover_list_req, \
+ cco__cc_assoc_req, \
+ cco__cm_get_key_req_pid0, \
+ cco__cm_get_key_req_pid1, \
+ \
+ ucco__cc_assoc_req, \
+ \
+ drv_mac_stop, \
+ cco__cco_nek_change, \
+ cco__cco_nek_change__nek_provide, \
+ cm_set_key_cnf_receive, \
+ cco__cco_nek_change__nek_timeout__wait, \
+ cco__cco_nek_change__timeout, \
+ \
+ ucco_start, \
+ ucco_stop, \
+ ucco__to_cco, \
+ cco_start, \
+ cco_stop, \
+ cco__to_ucco, \
+ cco__unassoc_start, \
+ cco__unassoc_stop, \
+ cco__assoc_start, \
+ cco__assoc_stop, \
+ BEACON_WITH_SAME_NID, \
+ cco_leave_merge_avln, \
+ \
+ garbage, \
+ cco_sta_leave_send_tei_map
+
+/* Actions without parameter. */
+#define __0(action) \
+typedef scenario_empty_t scenario_action_ ## action ## _t; \
+void \
+scenario_action_ ## action ## _cb ( \
+ scenario_globals_t *globals, scenario_params_t *params);
+
+/* Actions with parameters. */
+#define __n(action, param...) \
+typedef struct \
+{ \
+ PREPROC_FOR_EACH (__n_, param) \
+} scenario_action_ ## action ## _t; \
+void \
+scenario_action_ ## action ## _cb ( \
+ scenario_globals_t *globals, scenario_params_t *params);
+#define __n_(param) param;
+
+/* Actions with MME and parameters. */
+#define __m(action, param...) \
+typedef struct \
+{ \
+ cp_mme_peer_t peer; \
+ PREPROC_FOR_EACH (__m_, param) \
+} scenario_action_ ## action ## _t; \
+void \
+scenario_action_ ## action ## _cb ( \
+ scenario_globals_t *globals, scenario_params_t *params);
+#define __m_(param) param;
+
+__m (handover__cc_handover_cnf_receive)
+__0 (handover__timeout_cc_handover_cnf)
+__m (handover__cc_handover_info_rsp_receive)
+__0 (handover__timeout_cc_handover_info_rsp)
+__0 (handover__hoip_countdown_expired)
+__0 (handover__discover_done)
+__0 (handover__ended)
+__n (cco__cc_discover_list_req, cp_net_t *net, cp_sta_t *sta)
+__m (cco__cc_assoc_req)
+__m (cco__cm_get_key_req_pid0)
+__m (cco__cm_get_key_req_pid1)
+__m (ucco__cc_assoc_req)
+__0 (drv_mac_stop)
+__0 (cco__cco_nek_change)
+__0 (cco__cco_nek_change__nek_provide)
+__m (cm_set_key_cnf_receive)
+__0 (cco__cco_nek_change__nek_timeout__wait)
+__0 (cco__cco_nek_change__timeout)
+__0 (ucco_start)
+__0 (ucco_stop)
+__0 (ucco__to_cco)
+__0 (cco_start)
+__0 (cco_stop)
+__0 (cco__to_ucco)
+__0 (cco__unassoc_start)
+__0 (cco__unassoc_stop)
+__0 (cco__assoc_start)
+__0 (cco__assoc_stop)
+__n (BEACON_WITH_SAME_NID, bsu_beacon_t *beacon, cp_net_t *net, cp_sta_t *sta)
+__0 (cco_leave_merge_avln)
+__0 (garbage)
+__n (cco_sta_leave_send_tei_map, cp_sta_t *sta)
+
+#undef __0
+#undef __n
+#undef __n_
+#undef __m
+#undef __m_
+
+/* Scenario events. */
+#define SCENARIO_DEFS_EVENTS \
+ cp_fsm_event_bare_new, \
+ cp_fsm_event_mme_new, \
+ cp_fsm_branch, \
+ \
+ cp_msg_cc_handover_cnf_receive, \
+ cp_msg_cc_handover_info_ind_send_begin, \
+ cp_msg_cc_handover_info_ind_send, \
+ cp_msg_cc_handover_info_ind_send_end, \
+ cp_msg_cc_handover_req_send, \
+ cp_msg_cc_handover_info_rsp_receive, \
+ \
+ cp_msg_cc_discover_list_req_send, \
+ \
+ cp_msg_cc_assoc_req_receive, \
+ cp_msg_cc_assoc_cnf_send, \
+ \
+ cp_av_beacon_handover, \
+ cp_av_beacon_discover_init, \
+ cp_av_beacon_discover_uninit, \
+ cp_beacon_process_untracked_avln, \
+ \
+ cp_av_sta_action_assoc__authenticated__renew, \
+ \
+ cp_msg_cm_set_key_req_send, \
+ cp_msg_cm_set_key_cnf_receive, \
+ cp_msg_cm_get_key_req_receive, \
+ cp_msg_cm_get_key_cnf_send, \
+ \
+ bsu_power_on, \
+ \
+ cp_msg_cc_leave_ind_send, \
+ \
+ cp_msg_cc_set_tei_map_ind_send_begin, \
+ cp_msg_cc_set_tei_map_ind_send_sta, \
+ cp_msg_cc_set_tei_map_ind_send_end
+
+/* MME send event. */
+#define __ms(event, param...) \
+typedef struct \
+{ \
+ cp_mme_peer_t peer; \
+ PREPROC_FOR_EACH (__p_, ## param) \
+} scenario_event_ ## event ## _t;
+
+/* MME send event complex. */
+#define __msc(event, param...) \
+typedef struct \
+{ \
+ PREPROC_FOR_EACH (__p_, ## param) \
+} scenario_event_ ## event ## _t;
+
+/* MME send event with encryption information. */
+#define __msk(event, param...) \
+typedef struct \
+{ \
+ cp_mme_peer_t peer; \
+ cp_mme_peks_t peks; \
+ u8 pid; \
+ u8 pmn; \
+ PREPROC_FOR_EACH (__p_, ## param) \
+} scenario_event_ ## event ## _t;
+
+/* MME send event for CC_RELAY.IND. */
+#define __msr(event, param...) \
+typedef struct \
+{ \
+ mac_t mac_fa; \
+ cp_tei_t ftei; \
+ PREPROC_FOR_EACH (__p_, ## param) \
+} scenario_event_ ## event ## _t;
+
+/* MME receive event. */
+#define __mr(event, param...) \
+typedef struct \
+{ \
+ bool ok; \
+ PREPROC_FOR_EACH (__p_, ## param) \
+} scenario_event_ ## event ## _t;
+
+/* MME receive event with encryption information. */
+#define __mrk(event, param...) \
+typedef struct \
+{ \
+ bool ok; \
+ cp_mme_peks_t peks; \
+ u8 pid; \
+ u8 pmn; \
+ bool new_prn; \
+ bool new_my_nonce; \
+ bool new_your_nonce; \
+ PREPROC_FOR_EACH (__p_, ## param) \
+} scenario_event_ ## event ## _t;
+
+#define __p_(param) param;
+
+__mr (cp_msg_cc_handover_cnf_receive,
+ cp_msg_cc_handover_cnf_result_t result)
+__ms (cp_msg_cc_handover_info_ind_send_begin,
+ cp_msg_cc_handover_info_ind_rsc_t rsc,
+ cp_tei_t bcco,
+ uint num_sta)
+__msc (cp_msg_cc_handover_info_ind_send,
+ cp_tei_t tei, mac_t mac_addr,
+ uint status, cp_tei_t ptei)
+__msc (cp_msg_cc_handover_info_ind_send_end)
+__ms (cp_msg_cc_handover_req_send,
+ cp_msg_cc_handover_req_soft_hard_t soft_hard,
+ cp_msg_cc_handover_req_reason_t reason)
+__mr (cp_msg_cc_handover_info_rsp_receive)
+__msk (cp_msg_cm_set_key_req_send,
+ enum cp_msg_key_type_t key_type, u8 cco_cap, cp_nid_t nid,
+ u8 new_eks, cp_key_t new_key)
+__mrk (cp_msg_cm_set_key_cnf_receive, enum cp_msg_cm_set_key_cnf_result_t
+ result, u8 cco_cap);
+__ms (cp_msg_cc_discover_list_req_send);
+__mr (cp_msg_cc_assoc_req_receive,
+ enum cp_msg_cc_assoc_req_type_t request_type,
+ cp_nid_t nid,
+ u8 cco_cap, u8 proxy_cap)
+__ms (cp_msg_cc_assoc_cnf_send,
+ enum cp_msg_cc_assoc_cnf_result_t result,
+ cp_nid_t nid, cp_snid_t snid, cp_tei_t sta_tei, u16 lease_time_min)
+__mrk (cp_msg_cm_get_key_req_receive,
+ bool relayed,
+ enum cp_msg_key_type_t key_type, cp_nid_t nid, u32 *hash_key)
+__msk (cp_msg_cm_get_key_cnf_send,
+ enum cp_msg_cm_get_key_cnf_result_t result,
+ enum cp_msg_key_type_t key_type, cp_nid_t nid,
+ mac_eks_t eks, u32 *hash_key)
+__ms (cp_msg_cc_leave_ind_send,
+ enum cp_msg_cc_leave_ind_reason_t reason,
+ cp_nid_t nid)
+__ms (cp_msg_cc_set_tei_map_ind_send_begin,
+ enum cp_msg_cc_set_tei_map_ind_mode_t mode, uint sta_nb)
+__msc (cp_msg_cc_set_tei_map_ind_send_sta,
+ cp_tei_t tei, mac_t mac,
+ enum cp_msg_cc_set_tei_map_ind_status_t status)
+__msc (cp_msg_cc_set_tei_map_ind_send_end)
+
+#undef __ms
+#undef __msk
+#undef __msr
+#undef __mr
+#undef __mrk
+#undef __msc
+
+/* Any event. */
+#define __e(event, param...) \
+typedef struct \
+{ \
+ PREPROC_FOR_EACH (__p_, ## param) \
+} scenario_event_ ## event ## _t;
+
+__e (cp_fsm_event_bare_new, cp_fsm_event_type_t type)
+__e (cp_fsm_event_mme_new, cp_fsm_event_type_t type)
+__e (cp_fsm_branch, cp_fsm_branch_t branch)
+
+__e (cp_av_beacon_handover, cp_tei_t tei)
+__e (cp_av_beacon_discover_init)
+__e (cp_av_beacon_discover_uninit)
+__e (cp_beacon_process_untracked_avln)
+
+__e (cp_av_sta_action_assoc__authenticated__renew)
+
+__e (bsu_power_on, u8 snid)
+
+#undef __e
+
+#undef __p_
+
+#endif /* inc_scenario_defs_h */
diff --git a/cesar/cp/av/cco/action/test/utest/inc/test_cco_action.h b/cesar/cp/av/cco/action/test/utest/inc/test_cco_action.h
new file mode 100644
index 0000000000..4f3d078a74
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/inc/test_cco_action.h
@@ -0,0 +1,56 @@
+#ifndef inc_test_cco_action_h
+#define inc_test_cco_action_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file inc/test_cco_action.h
+ * \brief Test cco/action.
+ * \ingroup test
+ */
+#include "cp/inc/context.h"
+
+/** Contexts used in tests. */
+struct test_cco_action_t
+{
+ cp_t cp;
+ mac_config_t mac_config;
+};
+typedef struct test_cco_action_t test_cco_action_t;
+
+/**
+ * Initialise test contexts.
+ * \param ctx test context
+ */
+void
+test_cco_action_init (test_cco_action_t *ctx);
+
+/**
+ * Uninitialise test contexts.
+ * \param ctx test context
+ */
+void
+test_cco_action_uninit (test_cco_action_t *ctx);
+
+/**
+ * Reset test contexts.
+ * \param ctx test context
+ */
+void
+test_cco_action_reset (test_cco_action_t *ctx);
+
+/**
+ * Create our AVLN as if the STA was associated.
+ * \param ctx test context
+ * \param nid our NID
+ * \param snid our SNID
+ */
+void
+test_cco_action_create_our_net (test_cco_action_t *ctx, cp_nid_t nid,
+ cp_snid_t snid);
+
+#endif /* inc_test_cco_action_h */
diff --git a/cesar/cp/av/cco/action/test/utest/override/cp/inc/context.h b/cesar/cp/av/cco/action/test/utest/override/cp/inc/context.h
new file mode 100644
index 0000000000..cf3999d855
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/override/cp/inc/context.h
@@ -0,0 +1,84 @@
+#ifndef override_cp_inc_context_h
+#define override_cp_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file override/cp/inc/context.h
+ * \brief Control plane context override.
+ * \ingroup test
+ */
+#include "cp/types.h"
+#include "cp/cco/action/inc/cco_action.h"
+#include "cp/sta/action/inc/context.h"
+#include "cp/beacon/inc/beacon.h"
+#include "cp/sta/mgr/sta_mgr.h"
+#include "cp/sta/mgr/inc/sta_mgr.h"
+#include "cp/cco/region/inc/context.h"
+#include "cp/cco/bw/bw.h"
+#include "cp/cco/bw/inc/context.h"
+#include "cl/cl.h"
+#include "mac/common/config.h"
+#include "mac/common/store.h"
+#include "mac/sar/sar.h"
+#include "mac/pbproc/pbproc.h"
+#include "lib/rnd.h"
+#include "lib/trace.h"
+
+/** Forward declaration. */
+typedef struct cp_beacon_t cp_beacon_t;
+
+enum cp_handover_reason_t
+{
+ CP_HANDOVER_REASON_CCO_SELECTION,
+ CP_HANDOVER_REASON_CCO_LEAVING,
+ CP_HANDOVER_REASON_USER_APPOINT,
+ CP_HANDOVER_REASON_NB,
+};
+
+enum cp_handover_soft_hard_t
+{
+ CP_HANDOVER_SOFT_HARD_SOFT,
+ CP_HANDOVER_SOFT_HARD_HARD,
+ CP_HANDOVER_NB,
+};
+
+struct cp_handover_t
+{
+ /** Handover timeout. */
+ cp_sta_core_timed_event_def_t handover_timeout;
+
+ /** handover reason. */
+ enum cp_handover_reason_t reason;
+
+ /** Handover soft hard */
+ enum cp_handover_soft_hard_t soft_hard;
+};
+
+struct cp_t
+{
+ cp_cco_action_t cco_action;
+ cp_sta_action_t sta_action;
+ cp_sta_mgr_t sta_mgr;
+ cp_beacon_t beacon;
+ lib_rnd_t rnd;
+ cl_t *cl;
+ mac_config_t *mac_config;
+ mac_store_t *mac_store;
+ sar_t *sar;
+ pbproc_t *pbproc;
+ struct cp_handover_t handover;
+ struct cp_cco_region_t region;
+ struct cp_cco_bw_t bw;
+ bsu_t *bsu;
+
+#if CONFIG_TRACE
+ trace_buffer_t trace;
+#endif
+};
+
+#endif /* override_cp_inc_context_h */
diff --git a/cesar/cp/av/cco/action/test/utest/override/cp/sta/core/defs.h b/cesar/cp/av/cco/action/test/utest/override/cp/sta/core/defs.h
new file mode 100644
index 0000000000..9698b44e93
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/override/cp/sta/core/defs.h
@@ -0,0 +1,57 @@
+#ifndef cp_sta_core_defs_h
+#define cp_sta_core_defs_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/sta/core/defs.h
+ * \brief Sta core defs.
+ * \ingroup cp/sta/core
+ *
+ */
+#include "cp/fsm/forward.h"
+
+/** Forward declaration. */
+typedef struct cp_sta_core_t cp_sta_core_t;
+
+/*
+ * the sta core event flags
+ * these are some flags, so take care to give a value with all bits set to 0 but one.
+ */
+enum cp_sta_core_event_flag_t
+{
+ CP_STA_CORE_EVENT_FLAG_RECV_BEACON = 0x1,
+ CP_STA_CORE_EVENT_FLAG_RECV_MME = 0x2,
+ CP_STA_CORE_EVENT_FLAG_FSM = 0x4,
+ CP_STA_CORE_EVENT_FLAG_GARBAGE = 0x8,
+ CP_STA_CORE_EVENT_FLAG_TERMINATE = 0x10
+};
+typedef enum cp_sta_core_event_flag_t cp_sta_core_event_flag_t;
+
+/** Definition of alarm info structure
+ * (applications should not use it directly but use "alias" defined just below) */
+struct cp_sta_core_timed_event_def_t
+{
+ /* eCos alarm. */
+ uint alarm;
+ /* eCos alarm handle. */
+ uint alarm_handle;
+ /* the sta core event flag to set
+ * (auto or user-specified when creating/launching timer alarm). */
+ cp_sta_core_event_flag_t event_flag;
+ /* FSM event specified when creating/launching timer alarm
+ * (set if the previous flag is CP_STA_CORE_EVENT_FLAG_FSM). */
+ cp_fsm_event_t *fsm_event;
+ /* flag indicating a periodic alarm (if set to true)
+ * or one-shot alarm (if set to false). */
+ bool cyclic_alarm;
+ /* pointer to CP context. */
+ cp_t *cp_ctx;
+};
+typedef struct cp_sta_core_timed_event_def_t cp_sta_core_timed_event_def_t;
+
+#endif /* cp_sta_core_defs_h */
diff --git a/cesar/cp/av/cco/action/test/utest/override/mac/sar/inc/sar_context.h b/cesar/cp/av/cco/action/test/utest/override/mac/sar/inc/sar_context.h
new file mode 100644
index 0000000000..ab2a656f3d
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/override/mac/sar/inc/sar_context.h
@@ -0,0 +1,23 @@
+#ifndef override_mac_sar_inc_context_h
+#define override_mac_sar_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file override/mac/sar/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+struct sar_t
+{
+ mac_store_t *mac_store;
+};
+
+#endif /* override_mac_sar_inc_context_h */
diff --git a/cesar/cp/av/cco/action/test/utest/src/assoc.c b/cesar/cp/av/cco/action/test/utest/src/assoc.c
new file mode 100644
index 0000000000..9da8a2dbca
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/assoc.c
@@ -0,0 +1,518 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2010 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/cco/action/test/utest/src/assoc.c
+ * \brief Association test.
+ * \ingroup cp_cco_action
+ */
+#include "common/std.h"
+#include "lib/scenario/scenario.h"
+#include "inc/test_cco_action.h"
+#include "cp/cco/action/cco_action.h"
+#include "bsu/bsu.h"
+
+void
+assoc_test_set_own_sta_as_cco (cp_t *ctx, cp_net_t *net, cp_tei_t tei)
+{
+ cp_sta_mgr_set_our_avln (ctx, net);
+ cp_sta_own_data_set_tei (ctx, 1);
+ cp_sta_own_data_set_cco_status (ctx, true);
+}
+
+void
+assoc_test_case_cco (test_t t)
+{
+ test_case_begin (t, "Become UCCo/CCo/Leave CCo status");
+ test_begin (t, "UCCo/CCo/UNASSOC")
+ {
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+ scenario_globals_t globals = {
+ .cp = &ctx.cp,
+ };
+ cp_mme_tx_t mme_to_send;
+ globals.mme = &mme_to_send;
+ cp_sta_own_data_t *own = cp_sta_mgr_get_sta_own_data (&ctx.cp);
+ own->hybrid_mode = MAC_COEXISTENCE_AV_ONLY_MODE;
+ /* Become UCCo. */
+ scenario_entry_t ucco_enter[] = {
+ SCENARIO_ACTION (ucco_start),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco__nek_change),
+ SCENARIO_EVENT (cp_beacon_process_untracked_avln),
+ SCENARIO_EVENT (cp_av_beacon_discover_init),
+ SCENARIO_END
+ };
+ scenario_run (t, ucco_enter, &globals);
+ test_fail_unless (MAC_TEI_IS_STA (cp_sta_own_data_get_tei (&ctx.cp)));
+ test_fail_unless (cp_sta_own_data_get_cco_status (&ctx.cp));
+ test_fail_unless (own->hybrid_mode ==
+ MAC_COEXISTENCE_HYBRID_DELIMITERS_MODE);
+ /* Receive a wrong association request. */
+ cp_net_t *net = cp_sta_mgr_add_avln (&ctx.cp, 1, 1);
+ cp_sta_mgr_set_our_avln (&ctx.cp, net);
+ cp_nid_t our_nid = cp_sta_own_data_get_nid (&ctx.cp);
+ scenario_entry_t sta_assoc_wrong_request [] = {
+ SCENARIO_ACTION (ucco__cc_assoc_req, .peer = CP_MME_PEER (3, 3)),
+ SCENARIO_EVENT (cp_msg_cc_assoc_req_receive,
+ .ok = true,
+ .request_type = CP_MSG_CC_ASSOC_REQ_TYPE_RENEW,
+ .nid = our_nid + 1,
+ .cco_cap = CP_CCO_LEVEL,
+ .proxy_cap = false),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (UCCO, CC_ASSOC_REQ, nok)),
+ SCENARIO_END,
+ };
+ /* station is still Ucco. */
+ scenario_run (t, sta_assoc_wrong_request, &globals);
+ test_fail_unless (cp_sta_mgr_sta_get_from_mac (&ctx.cp, 3) == NULL);
+ test_fail_unless (cp_sta_own_data_get_cco_status (&ctx.cp));
+ /* Receive a good association request. Station should be CCo at the
+ * end of this scenario. */
+ scenario_entry_t sta_assoc_good_request [] = {
+ SCENARIO_ACTION (ucco__cc_assoc_req,
+ .peer = CP_MME_PEER (3, MAC_TEI_UNASSOCIATED)),
+ SCENARIO_EVENT (cp_msg_cc_assoc_req_receive,
+ .ok = true,
+ .request_type = CP_MSG_CC_ASSOC_REQ_TYPE_NEW,
+ .nid = our_nid,
+ .cco_cap = CP_CCO_LEVEL,
+ .proxy_cap = false),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_become_cco),
+ SCENARIO_EVENT (cp_msg_cc_assoc_cnf_send,
+ .peer = CP_MME_PEER (3, MAC_TEI_UNASSOCIATED),
+ .result = CP_MSG_CC_ASSOC_CNF_RESULT_SUCCESS,
+ .nid = our_nid,
+ .snid = cp_sta_own_data_get_snid (&ctx.cp),
+ .sta_tei = 2,
+ .lease_time_min = CP_LEASE_ASSOC_MIN),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_begin,
+ .peer = CP_MME_PEER_ALL_STA,
+ .mode = CP_MSG_CC_SET_TEI_MAP_IND_MODE_ADD,
+ .sta_nb = 1),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_sta,
+ .tei = 2, .mac = 3,
+ .status =
+ CP_MSG_CC_SET_TEI_MAP_IND_STATUS_ASSOCIATED),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_end),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (UCCO, CC_ASSOC_REQ, ok)),
+ SCENARIO_END,
+ };
+ scenario_run (t, sta_assoc_good_request, &globals);
+ cp_sta_t * sta = cp_sta_mgr_sta_get_from_mac (&ctx.cp, 3);
+ test_fail_unless (sta);
+ test_fail_unless (cp_sta_get_tei (sta) == 2);
+ test_fail_unless (cp_net_get_nm (&ctx.cp, net) ==
+ MAC_NM_CSMA_ONLY);
+ slab_release (sta);
+ /* Receive an Get key request from the associated STA. */
+ mac_eks_t eks = MAC_EKS_MIN + 1;
+ ctx.mac_config.nek[bsu_nek_index_current (INVALID_PTR)].eks = eks;
+ scenario_entry_t auth [] = {
+ /* Refuse access - wrong TEI. */
+ SCENARIO_ACTION (cco__cm_get_key_req_pid0,
+ .peer= CP_MME_PEER (3, 3)),
+ SCENARIO_EVENT (cp_msg_cm_get_key_req_receive, .ok = true,
+ .peks = CP_MME_PEKS_NMK,
+ .relayed = false, .key_type = CP_MSG_KEY_NEK,
+ .nid = 1, .pid = 0, .pmn = 1, .hash_key = 0),
+ SCENARIO_EVENT (cp_msg_cm_get_key_cnf_send,
+ .peer = CP_MME_PEER (3, 3),
+ .result =
+ CP_MSG_CM_GET_KEY_CNF_RESULT_REQUEST_REFUSED,
+ .key_type = CP_MSG_KEY_NEK, .nid = 1,
+ .eks = MAC_EKS_CLEAR, .pid = 0, .pmn = 0xff,
+ .peks = CP_MME_PEKS_NMK),
+ /* Refuse access - wrong MME decryption. */
+ SCENARIO_ACTION (cco__cm_get_key_req_pid0,
+ .peer= CP_MME_PEER (3, 2)),
+ SCENARIO_EVENT (cp_msg_cm_get_key_req_receive, .ok = false),
+ SCENARIO_EVENT (cp_msg_cm_get_key_cnf_send,
+ .peer = CP_MME_PEER (3, 2),
+ .result =
+ CP_MSG_CM_GET_KEY_CNF_RESULT_REQUEST_REFUSED,
+ .key_type = CP_MSG_KEY_NEK, .nid = 1,
+ .eks = MAC_EKS_CLEAR, .pid = 0, .pmn = 0xff,
+ .peks = CP_MME_PEKS_NMK),
+ /* Accept access. */
+ SCENARIO_ACTION (cco__cm_get_key_req_pid0,
+ .peer= CP_MME_PEER (3, 2)),
+ SCENARIO_EVENT (cp_msg_cm_get_key_req_receive, .ok = true,
+ .peks = CP_MME_PEKS_NMK,
+ .relayed = false, .key_type = CP_MSG_KEY_NEK,
+ .nid = 1, .pid = 0, .pmn = 1, .hash_key = 0),
+ /* Send the TEI map to the station. */
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_begin,
+ .peer = CP_MME_PEER (3, 2),
+ .mode = CP_MSG_CC_SET_TEI_MAP_IND_MODE_UPDATE,
+ .sta_nb = 2),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_sta,
+ .tei = cp_sta_own_data_get_tei (&ctx.cp),
+ .mac = cp_sta_own_data_get_mac_address (&ctx.cp),
+ .status =
+ CP_MSG_CC_SET_TEI_MAP_IND_STATUS_AUTHENTICATED),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_sta,
+ .tei = 2, .mac = 3,
+ .status =
+ CP_MSG_CC_SET_TEI_MAP_IND_STATUS_ASSOCIATED),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_end),
+ SCENARIO_EVENT (cp_msg_cm_get_key_cnf_send,
+ .peer = CP_MME_PEER (3, 2),
+ .result =
+ CP_MSG_CM_GET_KEY_CNF_RESULT_KEY_GRANTED,
+ .key_type = CP_MSG_KEY_NEK, .nid = 1,
+ .eks = eks, .pid = 0, .pmn = 0xff,
+ .peks = CP_MME_PEKS_NMK),
+ SCENARIO_END
+ };
+ scenario_run (t, auth, &globals);
+ /* Leave CCo to STA. */
+ scenario_entry_t cco_leave[] = {
+ SCENARIO_ACTION (cco__assoc_stop),
+ SCENARIO_EVENT (cp_av_beacon_discover_uninit),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_become_sta),
+ SCENARIO_END
+ };
+ scenario_run (t, cco_leave, &globals);
+ test_fail_unless (MAC_TEI_IS_STA (cp_sta_own_data_get_tei (&ctx.cp)));
+ test_fail_unless (!cp_sta_own_data_get_cco_status (&ctx.cp));
+ /* Leave CCo to UCCo. */
+ assoc_test_set_own_sta_as_cco (&ctx.cp, net, 1);
+ scenario_entry_t cco_to_ucco [] = {
+ SCENARIO_ACTION (cco__to_ucco),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_become_ucco),
+ SCENARIO_END
+ };
+ scenario_run (t, cco_to_ucco, &globals);
+ test_fail_unless (cp_sta_own_data_get_cco_status (&ctx.cp));
+ test_fail_unless (MAC_TEI_IS_STA (cp_sta_own_data_get_tei (&ctx.cp)));
+ /* Leave CCo to USTA. */
+ assoc_test_set_own_sta_as_cco (&ctx.cp, net, 1);
+ scenario_entry_t cco_unassoc [] = {
+ SCENARIO_ACTION (cco__unassoc_stop),
+ SCENARIO_EVENT (cp_av_beacon_discover_uninit),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_cco_leave),
+ SCENARIO_END
+ };
+ scenario_run (t, cco_unassoc, &globals);
+ /* Unassoc stop makes the FSM goes to UNASSOCIATED status. The reset
+ * of data are done in enter function of UNASSOCIATED state. */
+ test_fail_unless (!cp_sta_own_data_get_cco_status (&ctx.cp));
+ /* UCCo STOP. */
+ assoc_test_set_own_sta_as_cco (&ctx.cp, net, 1);
+ scenario_entry_t ucco_stop [] = {
+ SCENARIO_ACTION (ucco_stop),
+ SCENARIO_EVENT (cp_av_beacon_discover_uninit),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_cco_leave),
+ SCENARIO_END
+ };
+ scenario_run (t, ucco_stop, &globals);
+ test_fail_unless (!cp_sta_own_data_get_cco_status (&ctx.cp));
+ test_fail_unless (!MAC_TEI_IS_STA (cp_sta_own_data_get_tei (&ctx.cp)));
+ test_fail_unless (!cp_sta_own_data_get_authenticated_status (&ctx.cp));
+ /* UCCo to CCo. */
+ assoc_test_set_own_sta_as_cco (&ctx.cp, net, 1);
+ scenario_entry_t ucco_to_cco [] = {
+ SCENARIO_ACTION (ucco__to_cco),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_become_cco),
+ SCENARIO_END
+ };
+ scenario_run (t, ucco_to_cco, &globals);
+ test_fail_unless (cp_sta_own_data_get_cco_status (&ctx.cp));
+ test_fail_unless (MAC_TEI_IS_STA (cp_sta_own_data_get_tei (&ctx.cp)));
+ /* USTA to CCo start. */
+ cp_sta_own_data_set_cco_status (&ctx.cp, false);
+ cp_sta_mgr_set_our_avln (&ctx.cp, NULL);
+ cp_sta_own_data_set_tei (&ctx.cp, MAC_TEI_UNASSOCIATED);
+ cp_sta_mgr_add_avln (&ctx.cp, 0, 1);
+ scenario_entry_t usta_to_cco_start [] = {
+ SCENARIO_ACTION (cco__unassoc_start),
+ SCENARIO_EVENT (bsu_power_on, .snid = 14),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco__nek_change),
+ SCENARIO_EVENT (cp_beacon_process_untracked_avln),
+ SCENARIO_EVENT (cp_av_beacon_discover_init),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_become_cco),
+ SCENARIO_END
+ };
+ cp_snid_t old_snid = cp_sta_own_data_get_snid (&ctx.cp);
+ scenario_run (t, usta_to_cco_start, &globals);
+ cp_sta_mgr_remove_avln (&ctx.cp, 0, 1);
+ test_fail_unless (cp_sta_own_data_get_cco_status (&ctx.cp));
+ test_fail_unless (MAC_TEI_IS_STA (cp_sta_own_data_get_tei (&ctx.cp)));
+ test_fail_unless (old_snid != cp_sta_own_data_get_snid (&ctx.cp));
+ /* STA to CCo start. */
+ cp_sta_own_data_set_cco_status (&ctx.cp, false);
+ scenario_entry_t sta_to_cco [] = {
+ SCENARIO_ACTION (cco__assoc_start),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco__nek_change),
+ SCENARIO_EVENT (cp_beacon_process_untracked_avln),
+ SCENARIO_EVENT (cp_av_beacon_discover_init),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_become_cco),
+ SCENARIO_END
+ };
+ scenario_run (t, sta_to_cco, &globals);
+ test_fail_unless (cp_sta_own_data_get_cco_status (&ctx.cp));
+ test_fail_unless (MAC_TEI_IS_STA (cp_sta_own_data_get_tei (&ctx.cp)));
+ /* Uninit test. */
+ test_cco_action_uninit (&ctx);
+ }
+ test_end;
+}
+
+void
+assoc_test_case_nek_request (test_t t)
+{
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+
+ scenario_globals_t globals = {
+ .cp = &ctx.cp,
+ };
+
+ cp_mme_tx_t mme_to_send;
+ globals.mme = &mme_to_send;
+
+ /* create the avln */
+ cp_nid_t nid = 1;
+ cp_snid_t snid = 1;
+ /* create CCo. */
+ test_cco_action_create_our_net(&ctx, nid, snid);
+ cp_net_t *net = cp_sta_mgr_get_our_avln (&ctx.cp);
+
+ /* create an authenticated station in the avln */
+ const cp_tei_t sta_tei = 2;
+ const mac_t sta_mac = MAC_ADDRESS (0x00, 0x13, 0xd7, 0x00, 0x00, 0x01);
+ cp_sta_t *sta = cp_sta_mgr_sta_add (&ctx.cp, net, sta_tei, sta_mac);
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+ cp_mme_peer_t peer = CP_MME_PEER (sta_mac, sta_tei);
+
+ mac_eks_t eks = MAC_EKS_MIN + 1;
+ ctx.mac_config.nek[bsu_nek_index_next (INVALID_PTR)].eks = eks;
+
+ test_case_begin (t, "CCO receive a nek request");
+ test_begin (t, "request ok")
+ {
+ scenario_entry_t entry[] = {
+ SCENARIO_ACTION (cco__cm_get_key_req_pid1, .peer= peer),
+ SCENARIO_EVENT (cp_msg_cm_get_key_req_receive, .ok = true,
+ .peks = CP_MME_PEKS_NMK,
+ .relayed = false, .key_type = CP_MSG_KEY_NEK,
+ .nid = nid, .pid = 1, .pmn = 1, .hash_key = 0),
+ SCENARIO_EVENT (cp_msg_cm_get_key_cnf_send,
+ .peer = peer,
+ .result = CP_MSG_CM_GET_KEY_CNF_RESULT_KEY_GRANTED,
+ .key_type = CP_MSG_KEY_NEK, .nid = nid,
+ .eks = eks, .pid = 1, .pmn = 0xff,
+ .peks = CP_MME_PEKS_NMK),
+ SCENARIO_END
+ };
+ scenario_run (t, entry, &globals);
+ }
+ test_end;
+
+ test_begin (t, "receive fail")
+ {
+ scenario_entry_t entry[] = {
+ SCENARIO_ACTION (cco__cm_get_key_req_pid1, .peer= peer),
+ SCENARIO_EVENT (cp_msg_cm_get_key_req_receive, .ok = false,
+ .peks = CP_MME_PEKS_NMK,
+ .relayed = false, .key_type = CP_MSG_KEY_NEK,
+ .nid = nid, .pid = 1, .pmn = 1, .hash_key = 0),
+ SCENARIO_EVENT (cp_msg_cm_get_key_cnf_send,
+ .peer = peer,
+ .result = CP_MSG_CM_GET_KEY_CNF_RESULT_REQUEST_REFUSED,
+ .key_type = CP_MSG_KEY_NEK, .nid = nid,
+ .eks = MAC_EKS_CLEAR, .pid = 1, .pmn = 0xff,
+ .peks = CP_MME_PEKS_NMK),
+ SCENARIO_END
+ };
+ scenario_run (t, entry, &globals);
+ }
+ test_end;
+
+ test_begin (t, "invalid key type")
+ {
+ scenario_entry_t entry[] = {
+ SCENARIO_ACTION (cco__cm_get_key_req_pid1, .peer= peer),
+ SCENARIO_EVENT (cp_msg_cm_get_key_req_receive, .ok = true,
+ .peks = CP_MME_PEKS_NMK,
+ .relayed = false, .key_type = CP_MSG_KEY_DAK,
+ .nid = nid, .pid = 1, .pmn = 1, .hash_key = 0),
+ SCENARIO_EVENT (cp_msg_cm_get_key_cnf_send,
+ .peer = peer,
+ .result =
+ CP_MSG_CM_GET_KEY_CNF_RESULT_UNSUPPORTED_METHOD_KEY_TYPE,
+ .key_type = CP_MSG_KEY_DAK, .nid = nid,
+ .eks = MAC_EKS_CLEAR, .pid = 1, .pmn = 0xff,
+ .peks = CP_MME_PEKS_NMK),
+ SCENARIO_END
+ };
+ scenario_run (t, entry, &globals);
+ }
+ test_end;
+
+ test_begin (t, "invalid tei")
+ {
+ scenario_entry_t entry[] = {
+ SCENARIO_ACTION (cco__cm_get_key_req_pid1,
+ .peer= CP_MME_PEER (sta_mac, 0)),
+ SCENARIO_EVENT (cp_msg_cm_get_key_req_receive, .ok = true,
+ .peks = CP_MME_PEKS_NMK,
+ .relayed = false, .key_type = CP_MME_PEKS_NMK,
+ .nid = nid, .pid = 1, .pmn = 1, .hash_key = 0),
+ SCENARIO_EVENT (cp_msg_cm_get_key_cnf_send,
+ .peer = CP_MME_PEER (sta_mac, 0),
+ .result = CP_MSG_CM_GET_KEY_CNF_RESULT_REQUEST_REFUSED,
+ .key_type = CP_MME_PEKS_NMK, .nid = nid,
+ .eks = MAC_EKS_CLEAR, .pid = 1, .pmn = 0xff,
+ .peks = CP_MME_PEKS_NMK),
+ SCENARIO_END
+ };
+ scenario_run (t, entry, &globals);
+ }
+ test_end;
+
+ slab_release (sta);
+ test_cco_action_uninit (&ctx);
+}
+
+void
+assoc_test_case_beacon_with_same_nid (test_t t)
+{
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+
+ scenario_globals_t globals = {
+ .cp = &ctx.cp,
+ };
+
+ /* create the avln */
+ cp_nid_t nid = 1;
+ cp_snid_t snid = 1;
+ bsu_beacon_t *beacon;
+ test_cco_action_create_our_net(&ctx, nid, snid);
+ cp_net_t *net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ cp_sta_t *cco = cp_net_get_cco (&ctx.cp, net);
+
+ /* create an authenticated station in the avln */
+ const cp_tei_t sta_tei = 2;
+ const mac_t sta_mac = MAC_ADDRESS (0x00, 0x13, 0xd7, 0x00, 0x00, 0x01);
+ cp_sta_t *sta = cp_sta_mgr_sta_add (&ctx.cp, net, sta_tei, sta_mac);
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+
+ test_case_begin (t, "CCO receives a BEACON_WITH_SAME_NID");
+ test_begin (t, "the mac address is smaller than our own")
+ {
+ beacon = (bsu_beacon_t *) blk_alloc ();
+ beacon->bmis.mac_address.present = true;
+ beacon->bmis.mac_address.mac_address =
+ cp_sta_own_data_get_mac_address (&ctx.cp) - 1;
+
+ scenario_entry_t entry[] = {
+ SCENARIO_ACTION (BEACON_WITH_SAME_NID, .beacon = beacon, .net = net,
+ .sta = NULL),
+ SCENARIO_END
+ };
+ scenario_run (t, entry, &globals);
+ test_fail_unless (cp_sta_own_data_get_cco_status (&ctx.cp));
+ test_fail_unless (cp_net_get_cco (&ctx.cp, net) == cco);
+ blk_release (beacon);
+ }
+ test_end;
+
+ test_begin (t, "there is no bmi mac address")
+ {
+ beacon = (bsu_beacon_t *) blk_alloc ();
+ beacon->bmis.mac_address.present = false;
+
+ scenario_entry_t entry[] = {
+ SCENARIO_ACTION (BEACON_WITH_SAME_NID, .beacon = beacon, .net = net,
+ .sta = NULL),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco_leave_merge_avln),
+ SCENARIO_ACTION (cco_leave_merge_avln),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_sta_status_changed),
+ SCENARIO_EVENT (cp_av_beacon_discover_uninit),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_cco_leave),
+ SCENARIO_END
+ };
+ scenario_run (t, entry, &globals);
+ test_fail_unless (!cp_sta_own_data_get_cco_status (&ctx.cp));
+ test_fail_unless (cp_net_get_cco (&ctx.cp, net) == NULL);
+ int i;
+ for (i = 0; i < CP_CCO_ACTION_TEI_FLAGS_ROW; i++)
+ test_fail_unless (ctx.cp.cco_action.tei_flags[i] == 0);
+ blk_release (beacon);
+ }
+ test_end;
+ slab_release (sta);
+
+ test_cco_action_create_our_net(&ctx, nid, snid);
+ net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ /* create an authenticated station in the avln */
+ sta = cp_sta_mgr_sta_add (&ctx.cp, net, sta_tei, sta_mac);
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+
+ test_begin (t, "the mac address is bigger than our")
+ {
+ beacon = (bsu_beacon_t *) blk_alloc ();
+ beacon->bmis.mac_address.mac_address =
+ cp_sta_own_data_get_mac_address (&ctx.cp) + 1;
+
+ scenario_entry_t entry[] = {
+ SCENARIO_ACTION (BEACON_WITH_SAME_NID, .beacon = beacon, .net = net,
+ .sta = NULL),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco_leave_merge_avln),
+ SCENARIO_ACTION (cco_leave_merge_avln),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_sta_status_changed),
+ SCENARIO_EVENT (cp_av_beacon_discover_uninit),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_cco_leave),
+ SCENARIO_END
+ };
+ scenario_run (t, entry, &globals);
+ test_fail_unless (!cp_sta_own_data_get_cco_status (&ctx.cp));
+ test_fail_unless (cp_net_get_cco (&ctx.cp, net) == NULL);
+ int i;
+ for (i = 0; i < CP_CCO_ACTION_TEI_FLAGS_ROW; i++)
+ test_fail_unless (ctx.cp.cco_action.tei_flags[i] == 0);
+ blk_release (beacon);
+ }
+ test_end;
+
+ slab_release (sta);
+ test_cco_action_uninit (&ctx);
+}
+
+void
+assoc_test_suite (test_t t)
+{
+ test_suite_begin (t, "Association");
+ assoc_test_case_cco (t);
+ assoc_test_case_nek_request (t);
+ assoc_test_case_beacon_with_same_nid (t);
+}
diff --git a/cesar/cp/av/cco/action/test/utest/src/beacon_stub.c b/cesar/cp/av/cco/action/test/utest/src/beacon_stub.c
new file mode 100644
index 0000000000..8fc0e93cb8
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/beacon_stub.c
@@ -0,0 +1,44 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/beacon_stub.c
+ * \brief Beacon stub.
+ * \ingroup test
+ */
+#include "common/std.h"
+
+#include "cp/beacon/beacon.h"
+
+#include "lib/scenario/scenario.h"
+
+void
+cp_av_beacon_handover (cp_t *ctx, cp_tei_t tei)
+{
+ dbg_assert (ctx);
+ dbg_assert (MAC_TEI_IS_STA (tei));
+
+ scenario_event (cp_av_beacon_handover);
+}
+
+void
+cp_beacon_process_untracked_avln (cp_t *ctx)
+{
+ scenario_event (cp_beacon_process_untracked_avln);
+}
+
+void
+cp_av_beacon_discover_init (cp_t *ctx)
+{
+ scenario_event (cp_av_beacon_discover_init);
+}
+
+void
+cp_av_beacon_discover_uninit (cp_t *ctx)
+{
+ scenario_event (cp_av_beacon_discover_uninit);
+}
diff --git a/cesar/cp/av/cco/action/test/utest/src/bsu_stub.c b/cesar/cp/av/cco/action/test/utest/src/bsu_stub.c
new file mode 100644
index 0000000000..633d65be5d
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/bsu_stub.c
@@ -0,0 +1,23 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2011 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/bsu_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "bsu/bsu.h"
+#include "lib/scenario/scenario.h"
+
+void
+bsu_power_on (bsu_t *ctx, u8 snid)
+{
+ scenario_event (bsu_power_on);
+}
diff --git a/cesar/cp/av/cco/action/test/utest/src/cp_stub.c b/cesar/cp/av/cco/action/test/utest/src/cp_stub.c
new file mode 100644
index 0000000000..241cbb23df
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/cp_stub.c
@@ -0,0 +1,28 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/cp_stub.c
+ * \brief CP stub.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "cp/cp.h"
+
+void
+cp_compute_nmk_and_nid_from_npw (cp_t *ctx, const char *npw,
+ cp_security_level_t sl)
+{
+ dbg_assert (ctx);
+ dbg_assert (npw);
+}
+
+u32
+cp_sta_core_get_date_ms (cp_t *ctx)
+{
+ return 0;
+}
diff --git a/cesar/cp/av/cco/action/test/utest/src/dataplane_stub.c b/cesar/cp/av/cco/action/test/utest/src/dataplane_stub.c
new file mode 100644
index 0000000000..b350d9c457
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/dataplane_stub.c
@@ -0,0 +1,50 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/dataplane_stub.c
+ * \brief Data plane layers stub.
+ * \ingroup test
+ */
+#include "common/std.h"
+
+#include "lib/scenario/scenario.h"
+
+#include "cl/cl_mactotei.h"
+#include "mac/pbproc/pbproc.h"
+#include "cp/inc/context.h"
+#include "mac/sar/inc/context.h"
+
+void
+sar_activate (sar_t *ctx, bool flag)
+{
+}
+
+void
+sar_cleanup (sar_t *ctx)
+{
+}
+
+void
+sar_sta_remove (sar_t *ctx, u8 tei)
+{
+ dbg_assert (ctx);
+
+ if (MAC_TEI_IS_STA (tei))
+ {
+ bool ok;
+ ok = mac_store_sta_remove (ctx->mac_store, tei);
+
+ dbg_assert (ok);
+ }
+}
+
+void
+pbproc_activate (pbproc_t *ctx, bool flag)
+{
+}
+
diff --git a/cesar/cp/av/cco/action/test/utest/src/discover_list.c b/cesar/cp/av/cco/action/test/utest/src/discover_list.c
new file mode 100644
index 0000000000..c1fcc60e43
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/discover_list.c
@@ -0,0 +1,56 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2010 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/discover_list.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "lib/scenario/scenario.h"
+#include "inc/test_cco_action.h"
+#include "cp/cco/action/cco_action.h"
+
+void
+cc_discover_list_test_suite (test_t t)
+{
+ test_suite_begin (t, "CC_DISCOVER_LIST");
+ cp_sta_t *sta;
+ cp_net_t *net;
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+ scenario_globals_t globals = {
+ .cp = &ctx.cp,
+ };
+ cp_mme_tx_t mme_to_send;
+ globals.mme = &mme_to_send;
+ test_case_begin (t, "Send CC_DISCOVER_LIST.REQ");
+ /* Add the station to send the request. */
+ test_cco_action_create_our_net (&ctx, 1, 1);
+ net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ sta = cp_sta_mgr_sta_add (&ctx.cp, net, 4, 4);
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+ sta->cco_cap = CP_CCO_LEVEL;
+ scenario_entry_t entries[] = {
+ SCENARIO_ACTION (cco__cc_discover_list_req,
+ .net = net,
+ .sta = sta),
+ SCENARIO_EVENT (cp_msg_cc_discover_list_req_send,
+ .peer = CP_MME_PEER (4, 4)),
+ SCENARIO_END
+ };
+ test_begin (t, "Discover list.")
+ {
+ scenario_run (t, entries, &globals);
+ }
+ test_end;
+ slab_release (sta);
+ test_cco_action_uninit (&ctx);
+}
diff --git a/cesar/cp/av/cco/action/test/utest/src/fsm_stub.c b/cesar/cp/av/cco/action/test/utest/src/fsm_stub.c
new file mode 100644
index 0000000000..c453b3bf30
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/fsm_stub.c
@@ -0,0 +1,60 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/fsm_stub.c
+ * \brief FSM stub.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "cp/fsm/fsm.h"
+
+#include "lib/scenario/scenario.h"
+
+cp_fsm_event_t *
+cp_fsm_event_bare_new (cp_t *ctx, cp_fsm_event_type_t type)
+{
+ dbg_assert (ctx);
+ switch (type)
+ {
+ case CP_FSM_EVENT_TYPE_net_list_empty:
+ case CP_FSM_EVENT_TYPE_ustt_timeout:
+ case CP_FSM_EVENT_TYPE_btt_timeout:
+ case CP_FSM_EVENT_TYPE_join_timeout:
+ case CP_FSM_EVENT_TYPE_assoc_timeout:
+ case CP_FSM_EVENT_TYPE_renew:
+ /* Ignore. */
+ return INVALID_PTR;
+ case CP_FSM_EVENT_TYPE_sta_status_changed:
+ if (!scenario.current ||
+ (scenario.current->params.event_cp_fsm_event_bare_new.type != type))
+ return INVALID_PTR;
+
+ default:
+ ;
+ }
+ scenario_event (cp_fsm_event_bare_new, param);
+ test_fail_unless (type == param->type);
+ return INVALID_PTR;
+}
+
+cp_fsm_event_t *
+cp_fsm_event_mme_new (cp_t *ctx, cp_fsm_event_type_t type, cp_mme_rx_t *mme)
+{
+ dbg_assert (ctx);
+ scenario_event (cp_fsm_event_mme_new, param);
+ test_fail_unless (type == param->type);
+ return INVALID_PTR;
+}
+
+void
+cp_fsm_branch_ (cp_t *ctx, cp_fsm_branch_t branch)
+{
+ dbg_assert (ctx);
+ scenario_event (cp_fsm_branch, param);
+ test_fail_unless (branch == param->branch);
+}
diff --git a/cesar/cp/av/cco/action/test/utest/src/garbage.c b/cesar/cp/av/cco/action/test/utest/src/garbage.c
new file mode 100644
index 0000000000..89ee81d964
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/garbage.c
@@ -0,0 +1,183 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2011 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/garbage.c
+ * \brief test garbage functionalities.
+ * \ingroup cp_cco_action
+ */
+#include "common/std.h"
+#include "inc/test_cco_action.h"
+#include "lib/test.h"
+#include "lib/scenario/scenario.h"
+
+/**
+ * A single STA is present in the net and it had expired.
+ * \param t the test context.
+ * \param ctx the context of the cco_action test.
+ */
+void
+test_case_garbage_single_sta_expired (test_t t, test_cco_action_t *ctx)
+{
+ scenario_globals_t globals = {
+ .cp = &ctx->cp,
+ };
+ cp_mme_tx_t mme_to_send;
+ globals.mme = &mme_to_send;
+ /* The station should be removed from the station manager and go to the
+ * release list. The CCo must send to a CC_LEAVE.IND to the station
+ * and post a cco_all_sta_leaved event. */
+ scenario_entry_t release_sta[] = {
+ SCENARIO_ACTION (garbage),
+ SCENARIO_EVENT (cp_msg_cc_leave_ind_send,
+ .peer = CP_MME_PEER (1, 1),
+ .reason =
+ CP_MSG_CC_LEAVE_IND_REASON_TEI_LEASE_EXPIRED,
+ .nid = cp_sta_own_data_get_nid (&ctx->cp)),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_begin,
+ .peer = CP_MME_PEER_ALL_STA,
+ .mode = CP_MSG_CC_SET_TEI_MAP_IND_MODE_DELETE,
+ .sta_nb = 1),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_sta,
+ .tei = 1, .mac = 1, .status =
+ CP_MSG_CC_SET_TEI_MAP_IND_STATUS_ASSOCIATED),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_end),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco__all_sta_leaved),
+ SCENARIO_END
+ };
+ scenario_run (t, release_sta, &globals);
+}
+/**
+ * Two station are present in the NET and one had expired.
+ * \param t the test context.
+ * \param ctx the context of the cco_action test.
+ * \param sta the expired station.
+ */
+void
+test_case_garbage_two_sta_single_sta_expired (
+ test_t t, test_cco_action_t *ctx, cp_sta_t *sta)
+{
+ scenario_globals_t globals = {
+ .cp = &ctx->cp,
+ };
+ cp_mme_tx_t mme_to_send;
+ globals.mme = &mme_to_send;
+ scenario_entry_t release_sta2[] = {
+ SCENARIO_ACTION (garbage),
+ SCENARIO_EVENT (cp_msg_cc_leave_ind_send,
+ .peer = CP_MME_PEER (1, 1),
+ .reason =
+ CP_MSG_CC_LEAVE_IND_REASON_TEI_LEASE_EXPIRED,
+ .nid = cp_sta_own_data_get_nid (&ctx->cp)),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_begin,
+ .peer = CP_MME_PEER_ALL_STA,
+ .mode = CP_MSG_CC_SET_TEI_MAP_IND_MODE_DELETE,
+ .sta_nb = 1),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_sta,
+ .tei = 1, .mac = 1, .status =
+ CP_MSG_CC_SET_TEI_MAP_IND_STATUS_ASSOCIATED),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_end),
+ SCENARIO_ACTION (cco_sta_leave_send_tei_map, .sta = sta),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_begin,
+ .peer = CP_MME_PEER_ALL_STA,
+ .mode = CP_MSG_CC_SET_TEI_MAP_IND_MODE_DELETE,
+ .sta_nb = 1),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_sta,
+ .tei = 1, .mac = 1,
+ .status =
+ CP_MSG_CC_SET_TEI_MAP_IND_STATUS_ASSOCIATED),
+ SCENARIO_EVENT (cp_msg_cc_set_tei_map_ind_send_end),
+ SCENARIO_END
+ };
+ scenario_run (t, release_sta2, &globals);
+}
+
+void
+test_case_garbage_tei_lease_expire (test_t t)
+{
+ test_case_begin (t, "TEI lease expiration");
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+ test_cco_action_create_our_net (&ctx, 1, 1);
+ cp_net_t *our_net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ test_begin (t, "A station alone")
+ {
+ cp_sta_t *sta = cp_sta_mgr_sta_add (&ctx.cp, our_net, 1, 1);
+ sta->tei_lease_date_ms =
+ cp_sta_core_get_date_ms (&ctx.cp) -
+ MAC_SEC_TO_MS(CP_LEASE_ASSOC_MIN * 60);
+ test_case_garbage_single_sta_expired (t, &ctx);
+ slab_release (sta);
+ }
+ test_end;
+ test_cco_action_reset (&ctx);
+ test_cco_action_create_our_net (&ctx, 1, 1);
+ our_net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ /* Same thing with two station, one expire, the other no. */
+ test_begin (t, "Two stations, 1 expired")
+ {
+ cp_sta_t *sta = cp_sta_mgr_sta_add (&ctx.cp, our_net, 2, 2);
+ slab_release (sta);
+ sta = cp_sta_mgr_sta_add (&ctx.cp, our_net, 1, 1);
+ sta->tei_lease_date_ms =
+ cp_sta_core_get_date_ms (&ctx.cp) -
+ MAC_SEC_TO_MS(CP_LEASE_ASSOC_MIN * 60);
+ test_case_garbage_two_sta_single_sta_expired (t, &ctx, sta);
+ slab_release (sta);
+ }
+ test_end;
+ test_cco_action_uninit (&ctx);
+}
+
+void
+test_case_garbage_sta_expired (test_t t)
+{
+ test_case_begin (t, "Station expiration date expired");
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+ test_cco_action_create_our_net (&ctx, 1, 1);
+ cp_net_t *our_net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ test_begin (t, "A station alone")
+ {
+ cp_sta_t *sta = cp_sta_mgr_sta_add (&ctx.cp, our_net, 1, 1);
+ sta->expired_date_ms =
+ cp_sta_core_get_date_ms (&ctx.cp) -
+ HPAV_DISCOVERED_LIST_EXPIRE_TIME_MS;
+ test_case_garbage_single_sta_expired (t, &ctx);
+ slab_release (sta);
+ }
+ test_end;
+ test_cco_action_reset (&ctx);
+ test_cco_action_create_our_net (&ctx, 1, 1);
+ our_net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ /* Same thing with two station, one expire, the other no. */
+ test_begin (t, "Two stations, 1 expired")
+ {
+ cp_sta_t *sta = cp_sta_mgr_sta_add (&ctx.cp, our_net, 2, 2);
+ slab_release (sta);
+ sta = cp_sta_mgr_sta_add (&ctx.cp, our_net, 1, 1);
+ sta->expired_date_ms =
+ cp_sta_core_get_date_ms (&ctx.cp) -
+ HPAV_DISCOVERED_LIST_EXPIRE_TIME_MS;
+ test_case_garbage_two_sta_single_sta_expired (t, &ctx, sta);
+ slab_release (sta);
+ }
+ test_end;
+ test_cco_action_uninit (&ctx);
+}
+
+void
+gargabe_test_suite (test_t t)
+{
+ test_suite_begin (t, "Garbage test suite");
+ test_case_garbage_tei_lease_expire (t);
+ test_case_garbage_sta_expired (t);
+}
+
diff --git a/cesar/cp/av/cco/action/test/utest/src/handover.c b/cesar/cp/av/cco/action/test/utest/src/handover.c
new file mode 100644
index 0000000000..29361c3379
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/handover.c
@@ -0,0 +1,456 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/handover.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "lib/scenario/scenario.h"
+#include "inc/test_cco_action.h"
+#include "cp/cco/action/cco_action.h"
+#include "cp/av/cco/action/cco_action.h"
+
+
+void
+handover__handover_start (test_t test)
+{
+ cp_sta_t *sta;
+ cp_net_t *net;
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+ scenario_globals_t globals = {
+ .cp = &ctx.cp,
+ };
+ cp_mme_tx_t mme_to_send;
+ globals.mme = &mme_to_send;
+ test_case_begin (test, "Handover_discover_done");
+ scenario_entry_t handover_entries[] = {
+ SCENARIO_ACTION (handover__discover_done),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (
+ CCO, HANDOVER_DISCOVER_PROCESS_DONE, no_sta)),
+ SCENARIO_END
+ };
+ /* Add some station to realise a better test. */
+ test_cco_action_create_our_net (&ctx, 1, 1);
+ net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ sta = cp_sta_mgr_sta_add (&ctx.cp, net, 4, 4);
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+ sta->cco_cap = CP_CCO_LEVEL;
+ test_begin (test, "Discover process ended.")
+ {
+ ctx.cp.handover.reason =
+ CP_HANDOVER_REASON_CCO_SELECTION;
+ scenario_run (test, handover_entries, &globals);
+ }
+ test_end;
+ /* Change CCo level of the station. */
+ sta->cco_cap = 1;
+ scenario_entry_t handover_entries2[] = {
+ SCENARIO_ACTION (handover__discover_done),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (
+ CCO, HANDOVER_DISCOVER_PROCESS_DONE, sta)),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_CCO_HANDOVER_START),
+ SCENARIO_END
+ };
+ test_begin (test, "Discover process ended, start handover.")
+ {
+ ctx.cp.handover.reason =
+ CP_HANDOVER_REASON_CCO_SELECTION;
+ scenario_run (test, handover_entries2, &globals);
+ }
+ test_end;
+ cp_av_cco_action_cco_selection__clear (&ctx.cp);
+ slab_release (sta);
+ test_cco_action_uninit (&ctx);
+}
+
+void
+handover__handover_cc_handover_cnf_receive (test_t test)
+{
+ cp_sta_t *sta;
+ cp_net_t *net;
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+ ctx.cp.handover.reason = CP_HANDOVER_REASON_CCO_SELECTION;
+
+
+ scenario_globals_t globals = {
+ .cp = &ctx.cp,
+ };
+
+ cp_mme_tx_t mme_to_send;
+ globals.mme = &mme_to_send;
+
+ test_case_begin (test, "Handover_cnf_receive");
+
+ scenario_entry_t handover_entries[] = {
+ SCENARIO_ACTION (handover__cc_handover_cnf_receive, .peer = CP_MME_PEER (3, 3)),
+ SCENARIO_EVENT (cp_msg_cc_handover_cnf_receive,
+ .ok = true,
+ .result =
+ CP_MSG_CC_HANDOVER_CNF_RESULT_REJECT_ANY_HANDOVER),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (CCO_HANDOVER_WAIT_CC_HANDOVER_CNF,
+ CC_HANDOVER_CNF,
+ no_more_sta)),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_HANDOVER_FAILURE),
+ SCENARIO_ACTION (handover__cc_handover_cnf_receive, .peer = CP_MME_PEER (3, 3)),
+ SCENARIO_EVENT (cp_msg_cc_handover_cnf_receive,
+ .ok = true,
+ .result =
+ CP_MSG_CC_HANDOVER_CNF_RESULT_ACCEPT),
+ SCENARIO_EVENT (cp_msg_cc_handover_info_ind_send_begin,
+ .peer = CP_MME_PEER (3, 3),
+ .rsc = CP_HANDOVER_REASON_CCO_SELECTION,
+ .bcco = MAC_TEI_UNASSOCIATED,
+ .num_sta = 2),
+ SCENARIO_EVENT (cp_msg_cc_handover_info_ind_send,
+ .tei = 1,
+ .mac_addr = 1,
+ .status = 0x1,
+ .ptei = MAC_TEI_UNASSOCIATED),
+ SCENARIO_EVENT (cp_msg_cc_handover_info_ind_send,
+ .tei = 4,
+ .mac_addr = 4,
+ .status = 0x1,
+ .ptei = MAC_TEI_UNASSOCIATED),
+ SCENARIO_EVENT (cp_msg_cc_handover_info_ind_send_end),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_HANDOVER_TIMEOUT),
+ SCENARIO_END
+ };
+
+ scenario_entry_t handover_entries2[] = {
+ SCENARIO_ACTION (handover__cc_handover_cnf_receive, .peer = CP_MME_PEER (3, 3)),
+ SCENARIO_EVENT (cp_msg_cc_handover_cnf_receive,
+ .ok = true,
+ .result =
+ CP_MSG_CC_HANDOVER_CNF_RESULT_REJECT_ANY_HANDOVER),
+ SCENARIO_EVENT (cp_msg_cc_handover_req_send,
+ .peer = CP_MME_PEER (2, 2),
+ .soft_hard = CP_MSG_CC_HANDOVER_REQ_HANDOVER_HARD,
+ .reason = CP_MSG_CC_HANDOVER_REQ_REASON_CCO_SELECTION
+ ),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_HANDOVER_TIMEOUT),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (CCO_HANDOVER_WAIT_CC_HANDOVER_CNF,
+ CC_HANDOVER_CNF,
+ another_sta)),
+ SCENARIO_END
+ };
+
+ /* Add some station to realise a better test. */
+ test_cco_action_create_our_net (&ctx, 1, 1);
+ net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ sta = cp_sta_mgr_sta_add (&ctx.cp, net, 4, 4);
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+ slab_release (sta);
+ /* Create the new CCo. */
+ cp_sta_t *new_cco = cp_sta_mgr_sta_add (&ctx.cp, net, 3, 3);
+ cp_sta_set_authenticated (&ctx.cp, new_cco, true);
+ /* Add the new CCo to the CCO selection heap. */
+ cp_av_cco_action_cco_selection__mac_stop_sta_add (&ctx.cp, new_cco);
+
+ test_begin (test, "HANDOVER_CNF received - No more stations available")
+ {
+ ctx.cp.handover.reason =
+ CP_HANDOVER_REASON_CCO_SELECTION;
+ scenario_run (test, handover_entries, &globals);
+ cp_av_cco_action_cco_selection__clear (&ctx.cp);
+ }
+ test_end;
+ cp_sta_mgr_sta_remove (&ctx.cp, new_cco);
+ slab_release (new_cco);
+
+ sta = cp_sta_mgr_sta_add (&ctx.cp, net, 2, 2);
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+ sta->cco_cap = 1;
+ cp_av_cco_action_cco_selection__sta_add (&ctx.cp, net, sta);
+ slab_release (sta);
+
+ test_begin (test, "HANDOVER_CNF received - More stations available")
+ {
+ scenario_run (test, handover_entries2, &globals);
+ }
+ test_end;
+
+ cp_cco_action_uninit (&ctx.cp);
+ test_cco_action_uninit (&ctx);
+
+ mac_store_uninit (ctx.cp.mac_store);
+}
+
+void
+handover__timeout (test_t test)
+{
+ cp_net_t *net;
+ cp_sta_t *sta;
+
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+
+
+ scenario_globals_t globals = {
+ .cp = &ctx.cp,
+ };
+
+ cp_mme_tx_t mme_to_send;
+ globals.mme = &mme_to_send;
+ ctx.cp.handover.reason = CP_HANDOVER_REASON_CCO_SELECTION;
+
+ test_case_begin (test, "Handover Timeout");
+
+ scenario_entry_t handover_entries[] = {
+ SCENARIO_ACTION (handover__timeout_cc_handover_cnf),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (CCO_HANDOVER_WAIT_CC_HANDOVER_CNF,
+ HANDOVER_TIMEOUT,
+ no_more_sta)),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_HANDOVER_FAILURE),
+ SCENARIO_END
+ };
+
+ scenario_entry_t handover_entries2[] = {
+ SCENARIO_ACTION (handover__timeout_cc_handover_cnf),
+ SCENARIO_EVENT (cp_msg_cc_handover_req_send,
+ .peer = CP_MME_PEER (4, 4),
+ .soft_hard = CP_MSG_CC_HANDOVER_REQ_HANDOVER_HARD,
+ .reason =
+ CP_MSG_CC_HANDOVER_REQ_REASON_CCO_SELECTION),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_HANDOVER_TIMEOUT),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (CCO_HANDOVER_WAIT_CC_HANDOVER_CNF,
+ HANDOVER_TIMEOUT,
+ another_sta)),
+ SCENARIO_END
+ };
+
+ test_begin (test, "Timeout - No More stations available")
+ {
+ /* Add some station to realise a better test. */
+ test_cco_action_create_our_net (&ctx, 1, 1);
+ net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ sta = cp_sta_mgr_sta_add (&ctx.cp, net, 4, 4);
+ sta->cco_cap = 1;
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+ cp_av_cco_action_cco_selection__sta_add (&ctx.cp, net, sta);
+ slab_release (sta);
+
+ scenario_run (test, handover_entries, &globals);
+ }
+ test_end;
+
+ test_begin (test, "Timeout - Another station")
+ {
+ /* Add some station to realise a better test. */
+ sta = cp_sta_mgr_sta_add (&ctx.cp, net, 4, 4);
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+ sta->cco_cap = 1;
+ cp_av_cco_action_cco_selection__sta_add (&ctx.cp, net, sta);
+ slab_release (sta);
+ sta = cp_sta_mgr_sta_add (&ctx.cp, net, 3, 3);
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+ sta->cco_cap = 1;
+ cp_av_cco_action_cco_selection__sta_add (&ctx.cp, net, sta);
+ slab_release (sta);
+
+ scenario_run (test, handover_entries2, &globals);
+ }
+ test_end;
+
+ cp_cco_action_uninit (&ctx.cp);
+ test_cco_action_uninit (&ctx);
+}
+
+void
+handover__handover_cc_handover_info_rsp_receive (test_t test)
+{
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+
+
+ scenario_globals_t globals = {
+ .cp = &ctx.cp,
+ };
+
+ cp_mme_tx_t mme_to_send;
+ globals.mme = &mme_to_send;
+ ctx.cp.handover.reason = CP_HANDOVER_REASON_CCO_SELECTION;
+
+ test_case_begin (test, "Handover_info_rsp_receive");
+
+ scenario_entry_t handover_entries[] = {
+ SCENARIO_ACTION (handover__cc_handover_info_rsp_receive, .peer = CP_MME_PEER (3, 3)),
+ SCENARIO_EVENT (cp_msg_cc_handover_info_rsp_receive,
+ .ok = true),
+ SCENARIO_EVENT (cp_av_beacon_handover, .tei = 3),
+ SCENARIO_END
+ };
+
+ test_begin (test, "HANDOVER Info response receive")
+ {
+ ctx.cp.handover.reason =
+ CP_MSG_CC_HANDOVER_REQ_REASON_CCO_SELECTION;
+ scenario_run (test, handover_entries, &globals);
+ }
+ test_end;
+
+ cp_cco_action_uninit (&ctx.cp);
+ test_cco_action_uninit (&ctx);
+}
+
+void
+handover__hoip_countdown_expired (test_t test)
+{
+ test_case_begin (test, "Handover in progress done");
+
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+ ctx.cp.handover.reason = CP_HANDOVER_REASON_CCO_SELECTION;
+
+ scenario_globals_t globals = {
+ .cp = &ctx.cp,
+ };
+
+ test_cco_action_create_our_net (&ctx, 1, 1);
+ ctx.cp.handover.reason = CP_HANDOVER_REASON_CCO_SELECTION;
+
+ scenario_entry_t handover_entries[] = {
+ SCENARIO_ACTION (handover__hoip_countdown_expired),
+ SCENARIO_EVENT (cp_av_beacon_discover_uninit),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_become_sta),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_HANDOVER_SUCCESS),
+ SCENARIO_END
+ };
+
+ test_begin (test, "HANDOVER Ended")
+ {
+ ctx.cp.handover.reason =
+ CP_MSG_CC_HANDOVER_REQ_REASON_CCO_SELECTION;
+ scenario_run (test, handover_entries, &globals);
+
+ test_fail_unless (MAC_TEI_IS_STA(cp_sta_own_data_get_tei (&ctx.cp)));
+ test_fail_unless (cp_sta_own_data_get_cco_status (&ctx.cp) == false);
+ }
+ test_end;
+
+ cp_cco_action_uninit (&ctx.cp);
+ test_cco_action_uninit (&ctx);
+}
+
+
+void
+handover__cco_leave (test_t test)
+{
+ test_case_begin (test, "Handover CCo leaving");
+
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+ ctx.cp.handover.reason = CP_HANDOVER_REASON_CCO_LEAVING;
+
+ scenario_globals_t globals = {
+ .cp = &ctx.cp,
+ };
+
+ test_cco_action_create_our_net (&ctx, 1, 1);
+
+ scenario_entry_t net_empty[] = {
+ SCENARIO_ACTION (drv_mac_stop),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco__all_sta_leaved),
+ SCENARIO_END
+ };
+
+ test_begin (test, "Net empty")
+ {
+ scenario_run (test, net_empty, &globals);
+ test_fail_unless (cp_sta_mgr_net_list_is_empty (&ctx.cp));
+ }
+ test_end;
+
+
+ scenario_entry_t handover[] = {
+ SCENARIO_ACTION (drv_mac_stop),
+ SCENARIO_EVENT(cp_fsm_event_bare_new, .type =
+ CP_FSM_EVENT_TYPE_CCO_HANDOVER_START),
+ SCENARIO_EVENT(cp_fsm_event_bare_new, .type =
+ CP_FSM_EVENT_TYPE_CCO_LEAVING_HANDOVER),
+ SCENARIO_END
+ };
+
+ test_begin (test, "Handover start")
+ {
+ cp_sta_t *sta;
+ cp_net_t *net;
+
+ net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ sta = cp_sta_mgr_sta_add (&ctx.cp, net, 2, 2);
+ slab_release (sta);
+ scenario_run (test, handover, &globals);
+ }
+ test_end;
+
+ scenario_entry_t handover_ended [] = {
+ SCENARIO_ACTION (handover__ended),
+ SCENARIO_EVENT (cp_av_beacon_discover_uninit),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_assoc_become_sta),
+ SCENARIO_END
+ };
+
+ test_begin (test, "Handover ended")
+ {
+ scenario_run (test, handover_ended, &globals);
+ }
+ test_end;
+
+ cp_cco_action_uninit (&ctx.cp);
+ test_cco_action_uninit (&ctx);
+}
+
+void
+handover_test_cases (test_t test)
+{
+ handover__handover_start (test);
+ handover__handover_cc_handover_cnf_receive (test);
+ handover__timeout (test);
+ handover__handover_cc_handover_info_rsp_receive (test);
+ handover__hoip_countdown_expired (test);
+ handover__cco_leave (test);
+}
+
+void
+handover_test_suite (test_t t)
+{
+ test_suite_begin (t, "handover");
+ handover_test_cases (t);
+ test_case_begin (t, "memory");
+ test_begin (t, "memory")
+ {
+ test_fail_unless (blk_check_memory ());
+ } test_end;
+}
diff --git a/cesar/cp/av/cco/action/test/utest/src/msg_stub.c b/cesar/cp/av/cco/action/test/utest/src/msg_stub.c
new file mode 100644
index 0000000000..b6e593005c
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/msg_stub.c
@@ -0,0 +1,311 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/msg_stub.c
+ * \brief cp/msg module stub.
+ * \ingroup test
+ */
+#include "common/std.h"
+
+#include "lib/scenario/scenario.h"
+
+#include "cp/inc/context.h"
+#include "cp/msg/msg.h"
+#include "hal/phy/defs.h"
+
+#include <string.h>
+
+#define __ptr_(TYPE) PASTE_EXPAND (__ptr__, TYPE)
+#define __ptr__assign *
+#define __ptr__string
+#define __ptr__string_or_null
+#define __ptr__tonemask
+#define __ptr__hash_key
+
+/* Code for MME transmission. */
+#define __ms(EVENT, PARAMS...) \
+void \
+EVENT (cp_t *ctx, cp_mme_peer_t *peer \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __ms_pdecl_, ## PARAMS)) \
+{ \
+ dbg_assert (ctx); \
+ dbg_assert (peer); \
+ scenario_event (EVENT, param); \
+ __ms_test_peer \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __ms_test_, ## PARAMS) \
+}
+
+/* Code for MME transmission complex with a begin. */
+#define __mscb(EVENT, PARAMS...) \
+cp_mme_tx_t * \
+EVENT (cp_t *ctx, cp_mme_peer_t *peer \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __ms_pdecl_, ## PARAMS)) \
+{ \
+ dbg_assert (ctx); \
+ dbg_assert (peer); \
+ scenario_event (EVENT, param, global); \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __ms_test_, ## PARAMS) \
+ return global->mme; \
+}
+
+/* Code for MME transmission complex (with or without an end). */
+#define __msc(EVENT, PARAMS...) \
+void \
+EVENT (cp_t *ctx, cp_mme_tx_t *mme \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __ms_pdecl_, ## PARAMS)) \
+{ \
+ dbg_assert (ctx); \
+ dbg_assert (mme); \
+ scenario_event (EVENT, param); \
+ test_fail_unless (param); \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __ms_test_, ## PARAMS) \
+}
+
+#define __ms_pdecl_(TYPE, PARAM, KIND) , TYPE PARAM
+#define __ms_test_(TYPE, PARAM, KIND) \
+ PASTE_EXPAND (__ms_test__, KIND) (PARAM)
+#define __ms_test__assign(PARAM) \
+ test_fail_unless (PARAM == param->PARAM);
+#define __ms_test__string(PARAM) \
+ test_fail_unless (strcmp (PARAM, param->PARAM) == 0);
+#define __ms_test_peer \
+ test_fail_unless (peer->mac == param->peer.mac); \
+ test_fail_unless (peer->eth_type == param->peer.eth_type); \
+ test_fail_unless (peer->vlan_tci == param->peer.vlan_tci); \
+ test_fail_unless (peer->tei == param->peer.tei); \
+
+/* Code for MME transmission with a data structure. */
+#define __msd(EVENT, DATA, PARAMS...) \
+void \
+EVENT (cp_t *ctx, cp_mme_peer_t *peer, const DATA *data) \
+{ \
+ dbg_assert (ctx); \
+ dbg_assert (peer); \
+ dbg_assert (data); \
+ scenario_event (EVENT, param); \
+ __ms_test_peer \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __msd_test_, ## PARAMS) \
+}
+
+#define __msd_test_(TYPE, PARAM, KIND) \
+ PASTE_EXPAND (__msd_test__, KIND) (PARAM)
+#define __msd_test__assign(PARAM) \
+ test_fail_unless (data->PARAM == param->PARAM);
+#define __msd_test__string(PARAM) \
+ test_fail_unless (strcmp (data->PARAM, param->PARAM) == 0);
+#define __msd_test__hash_key(PARAM) \
+ test_fail_unless (!param->PARAM || memcmp (data->PARAM, param->PARAM, \
+ CP_HASH_KEY_SIZE) == 0);
+#define __msd_test__key(PARAM) \
+ test_fail_unless (memcmp (&data->PARAM, &param->PARAM, \
+ sizeof (cp_key_t)) == 0);
+
+/* Code for MME transmission with a data structure with encryption
+ * information. */
+#define __msk(EVENT, DATA, PARAMS...) \
+void \
+EVENT (cp_t *ctx, cp_mme_peer_t *peer, cp_mme_peks_t peks, \
+ const cp_secu_protocol_run_t *prun, const DATA *data) \
+{ \
+ dbg_assert (ctx); \
+ dbg_assert (peer); \
+ dbg_assert (data); \
+ scenario_event (EVENT, param, global); \
+ __ms_test_peer \
+ test_fail_unless (peks == param->peks); \
+ test_fail_unless (prun->pid == param->pid); \
+ test_fail_unless (prun->pmn == param->pmn); \
+ global->prn = prun->prn; \
+ global->my_nonce = prun->my_nonce; \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __msd_test_, ## PARAMS) \
+}
+
+/* Code for MME transmission for CC_RELAY.IND. */
+#define __msr(EVENT, PARAMS...) \
+void \
+EVENT (cp_t *ctx, cp_mme_rx_t *mme \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __ms_pdecl_, ## PARAMS)) \
+{ \
+ dbg_assert (ctx); \
+ dbg_assert (mme); \
+ scenario_event (EVENT, param); \
+ test_fail_unless (mme->relay.mac_fa == param->mac_fa); \
+ test_fail_unless (mme->relay.ftei == param->ftei); \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __ms_test_, ## PARAMS) \
+}
+
+
+/* Code for MME reception. */
+#define __mr(EVENT, PARAMS...) \
+bool \
+EVENT (cp_t *ctx, cp_mme_rx_t *mme \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __mr_pdecl_, ## PARAMS)) \
+{ \
+ dbg_assert (ctx); \
+ dbg_assert (mme); \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __mr_assert_, ## PARAMS) \
+ scenario_event (EVENT, param); \
+ if (param->ok) \
+ { \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __mr_copy_, ## PARAMS) \
+ return true; \
+ } \
+ else \
+ return false; \
+}
+
+#define __mr_pdecl_(TYPE, PARAM, KIND) , TYPE __ptr_ (KIND) PARAM
+#define __mr_assert_(TYPE, PARAM, KIND) dbg_assert_ptr (PARAM);
+#define __mr_copy_(TYPE, PARAM, KIND) PASTE_EXPAND (__mr_copy__, KIND) (PARAM)
+
+#define __mr_copy__assign(PARAM) *PARAM = param->PARAM;
+#define __mr_copy__string(PARAM) strcpy (PARAM, param->PARAM);
+#define __mr_copy__string_or_null(PARAM) \
+ if (param->PARAM) strcpy (PARAM, param->PARAM);
+#define __mr_copy__tonemask(PARAM) \
+ memcpy (PARAM, param->PARAM, PHY_TONEMASK_SIZE);
+
+/* Code for MME reception with a data structure. */
+#define __mrd(EVENT, DATA, PARAMS...) \
+bool \
+EVENT (cp_t *ctx, cp_mme_rx_t *mme, DATA *data) \
+{ \
+ dbg_assert (ctx); \
+ dbg_assert (mme); \
+ dbg_assert (data); \
+ scenario_event (EVENT, param); \
+ if (param->ok) \
+ { \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __mrd_copy_, PARAMS) \
+ return true; \
+ } \
+ else \
+ return false; \
+}
+
+#define __mrd_copy_(TYPE, PARAM, KIND) \
+ PASTE_EXPAND (__mrd_copy__, KIND) (PARAM)
+
+#define __mrd_copy__assign(PARAM) data->PARAM = param->PARAM;
+#define __mrd_copy__string(PARAM) strcpy (data->PARAM, param->PARAM);
+#define __mrd_copy__tonemask(PARAM) \
+ memcpy (data->PARAM, param->PARAM, PHY_TONEMASK_SIZE);
+#define __mrd_copy__hash_key(PARAM) \
+ if (param->PARAM) memcpy (data->PARAM, param->PARAM, CP_HASH_KEY_SIZE);
+#define __mrd_copy__assign_deref(PARAM) \
+ if (param->PARAM) data->PARAM = *param->PARAM;
+
+/* Code for MME reception with a data structure with encryption
+ * information. */
+#define __mrk(EVENT, DATA, PARAMS...) \
+bool \
+EVENT (cp_t *ctx, cp_mme_rx_t *mme, DATA *data) \
+{ \
+ dbg_assert (ctx); \
+ dbg_assert (mme); \
+ dbg_assert (data); \
+ scenario_event (EVENT, param, g); \
+ if (param->ok) \
+ { \
+ mme->peks = param->peks; \
+ if (param->new_prn) g->prn = lib_rnd32 (&ctx->rnd) & 0xffff; \
+ if (param->new_my_nonce) g->my_nonce = lib_rnd32 (&ctx->rnd); \
+ if (param->new_your_nonce) g->your_nonce = lib_rnd32 (&ctx->rnd); \
+ mme->prun.pid = param->pid; \
+ mme->prun.pmn = param->pmn; \
+ mme->prun.prn = g->prn; \
+ mme->prun.my_nonce = g->my_nonce; \
+ mme->prun.your_nonce = g->your_nonce; \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __mrd_copy_, PARAMS) \
+ return true; \
+ } \
+ else \
+ return false; \
+}
+
+/* Code for MME reception for CC_RELAY.REQ. */
+#define __mrr(EVENT, PARAMS...) \
+bool \
+EVENT (cp_t *ctx, cp_mme_rx_t *mme \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __mr_pdecl_, ## PARAMS)) \
+{ \
+ dbg_assert (ctx); \
+ dbg_assert (mme); \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __mr_assert_, ## PARAMS) \
+ scenario_event (EVENT, param); \
+ if (param->ok) \
+ { \
+ mme->relay.mac_fa = param->mac_fa; \
+ mme->relay.ftei = param->ftei; \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, __mr_copy_, ## PARAMS) \
+ return true; \
+ } \
+ else \
+ return false; \
+}
+
+__mr (cp_msg_cc_handover_cnf_receive,
+ (cp_msg_cc_handover_cnf_result_t, result, assign))
+__mscb (cp_msg_cc_handover_info_ind_send_begin,
+ (cp_msg_cc_handover_info_ind_rsc_t, rsc, assign),
+ (cp_tei_t, bcco, assign),
+ (uint, num_sta, assign))
+__msc (cp_msg_cc_handover_info_ind_send,
+ (cp_tei_t, tei, assign),
+ (mac_t, mac_addr, assign),
+ (uint, status, assign),
+ (cp_tei_t, ptei, assign))
+__msc (cp_msg_cc_handover_info_ind_send_end)
+__ms (cp_msg_cc_handover_req_send,
+ (cp_msg_cc_handover_req_soft_hard_t, soft_hard, assign),
+ (cp_msg_cc_handover_req_reason_t, reason, assign))
+__mr (cp_msg_cc_handover_info_rsp_receive)
+__msk (cp_msg_cm_set_key_req_send,
+ cp_msg_cm_set_key_req_t,
+ (enum cp_msg_key_type_t, key_type, assign),
+ (u8, cco_cap, assign),
+ (cp_nid_t, nid, assign),
+ (u8, new_eks, assign),
+ (cp_key_t, new_key, key))
+__mrk (cp_msg_cm_set_key_cnf_receive, cp_msg_cm_set_key_cnf_t,
+ (enum cp_msg_cm_set_key_cnf_result_t, result, assign),
+ (u8, cco_cap, assign))
+__mrk (cp_msg_cm_get_key_req_receive, cp_msg_cm_get_key_req_t,
+ (bool, relayed, assign),
+ (enum cp_msg_key_type_t, key_type, assign),
+ (cp_nid_t, nid, assign),
+ (u32 *, hash_key, hash_key))
+__ms (cp_msg_cc_discover_list_req_send)
+__mrd (cp_msg_cc_assoc_req_receive, cp_msg_cc_assoc_req_t,
+ (enum cp_msg_cc_assoc_req_type_t, request_type, assign),
+ (cp_nid_t, nid, assign),
+ (u8, cco_cap, assign),
+ (u8, proxy_cap, assign))
+__msd (cp_msg_cc_assoc_cnf_send, cp_msg_cc_assoc_cnf_t,
+ (enum cp_msg_cc_assoc_cnf_result_t, result, assign),
+ (cp_nid_t, nid, assign),
+ (cp_snid_t, snid, assign),
+ (cp_tei_t, sta_tei, assign),
+ (u16, lease_time_min, assign))
+__msk (cp_msg_cm_get_key_cnf_send, cp_msg_cm_get_key_cnf_t,
+ (enum cp_msg_cm_get_key_cnf_result_t, result, assign),
+ (enum cp_msg_key_type_t, key_type, assign),
+ (cp_nid_t, nid, assign),
+ (mac_eks_t, eks, assign),
+ (u32 *, hash_key, hash_key))
+__ms (cp_msg_cc_leave_ind_send,
+ (enum cp_msg_cc_leave_ind_reason_t, reason, assign),
+ (cp_nid_t, nid, assign))
+__mscb (cp_msg_cc_set_tei_map_ind_send_begin,
+ (enum cp_msg_cc_set_tei_map_ind_mode_t, mode, assign),
+ (uint, sta_nb, assign))
+__msc (cp_msg_cc_set_tei_map_ind_send_sta,
+ (cp_tei_t, tei, assign),
+ (mac_t, mac, assign),
+ (enum cp_msg_cc_set_tei_map_ind_status_t, status, assign))
+__msc (cp_msg_cc_set_tei_map_ind_send_end)
diff --git a/cesar/cp/av/cco/action/test/utest/src/nek.c b/cesar/cp/av/cco/action/test/utest/src/nek.c
new file mode 100644
index 0000000000..207cb75bc5
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/nek.c
@@ -0,0 +1,374 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/cco/action/src/nek.c
+ * \brief Nek Change test.
+ * \ingroup cp_cco_action
+ */
+#include "common/std.h"
+
+#include "lib/scenario/scenario.h"
+#include "inc/test_cco_action.h"
+#include "cp/cco/action/cco_action.h"
+
+cp_key_t nek = {{0x11111111, 0x22222222, 0x33333333, 0x44444444}};
+
+void
+nek_change (test_t t)
+{
+ test_cco_action_t ctx;
+ test_cco_action_init (&ctx);
+ cp_cco_action_init (&ctx.cp);
+
+ scenario_globals_t globals = {
+ .cp = &ctx.cp,
+ };
+
+ test_cco_action_create_our_net (&ctx, 0x123456789abcull,
+ 0xa);
+ test_case_begin (t, "Nek change");
+
+ test_begin (t, "Nek changing No STA.")
+ {
+ test_cco_action_create_our_net (&ctx, 0x123456789abcull,
+ 0xa);
+
+ scenario_entry_t entries[] = {
+ SCENARIO_ACTION (cco__cco_nek_change),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco__nek_change),
+ SCENARIO_EVENT (
+ cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco_nek_change__nek_provide),
+ SCENARIO_ACTION (cco__cco_nek_change__nek_provide),
+ SCENARIO_EVENT (
+ cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (
+ CCO_NEK_CHANGE_IDLE, cco_nek_change__nek_provide, nosta)),
+ SCENARIO_END
+ };
+ scenario_run (t, entries, &globals);
+ test_fail_unless (ctx.cp.cco_action.eks_current == 0);
+ }
+ test_end;
+
+ test_begin (t, "Nek changing one STA.")
+ {
+ cp_net_t *net;
+ cp_sta_t *sta;
+ cp_key_t key_invalid = {{0,0,0,0}};
+
+ net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ sta = cp_sta_mgr_sta_add (&ctx.cp, net, 2, 2);
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+ slab_release (sta);
+
+ scenario_entry_t entries[] = {
+ SCENARIO_ACTION (cco__cco_nek_change),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco__nek_change),
+ SCENARIO_EVENT (
+ cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco_nek_change__nek_provide),
+ /* First Message exchange. */
+ SCENARIO_ACTION (cco__cco_nek_change__nek_provide),
+ SCENARIO_EVENT (cp_msg_cm_set_key_req_send,
+ .peer = CP_MME_PEER (2, 2),
+ .peks = CP_MME_PEKS_NONE,
+ .pid = 1,
+ .pmn = 1,
+ .key_type = CP_MSG_KEY_NONCE_ONLY,
+ .cco_cap = CP_CCO_LEVEL,
+ .nid = cp_sta_own_data_get_nid (&ctx.cp),
+ .new_eks = 0,
+ .new_key = key_invalid),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type =
+ CP_FSM_EVENT_TYPE_cco_nek_change__nek_timeout),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (CCO_NEK_CHANGE_IDLE,
+ cco_nek_change__nek_provide, sta)),
+ /* Second Message exchange. */
+ SCENARIO_ACTION (cm_set_key_cnf_receive,
+ .peer = CP_MME_PEER (2, 2)),
+ SCENARIO_EVENT (cp_msg_cm_set_key_cnf_receive, .ok = true,
+ .pmn = 2, .pid = 1, .new_prn = false,
+ .new_my_nonce = true, .new_your_nonce = true,
+ .result = CP_MSG_CM_SET_KEY_CNF_RESULT_SUCCESS,
+ .cco_cap = CP_CCO_LEVEL),
+ SCENARIO_EVENT (cp_msg_cm_set_key_req_send,
+ .peer = CP_MME_PEER (2, 2),
+ .peks = CP_MME_PEKS_NMK,
+ .pid = 1,
+ .pmn = 3,
+ .key_type = CP_MSG_KEY_NEK,
+ .cco_cap = CP_CCO_LEVEL,
+ .nid = cp_sta_own_data_get_nid (&ctx.cp),
+ .new_eks = 1,
+ .new_key = ctx.cp.cco_action.nek_new),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type =
+ CP_FSM_EVENT_TYPE_cco_nek_change__nek_timeout),
+ /* Last Message received from the Peer station. */
+ SCENARIO_ACTION (cm_set_key_cnf_receive,
+ .peer = CP_MME_PEER (2, 2)),
+ SCENARIO_EVENT (cp_msg_cm_set_key_cnf_receive, .ok = true,
+ .pmn = 255, .pid = 1, .new_prn = false,
+ .new_my_nonce = false, .new_your_nonce = false,
+ .result = CP_MSG_CM_SET_KEY_CNF_RESULT_SUCCESS,
+ .cco_cap = CP_CCO_LEVEL),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF,
+ CM_SET_KEY_CNF_PID1,
+ end)),
+ /* Second Message exchange WRONG. */
+ SCENARIO_ACTION (cm_set_key_cnf_receive,
+ .peer = CP_MME_PEER (2, 2)),
+ SCENARIO_EVENT (cp_msg_cm_set_key_cnf_receive, .ok = false,
+ .pmn = 2, .pid = 1, .new_prn = false,
+ .new_my_nonce = false, .new_your_nonce = false,
+ .result = CP_MSG_CM_SET_KEY_CNF_RESULT_SUCCESS,
+ .cco_cap = CP_CCO_LEVEL),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF,
+ CM_SET_KEY_CNF_PID1,
+ end)),
+ /* Last Message exchange WRONG. */
+ SCENARIO_ACTION (cm_set_key_cnf_receive,
+ .peer = CP_MME_PEER (2, 2)),
+ SCENARIO_EVENT (cp_msg_cm_set_key_cnf_receive, .ok = false,
+ .pmn = 255, .pid = 1, .new_prn = false,
+ .new_my_nonce = false, .new_your_nonce = false,
+ .result = CP_MSG_CM_SET_KEY_CNF_RESULT_SUCCESS,
+ .cco_cap = CP_CCO_LEVEL),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF,
+ CM_SET_KEY_CNF_PID1,
+ end)),
+ SCENARIO_END
+ };
+ scenario_run (t, entries, &globals);
+ test_fail_unless (ctx.cp.cco_action.eks_current == 0);
+ }
+ test_end;
+
+ test_begin (t, "Two stats.")
+ {
+ cp_net_t *net;
+ cp_sta_t *sta;
+ cp_key_t key_invalid = {{0,0,0,0}};
+
+ net = cp_sta_mgr_get_our_avln (&ctx.cp);
+ sta = cp_sta_mgr_sta_add (&ctx.cp, net, 3, 3);
+ cp_sta_set_authenticated (&ctx.cp, sta, true);
+ slab_release (sta);
+
+ scenario_entry_t entries[] = {
+ SCENARIO_ACTION (cco__cco_nek_change),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco__nek_change),
+ SCENARIO_EVENT (
+ cp_fsm_event_bare_new,
+ .type = CP_FSM_EVENT_TYPE_cco_nek_change__nek_provide),
+ /* First Message exchange. */
+ SCENARIO_ACTION (cco__cco_nek_change__nek_provide),
+ SCENARIO_EVENT (cp_msg_cm_set_key_req_send,
+ .peer = CP_MME_PEER (2, 2),
+ .peks = CP_MME_PEKS_NONE,
+ .pid = 1,
+ .pmn = 1,
+ .key_type = CP_MSG_KEY_NONCE_ONLY,
+ .cco_cap = CP_CCO_LEVEL,
+ .nid = cp_sta_own_data_get_nid (&ctx.cp),
+ .new_eks = 0,
+ .new_key = key_invalid),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type =
+ CP_FSM_EVENT_TYPE_cco_nek_change__nek_timeout),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (CCO_NEK_CHANGE_IDLE,
+ cco_nek_change__nek_provide, sta)),
+ /* Second Message exchange. */
+ SCENARIO_ACTION (cm_set_key_cnf_receive,
+ .peer = CP_MME_PEER (2, 2)),
+ SCENARIO_EVENT (cp_msg_cm_set_key_cnf_receive, .ok = true,
+ .pmn = 2, .pid = 1, .new_prn = false,
+ .new_my_nonce = false, .new_your_nonce = false,
+ .result = CP_MSG_CM_SET_KEY_CNF_RESULT_SUCCESS,
+ .cco_cap = CP_CCO_LEVEL),
+ SCENARIO_EVENT (cp_msg_cm_set_key_req_send,
+ .peer = CP_MME_PEER (2, 2),
+ .peks = CP_MME_PEKS_NMK,
+ .pid = 1,
+ .pmn = 3,
+ .key_type = CP_MSG_KEY_NEK,
+ .cco_cap = CP_CCO_LEVEL,
+ .nid = cp_sta_own_data_get_nid (&ctx.cp),
+ .new_eks = 1,
+ .new_key = ctx.cp.cco_action.nek_new),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type =
+ CP_FSM_EVENT_TYPE_cco_nek_change__nek_timeout),
+ /* Last Message received from the Peer station. Go on with the
+ * next STA. */
+ SCENARIO_ACTION (cm_set_key_cnf_receive,
+ .peer = CP_MME_PEER (2, 2)),
+ SCENARIO_EVENT (cp_msg_cm_set_key_cnf_receive, .ok = true,
+ .pmn = 255, .pid = 1, .new_prn = false,
+ .new_my_nonce = false, .new_your_nonce = false,
+ .result = CP_MSG_CM_SET_KEY_CNF_RESULT_SUCCESS,
+ .cco_cap = CP_CCO_LEVEL),
+ SCENARIO_EVENT (cp_msg_cm_set_key_req_send,
+ .peer = CP_MME_PEER (3, 3),
+ .peks = CP_MME_PEKS_NONE,
+ .pid = 1,
+ .pmn = 1,
+ .key_type = CP_MSG_KEY_NONCE_ONLY,
+ .cco_cap = CP_CCO_LEVEL,
+ .nid = cp_sta_own_data_get_nid (&ctx.cp),
+ .new_eks = 0,
+ .new_key = key_invalid),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type =
+ CP_FSM_EVENT_TYPE_cco_nek_change__nek_timeout),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF,
+ CM_SET_KEY_CNF_PID1,
+ ok_continue)),
+ SCENARIO_END
+ };
+ scenario_run (t, entries, &globals);
+ test_fail_unless (ctx.cp.cco_action.eks_current == 0);
+ }
+ test_end;
+
+ test_begin (t, "Two stats las message received wrong.")
+ {
+ cp_key_t key_invalid = {{0,0,0,0}};
+
+ ctx.cp.cco_action.eks_sta_current_peer = CP_MME_PEER (2,2);
+
+ scenario_entry_t entries[] = {
+ /* Last Message received wrong from the Peer station. Go on with
+ * the next STA. */
+ SCENARIO_ACTION (cm_set_key_cnf_receive,
+ .peer = CP_MME_PEER (2, 2)),
+ SCENARIO_EVENT (cp_msg_cm_set_key_cnf_receive, .ok = false,
+ .pmn = 255, .pid = 1, .new_prn = false,
+ .new_my_nonce = false, .new_your_nonce = false,
+ .result = CP_MSG_CM_SET_KEY_CNF_RESULT_SUCCESS,
+ .cco_cap = CP_CCO_LEVEL),
+ SCENARIO_EVENT (cp_msg_cm_set_key_req_send,
+ .peer = CP_MME_PEER (3, 3),
+ .peks = CP_MME_PEKS_NONE,
+ .pid = 1,
+ .pmn = 1,
+ .key_type = CP_MSG_KEY_NONCE_ONLY,
+ .cco_cap = CP_CCO_LEVEL,
+ .nid = cp_sta_own_data_get_nid (&ctx.cp),
+ .new_eks = 0,
+ .new_key = key_invalid),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type =
+ CP_FSM_EVENT_TYPE_cco_nek_change__nek_timeout),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF,
+ CM_SET_KEY_CNF_PID1,
+ ok_continue)),
+ SCENARIO_END
+ };
+ scenario_run (t, entries, &globals);
+ test_fail_unless (ctx.cp.cco_action.eks_current == 0);
+ }
+ test_end;
+
+ test_begin (t, "Two stats timeout in process.")
+ {
+ cp_key_t key_invalid = {{0,0,0,0}};
+
+ ctx.cp.cco_action.eks_sta_current_peer = CP_MME_PEER (2,2);
+
+ scenario_entry_t entries[] = {
+ /* Last Message received wrong from the Peer station. Go on with
+ * the next STA. */
+ SCENARIO_ACTION (cco__cco_nek_change__timeout),
+ SCENARIO_EVENT (cp_msg_cm_set_key_req_send,
+ .peer = CP_MME_PEER (3, 3),
+ .peks = CP_MME_PEKS_NONE,
+ .pid = 1,
+ .pmn = 1,
+ .key_type = CP_MSG_KEY_NONCE_ONLY,
+ .cco_cap = CP_CCO_LEVEL,
+ .nid = cp_sta_own_data_get_nid (&ctx.cp),
+ .new_eks = 0,
+ .new_key = key_invalid),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type =
+ CP_FSM_EVENT_TYPE_cco_nek_change__nek_timeout),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (
+ CCO_NEK_CHANGE_PROCESS_CM_SET_KEY_CNF,
+ cco_nek_change__nek_timeout,
+ yes)),
+ SCENARIO_END
+ };
+ scenario_run (t, entries, &globals);
+ test_fail_unless (ctx.cp.cco_action.eks_current == 0);
+ }
+ test_end;
+
+ test_begin (t, "Two stats timeout in wait.")
+ {
+ cp_key_t key_invalid = {{0,0,0,0}};
+
+ ctx.cp.cco_action.eks_sta_current_peer = CP_MME_PEER (2,2);
+
+ scenario_entry_t entries[] = {
+ /* Last Message received wrong from the Peer station. Go on with
+ * the next STA. */
+ SCENARIO_ACTION (cco__cco_nek_change__nek_timeout__wait),
+ SCENARIO_EVENT (cp_msg_cm_set_key_req_send,
+ .peer = CP_MME_PEER (3, 3),
+ .peks = CP_MME_PEKS_NONE,
+ .pid = 1,
+ .pmn = 1,
+ .key_type = CP_MSG_KEY_NONCE_ONLY,
+ .cco_cap = CP_CCO_LEVEL,
+ .nid = cp_sta_own_data_get_nid (&ctx.cp),
+ .new_eks = 0,
+ .new_key = key_invalid),
+ SCENARIO_EVENT (cp_fsm_event_bare_new,
+ .type =
+ CP_FSM_EVENT_TYPE_cco_nek_change__nek_timeout),
+ SCENARIO_EVENT (cp_fsm_branch,
+ .branch = CP_FSM_BRANCH (
+ CCO_NEK_CHANGE_WAIT_STA_CNF,
+ cco_nek_change__nek_timeout,
+ yes)),
+ SCENARIO_END
+ };
+ scenario_run (t, entries, &globals);
+ test_fail_unless (ctx.cp.cco_action.eks_current == 0);
+ }
+ test_end;
+
+
+ test_cco_action_uninit (&ctx);
+}
+
+void
+cp_secu_generate_key (cp_t *ctx, uint num,
+ uint nb_iteration,
+ cp_key_t *output_key)
+{
+ uint i;
+ dbg_assert (output_key);
+
+ for (i = 0; i < COUNT (output_key->key); i++)
+ output_key->key[i]= nek.key[i];
+}
diff --git a/cesar/cp/av/cco/action/test/utest/src/scenario_actions.c b/cesar/cp/av/cco/action/test/utest/src/scenario_actions.c
new file mode 100644
index 0000000000..e0acffaac2
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/scenario_actions.c
@@ -0,0 +1,121 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/scenario_actions.c
+ * \brief Scenario actions.
+ * \ingroup test
+ */
+#include "common/std.h"
+
+#include "cp/cco/action/cco_action.h"
+#include "cp/av/cco/action/cco_action.h"
+#include "cp/av/cco/action/handover.h"
+
+#include "lib/scenario/scenario.h"
+
+#define __m(ACTION) \
+void \
+scenario_action_ ## ACTION ## _cb (scenario_globals_t *globals, \
+ scenario_params_t *params) \
+{ \
+ static cp_mme_rx_t mme; \
+ mme.peer = params->action_ ## ACTION.peer; \
+ cp_av_cco_action_ ## ACTION (globals->cp, &mme); \
+}
+
+#define __mp(ACTION) \
+void \
+scenario_action_ ## ACTION ## _cb (scenario_globals_t *globals, \
+ scenario_params_t *params) \
+{ \
+ ccotic cp_mme_rx_t mme; \
+ mme.peer = params->action_ ## ACTION.peer; \
+ mme.prun.pid = params->action_ ## ACTION.pid; \
+ cp_av_cco_action_ ## ACTION (globals->cp, &mme); \
+}
+
+#define __me(ACTION) \
+void \
+scenario_action_ ## ACTION ## _cb (scenario_globals_t *globals, \
+ scenario_params_t *params) \
+{ \
+ ccotic cp_mme_rx_t mme; \
+ mme.peer = params->action_ ## ACTION.peer; \
+ mme.encrypt = params->action_ ## ACTION.encrypt; \
+ cp_av_cco_action_ ## ACTION (globals->cp, &mme); \
+}
+
+#define __0(ACTION) \
+void \
+scenario_action_ ## ACTION ## _cb (scenario_globals_t *globals, \
+ scenario_params_t *params) \
+{ \
+ cp_av_cco_action_ ## ACTION (globals->cp); \
+}
+
+#define __n(ACTION, PARAMS...) \
+void \
+scenario_action_ ## ACTION ## _cb (scenario_globals_t *globals, \
+ scenario_params_t *params) \
+{ \
+ scenario_action_ ## ACTION ## _t *p = &params->action_ ## ACTION; \
+ cp_av_cco_action_ ## ACTION (globals->cp \
+ PREPROC_FOR_EACH_PARAM (PREPROC_CALL_UNPACK, \
+ __n_args, ## PARAMS) \
+ ); \
+}
+
+#define __n_args(TYPE, PARAM) \
+ , p->PARAM
+
+__m (handover__cc_handover_cnf_receive)
+__0 (handover__timeout_cc_handover_cnf)
+__m (handover__cc_handover_info_rsp_receive)
+__0 (handover__timeout_cc_handover_info_rsp)
+__0 (handover__hoip_countdown_expired)
+__0 (handover__discover_done)
+__0 (handover__ended)
+__n (cco__cc_discover_list_req,
+ (cp_net_t *, net),
+ (cp_sta_t *, sta))
+__m (cco__cc_assoc_req)
+__m (cco__cm_get_key_req_pid0)
+__m (cco__cm_get_key_req_pid1)
+__m (ucco__cc_assoc_req)
+__0 (drv_mac_stop)
+__0 (cco__cco_nek_change)
+__0 (cco__cco_nek_change__nek_provide)
+__m (cm_set_key_cnf_receive)
+__0 (cco__cco_nek_change__timeout)
+__0 (cco__cco_nek_change__nek_timeout__wait)
+__0 (ucco_start)
+__0 (ucco_stop)
+__0 (ucco__to_cco)
+__0 (cco__to_ucco)
+__0 (cco__unassoc_start)
+__0 (cco__unassoc_stop)
+__0 (cco__assoc_start)
+__0 (cco__assoc_stop)
+__0 (garbage)
+__n (cco_sta_leave_send_tei_map, (cp_sta_t *, sta))
+
+void
+scenario_action_BEACON_WITH_SAME_NID_cb (scenario_globals_t *globals,
+ scenario_params_t *params)
+{
+ scenario_action_BEACON_WITH_SAME_NID_t *p =
+ &params->action_BEACON_WITH_SAME_NID;
+ cp_av_cco_action_beacon_with_same_nid (globals->cp, p->beacon, p->net, p->sta);
+}
+
+void
+scenario_action_cco_leave_merge_avln_cb (scenario_globals_t *globals,
+ scenario_params_t *params)
+{
+ cp_av_cco_action_cco__unassoc_stop (globals->cp);
+}
diff --git a/cesar/cp/av/cco/action/test/utest/src/secu.c b/cesar/cp/av/cco/action/test/utest/src/secu.c
new file mode 100644
index 0000000000..67e4db2a87
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/secu.c
@@ -0,0 +1,55 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/secu.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "cp/secu/secu.h"
+
+void
+cp_secu_protocol_run_new (cp_secu_protocol_run_t *prun, u8 pid,
+ lib_rnd_t *rnd)
+{
+ memset (prun, 0, sizeof (cp_secu_protocol_run_t));
+ prun->pmn = 1;
+ prun->pid = pid;
+ prun->prn = lib_rnd32 (rnd);
+ prun->my_nonce = lib_rnd32 (rnd);
+}
+
+void
+cp_secu_protocol_next (cp_secu_protocol_run_t *prun, lib_rnd_t *rnd,
+ bool last)
+{
+ dbg_assert (prun);
+ dbg_assert (rnd);
+ if (prun->pmn == 1)
+ prun->my_nonce = lib_rnd32 (rnd);
+ if (last)
+ prun->pmn = 0xff;
+ else
+ {
+ dbg_assert (prun->pmn != 0xff);
+ prun->pmn++;
+ }
+}
+
+bool
+cp_secu_protocol_check (const cp_secu_protocol_run_t *prun,
+ const cp_secu_protocol_run_t *prun_recv,
+ const cp_secu_protocol_run_check_result_t expected_result)
+{
+ dbg_assert (prun_recv);
+
+ return true;
+}
+
diff --git a/cesar/cp/av/cco/action/test/utest/src/sta_action.c b/cesar/cp/av/cco/action/test/utest/src/sta_action.c
new file mode 100644
index 0000000000..042ec41a77
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/sta_action.c
@@ -0,0 +1,26 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/sta_action.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "cp/sta/action/action.h"
+
+
+#include "lib/scenario/scenario.h"
+void
+cp_av_sta_action_assoc__authenticated__renew (cp_t *ctx)
+{
+ dbg_assert (ctx);
+
+ scenario_event (cp_av_sta_action_assoc__authenticated__renew);
+}
diff --git a/cesar/cp/av/cco/action/test/utest/src/test_cco_action.c b/cesar/cp/av/cco/action/test/utest/src/test_cco_action.c
new file mode 100644
index 0000000000..91e729acca
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest/src/test_cco_action.c
@@ -0,0 +1,103 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/test_sta_action.c
+ * \brief Test sta/action.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "inc/test_cco_action.h"
+#include "lib/test.h"
+#include "mac/sar/inc/context.h"
+
+void
+assoc_test_suite (test_t t);
+
+void
+handover_test_suite (test_t t);
+
+void
+nek_change (test_t t);
+
+void
+cc_discover_list_test_suite (test_t t);
+
+void
+gargabe_test_suite (test_t t);
+
+void
+test_cco_action_init (test_cco_action_t *ctx)
+{
+#if CONFIG_TRACE
+ static trace_namespace_t namespace;
+ trace_buffer_add (&ctx->cp.trace, "cp", 8, 1, false, &namespace);
+#endif
+ static sar_t sar;
+
+ lib_rnd_init (&ctx->cp.rnd, 1234);
+ ctx->cp.mac_config = &ctx->mac_config;
+ ctx->cp.mac_store = mac_store_init ();
+ ctx->cp.sar = &sar;
+ sar.mac_store = ctx->cp.mac_store;
+ ctx->cp.pbproc = NULL;
+ ctx->cp.cl = INVALID_PTR;
+ cp_sta_mgr_init (&ctx->cp);
+}
+
+void
+test_cco_action_uninit (test_cco_action_t *ctx)
+{
+ cp_sta_mgr_uninit (&ctx->cp);
+ mac_store_uninit (ctx->cp.mac_store);
+#if CONFIG_TRACE
+ trace_buffer_remove (&ctx->cp.trace);
+#endif
+}
+
+void
+test_cco_action_reset (test_cco_action_t *ctx)
+{
+ cp_sta_mgr_uninit (&ctx->cp);
+ mac_store_uninit (ctx->cp.mac_store);
+ ctx->cp.mac_store = mac_store_init ();
+ cp_sta_mgr_init (&ctx->cp);
+}
+
+void
+test_cco_action_create_our_net (test_cco_action_t *ctx, cp_nid_t nid,
+ cp_snid_t snid)
+{
+ cp_t *cp = &ctx->cp;
+ cp_sta_own_data_set_nid (cp, nid);
+ cp_sta_own_data_set_snid (cp, snid);
+ cp_net_t *our_net = cp_sta_mgr_add_avln (cp, snid, nid);
+ cp_sta_mgr_set_our_avln (cp, our_net);
+
+ cp_sta_own_data_set_tei (cp, 1);
+ cp_sta_own_data_set_mac_address (cp, 0x1);
+ cp_sta_own_data_set_authenticated_status (cp, true);
+ cp_sta_own_data_set_cco_status (cp, true);
+}
+
+int
+main (int argc, char **argv)
+{
+ test_t t;
+ test_init (t, argc, argv);
+ trace_init ();
+
+ assoc_test_suite (t);
+ handover_test_suite (t);
+ nek_change (t);
+ cc_discover_list_test_suite (t);
+ gargabe_test_suite (t) ;
+
+ test_result (t);
+ return test_nb_failed (t) == 0 ? 0 : 1;
+}
+
diff --git a/cesar/cp/av/cco/action/test/utest2/Config b/cesar/cp/av/cco/action/test/utest2/Config
new file mode 100644
index 0000000000..3ebfb2f0b9
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/Config
@@ -0,0 +1 @@
+CONFIG_CP_AV = y
diff --git a/cesar/cp/av/cco/action/test/utest2/Makefile b/cesar/cp/av/cco/action/test/utest2/Makefile
new file mode 100644
index 0000000000..2b704c698f
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/Makefile
@@ -0,0 +1,52 @@
+BASE = ../../../../../..
+
+ECOS = y
+
+INCLUDES = cp/av/cco/action/test/utest2/override
+
+HOST_PROGRAMS= fsm_handover
+TARGET_PROGRAMS = action garbage status keys
+
+action_SOURCES = action-test.c core_stub.c \
+ sar_stub.c pbproc_stub.c sta_action.c
+action_MODULES = lib cp/av/cco/action mac/common cp/av/sta/mgr \
+ cp/av/cco/region/stub cp/av/cco/bw/stub cp/av/beacon/stub \
+ cp/av/fsm/stub cp/av/beacon/stub cl/stub\
+ cp/secu cp/msg/stub bsu/stub cp/av/cco/region/stub \
+ cp/av/cco/bw/stub
+action_CONFIG_MODULES = cp
+
+garbage_SOURCES = garbage.c core_stub.c \
+ sar_stub.c pbproc_stub.c sta_action.c
+garbage_MODULES = lib cp/av/cco/action mac/common cp/av/sta/mgr \
+ cp/av/cco/region/stub cp/av/cco/bw/stub cp/av/beacon/stub \
+ cp/av/beacon/stub cl/stub cp/secu cp/msg/stub bsu/stub \
+ cp/av/cco/region/stub cp/av/cco/bw/stub cp/av/fsm/stub
+garbage_CONFIG_MODULES = cp
+
+status_SOURCES = status.c pbproc_stub.c sar_stub.c sta_action.c
+status_MODULES = lib cp/av/cco/action mac/common cp/av/sta/mgr \
+ cp/av/cco/region/stub cp/av/cco/bw/stub cp/av/beacon/stub \
+ cp/av/fsm/stub cp/beacon/stub cp/sta/core/stub \
+ cp/msg/stub cl/stub mac/sar/stub cp/secu/stub \
+ cp/secu bsu/stub cp/cco/region/stub cp/cco/bw/stub
+status_CONFIG_MODULES = cp
+
+keys_SOURCES = action_gen_nek.c pbproc_stub.c sar_stub.c \
+ sta_action.c
+keys_MODULES = lib cp/av/cco/action mac/common cp/av/sta/mgr \
+ cp/secu cp/av/cco/region/stub cp/av/cco/bw/stub cp/av/beacon/stub \
+ cp/av/fsm/stub cp/beacon/stub cp/sta/core/stub \
+ cp/msg/stub cl/stub mac/sar/stub cl/stub \
+ bsu/stub cp/cco/region/stub cp/cco/bw/stub
+keys_CONFIG_MODULES = cp
+
+fsm_handover_SOURCES= fsm_handover.c sta_action.c
+fsm_handover_MODULES= lib cp/av/cco/action mac/common cp/secu cp/av/sta/mgr \
+ cp/av/cco/region/stub cp/av/cco/bw/stub cp/av/beacon/stub \
+ cp/av/fsm/stub cp/beacon/stub cp/sta/core/stub \
+ cp/msg/stub cl/stub mac/sar/stub \
+ bsu/stub cp/cco/region/stub cp/cco/bw/stub
+fsm_handover_CONFIG_MODULES = cp
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/cp/av/cco/action/test/utest2/doc/Makefile b/cesar/cp/av/cco/action/test/utest2/doc/Makefile
new file mode 100644
index 0000000000..9c79b61892
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/doc/Makefile
@@ -0,0 +1,20 @@
+PAGES= cco_action.txt
+
+ODT=$(PAGES:%.txt=%.odt)
+HTML=$(PAGES:%.txt=%.html)
+
+all: $(ODT) $(HTML)
+
+odt: $(ODT)
+
+html: $(HTML)
+
+%.odt: %.txt
+ rst2odt.py $< $@
+
+%.html: %.txt
+ rst2html $< $@
+
+clean:
+ rm -f $(ODT)
+ rm -f $(HTML)
diff --git a/cesar/cp/av/cco/action/test/utest2/doc/cco_action.txt b/cesar/cp/av/cco/action/test/utest2/doc/cco_action.txt
new file mode 100644
index 0000000000..70f120e236
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/doc/cco_action.txt
@@ -0,0 +1,172 @@
+CCO Action test
+===============
+
+Initialise
+----------
+
+The initialise procedure shall only initialise the set for the expiration
+process.
+
+At the end of this test the set shall be empty.
+
+Uninitialise
+------------
+
+The uninitialise procedure shall remove the station referenced in the TEI
+lease expiration.
+For that some station shall be added to the station manager and to the
+tei_lease_expiration set.
+
+At the end of this test, the set shall be empty and the memory freed
+correctly.
+
+SNID change
+-----------
+
+Test the procedure to modify the SNID at the beginning of the AVLN, and
+simulating an AVLN SNID collision.
+
+Test 1: Choosing SNID at the beginning.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This shall choose randomly a value of SNID. The random generator is
+initialised with the mac_ntb date.
+
+Environment:
+ * The phy_date override in the test shall always return the same value in order to verify the SNID chosen.
+ * The all range of SNID values shall be available. The flags returned by the override of the get_snids function from the sta manager shall return 0x0.
+
+
+Test 2: Choosing SNID after collision.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This shall choose randomly a value of SNID between the following ones, 2, 3,
+4, 7, 9, 11, 13, 14. So the flag returned by the get_snids function from the
+sta manager shall be not(0x9563) so 0x6A9C.
+
+Once this is done the value of the new SNID shall be provide to the beacon
+module using change_snid function.
+
+Garbage
+-------
+
+The garbage function will call the tei_lease_check function to expire the expired TEI lease in the station of the AVLN.
+
+Normally the clock use for the TEI lease is the eCos time, so it is very
+difficult to modify this timer.
+
+For that a thread shall be added to the test to use the cyg_thread_delay
+eCos's function which can only be called in a thread.
+
+Environment:
+ * Add a thread to use the cyg_thread_delay, this thread will be use for this test case at least.
+ * Add some station with a TEI lease of 5 eCos ticks i.e. 50 ms.
+
+The time between the garbage function call and the time verification of the
+test shall be greater than the 5 eCos ticks.
+
+At the end no more station shall be present i.e. the lease had expired.
+
+Generate key
+------------
+
+Sta association procedure
+-------------------------
+
+Test 1: Receiving a CC_ASSOC.REQ join
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+First station to associate
+ The CCo shall try to associate the station to its AVLN.
+
+ 1. Get an available TEI different from the one of the own Station's TEI.
+ 2. Add the station to the station list (use the station manager).
+ 3. Answer the request.
+
+ At the end of this test, the station shall be present in the station manager
+ list. The station shall be in the associate state.
+
+Second station to associate
+ The CCo tries to associate another station to the AVLN.
+
+ 1. Get an available TEI different from the previous registered station and
+ the own station.
+ 2. Add the station to the station manager list.
+ 3. Answer the request.
+
+ At the end of the test two station shall be present with different TEIs.
+
+No more station can be associate
+ The CCo tries to associate another station to the AVLN, but there are no more TEIs available.
+
+ 1. The CCo tries to get a TEI for the station, the function shall return 0.
+ 2. Add the station to the sta manager as unassociated sta.
+ 3. Answer the request with a failed code.
+
+Test 2: Receiving a CC_ASSOC.REQ renew
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This shall only verify if the TEI lease is correctly update in the station.
+
+At the end of this test, the station requiring the renew shall have 45
+minutes more before the expiration of the TEI lease.
+
+Test 3: Receiving a CC_ASSOC_REQ join from a associated station
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+At the end the station shall still exists with a different TEI.
+ 1. The station is removed from the AVLN. (a SET_TEI_MAP is send)
+ 2. The station is added in the AVLN (a SET_TEI_MAP is send).
+
+Sta authentication procedure
+----------------------------
+
+this shall only answer with a CM_GET_KEY.CNF message if the station is known.
+
+Test 1: Station is not known.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Environment
+ A MME is received with a authentication request and the Station is not
+ known.
+
+Result
+ A MME with the CM_GET_KEY.CNF containing the result "request refused" shall
+ be sent.
+
+Test 2: Station is known.
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Environment
+ Some station have been added and are associated.
+ A CM_GET_KEY.REQ MME is received from a station.
+
+Result
+ The CCo shall send a answer CM_GET_KEY.CNF with the following data.
+
+ * Result = 0 (guaranteed)
+ * key = 2 (NEK)
+ * NID = 0
+
+STA leaving
+-----------
+
+Station is known
+~~~~~~~~~~~~~~~~
+
+Environment
+ Some station have been added and are associated and authenticated.
+ One of those stations sends a CC_LEAVE.REQ.
+
+Result
+ The station is removed from the station manager.
+ The CCo answers with a CC_LEAVE.IND.
+
+Station is not known
+~~~~~~~~~~~~~~~~~~~~
+
+Environment
+ A CC_LEAVE.REQ is received from a unknown station.
+
+Result
+ The CC_LEAVE.REQ is ignored.
diff --git a/cesar/cp/av/cco/action/test/utest2/ecos.ecc.sh b/cesar/cp/av/cco/action/test/utest2/ecos.ecc.sh
new file mode 100644
index 0000000000..8253d98c9a
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/cp/av/cco/action/test/utest2/override/cp/inc/context.h b/cesar/cp/av/cco/action/test/utest2/override/cp/inc/context.h
new file mode 100644
index 0000000000..573048df09
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/override/cp/inc/context.h
@@ -0,0 +1,82 @@
+#ifndef overide_cp_inc_context_h
+#define overide_cp_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file overide/cp/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "lib/rnd.h"
+#include "cp/cco/action/cco_action.h"
+#include "cl/cl.h"
+#include "mac/common/config.h"
+#include "mac/common/store.h"
+#include "cp/sta/mgr/sta_mgr.h"
+#include "cp/beacon/beacon.h"
+#include "cp/cco/bw/bw.h"
+
+#include "cp/cco/action/inc/cco_action.h"
+#include "cp/sta/action/inc/context.h"
+#include "cp/sta/mgr/inc/sta_mgr.h"
+#include "cp/beacon/inc/beacon.h"
+#include "cp/cco/region/inc/context.h"
+#include "cp/cco/bw/inc/context.h"
+
+
+enum cp_handover_reason_t
+{
+ CP_HANDOVER_REASON_CCO_SELECTION,
+ CP_HANDOVER_REASON_CCO_LEAVING,
+ CP_HANDOVER_REASON_USER_APPOINT,
+ CP_HANDOVER_REASON_NB,
+};
+
+enum cp_handover_soft_hard_t
+{
+ CP_HANDOVER_SOFT_HARD_SOFT,
+ CP_HANDOVER_SOFT_HARD_HARD,
+ CP_HANDOVER_NB,
+};
+
+struct cp_handover_t
+{
+ /** Handover timeout. */
+ cp_sta_core_timed_event_def_t handover_timeout;
+
+ /** handover reason. */
+ enum cp_handover_reason_t reason;
+
+ /** Handover soft hard */
+ enum cp_handover_soft_hard_t soft_hard;
+};
+
+struct cp_t
+{
+ cp_cco_action_t cco_action;
+ cp_sta_action_t sta_action;
+ cl_t *cl;
+ lib_rnd_t rnd;
+ mac_config_t *mac_config;
+ cp_sta_mgr_t sta_mgr;
+ mac_store_t *mac_store;
+ cp_beacon_t beacon;
+ sar_t *sar;
+ pbproc_t *pbproc;
+ struct cp_cco_region_t region;
+ struct cp_cco_bw_t bw;
+ bsu_t *bsu;
+
+ /** Handover context. */
+ struct cp_handover_t handover;
+
+};
+
+#endif /* overide_cp_inc_context_h */
diff --git a/cesar/cp/av/cco/action/test/utest2/override/cp/sta/core/defs.h b/cesar/cp/av/cco/action/test/utest2/override/cp/sta/core/defs.h
new file mode 100644
index 0000000000..9698b44e93
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/override/cp/sta/core/defs.h
@@ -0,0 +1,57 @@
+#ifndef cp_sta_core_defs_h
+#define cp_sta_core_defs_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/sta/core/defs.h
+ * \brief Sta core defs.
+ * \ingroup cp/sta/core
+ *
+ */
+#include "cp/fsm/forward.h"
+
+/** Forward declaration. */
+typedef struct cp_sta_core_t cp_sta_core_t;
+
+/*
+ * the sta core event flags
+ * these are some flags, so take care to give a value with all bits set to 0 but one.
+ */
+enum cp_sta_core_event_flag_t
+{
+ CP_STA_CORE_EVENT_FLAG_RECV_BEACON = 0x1,
+ CP_STA_CORE_EVENT_FLAG_RECV_MME = 0x2,
+ CP_STA_CORE_EVENT_FLAG_FSM = 0x4,
+ CP_STA_CORE_EVENT_FLAG_GARBAGE = 0x8,
+ CP_STA_CORE_EVENT_FLAG_TERMINATE = 0x10
+};
+typedef enum cp_sta_core_event_flag_t cp_sta_core_event_flag_t;
+
+/** Definition of alarm info structure
+ * (applications should not use it directly but use "alias" defined just below) */
+struct cp_sta_core_timed_event_def_t
+{
+ /* eCos alarm. */
+ uint alarm;
+ /* eCos alarm handle. */
+ uint alarm_handle;
+ /* the sta core event flag to set
+ * (auto or user-specified when creating/launching timer alarm). */
+ cp_sta_core_event_flag_t event_flag;
+ /* FSM event specified when creating/launching timer alarm
+ * (set if the previous flag is CP_STA_CORE_EVENT_FLAG_FSM). */
+ cp_fsm_event_t *fsm_event;
+ /* flag indicating a periodic alarm (if set to true)
+ * or one-shot alarm (if set to false). */
+ bool cyclic_alarm;
+ /* pointer to CP context. */
+ cp_t *cp_ctx;
+};
+typedef struct cp_sta_core_timed_event_def_t cp_sta_core_timed_event_def_t;
+
+#endif /* cp_sta_core_defs_h */
diff --git a/cesar/cp/av/cco/action/test/utest2/override/mac/sar/inc/context.h b/cesar/cp/av/cco/action/test/utest2/override/mac/sar/inc/context.h
new file mode 100644
index 0000000000..9e7c6f07ca
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/override/mac/sar/inc/context.h
@@ -0,0 +1,23 @@
+#ifndef overide_mac_sar_inc_context_h
+#define overide_mac_sar_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file overide/mac/sar/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+struct sar_t
+{
+ mac_store_t *mac_store;
+};
+
+#endif /* overide_mac_sar_inc_context_h */
diff --git a/cesar/cp/av/cco/action/test/utest2/src/action-test.c b/cesar/cp/av/cco/action/test/utest2/src/action-test.c
new file mode 100644
index 0000000000..4606dfefd7
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/src/action-test.c
@@ -0,0 +1,1385 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/action-test.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include "common/std.h"
+#include "string.h"
+
+#include "lib/test.h"
+#include "lib/utils.h"
+#include "lib/swap.h"
+#include "lib/slab.h"
+
+#include "common/defs/homeplugAV.h"
+#include "common/defs/ethernet.h"
+
+#include "cp/cp.h"
+#include "cp/fsm/fsm.h"
+#include "cp/msg/msg.h"
+#include "cp/sta/mgr/sta.h"
+#include "cp/sta/mgr/sta_mgr.h"
+
+#include "cp/cco/action/cco_action.h"
+#include "cp/cco/action/inc/cco_action.h"
+#include "cp/av/cco/action/cco_action.h"
+#include "cp/av/cco/action/inc/cco_action.h"
+
+
+#include "cl/cl_mactotei.h"
+
+#include "mac/common/timings.h"
+
+/* Override interfaces. */
+#include "cp/inc/context.h"
+#include "mac/sar/inc/context.h"
+#include "cl/inc/context.h"
+
+cp_sta_t *
+cp_av_cco_action_cco_selection__selection (cp_t *ctx);
+
+void
+cp_av_cco_action_tei_expired (cp_t *ctx, cp_sta_t *sta);
+
+// The value provided to the module beacon.
+u16 snid_compute;
+
+// A Simple counter.
+uint tei_map_cnt;
+
+static bool fsm_event_posted = false;
+static cp_tei_t sta_tei;
+static cp_msg_cc_assoc_cnf_t res_data;
+
+static bool discover_compute_function_call;
+
+static void
+test_action_init (cp_t *cp)
+{
+ static mac_config_t mac_config;
+ static cl_t cl;
+ static sar_t sar;
+ memset (&mac_config, 0, sizeof (mac_config));
+ memset (&cl, 0, sizeof (cl_t));
+ memset (&sar, 0, sizeof (sar_t));
+ memset (cp, 0, sizeof (cp_t));
+ cp->mac_config = &mac_config;
+ cp->cl = &cl;
+ cp->sar = &sar;
+ cp->mac_store = sar.mac_store = mac_store_init ();
+ cp_cco_action_init (cp);
+ lib_rnd_init (&cp->rnd, 1234);
+ cp_beacon_init (cp);
+ cp_sta_mgr_init (cp);
+}
+
+static void
+test_action_uninit (cp_t *cp)
+{
+ cp_cco_action_uninit (cp);
+ cp_sta_mgr_uninit (cp);
+ cp_beacon_uninit (cp);
+ mac_store_uninit (cp->mac_store);
+}
+
+/**
+ * Verify TEI lease computing function.
+ * \param test the test object.
+ *
+ * Test 1:
+ * Initialise the TEI flags to the value 0x0124 in the first word.
+ * The TEI return shall be 2.
+ *
+ * Test 2:
+ * Initialise the TEI flags first word to 0xFFFFFFFE.
+ * The second one with 0xFFFFEFFF
+ * The TEI returned shall be 45.
+ */
+void
+test_case_tei_lease_create (test_t test)
+{
+ cp_t cp;
+ uint tei;
+
+
+ test_case_begin (test, "TEI Lease create");
+ test_begin (test, "Test 1. Request lease")
+ {
+ uint i;
+ test_action_init (&cp);
+ for (i = 0; i< 5; i++)
+ {
+ tei = cp_av_cco_action_tei_compute (&cp);
+ test_fail_if (tei != i + 1);
+ }
+ test_action_uninit (&cp);
+ }
+ test_end;
+
+ test_begin (test, "Test 2. Request 5 TEI, release TEI 2, request another one")
+ {
+ uint i;
+ test_action_init (&cp);
+
+ for (i = 0; i < 5; i++)
+ {
+ tei = cp_av_cco_action_tei_compute (&cp);
+ test_fail_if (tei != i + 1);
+ }
+
+ cp_cco_action_tei_release (&cp, 2);
+ tei = cp_av_cco_action_tei_compute (&cp);
+ test_fail_if (tei != 2);
+ test_action_uninit (&cp);
+ }
+ test_end;
+
+ test_begin (test, "Test 3, Store 0x17 in the first word")
+ {
+ test_action_init (&cp);
+
+ cp.cco_action.tei_flags[0] = 0x17;
+
+ cp_av_cco_action_tei_in_use (&cp, 4);
+
+ test_fail_unless (cp.cco_action.tei_flags[0] == 0x1F);
+ test_fail_unless (cp_av_cco_action_tei_compute (&cp) == 6);
+ test_action_uninit (&cp);
+ }
+ test_end;
+}
+
+/**
+ * Verify TEI release function.
+ * \param test the test object.
+ *
+ * Test 1:
+ * Initialise the TEI flags to the value 0x0126 in the first word.
+ * The TEI return shall be 1
+ *
+ * Test 2:
+ * Initialise the TEI flags first word to 0xFFFFFFFF.
+ * The second one with 0xFFFFFFFF
+ * The TEI returned shall be 45.
+ */
+void
+test_case_tei_release (test_t test)
+{
+ cp_t cp;
+ uint tei;
+
+ test_action_init (&cp);
+ test_case_begin (test, "TEI Lease release");
+
+ test_begin (test, "Test 1")
+ {
+
+ cp.cco_action.tei_flags[0] = 0x0126;
+
+ //Release TEI 2.
+ cp_cco_action_tei_release (&cp, 2);
+
+ test_fail_if (cp.cco_action.tei_flags[0] != 0x124);
+
+ // Get TEI.
+ tei = cp_av_cco_action_tei_compute (&cp);
+
+ test_fail_if (tei != 1);
+ test_fail_if (cp.cco_action.tei_flags[0] != 0x125);
+ }
+ test_end;
+
+ test_begin (test, "Test 2")
+ {
+ cp.cco_action.tei_flags[0] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[1] = 0xFFFFFFFF;
+
+ cp_cco_action_tei_release (&cp, 45);
+ test_fail_if (cp.cco_action.tei_flags[1] != 0xFFFFEFFF);
+ tei = cp_av_cco_action_tei_compute (&cp);
+ test_fail_if (tei != 45);
+ test_fail_if (cp.cco_action.tei_flags[1] != 0xFFFFFFFF);
+ }
+ test_end;
+ test_action_uninit (&cp);
+}
+
+/** Test the initialisation of the cco_action module.
+ * \param test the test object.
+ *
+ * The initialise procedure shall only initialise the set for the expiration
+ * process.
+ * At the end of this test the set shall be empty.
+ */
+void
+test_case_cco_action_init (test_t test)
+{
+ cp_t cp;
+ uint i;
+
+ test_case_begin (test, "Initialise the module.");
+
+ test_action_init (&cp);
+
+ test_begin (test, "Verify")
+ {
+ for (i = 0; i < 8; i++)
+ {
+ test_fail_if (cp.cco_action.tei_flags[i] != 0,
+ "TEI flags shall be null");
+ }
+ }
+ test_end;
+ test_action_uninit (&cp);
+}
+
+/** Change SNID.
+ * \param test the test object.
+ *
+ * Test the procedure to modify the SNID at the beginning of the AVLN, and
+ * simulating an AVLN SNID collision.
+ *
+ * Test 1: Choosing SNID at the beginning.
+ * This shall choose randomly a value of SNID. The random generator is
+ * initialised with the mac_ntb date.
+ *
+ * Environment:
+ * The phy_date override in the test shall always return the same value
+ * in order to verify the SNID chosen.
+ *
+ * The all range of SNID values shall be available. The flags returned
+ * by the override of the get_snids function from the sta manager shall
+ * return 0x0.
+ *
+ * Test 2: Choosing SNID after collision.
+ *
+ * This shall choose randomly a value of SNID between the following ones,
+ * 2, 3, 4, 7, 9, 11, 13, 14. So the flag returned by the
+ * get_snids function from the sta manager shall be not(0x9563) so 0x6A9C.
+ *
+ * Once this is done the value of the new SNID shall be provide to the beacon
+ * module using change_snid function.
+ */
+void
+test_case_change_snid (test_t test)
+{
+ cp_t cp;
+ test_case_begin (test, "change SNID");
+ test_action_init (&cp);
+ u8 snids[] = {1, 5, 6, 8, 10, 12, 15};
+ uint i;
+ /* Adding the AVLN. */
+ for (i = 0; i < COUNT (snids); i++)
+ cp_sta_mgr_add_avln (&cp, snids[i], i);
+ cp_av_cco_action_cco__cco_snid_conflict (&cp);
+ test_begin (test, "Verify SNID chosen")
+ {
+ for (i = 0; i < COUNT (snids); i++)
+ test_fail_unless (snid_compute != snids[i]);
+ }
+ test_end;
+ test_action_uninit (&cp);
+}
+
+void
+test_case_cco_action_start (test_t test)
+{
+ cp_t cp;
+ cp_net_t *net;
+ test_case_begin (test, "Unassoc to CCo Action start");
+ test_action_init (&cp);
+
+ test_begin (test, "station CCo")
+ {
+ cp_snid_t snid = cp_sta_own_data_get_snid (&cp);
+ cp_net_t *net = cp_sta_mgr_add_avln (&cp, snid, 1);
+ cp_sta_t *sta = cp_sta_mgr_sta_add (&cp, net, 1, 1);
+ slab_release (sta);
+ cp_sta_own_data_set_nid (&cp, 1);
+ test_fail_unless (!cp_sta_own_data_get_tei (&cp));
+ /* As an AVLN already exits, the CCo should not use the same snid. */
+ cp_av_cco_action_cco__unassoc_start (&cp);
+ test_fail_unless (net != cp_sta_mgr_get_our_avln (&cp));
+ test_fail_unless (cp_net_get_nid (&cp, net)
+ == cp_sta_own_data_get_nid (&cp));
+ test_fail_unless (cp_net_get_snid (&cp, net)
+ != cp_sta_own_data_get_snid (&cp));
+ test_fail_unless (cp_sta_own_data_get_cco_status (&cp));
+ test_fail_unless (MAC_TEI_IS_STA (cp_sta_own_data_get_tei (&cp)));
+ test_fail_if (cp.mac_config->nek[0].nek_enc[0] == 0);
+ }
+ test_end;
+
+ test_begin (test, "Station leave CCo status to unassoc")
+ {
+ cp_snid_t snid;
+ cp_nid_t nid;
+ snid = cp_sta_own_data_get_snid (&cp);
+ nid = cp_sta_own_data_get_nid (&cp);
+ net = cp_sta_mgr_get_avln (&cp, snid, nid);
+ test_fail_unless (net);
+ cp_av_cco_action_cco__unassoc_stop(&cp);
+ snid = cp_sta_own_data_get_snid (&cp);
+ nid = cp_sta_own_data_get_nid (&cp);
+ net = cp_sta_mgr_get_avln (&cp, snid, nid);
+ test_fail_unless (net);
+ /* check only CCo status, the TEI and our AVLN are reseted by
+ * UNASSOCIATED enter function. */
+ test_fail_if (cp_sta_own_data_get_cco_status (&cp) != false);
+ test_fail_if (cp.cl->mactotei != NULL);
+ }
+ test_end;
+ test_action_uninit (&cp);
+}
+
+/** Sta association procedure.
+ * \param test the test object.
+ *
+ * Test 1: Receiving a CC_ASSOC.REQ join
+ *
+ * First station to associate
+ * The CCo shall try to associate the station to its AVLN.
+ * 1. Get an available TEI different from the one of the own Station's TEI.
+ * 2. Add the station to the station list (use the station manager).
+ * 3. Answer the request.
+ *
+ * At the end of this test, the station shall be present in the station
+ * manager list. The station shall be in the associate state.
+ *
+ * Second station to associate
+ * The CCo tries to associate another station to the AVLN.
+ *
+ * 1. Get an available TEI different from the previous registered station
+ * and the own station.
+ * 2. Add the station to the station manager list.
+ * 3. Answer the request.
+ *
+ * At the end of the test two station shall be present with different TEIs.
+ *
+ * No more station can be associate
+ * The CCo tries to associate another station to the AVLN, but there are
+ * no more TEIs available.
+ *
+ * 1. The CCo tries to get a TEI for the station, the function shall
+ * return 0.
+ * 2. Add the station to the sta manager as unassociated sta.
+ * 3. Answer the request with a failed code.
+ *
+ * Test 2: Receiving a CC_ASSOC.REQ renew
+ *
+ * This shall only verify if the TEI lease is correctly update in the
+ * station.
+ *
+ * At the end of this test, the station requiring the renew shall have 45
+ * minutes more before the expiration of the TEI lease.
+ *
+ * Test 3: Receiving a CC_ASSOC_REQ join from a associated station.
+ *
+ * At the end the station shall still exists with a different TEI.
+ * 1. The station is removed from the AVLN. (a SET_TEI_MAP is send)
+ * 2. The station is added in the AVLN (a SET_TEI_MAP is send).
+ */
+void
+test_case_sta_assoc_procedure (test_t test)
+{
+ cp_t cp;
+ bitstream_t bitstream;
+ u8 buffer[256] __attribute__((aligned(256)));
+ uint req_type = CP_MSG_CC_ASSOC_REQ_TYPE_NEW;
+ u64 nid = 12;
+ uint cco_cap = 2;
+ uint pco_cap = true;
+ cp_mme_rx_t mme_rx;
+ cp_net_t *net = 0x0;
+ cp_sta_t *sta;
+
+ test_action_init (&cp);
+ cp_sta_own_data_set_nid (&cp, nid);
+
+ test_case_begin (test, "Receiving CC_ASSOC.REQ");
+
+ test_begin (test, "Test 1: Receiving a CC_ASSOC.REQ join")
+ {
+ net = cp_sta_mgr_add_avln (&cp, 0, nid);
+ cp_sta_mgr_set_our_avln (&cp, net);
+
+ cp_sta_own_data_set_tei (&cp, 1);
+ cp_sta_own_data_set_cco_status (&cp, true);
+
+ // Construct the MME to associate the first station.
+ mme_rx.peer.mac = 2;
+ mme_rx.peer.eth_type = HPAV_MTYPE_MME;
+ mme_rx.peer.vlan_tci = 0;
+ mme_rx.peer.tei = 0;
+
+ // Write the request.
+ bitstream_init (&bitstream, buffer + HPAV_MME_HEADER, 10,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &req_type, 8);
+ bitstream_access (&bitstream, &nid, 56);
+ bitstream_access (&bitstream, &cco_cap, 8);
+ bitstream_access (&bitstream, &pco_cap, 8);
+ bitstream_finalise (&bitstream);
+
+ // Initialise the MME Rx object.
+ mme_rx.p_mme = buffer;
+ mme_rx.length = 60;
+ bitstream_init (&mme_rx.bitstream, buffer + HPAV_MME_HEADER,
+ mme_rx.length, BITSTREAM_READ);
+
+ sta_tei = 0;
+ cp_av_cco_action_cco__cc_assoc_req (&cp, &mme_rx);
+
+ net = cp_sta_mgr_get_our_avln (&cp);
+ sta = cp_sta_mgr_sta_get_assoc (&cp, net, sta_tei);
+ test_fail_if (sta_tei == 0);
+ test_fail_if (sta == NULL);
+ test_fail_if (sta->assoc_req_last_ms == 0);
+
+ /* Call the garbage function to simulate the two seconds to associate
+ * the station. */
+ while (cp_sta_core_get_date_ms (&cp) != CP_ASSOC_FULL_TIMEOUT_MS +
+ 20);
+ cp_cco_action_garbage (&cp);
+
+ test_fail_if (cp_sta_get_assoc_confirmed (&cp, sta) != true);
+
+ slab_release (sta);
+ }
+ test_end;
+
+ test_begin (test, "Assoc a second station")
+ {
+ // Second station to add.
+ // Construct the MME to associate the second station.
+ mme_rx.peer.mac = 3;
+ mme_rx.peer.eth_type = HPAV_MTYPE_MME;
+ mme_rx.peer.vlan_tci = 0;
+ mme_rx.peer.tei = 0;
+
+ // Write the request.
+ bitstream_init (&bitstream, buffer + HPAV_MME_HEADER, 10,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &req_type, 8);
+ bitstream_access (&bitstream, &nid, 56);
+ bitstream_access (&bitstream, &cco_cap, 8);
+ bitstream_access (&bitstream, &pco_cap, 8);
+ bitstream_finalise (&bitstream);
+
+ // Initialise the MME Rx object.
+ mme_rx.p_mme = buffer;
+ mme_rx.length = 60;
+ bitstream_init (&mme_rx.bitstream, buffer + HPAV_MME_HEADER,
+ mme_rx.length, BITSTREAM_READ);
+
+ sta_tei = 0;
+ cp_av_cco_action_cco__cc_assoc_req (&cp, &mme_rx);
+
+ net = cp_sta_mgr_get_our_avln (&cp);
+ sta = cp_sta_mgr_sta_get_assoc (&cp, net, sta_tei);
+ test_fail_if (sta_tei == 0);
+ test_fail_if (sta == NULL);
+
+ slab_release (sta);
+ }
+ test_end;
+
+ test_begin (test, "Assoc with a know station from another net")
+ {
+ /* Create a station from another AVLN. */
+ cp_net_t *other_net = cp_sta_mgr_add_avln (&cp, 0 + 2, nid + 2);
+ cp_sta_t *other_sta = cp_sta_mgr_sta_add (&cp, other_net, 1, 0x42);
+
+ /* Configure the MME received. */
+ mme_rx.peer.mac = 0x42;
+ mme_rx.peer.eth_type = HPAV_MTYPE_MME;
+ mme_rx.peer.vlan_tci = 0;
+ mme_rx.peer.tei = 1;
+
+ /* Write the CC_ASSOC.REQ request. */
+ bitstream_init (&bitstream, buffer + HPAV_MME_HEADER, 10,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &req_type, 8);
+ bitstream_access (&bitstream, &nid, 56);
+ bitstream_access (&bitstream, &cco_cap, 8);
+ bitstream_access (&bitstream, &pco_cap, 8);
+ bitstream_finalise (&bitstream);
+
+ /* Initialise the MME Rx. */
+ mme_rx.p_mme = buffer;
+ mme_rx.length = 60;
+ bitstream_init (&mme_rx.bitstream, buffer + HPAV_MME_HEADER,
+ mme_rx.length, BITSTREAM_READ);
+
+ /* Reset stub. */
+ sta_tei = 0;
+ /* Receive CC_ASSOC.REQ request. */
+ cp_av_cco_action_cco__cc_assoc_req (&cp, &mme_rx);
+
+ /* It must receive a TEI. */
+ test_fail_if (sta_tei == 0);
+ /* Not its actual TEI in the other net. */
+ test_fail_if (sta_tei == 1);
+
+ /* Check station exist in our AVLN. */
+ net = cp_sta_mgr_get_our_avln (&cp);
+ sta = cp_sta_mgr_sta_get_assoc (&cp, net, sta_tei);
+ test_fail_if (sta == NULL);
+ slab_release (sta);
+
+ /* Check station is not in the other AVLN. */
+ sta = cp_sta_mgr_sta_get_assoc (&cp, other_net, sta_tei);
+ test_fail_if (sta != NULL);
+ sta = cp_sta_mgr_sta_get_assoc (&cp, other_net, 1);
+ test_fail_if (sta != NULL);
+
+ /* Clean. */
+ slab_release (other_sta);
+ cp_sta_mgr_remove_avln (&cp, 0 + 2, nid + 2);
+ } test_end;
+
+
+ test_begin (test, "No more TEI available")
+ {
+ /* The next station can not be associated because the TEIs are
+ * already in use. */
+ cp.cco_action.tei_flags[0] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[1] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[2] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[3] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[4] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[5] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[6] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[7] = 0xFFFFFFFF;
+
+ // third station to add.
+ // Construct the MME to associate the third station.
+ mme_rx.peer.mac = 4;
+ mme_rx.peer.eth_type = HPAV_MTYPE_MME;
+ mme_rx.peer.vlan_tci = 0;
+ mme_rx.peer.tei = 0;
+
+ // Write the request.
+ bitstream_init (&bitstream, buffer + HPAV_MME_HEADER, 10,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &req_type, 8);
+ bitstream_access (&bitstream, &nid, 56);
+ bitstream_access (&bitstream, &cco_cap, 8);
+ bitstream_access (&bitstream, &pco_cap, 8);
+ bitstream_finalise (&bitstream);
+
+ // Initialise the MME Rx object.
+ mme_rx.p_mme = buffer;
+ mme_rx.length = 60;
+ bitstream_init (&mme_rx.bitstream, buffer + HPAV_MME_HEADER,
+ mme_rx.length, BITSTREAM_READ);
+
+ sta_tei = 0;
+ cp_av_cco_action_cco__cc_assoc_req (&cp, &mme_rx);
+
+ net = cp_sta_mgr_get_our_avln (&cp);
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 4);
+ test_fail_if (sta_tei != 0);
+ test_fail_if (sta == NULL);
+ slab_release (sta);
+
+ }
+ test_end;
+
+ test_case_begin (test, "Test 2: Receiving a CC_ASSOC.REQ renew");
+
+ test_begin (test, "renew the lease")
+ {
+ // Renew the lease.
+ mme_rx.peer.mac = 2;
+ mme_rx.peer.eth_type = HPAV_MTYPE_MME;
+ mme_rx.peer.vlan_tci = 0;
+ mme_rx.peer.tei = 2;
+
+ // Write the request.
+ req_type = CP_MSG_CC_ASSOC_REQ_TYPE_RENEW;
+ bitstream_init (&bitstream, buffer + HPAV_MME_HEADER, 10,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &req_type, 8);
+ bitstream_access (&bitstream, &nid, 56);
+ bitstream_access (&bitstream, &cco_cap, 8);
+ bitstream_access (&bitstream, &pco_cap, 8);
+ bitstream_finalise (&bitstream);
+
+ // Initialise the MME Rx object.
+ mme_rx.p_mme = buffer;
+ mme_rx.length = 60;
+ bitstream_init (&mme_rx.bitstream, buffer + HPAV_MME_HEADER,
+ mme_rx.length, BITSTREAM_READ);
+
+ net = cp_sta_mgr_get_our_avln (&cp);
+ sta = cp_sta_mgr_sta_get_assoc (&cp, net, 2);
+ sta->tei_lease_date_ms = 10;
+ cp_sta_set_authenticated (&cp, sta, true);
+
+ cp_av_cco_action_cco__cc_assoc_req (&cp, &mme_rx);
+
+ test_fail_if (sta->tei_lease_date_ms !=
+ MAC_SEC_TO_MS(CP_LEASE_AUTH_MIN * 60) +
+ cp_sta_core_get_date_ms (&cp) - 10);
+
+ cp_sta_mgr_release_station (&cp, cp_sta_get_tei (sta));
+ slab_release (sta);
+
+ /* Station does not exists. */
+ mme_rx.p_mme = buffer;
+ mme_rx.length = 60;
+ bitstream_init (&mme_rx.bitstream, buffer + HPAV_MME_HEADER,
+ mme_rx.length, BITSTREAM_READ);
+
+ cp_av_cco_action_cco__cc_assoc_req (&cp, &mme_rx);
+
+ test_fail_unless (res_data.result
+ == CP_MSG_CC_ASSOC_CNF_RESULT_FAILURE_OTHER_REASON);
+ test_fail_unless (res_data.sta_tei == 0);
+ test_fail_unless (res_data.lease_time_min == 0);
+ }
+ test_end;
+
+ test_begin (test,
+ "Test 3: Receiving a CC_ASSOC_REQ join from a associated station")
+ {
+ cp.cco_action.tei_flags[0] = 0xF0FFFFFF;
+ cp.cco_action.tei_flags[1] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[2] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[3] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[4] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[5] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[6] = 0xFFFFFFFF;
+ cp.cco_action.tei_flags[7] = 0xFFFFFFFF;
+
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 2);
+ cp_sta_set_authenticated (&cp, sta, true);
+ test_fail_unless (cp_sta_get_authenticated (&cp, sta));
+ test_fail_unless (sta);
+ slab_release (sta);
+ // Construct the MME to associate the first station.
+ mme_rx.peer.mac = 2;
+ mme_rx.peer.eth_type = HPAV_MTYPE_MME;
+ mme_rx.peer.vlan_tci = 0;
+ mme_rx.peer.tei = 0;
+
+ req_type = CP_MSG_CC_ASSOC_REQ_TYPE_NEW;
+ // Write the request.
+ bitstream_init (&bitstream, buffer + HPAV_MME_HEADER, 10,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &req_type, 8);
+ bitstream_access (&bitstream, &nid, 56);
+ bitstream_access (&bitstream, &cco_cap, 8);
+ bitstream_access (&bitstream, &pco_cap, 8);
+ bitstream_finalise (&bitstream);
+
+ // Initialise the MME Rx object.
+ mme_rx.p_mme = buffer;
+ mme_rx.length = 60;
+ bitstream_init (&mme_rx.bitstream, buffer + HPAV_MME_HEADER,
+ mme_rx.length, BITSTREAM_READ);
+
+ cp_sta_mgr_set_our_avln (&cp, net);
+ cp_sta_own_data_set_tei (&cp, 244);
+ cp_sta_own_data_set_cco_status (&cp, true);
+
+ cp_av_cco_action_cco__cc_assoc_req (&cp, &mme_rx);
+
+ net = cp_sta_mgr_get_our_avln (&cp);
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 2);
+ test_fail_unless (cp_sta_get_authenticated (&cp, sta) == false);
+ test_fail_if (sta == NULL);
+ slab_release (sta);
+ }
+ test_end;
+ test_action_uninit (&cp);
+}
+
+void
+test_case_sta_assoc_procedure_ucco_to_cco (test_t test)
+{
+ cp_t cp;
+ bitstream_t bitstream;
+ u8 buffer[256];
+ uint req_type;
+ u64 nid = 12;
+ uint cco_cap = 2;
+ uint pco_cap = true;
+ cp_mme_rx_t mme_rx;
+ cp_sta_t *sta;
+ cp_net_t *net;
+
+ test_action_init (&cp);
+ cp_av_cco_action_ucco_start (&cp);
+
+ net = cp_sta_mgr_add_avln (&cp, 1, nid);
+ cp_sta_mgr_set_our_avln (&cp, net);
+
+ test_case_begin (test, "Receiving a CC_ASSOC.REQ join");
+
+ test_begin (test, "JOIN")
+ {
+ // Construct the MME to associate the first station.
+ mme_rx.peer.mac = 2;
+ mme_rx.peer.eth_type = HPAV_MTYPE_MME;
+ mme_rx.peer.vlan_tci = 0;
+ mme_rx.peer.tei = 0;
+
+ req_type = CP_MSG_CC_ASSOC_REQ_TYPE_NEW;
+
+ // Write the request.
+ bitstream_init (&bitstream, buffer + HPAV_MME_HEADER, 10,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &req_type, 8);
+ bitstream_access (&bitstream, &nid, 56);
+ bitstream_access (&bitstream, &cco_cap, 8);
+ bitstream_access (&bitstream, &pco_cap, 8);
+ bitstream_finalise (&bitstream);
+
+ // Initialise the MME Rx object.
+ mme_rx.p_mme = buffer;
+ mme_rx.length = 60;
+ bitstream_init (&mme_rx.bitstream, buffer + HPAV_MME_HEADER,
+ mme_rx.length, BITSTREAM_READ);
+
+ fsm_event_posted = false;
+ cp_av_cco_action_ucco__cc_assoc_req (&cp, &mme_rx);
+
+ net = cp_sta_mgr_get_our_avln (&cp);
+ sta = cp_net_sta_get_first (&cp, net, CP_NET_STA_ASSOC);
+ test_fail_if (fsm_event_posted == false);
+ test_fail_if (cp_sta_own_data_get_cco_status (&cp) == false);
+ test_fail_if (sta == NULL);
+
+ if (sta)
+ slab_release (sta);
+ }
+ test_end;
+
+ cp_av_cco_action_cco__unassoc_stop (&cp);
+ test_action_uninit (&cp);
+}
+
+/** Sta authentication procedure
+ * \param test the test object.
+ *
+ * this shall only answer with a CM_GET_KEY.CNF message if the station is known
+ *
+ * Test 1: Station is not known.
+ * Environment
+ * A MME is received with a authentication request and the Station is not
+ * known.
+ * Result
+ * A MME with the CM_GET_KEY.CNF containing the result "request refused"
+ * shall be sent.
+ *
+ * Test 2: Station is known.
+ *
+ * Environment
+ * Some station have been added and are associated. A CM_GET_KEY.REQ MME
+ * is received from a station.
+ * Result
+ * The CCo shall send a answer CM_GET_KEY.CNF with the following data.
+ *
+ * - Result = 0 (guaranteed)
+ * - key = 2 (NEK)
+ * - NID = 0
+ */
+void
+test_case_sta_authentication (test_t test)
+{
+ test_case_begin (test, "Authentication status.");
+
+ test_begin (test, "assoc")
+ {
+ cp_t cp;
+ lib_rnd_init (&cp.rnd, 1234);
+ cp_net_t *net;
+ bitstream_t bitstream;
+ cp_mme_rx_t mme;
+ u64 data;
+ u8 buffer[1024];
+ cp_sta_t *sta;
+
+ test_action_init (&cp);
+ // Update the net NID and SNID.
+ cp_sta_own_data_set_nid (&cp, 0x1);
+ cp_sta_own_data_set_snid (&cp, 0x2);
+
+ net = cp_sta_mgr_add_avln (&cp, 2, 1);
+ cp_sta_mgr_set_our_avln (&cp, net);
+ cp_sta_own_data_set_tei (&cp, 1);
+ cp_sta_own_data_set_cco_status (&cp, true);
+
+ sta = cp_sta_mgr_sta_add (&cp, net, 2, 123);
+ cp_sta_set_assoc_confirmed (&cp, sta, false);
+
+ test_case_begin (test, "Sta authentication procedure");
+
+ // Build the MME.
+ bitstream_init (&bitstream, buffer, sizeof(buffer), BITSTREAM_WRITE);
+ // ODA.
+ data = 0x2;
+ bitstream_access (&bitstream, &data, 48);
+ // OSA.
+ data = 0x1;
+ bitstream_access (&bitstream, &data, 48);
+ /* Ethernet type */
+ data = HPAV_MTYPE_MME;
+ bitstream_access (&bitstream, &data, 16);
+ // MMV.
+ data = HPAV_MMV1;
+ bitstream_access (&bitstream, &data, 8);
+ // MMtype.
+ data = CM_GET_KEY_REQ;
+ bitstream_access (&bitstream, &data, 16);
+ // FMI
+ data = 0;
+ bitstream_access (&bitstream, &data, 16);
+ // Request type.
+ data = 0;
+ bitstream_access (&bitstream, &data, 8);
+ // Request key type.
+ data = CP_MSG_KEY_NEK;
+ bitstream_access (&bitstream, &data, 8);
+ // NID.
+ data = cp_net_get_nid (&cp, net);
+ bitstream_access (&bitstream, &data, 56);
+ // Nonce.
+ data = 0xc;
+ bitstream_access (&bitstream, &data, 32);
+ // PID.
+ data = 0;
+ bitstream_access (&bitstream, &data, 32);
+ // Key.
+ data = 0xA;
+ bitstream_access (&bitstream, &data, 8);
+ bitstream_finalise (&bitstream);
+
+ mme.length = 37;
+ mme.p_mme = buffer;
+ mme.peer.tei = 0x2;
+ cp_secu_protocol_run_new (&mme.prun, 0, &cp.rnd);
+
+ cp_av_cco_action_cco__cm_get_key_req_pid0 (&cp, &mme);
+
+ test_fail_if (cp_sta_get_assoc_confirmed (&cp, sta) != true);
+
+ slab_release (sta);
+ test_action_uninit (&cp);
+ }
+ test_end;
+}
+
+/** Test the station leaving procedure.
+ * \param test the test object.
+ *
+ * This shall only verify that a message is post in the FSM when the station
+ * leave the AVLN.
+ */
+void
+test_case_sta_tei_expires (test_t test)
+{
+ cp_t cp;
+ cp_net_t *net;
+ cp_sta_t *sta;
+
+ test_action_init (&cp);
+ test_case_begin (test, "CCO action : Station leave");
+
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+ cp_sta_mgr_set_our_avln (&cp, net);
+ sta = cp_sta_mgr_sta_add (&cp, net, 0x1, 0x1);
+ cp_sta_set_authenticated (&cp, sta, true);
+ cp_sta_own_data_set_tei (&cp, 244);
+ cp_sta_own_data_set_cco_status (&cp, true);
+ cp_av_cco_action_tei_expired (&cp, sta);
+ slab_release (sta);
+
+ test_begin (test, "Verify the post event")
+ {
+ test_fail_if (fsm_event_posted != true, "FSM Event not posted");
+ }
+ test_end;
+ test_action_uninit (&cp);
+}
+
+void
+test_case_sta_cc_leave (test_t test)
+{
+ test_case_begin (test, "Station send a cc_leave.req");
+
+ test_begin (test, "STA 1")
+ {
+ cp_t cp;
+ cp_net_t *net;
+ cp_sta_t *sta;
+ cp_mme_rx_t msg;
+
+ test_action_init (&cp);
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+ cp_sta_own_data_set_tei (&cp, 244);
+ cp_sta_mgr_set_our_avln (&cp, net);
+ cp_sta_own_data_set_cco_status (&cp, true);
+ sta = cp_sta_mgr_sta_add (&cp, net, 1, 1);
+
+ msg.peer.tei = 1;
+ msg.peer.mac = 1;
+ msg.peer.eth_type = HPAV_MTYPE_MME;
+ msg.peer.vlan_tci = 0;
+ msg.mmtype = CC_LEAVE_REQ;
+
+ cp_av_cco_action_cco__cc_leave_req (&cp, &msg);
+
+ test_fail_if (sta->tei_lease_date_ms != CP_STA_MGR_STATION_RELEASE_MS +
+ cp_sta_core_get_date_ms (&cp) - 10);
+ slab_release (sta);
+
+ cp_av_cco_action_cco__cc_leave_req (&cp, &msg);
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 1);
+ test_fail_unless (sta == NULL);
+ test_action_uninit (&cp);
+ }
+ test_end;
+
+ test_begin (test, "STA in CCo selection procedure")
+ {
+ cp_t cp;
+ cp_net_t *net;
+ cp_sta_t *sta;
+ cp_mme_rx_t msg;
+
+ test_action_init (&cp);
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+ cp_sta_own_data_set_tei (&cp, 244);
+ cp_sta_own_data_set_mac_address (&cp, 1);
+ cp_sta_mgr_set_our_avln (&cp, net);
+ cp_sta_own_data_set_cco_status (&cp, true);
+ sta = cp_sta_mgr_sta_add (&cp, net, 1, 2);
+ sta->cco_cap = 1;
+ cp_sta_set_authenticated (&cp, sta, true);
+ cp_av_cco_action_cco_selection__sta_add (&cp, net, sta);
+
+ test_fail_unless (heap_empty (&cp.cco_action.selection_heap) == false);
+
+ msg.peer.tei = 1;
+ msg.peer.mac = 1;
+ msg.peer.eth_type = HPAV_MTYPE_MME;
+ msg.peer.vlan_tci = 0;
+ msg.mmtype = CC_LEAVE_REQ;
+
+ cp_av_cco_action_cco__cc_leave_req (&cp, &msg);
+ cp_av_cco_action_cco_selection__clear (&cp);
+
+ test_fail_if (sta->tei_lease_date_ms != CP_STA_MGR_STATION_RELEASE_MS +
+ cp_sta_core_get_date_ms (&cp) - 10);
+ test_fail_unless (heap_empty (&cp.cco_action.selection_heap) == true);
+ slab_release (sta);
+ test_action_uninit (&cp);
+ }
+ test_end;
+
+}
+
+void
+test_case_sta_release_tei (test_t test)
+{
+ test_case_begin (test, "Station is freed");
+
+ test_begin (test, "STA 1")
+ {
+ cp_t cp;
+ cp_net_t *net;
+ cp_sta_t *sta;
+ cp_mme_rx_t msg;
+ cp_tei_t sta_tei;
+
+ test_action_init (&cp);
+ sta_tei = cp_av_cco_action_tei_compute (&cp);
+
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+ cp_sta_own_data_set_tei (&cp, sta_tei + 1);
+ cp_sta_mgr_set_our_avln (&cp, net);
+ cp_sta_own_data_set_cco_status (&cp, true);
+
+ sta = cp_sta_mgr_sta_add (&cp, net, sta_tei, 1);
+
+ msg.peer.tei = sta_tei;
+ msg.peer.mac = 1;
+ msg.peer.eth_type = HPAV_MTYPE_MME;
+ msg.peer.vlan_tci = 0;
+ msg.mmtype = CC_LEAVE_REQ;
+
+ cp_av_cco_action_cco__cc_leave_req (&cp, &msg);
+
+ test_fail_if (sta->tei_lease_date_ms != CP_STA_MGR_STATION_RELEASE_MS +
+ cp_sta_core_get_date_ms (&cp) - 10);
+
+ sta->tei_lease_date_ms = 0;
+ cp_sta_mgr_garbage (&cp);
+ slab_release (sta);
+
+ test_fail_if ((cp.cco_action.tei_flags[0] & 0x2) == true);
+ test_action_uninit (&cp);
+ }
+ test_end;
+}
+
+void
+test_case_cco_selection (test_t test)
+{
+ test_case_begin (test, "CCo selection");
+
+ test_begin (test, "Selection")
+ {
+ cp_t cp;
+ cp_net_t *net;
+ cp_sta_t *sta;
+ cp_sta_own_data_t *own;
+
+ test_action_init (&cp);
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+ cp_sta_mgr_set_our_avln (&cp, net);
+
+ cp_sta_own_data_set_tei (&cp, 1);
+ cp_sta_own_data_set_authenticated_status (&cp, true);
+ cp_sta_own_data_set_cco_status (&cp, true);
+
+ sta = cp_sta_mgr_sta_add (&cp, net, 2, 2);
+ sta->cco_cap = 1;
+ cp_sta_set_authenticated (&cp, sta, true);
+ slab_release (sta);
+ sta = cp_sta_mgr_sta_add (&cp, net, 3, 3);
+ sta->cco_cap = 1;
+ cp_sta_set_authenticated (&cp, sta, true);
+ slab_release (sta);
+
+ /* Configure the test. Selecting Station 2 as CCo. */
+ cp_sta_own_data_set_mac_address (&cp, 1);
+
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 2);
+ cp_av_cco_action_cco_selection__sta_add (&cp, net, sta);
+ slab_release (sta);
+
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 3);
+ cp_av_cco_action_cco_selection__sta_add (&cp, net, sta);
+ slab_release (sta);
+
+ sta = cp_av_cco_action_cco_selection__selection (&cp);
+ test_fail_unless (cp_sta_get_mac_address (sta) == 3);
+ slab_release (sta);
+
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 3);
+ cp_av_cco_action_cco_selection__sta_remove (&cp, sta);
+ slab_release (sta);
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 2);
+ cp_av_cco_action_cco_selection__sta_remove (&cp, sta);
+ slab_release (sta);
+
+ test_fail_unless (heap_empty (&cp.cco_action.selection_heap) ==
+ true);
+
+
+ /* Configuring, the own station is CCo user appointed, it shall stay
+ * CCo. */
+ own = cp_sta_mgr_get_sta_own_data (&cp);
+ own->cco_prefered = true;
+
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 2);
+ cp_av_cco_action_cco_selection__sta_add (&cp, net, sta);
+ slab_release (sta);
+
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 3);
+ cp_av_cco_action_cco_selection__sta_add (&cp, net, sta);
+ slab_release (sta);
+
+ sta = cp_av_cco_action_cco_selection__selection (&cp);
+
+ test_fail_unless (sta == NULL);
+ test_fail_unless (heap_empty (&cp.cco_action.selection_heap) ==
+ true);
+
+ /* Configure the test to choose station 3 as CCo cause of the CCo
+ * level. */
+ own->cco_prefered = false;
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 2);
+ sta->cco_cap = 0;
+ cp_av_cco_action_cco_selection__sta_add (&cp, net, sta);
+ slab_release (sta);
+
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 3);
+ sta->cco_cap = 1;
+ cp_av_cco_action_cco_selection__sta_add (&cp, net, sta);
+ slab_release (sta);
+
+ sta = cp_av_cco_action_cco_selection__selection (&cp);
+
+ test_fail_unless (cp_sta_get_mac_address (sta) == 3);
+ slab_release (sta);
+ test_action_uninit (&cp);
+ }
+ test_end;
+}
+
+int
+main (int argc, char **argv)
+{
+ test_t test;
+ test_init (test, argc, argv);
+
+ test_case_tei_lease_create (test);
+ test_case_tei_release (test);
+ test_case_cco_action_init (test);
+ test_case_change_snid (test);
+ test_case_sta_assoc_procedure (test);
+ test_case_sta_authentication (test);
+ test_case_sta_tei_expires (test);
+ test_case_cco_action_start (test);
+ test_case_sta_assoc_procedure_ucco_to_cco (test);
+ test_case_sta_cc_leave (test);
+ test_case_sta_release_tei (test);
+ test_case_cco_selection (test);
+
+ test_case_begin (test, "Memory leaks");
+
+ test_begin (test, "Memory leaks verification")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
+void
+cp_beacon_change_snid (cp_t *ctx, u8 snid)
+{
+ snid_compute = snid;
+}
+
+/**
+ * Begin a CC_SET_TEI_MAP.IND construction.
+ * \param ctx control plane context
+ * \param peer peer information
+ * \param mode update, add or delete
+ * \param sta_nb number of stations sent
+ * \return the MME being constructed
+ */
+cp_mme_tx_t *
+cp_msg_cc_set_tei_map_ind_send_begin (
+ cp_t *ctx, cp_mme_peer_t *peer,
+ enum cp_msg_cc_set_tei_map_ind_mode_t mode, uint sta_nb)
+{
+ return NULL;
+}
+
+/**
+ *
+ * Write a station to a CC_SET_TEI_MAP.IND being constructed.
+ * \param ctx control plane context
+ * \param mme MME being constructed
+ * \param tei STA TEI
+ * \param mac STA mac address
+ * \param status STA status
+ */
+void
+cp_msg_cc_set_tei_map_ind_send_sta (
+ cp_t *ctx, cp_mme_tx_t *mme, cp_tei_t tei, mac_t mac,
+ enum cp_msg_cc_set_tei_map_ind_status_t status)
+{
+}
+
+/**
+ * Finalise and send a CC_SET_TEI_MAP.IND message.
+ * \param ctx control plane context
+ * \param mme MME being constructed
+ */
+void
+cp_msg_cc_set_tei_map_ind_send_end (cp_t *ctx, cp_mme_tx_t *mme)
+{
+}
+
+/**
+ * Receive a CC_ASSOC.REQ.
+ * \param ctx control plane context
+ * \param mme MME handle
+ * \param data received MME data
+ * \return true on success
+ */
+bool
+cp_msg_cc_assoc_req_receive (cp_t *ctx, cp_mme_rx_t *mme,
+ cp_msg_cc_assoc_req_t *data)
+{
+ dbg_assert (ctx);
+ dbg_assert (mme);
+ dbg_assert (data);
+
+ bitstream_access (&mme->bitstream, &data->request_type, 8);
+ bitstream_access (&mme->bitstream, &data->nid, 56);
+ bitstream_access (&mme->bitstream, &data->cco_cap, 8);
+ bitstream_access (&mme->bitstream, &data->proxy_cap, 8);
+ bitstream_finalise (&mme->bitstream);
+
+ return true;
+}
+
+/**
+ * Send a CC_ASSOC.CNF.
+ * \param ctx control plane context
+ * \param peer peer information
+ * \param data MME data to send
+ */
+void
+cp_msg_cc_assoc_cnf_send (cp_t *ctx, cp_mme_peer_t *peer,
+ const cp_msg_cc_assoc_cnf_t *data)
+{
+ dbg_assert (data);
+
+ sta_tei = data->sta_tei;
+
+ memcpy (&res_data, data, sizeof (cp_msg_cc_assoc_cnf_t));
+}
+
+/**
+ * Receive a CM_GET_KEY.REQ.
+ * \param ctx control plane context
+ * \param mme MME handle
+ * \param data received MME data
+ * \return true on success
+ *
+ * Encryption and protocol run information is available in the MME handle.
+ */
+bool
+cp_msg_cm_get_key_req_receive (cp_t *ctx, cp_mme_rx_t *mme,
+ cp_msg_cm_get_key_req_t *data)
+{
+ uint offset;
+ u64 unused;
+ dbg_assert (ctx);
+ dbg_assert (mme);
+ dbg_assert (mme->p_mme);
+ dbg_assert (mme->length < ETH_PACKET_MAX_SIZE);
+ dbg_assert (data);
+
+ // Read the MME.
+ bitstream_init (&mme->bitstream, mme->p_mme, mme->length, BITSTREAM_READ);
+ bitstream_access (&mme->bitstream, &mme->peer.mac, 48);
+ bitstream_access (&mme->bitstream, &unused, 48);
+ bitstream_access (&mme->bitstream, &mme->peer.eth_type, 16);
+
+ if (ETH_IS_VLANTAG (mme->peer.eth_type))
+ {
+ bitstream_access (&mme->bitstream, &mme->peer.vlan_tci, 16);
+ bitstream_access (&mme->bitstream, &unused, 16);
+ }
+ else
+ mme->peer.vlan_tci = 0;
+
+ bitstream_access (&mme->bitstream, &unused, 8);
+ bitstream_access (&mme->bitstream, &unused, 16);
+ bitstream_access (&mme->bitstream, &unused, 16);
+
+ // Read the data in the MME.
+ bitstream_access (&mme->bitstream, &data->relayed, 8);
+ bitstream_access (&mme->bitstream, &data->key_type, 8);
+ bitstream_access (&mme->bitstream, &data->nid, 56);
+
+ offset = 37 + ETH_GET_VLANTAG_SIZE (mme->peer.eth_type);
+
+ memcpy (mme->p_mme + offset, &data->hash_key, mme->length - offset);
+ return true;
+}
+
+/**
+ * Send a CC_LEAVE.CNF.
+ * \param ctx control plane context
+ * \param peer peer information
+ */
+void
+cp_msg_cc_leave_cnf_send (cp_t *ctx, cp_mme_peer_t *peer)
+{
+}
+
+/**
+ * Send a CC_LEAVE.IND.
+ * \param ctx control plane context
+ * \param peer peer information
+ * \param reason reason for the disassociation
+ * \param nid NID
+ */
+void
+cp_msg_cc_leave_ind_send (cp_t *ctx, cp_mme_peer_t *peer,
+ enum cp_msg_cc_leave_ind_reason_t reason,
+ cp_nid_t nid)
+{
+}
+
+void
+cp_fsm_post (cp_t *ctx, cp_fsm_event_t *event)
+{
+ fsm_event_posted = true;
+}
+
+void
+cp_fsm_trigger (cp_t *ctx, cp_fsm_event_t *event)
+{
+ fsm_event_posted = true;
+}
+
+bool
+cp_msg_cc_leave_req_receive (cp_t *ctx, cp_mme_rx_t *mme,
+ enum cp_msg_cc_leave_req_reason_t *reason)
+{
+ return true;
+}
+
+bool
+cp_msg_cc_leave_ind_receive (cp_t *ctx, cp_mme_rx_t *mme,
+ enum cp_msg_cc_leave_ind_reason_t *reason,
+ cp_nid_t *nid)
+{
+ return true;
+}
+
+void
+cp_msg_cc_leave_rsp_send (cp_t *ctx, cp_mme_peer_t *peer)
+{
+}
+
+void
+cp_beacon_discover_compute_interval (cp_t *ctx)
+{
+ discover_compute_function_call = true;
+}
+
+void
+cp_beacon_change_nek (cp_t *ctx, uint eks, cp_key_t nek, bool now)
+{
+ dbg_assert (ctx);
+
+ ctx->mac_config->nek[0].eks = MAC_EKS_MAX - 1;
+ ctx->mac_config->nek[0].nek_enc[0] = nek.key[0];
+ ctx->mac_config->nek[0].nek_enc[1] = nek.key[1];
+ ctx->mac_config->nek[0].nek_enc[2] = nek.key[2];
+ ctx->mac_config->nek[0].nek_enc[3] = nek.key[3];
+ ctx->mac_config->nek[0].nek_dec[0] = nek.key[3];
+ ctx->mac_config->nek[0].nek_dec[1] = nek.key[2];
+ ctx->mac_config->nek[0].nek_dec[2] = nek.key[1];
+ ctx->mac_config->nek[0].nek_dec[3] = nek.key[0];
+}
+
diff --git a/cesar/cp/av/cco/action/test/utest2/src/action_gen_nek.c b/cesar/cp/av/cco/action/test/utest2/src/action_gen_nek.c
new file mode 100644
index 0000000000..bd56e58785
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/src/action_gen_nek.c
@@ -0,0 +1,91 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/action_gen_nek.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include "common/std.h"
+#include "string.h"
+
+#include "lib/test.h"
+#include "lib/utils.h"
+#include "lib/swap.h"
+
+#include "cl/cl_mactotei.h"
+
+#include "common/defs/homeplugAV.h"
+#include "common/defs/ethernet.h"
+
+#include "mac/common/ntb.h"
+
+#include "cp/cp.h"
+#include "cp/fsm/fsm.h"
+#include "cp/msg/msg.h"
+#include "cp/sta/mgr/sta.h"
+
+#include "cp/cco/action/cco_action.h"
+#include "cp/cco/action/inc/cco_action.h"
+#include "cp/av/cco/action/cco_action.h"
+
+#include "cp/inc/context.h"
+#include "stdio.h"
+
+void
+test_case_gen_nek (test_t test)
+{
+ cp_t cp;
+ memset (&cp, 0, sizeof (cp_t));
+
+ /* Initialise the seed of the random generator. */
+ cp_cco_action_init (&cp);
+
+ test_begin (test, "Verify first shot")
+ {
+ uint i;
+ cp_key_t computed_keys;
+ lib_rnd_init (&cp.rnd, 0x12345678);
+ cp_secu_generate_key(&cp, lib_rnd32 (&cp.rnd),
+ 5, &computed_keys);
+ lib_rnd_init (&cp.rnd, 0x12345678);
+ cp_av_cco_action_cco__cco_nek_change (&cp);
+ for (i = 0; i < COUNT (cp.cco_action.nek_new.key); i++)
+ {
+ test_fail_unless (cp.cco_action.nek_new.key[i]
+ == computed_keys.key[i]);
+ }
+ }
+ test_end;
+}
+
+int
+main (void)
+{
+ test_t test;
+
+ test_init (test, 0, NULL);
+ test_case_gen_nek (test);
+
+ test_case_begin (test, "Memory leaks");
+
+ test_begin (test, "Memory leaks verification")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+
+}
diff --git a/cesar/cp/av/cco/action/test/utest2/src/core_stub.c b/cesar/cp/av/cco/action/test/utest2/src/core_stub.c
new file mode 100644
index 0000000000..6f6ab9333e
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/src/core_stub.c
@@ -0,0 +1,43 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/core_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include "common/std.h"
+#include "cp/cp.h"
+#include "cp/fsm/forward.h"
+#include "cp/sta/core/core.h"
+
+static uint core_time = 0;
+
+u32
+cp_sta_core_get_date_ms (cp_t *ctx)
+{
+ return (core_time += 10);
+}
+
+void
+cp_sta_core_stop_timed_or_cyclic_event(cp_t *cp_ctx,
+ cp_sta_core_timed_event_def_t *sta_core_timed_event)
+{
+}
+
+void
+cp_sta_core_gen_timed_event(cp_t *cp_ctx,
+ cp_sta_core_timed_event_def_t *sta_core_timed_event,
+ cp_fsm_event_t *fsm_event,
+ uint event_delay_ms)
+{
+}
diff --git a/cesar/cp/av/cco/action/test/utest2/src/fsm_handover.c b/cesar/cp/av/cco/action/test/utest2/src/fsm_handover.c
new file mode 100644
index 0000000000..4d7de47039
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/src/fsm_handover.c
@@ -0,0 +1,280 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file fsm_handover.c
+ * \brief Test the handover procedure.
+ * \ingroup cp_cco_action
+ *
+ */
+#include "common/std.h"
+#include "lib/test.h"
+#include "lib/blk.h"
+#include "common/defs/ethernet.h"
+
+#include "cp/cp.h"
+#include "cl/cl.h"
+#include "mac/sar/sar.h"
+#include "cp/av/cco/action/handover.h"
+#include "cp/av/cco/action/cco_action.h"
+#include "cp/msg/msg.h"
+#include "cp/beacon/beacon.h"
+
+#include "cp/inc/context.h"
+#include "cl/inc/context.h"
+#include "mac/sar/inc/context.h"
+#include "cp/av/cco/action/inc/cco_action.h"
+
+static u8 buffer[ETH_PACKET_MAX_SIZE];
+
+static bool handover_req;
+static mac_t handover_req_peer_mac_addr;
+static cp_tei_t handover_req_peer_tei;
+
+static bool handover_info_ind;
+static mac_t handover_info_ind_peer_mac_addr;
+static cp_tei_t handover_info_ind_peer_tei;
+
+static cp_tei_t beacon_handover_cco_new_tei;
+
+void
+test_case__handover_discover_done (test_t test)
+{
+ test_case_begin (test, "Discover done");
+
+ test_begin (test, "Selection CCo-CCo user appointed")
+ {
+ cp_t cp;
+ cl_t cl;
+ sar_t sar;
+ mac_store_t *mac_store;
+ mac_config_t mac_config;
+ cp_net_t *net;
+ cp_sta_t *sta;
+ cp_sta_own_data_t *own;
+ uint i;
+
+ /* Initialise the modules. */
+ memset (&sar, 0, sizeof (sar));
+ memset (&cl, 0, sizeof (cl));
+ memset (&cp, 0, sizeof (cp_t));
+ memset (&mac_config, 0, sizeof (mac_config_t));
+
+ cp_cco_action_init (&cp);
+ cp_sta_mgr_init (&cp);
+ mac_store = mac_store_init ();
+
+ sar.mac_store = mac_store;
+ cp.mac_store = mac_store;
+ cp.cl = &cl;
+ cp.sar = &sar;
+ cp.mac_config = &mac_config;
+
+ /* Add the network. */
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+
+ /* Configure our own station. */
+ cp_sta_mgr_set_our_avln (&cp, net);
+ cp_sta_own_data_set_mac_address (&cp, 1);
+ cp_sta_own_data_set_tei (&cp, 1);
+ cp_sta_own_data_set_authenticated_status (&cp, true);
+ cp_sta_own_data_set_cco_status (&cp, true);
+ own = cp_sta_mgr_get_sta_own_data (&cp);
+ own->cco_prefered = true;
+
+ /* Add some stations. */
+ for (i = 2; i < 10; i++)
+ {
+ sta = cp_sta_mgr_sta_add (&cp, net, i, i);
+ cp_sta_set_authenticated (&cp, sta, true);
+ sta->cco_cap = 1;
+ /* Add the station to the selection process. */
+ cp_av_cco_action_cco_selection__sta_add (&cp, net, sta);
+ slab_release (sta);
+ }
+
+ /* Launch the test. */
+ handover_req = false;
+ cp_av_cco_action_handover__discover_done (&cp);
+ test_fail_unless (heap_empty (&cp.cco_action.selection_heap) == true);
+ test_fail_unless (handover_req == false);
+
+ /* Uninitialise the modules. */
+ cp_cco_action_uninit (&cp);
+ cp_sta_mgr_uninit (&cp);
+
+ /* Remove the stations from the store. */
+ for (i = 2; i < 10; i++)
+ {
+ dbg_check (mac_store_sta_remove (mac_store, i));
+ }
+
+ mac_store_uninit (mac_store);
+ }
+ test_end;
+
+ test_begin (test, "Selection CCo-CCo not user appointed")
+ {
+ cp_t cp;
+ cl_t cl;
+ sar_t sar;
+ mac_store_t *mac_store;
+ mac_config_t mac_config;
+ cp_net_t *net;
+ cp_sta_t *sta;
+ uint i;
+
+ /* Initialise the modules. */
+ memset (&sar, 0, sizeof (sar));
+ memset (&cl, 0, sizeof (cl));
+ memset (&cp, 0, sizeof (cp_t));
+ memset (&mac_config, 0, sizeof (mac_config_t));
+
+ cp_cco_action_init (&cp);
+ cp_sta_mgr_init (&cp);
+ mac_store = mac_store_init ();
+
+ sar.mac_store = mac_store;
+ cp.mac_store = mac_store;
+ cp.cl = &cl;
+ cp.sar = &sar;
+ cp.mac_config = &mac_config;
+
+ /* Add the network. */
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+
+ /* Configure our own station. */
+ cp_sta_mgr_set_our_avln (&cp, net);
+ cp_sta_own_data_set_mac_address (&cp, 1);
+ cp_sta_own_data_set_tei (&cp, 1);
+ cp_sta_own_data_set_authenticated_status (&cp, true);
+ cp_sta_own_data_set_cco_status (&cp, true);
+ cp_sta_mgr_get_sta_own_data (&cp);
+
+ /* Add some stations. */
+ for (i = 2; i < 10; i++)
+ {
+ sta = cp_sta_mgr_sta_add (&cp, net, i, i);
+ cp_sta_set_authenticated (&cp, sta, true);
+ if (i == 2)
+ sta->cco_cap = 1;
+ /* Add the station to the selection process. */
+ cp_av_cco_action_cco_selection__sta_add (&cp, net, sta);
+ slab_release (sta);
+ }
+
+ /* Launch the test. */
+ handover_req = false;
+ handover_req_peer_mac_addr = 0;
+ handover_req_peer_tei = 0;
+
+ cp_av_cco_action_handover__start (&cp);
+ test_fail_unless (heap_empty (&cp.cco_action.selection_heap) == false);
+ test_fail_unless (handover_req == true);
+ test_fail_unless (handover_req_peer_tei == 2);
+ test_fail_unless (handover_req_peer_mac_addr == 2);
+
+ /* Launch the test with a CCo-Level 1. */
+ handover_req = false;
+ handover_req_peer_mac_addr = 0;
+ handover_req_peer_tei = 0;
+
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 2);
+ sta->cco_cap = 0;
+ cp_av_cco_action_cco_selection__sta_remove (&cp, sta);
+ cp_av_cco_action_cco_selection__sta_add (&cp, net, sta);
+ slab_release (sta);
+
+ sta = cp_sta_mgr_sta_get_from_mac (&cp, 4);
+ sta->cco_cap = 1;
+ cp_av_cco_action_cco_selection__sta_add (&cp, net, sta);
+ slab_release (sta);
+
+ cp_av_cco_action_handover__start (&cp);
+ test_fail_unless (heap_empty (&cp.cco_action.selection_heap) == false);
+ test_fail_unless (handover_req == true);
+ test_fail_unless (handover_req_peer_tei == 4);
+ test_fail_unless (handover_req_peer_mac_addr == 4);
+
+ /* Uninitialise the modules. */
+ cp_cco_action_uninit (&cp);
+ cp_sta_mgr_uninit (&cp);
+
+ /* Remove the stations from the store. */
+ for (i = 2; i < 10; i++)
+ {
+ dbg_check (mac_store_sta_remove (mac_store, i));
+ }
+
+ mac_store_uninit (mac_store);
+ }
+ test_end;
+}
+
+void
+test_suite__cco_handover (test_t test)
+{
+ test_suite_begin (test, "FSM Handover CCo");
+
+ test_case__handover_discover_done (test);
+}
+
+int
+main (void)
+{
+ test_t test;
+ test_init (test, 0, NULL);
+
+ test_suite__cco_handover (test);
+
+ test_case_begin (test, "Memory leaks");
+ test_begin (test, "Memory leaks verification")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
+/* Stubs functions. */
+
+u8 *
+cp_cl_interf_get_buffer_tx (cp_t *ctx)
+{
+ return buffer;
+}
+
+void
+cp_msg_cc_handover_req_send (cp_t *ctx, cp_mme_peer_t *peer,
+ cp_msg_cc_handover_req_soft_hard_t soft_hard,
+ cp_msg_cc_handover_req_reason_t reason)
+{
+ handover_req = true;
+ handover_req_peer_mac_addr = peer->mac;
+ handover_req_peer_tei = peer->tei;
+}
+
+cp_mme_tx_t *
+cp_msg_cc_handover_info_ind_send_begin (cp_t *ctx, cp_mme_peer_t *peer,
+ cp_msg_cc_handover_info_ind_rsc_t rsc,
+ cp_tei_t bcco,
+ uint num_sta)
+{
+ handover_info_ind = true;
+ handover_info_ind_peer_mac_addr = peer->mac;
+ handover_info_ind_peer_tei = peer->tei;
+
+ return NULL;
+}
+
+void
+cp_av_beacon_cco_handover (cp_t *ctx, cp_tei_t tei)
+{
+ beacon_handover_cco_new_tei = tei;
+}
diff --git a/cesar/cp/av/cco/action/test/utest2/src/garbage.c b/cesar/cp/av/cco/action/test/utest2/src/garbage.c
new file mode 100644
index 0000000000..95e237118a
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/src/garbage.c
@@ -0,0 +1,462 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/garbage.c
+ * \brief Test the garbage.
+ * \ingroup cp_cco
+ *
+ */
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include "common/std.h"
+#include "lib/test.h"
+
+#include "mac/common/ntb.h"
+
+#include "cp/cp.h"
+#include "cp/defs.h"
+#include "cp/msg/msg.h"
+
+#include "cp/cco/action/cco_action.h"
+#include "cp/cco/action/inc/cco_action.h"
+
+#include "cp/inc/context.h"
+
+#include "cl/cl.h"
+#include "cl/inc/context.h"
+#include "mac/sar/inc/context.h"
+
+#include "stdio.h"
+
+#define TEST_CCO_ACTION_NB_STA 10
+
+cyg_handle_t my_thread_handle;
+cyg_thread my_thread;
+u8 my_thread_stack [CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+/** The garbage function will call the tei_lease_check function to expire
+ * the expired TEI lease in the station of the AVLN.
+ *
+ * Environment:
+ *
+ * * Add a thread to use the cyg_thread_delay, this thread will be use
+ * for this test case at least.
+ * * Add some station with a TEI lease of 5 eCos ticks i.e. 50 ms.
+ *
+ * The time between the garbage function call and the time verification
+ * of the test shall be greater than the 5 eCos ticks.
+ *
+ * At the end no more station shall be present i.e. the lease had expired.
+ */
+void
+my_thread_entry (cyg_addrword_t data)
+{
+ test_t test;
+
+ test_init (test, 0, NULL);
+
+ test_case_begin (test, "Verify garbage result");
+
+ printf ("Initialising the test ...\n");
+ test_begin (test, "Verify")
+ {
+ cp_sta_t *sta;
+ uint i;
+ cp_t cp;
+ cp_net_t *net;
+ mac_config_t mac_config;
+ uint date;
+ cl_t cl;
+ sar_t sar;
+
+ mac_ntb_init (&mac_config);
+
+ cp_cco_action_init (&cp);
+ cp_sta_mgr_init (&cp);
+ cp.cl = &cl;
+ cp.sar = &sar;
+ cp.mac_store = mac_store_init ();
+ cp.mac_config = &mac_config;
+ cl.mactotei = NULL;
+ sar.mac_store = cp.mac_store;
+
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+ cp_sta_mgr_set_our_avln (&cp, net);
+ cp_sta_own_data_set_tei (&cp, 244);
+ cp_sta_own_data_set_cco_status (&cp, true);
+
+ printf ("Starting the test, please wait...\n");
+ for (i = 0; i < TEST_CCO_ACTION_NB_STA; i++)
+ {
+ sta = cp_sta_mgr_sta_add (&cp, net, 0, i + 1);
+ sta->tei_lease_date_ms = i;
+ slab_release (sta);
+ sta = cp_sta_mgr_sta_add (&cp, net, i + 1, i + 1);
+ cp_sta_set_authenticated (&cp, sta, CP_NET_STA_ASSOC);
+ sta->tei_lease_date_ms = i;
+ slab_release (sta);
+ }
+ cp_sta_mgr_commit_to_dataplane (&cp);
+ date = cyg_current_time () + 600;
+
+ while (cyg_current_time () < date)
+ {
+ cyg_thread_delay (5);
+ cp_cco_action_garbage (&cp);
+ }
+
+ test_fail_if (set_empty (&net->associated_stas) == false);
+ test_fail_if (set_empty (&net->unassociated_stas) == false);
+
+ cp_cco_action_uninit (&cp);
+ cp_sta_mgr_uninit (&cp);
+ mac_store_uninit (cp.mac_store);
+ }
+ test_end;
+
+ test_begin (test, "Verify")
+ {
+ cp_sta_t *sta;
+ uint i;
+ test_t test;
+ cp_t cp;
+ cp_net_t *net;
+ mac_config_t mac_config;
+ uint date;
+ cl_t cl;
+ sar_t sar;
+
+ mac_ntb_init (&mac_config);
+
+ test_init (test, 0, NULL);
+
+ cp_cco_action_init (&cp);
+ cp_sta_mgr_init (&cp);
+ cp.cl = &cl;
+ cp.sar = &sar;
+ cp.mac_store = mac_store_init ();
+ cp.mac_config = &mac_config;
+ cl.mactotei = NULL;
+ sar.mac_store = cp.mac_store;
+
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+ cp_sta_mgr_set_our_avln (&cp, net);
+ cp_sta_own_data_set_tei (&cp, 244);
+ cp_sta_own_data_set_cco_status (&cp, true);
+
+ printf ("Starting the test, please wait...\n");
+ for (i = 0; i < TEST_CCO_ACTION_NB_STA; i++)
+ {
+ sta = cp_sta_mgr_sta_add (&cp, net, i + 1, i + 1);
+ cp_sta_set_assoc_confirmed (&cp, sta, false);
+ sta->assoc_req_last_ms = i + 1;
+ slab_release (sta);
+ }
+
+ date = CP_ASSOC_FULL_TIMEOUT_MS / 2;
+ cp_sta_mgr__assoc__timeout (&cp, date);
+
+ for (i = 0; i < TEST_CCO_ACTION_NB_STA; i++)
+ {
+ sta = cp_sta_mgr_sta_get_assoc (&cp, net, i + 1);
+ test_fail_if (cp_sta_get_assoc_confirmed (&cp, sta) != false);
+ slab_release (sta);
+ }
+
+ date = CP_ASSOC_FULL_TIMEOUT_MS + 100;
+ cp_sta_mgr__assoc__timeout (&cp, date);
+
+ for (i = 0; i < TEST_CCO_ACTION_NB_STA; i++)
+ {
+ sta = cp_sta_mgr_sta_get_assoc (&cp, net, i + 1);
+ test_fail_if (cp_sta_get_assoc_confirmed (&cp, sta) != true);
+ slab_release (sta);
+ }
+
+ date = CP_ASSOC_FULL_TIMEOUT_MS / 2;
+ cp_sta_mgr__assoc__timeout (&cp, date);
+
+ for (i = 0; i < TEST_CCO_ACTION_NB_STA; i++)
+ {
+ sta = cp_sta_mgr_sta_get_assoc (&cp, net, i + 1);
+ test_fail_if (cp_sta_get_assoc_confirmed (&cp, sta) != true);
+ slab_release (sta);
+ }
+
+ cp_cco_action_uninit (&cp);
+ cp_sta_mgr_uninit (&cp);
+ mac_store_uninit (cp.mac_store);
+ }
+ test_end;
+
+ test_case_begin (test, "Memory leaks");
+
+ test_begin (test, "Memory leaks verification")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ printf ("Initialising the test ...\n");
+ test_begin (test, "Garbage calling the timeout association. ")
+ {
+ cp_sta_t *sta;
+ uint i;
+ cp_t cp;
+ cp_net_t *net;
+ mac_config_t mac_config;
+ uint date;
+ cl_t cl;
+ sar_t sar;
+
+ mac_ntb_init (&mac_config);
+
+ cp_cco_action_init (&cp);
+ cp_sta_mgr_init (&cp);
+ cp.cl = &cl;
+ cp.sar = &sar;
+ cp.mac_store = mac_store_init ();
+ cp.mac_config = &mac_config;
+ cl.mactotei = NULL;
+ sar.mac_store = cp.mac_store;
+
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+ cp_sta_mgr_set_our_avln (&cp, net);
+ cp_sta_own_data_set_tei (&cp, 244);
+ cp_sta_own_data_set_cco_status (&cp, true);
+
+ printf ("Starting the test, please wait...\n");
+ for (i = 0; i < TEST_CCO_ACTION_NB_STA; i++)
+ {
+ sta = cp_sta_mgr_sta_add (&cp, net, i + 1, i + 1);
+ cp_sta_set_assoc_confirmed (&cp, sta, false);
+ sta->tei_lease_date_ms = 24000;
+ sta->assoc_req_last_ms = 10 + i;
+ slab_release (sta);
+ }
+ cp_sta_mgr_commit_to_dataplane (&cp);
+
+ for (i = 0; i < TEST_CCO_ACTION_NB_STA; i++)
+ {
+ test_fail_if (cp_sta_get_assoc_confirmed (&cp, sta) != false);
+ }
+
+ date = cyg_current_time () + 2400;
+ while (cyg_current_time () < date)
+ {
+ cyg_thread_delay (5);
+ cp_cco_action_garbage (&cp);
+ }
+
+ for (i = 0; i < TEST_CCO_ACTION_NB_STA; i++)
+ {
+ test_fail_if (cp_sta_get_assoc_confirmed (&cp, sta) != true);
+ }
+
+ cp_cco_action_uninit (&cp);
+ cp_sta_mgr_uninit (&cp);
+ mac_store_uninit (cp.mac_store);
+ }
+ test_end;
+
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+}
+
+int
+main (void)
+{
+
+ // Create the thread object.
+ cyg_thread_create( 1, my_thread_entry, 0, "garbage", my_thread_stack,
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, &my_thread_handle,
+ &my_thread);
+
+
+ // Activate the thread.
+ cyg_thread_resume (my_thread_handle);
+
+ return 0;
+}
+
+void
+cp_beacon_change_snid (cp_t *ctx, u8 snid)
+{
+}
+
+/**
+ * Send a CC_ASSOC.REQ.
+ * \param ctx control plane context
+ * \param peer peer information
+ * \param data MME data to send
+ */
+void
+cp_msg_cc_assoc_req_send (cp_t *ctx, cp_mme_peer_t *peer,
+ const cp_msg_cc_assoc_req_t *data)
+{
+}
+
+/**
+ * Receive a CC_ASSOC.REQ.
+ * \param ctx control plane context
+ * \param mme MME handle
+ * \param data received MME data
+ * \return true on success
+ */
+bool
+cp_msg_cc_assoc_req_receive (cp_t *ctx, cp_mme_rx_t *mme,
+ cp_msg_cc_assoc_req_t *data)
+{
+ return true;
+}
+
+/**
+ * Send a CC_ASSOC.CNF.
+ * \param ctx control plane context
+ * \param peer peer information
+ * \param data MME data to send
+ */
+void
+cp_msg_cc_assoc_cnf_send (cp_t *ctx, cp_mme_peer_t *peer,
+ const cp_msg_cc_assoc_cnf_t *data)
+{
+}
+
+/**
+ * Receive a CC_ASSOC.CNF.
+ * \param ctx control plane context
+ * \param mme MME handle
+ * \param data received MME data
+ * \return true on success
+ */
+bool
+cp_msg_cc_assoc_cnf_receive (cp_t *ctx, cp_mme_rx_t *mme,
+ cp_msg_cc_assoc_cnf_t *data)
+{
+ return true;
+}
+
+/**
+ * Send a CC_LEAVE.CNF.
+ * \param ctx control plane context
+ * \param peer peer information
+ */
+void
+cp_msg_cc_leave_cnf_send (cp_t *ctx, cp_mme_peer_t *peer)
+{
+}
+
+/**
+ * Begin a CC_SET_TEI_MAP.IND construction.
+ * \param ctx control plane context
+ * \param peer peer information
+ * \param mode update, add or delete
+ * \param sta_nb number of stations sent
+ * \return the MME being constructed
+ */
+cp_mme_tx_t *
+cp_msg_cc_set_tei_map_ind_send_begin (
+ cp_t *ctx, cp_mme_peer_t *peer,
+ enum cp_msg_cc_set_tei_map_ind_mode_t mode, uint sta_nb)
+{
+ return NULL;
+}
+
+/**
+ *
+ * Write a station to a CC_SET_TEI_MAP.IND being constructed.
+ * \param ctx control plane context
+ * \param mme MME being constructed
+ * \param tei STA TEI
+ * \param mac STA mac address
+ * \param status STA status
+ */
+void
+cp_msg_cc_set_tei_map_ind_send_sta (
+ cp_t *ctx, cp_mme_tx_t *mme, cp_tei_t tei, mac_t mac,
+ enum cp_msg_cc_set_tei_map_ind_status_t status)
+{
+}
+
+/**
+ * Finalise and send a CC_SET_TEI_MAP.IND message.
+ * \param ctx control plane context
+ * \param mme MME being constructed
+ */
+void
+cp_msg_cc_set_tei_map_ind_send_end (cp_t *ctx, cp_mme_tx_t *mme)
+{
+}
+
+/**
+ * Receive a CM_GET_KEY.REQ.
+ * \param ctx control plane context
+ * \param mme MME handle
+ * \param data received MME data
+ * \return true on success
+ *
+ * Encryption and protocol run information is available in the MME handle.
+ */
+bool
+cp_msg_cm_get_key_req_receive (cp_t *ctx, cp_mme_rx_t *mme,
+ cp_msg_cm_get_key_req_t *data)
+{
+ return true;
+}
+
+/**
+ * Send a CM_GET_KEY.CNF.
+ * \param ctx control plane context
+ * \param peer peer information
+ * \param peks payload encryption key select
+ * \param prun protocol run information
+ * \param data MME data to send
+ */
+void
+cp_msg_cm_get_key_cnf_send (cp_t *ctx, cp_mme_peer_t *peer,
+ cp_mme_peks_t peks,
+ const cp_secu_protocol_run_t *prun,
+ const cp_msg_cm_get_key_cnf_t *data)
+{
+}
+
+/**
+ * Send a CC_LEAVE.IND.
+ * \param ctx control plane context
+ * \param peer peer information
+ * \param reason reason for the disassociation
+ * \param nid NID
+ */
+void
+cp_msg_cc_leave_ind_send (cp_t *ctx, cp_mme_peer_t *peer,
+ enum cp_msg_cc_leave_ind_reason_t reason,
+ cp_nid_t nid)
+{
+}
+
+bool
+cp_msg_cc_leave_req_receive (cp_t *ctx, cp_mme_rx_t *mme,
+ enum cp_msg_cc_leave_req_reason_t *reason)
+{
+ return true;
+}
+
+bool
+cp_msg_cc_leave_ind_receive (cp_t *ctx, cp_mme_rx_t *mme,
+ enum cp_msg_cc_leave_ind_reason_t *reason,
+ cp_nid_t *nid)
+{
+ return true;
+}
+
+void
+cp_msg_cc_leave_rsp_send (cp_t *ctx, cp_mme_peer_t *peer)
+{
+}
diff --git a/cesar/cp/av/cco/action/test/utest2/src/pbproc_stub.c b/cesar/cp/av/cco/action/test/utest2/src/pbproc_stub.c
new file mode 100644
index 0000000000..17f1ec5710
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/src/pbproc_stub.c
@@ -0,0 +1,22 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/pbproc.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "mac/pbproc/pbproc.h"
+
+void
+pbproc_activate (pbproc_t *ctx, bool activate)
+{
+}
diff --git a/cesar/cp/av/cco/action/test/utest2/src/sar_stub.c b/cesar/cp/av/cco/action/test/utest2/src/sar_stub.c
new file mode 100644
index 0000000000..4a65d0b9c1
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/src/sar_stub.c
@@ -0,0 +1,45 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/sar_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "mac/sar/sar.h"
+#include "mac/sar/inc/context.h"
+
+/**
+ * Remove a station from the SAR and the mac store.
+ * \param ctx the CP context.
+ * \param tei the station tei.
+ *
+ * Remove all the MFS from the expiration mechanism of the SAR and ends to
+ * remove the station from the mac store.
+ */
+void
+sar_sta_remove (sar_t *ctx, u8 tei)
+{
+ dbg_assert (ctx);
+ dbg_assert (ctx->mac_store);
+ dbg_assert (tei);
+
+ dbg_check (mac_store_sta_remove (ctx->mac_store, tei));
+}
+
+void
+sar_activate (sar_t *ctx, bool state)
+{
+}
+
+void
+sar_cleanup (sar_t *ctx)
+{
+}
diff --git a/cesar/cp/av/cco/action/test/utest2/src/secu_stub.c b/cesar/cp/av/cco/action/test/utest2/src/secu_stub.c
new file mode 100644
index 0000000000..afcdc3fbe1
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/src/secu_stub.c
@@ -0,0 +1,46 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/secu_stub.c
+ * \brief The security functions.
+ * \ingroup cp/cco/action
+ *
+ */
+#include "common/std.h"
+
+#include "cp/secu/secu.h"
+
+/**
+ * Generate the AES key.
+ * \param num a random number.
+ * \param output the key generated.
+ */
+void
+cp_secu_generate_key (cp_t*ctx, uint num,
+ uint nb_iteration, cp_key_t *output)
+{
+ uint i;
+ dbg_assert (num);
+
+ for (i = 0; i < 4; i++)
+ output->key[i] = num;
+}
+
+bool
+cp_secu_protocol_check (const cp_secu_protocol_run_t *prun,
+ const cp_secu_protocol_run_t *prun_recv,
+ const cp_secu_protocol_run_check_result_t expected_result)
+{
+ return true;
+}
+
+void
+cp_secu_protocol_next (cp_secu_protocol_run_t *prun, lib_rnd_t *rnd,
+ bool last)
+{
+}
diff --git a/cesar/cp/av/cco/action/test/utest2/src/sta_action.c b/cesar/cp/av/cco/action/test/utest2/src/sta_action.c
new file mode 100644
index 0000000000..b871fb1786
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/src/sta_action.c
@@ -0,0 +1,26 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/sta_action.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "cp/sta/action/action.h"
+
+void
+cp_av_sta_action_assoc__authenticated__renew (cp_t *ctx)
+{
+}
+
+void
+cp_sta_core_checkpoint (cp_t *ctx)
+{
+}
diff --git a/cesar/cp/av/cco/action/test/utest2/src/status.c b/cesar/cp/av/cco/action/test/utest2/src/status.c
new file mode 100644
index 0000000000..ff79a69319
--- /dev/null
+++ b/cesar/cp/av/cco/action/test/utest2/src/status.c
@@ -0,0 +1,316 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/status.c
+ * \brief The four status possible for the station.
+ * \ingroup « module »
+ *
+ * This shall test the four steps of the stations.
+ * - From unassociated to unassociated CCo.
+ * - From UCCo to CCo.
+ * - From CCo to UCCo.
+ * - From CCo to STA.
+ * - From STA to CCo.
+ */
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include "common/std.h"
+#include "lib/test.h"
+#include "lib/blk.h"
+
+/* Public interfaces. */
+#include "cp/cp.h"
+#include "cp/cco/action/cco_action.h"
+#include "cp/av/cco/action/cco_action.h"
+
+/* Override interfaces. */
+#include "cp/inc/context.h"
+#include "cl/inc/context.h"
+#include "mac/sar/inc/context.h"
+
+static bool central_beacon;
+
+void
+test_suite__cco_action__case__Usta_to_cco (test_t test)
+{
+ test_case_begin (test, "Unassociated Station to CCo");
+
+ test_begin (test, "USTA to CCo")
+ {
+ cp_t cp;
+ cl_t cl;
+ sar_t sar;
+ mac_config_t mac_config;
+ cp_net_t *net;
+
+ /* Initialise the CP CCo action module. */
+ cp_cco_action_init (&cp);
+
+ /* Initialise the Station manager. */
+ cp_sta_mgr_init (&cp);
+
+ /* Initialise the CP context. */
+ cp.cl = &cl;
+ cp.mac_config = &mac_config;
+ cp.sar = &sar;
+
+ /* Store a fake NID to the station. */
+ cp_sta_own_data_set_nid (&cp, 0x12345678);
+
+ /* Starting the CCo. */
+ central_beacon = false;
+ cp_av_cco_action_cco__unassoc_start (&cp);
+
+ /* The station shall now have a TEI.
+ * It shall be authenticated.
+ * Have the CCo status. */
+ test_fail_if (cp_sta_own_data_get_tei (&cp) == MAC_TEI_UNASSOCIATED);
+ test_fail_if (cp_sta_own_data_get_authenticated_status (&cp) ==
+ false);
+ test_fail_if (cp_sta_own_data_get_cco_status (&cp) == false);
+
+ /* It shall choose a SNID and set our AVLN. */
+ net = cp_sta_mgr_get_our_avln (&cp);
+ test_fail_if (net == NULL);
+ test_fail_if (cp_net_get_snid (&cp, net)
+ != cp_sta_own_data_get_snid (&cp));
+ test_fail_if (cp_net_get_nid (&cp, net)
+ != cp_sta_own_data_get_nid (&cp));
+
+ /* Uninitialise the station manager. */
+ cp_sta_mgr_uninit (&cp);
+
+ /* Uninitialise the CCo action module. */
+ cp_cco_action_uninit (&cp);
+ }
+ test_end;
+}
+
+void
+test_suite__cco_action__case__sta_to_cco (test_t test)
+{
+ test_case_begin (test, "Associated Station to CCo");
+
+ test_begin (test, "STA to CCo")
+ {
+ cp_t cp;
+ cl_t cl;
+ sar_t sar;
+ mac_config_t mac_config;
+ cp_net_t *net;
+
+ /* Initialise the CP CCo action module. */
+ cp_cco_action_init (&cp);
+
+ /* Initialise the Station manager. */
+ cp_sta_mgr_init (&cp);
+
+ /* Initialise the CP context. */
+ cp.cl = &cl;
+ cp.mac_config = &mac_config;
+ cp.sar = &sar;
+
+ /* Configure our AVLN. */
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+ cp_sta_mgr_set_our_avln (&cp, net);
+
+ /* Configure the station. */
+ cp_sta_own_data_set_tei (&cp, 23);
+ cp_sta_own_data_set_authenticated_status (&cp, true);
+ cp_sta_own_data_set_cco_status (&cp, true);
+
+ /* Starting the CCo. */
+ central_beacon = false;
+ cp_av_cco_action_cco__unassoc_start (&cp);
+
+ /* The station shall now have a TEI.
+ * It shall be authenticated.
+ * Have the CCo status. */
+ test_fail_if (cp_sta_own_data_get_tei (&cp) != 23);
+ test_fail_if (cp_sta_own_data_get_authenticated_status (&cp) ==
+ false);
+ test_fail_if (cp_sta_own_data_get_cco_status (&cp) == false);
+
+ /* It shall choose a SNID and set our AVLN. */
+ net = cp_sta_mgr_get_our_avln (&cp);
+ test_fail_if (net == NULL);
+ test_fail_if (cp_net_get_snid (&cp, net)
+ != cp_sta_own_data_get_snid (&cp));
+ test_fail_if (cp_net_get_nid (&cp, net)
+ != cp_sta_own_data_get_nid (&cp));
+
+ /* Uninitialise the station manager. */
+ cp_sta_mgr_uninit (&cp);
+
+ /* Uninitialise the CCo action module. */
+ cp_cco_action_uninit (&cp);
+ }
+ test_end;
+}
+
+
+void
+test_suite__cco_action__case__cco_to_station (test_t test)
+{
+ test_case_begin (test, "CCo to STA");
+
+ test_begin (test, "CCo to STA")
+ {
+ cp_t cp;
+ cl_t cl;
+ sar_t sar;
+ mac_config_t mac_config;
+ cp_net_t *net;
+
+ /* Initialise the CP CCo action module. */
+ cp_cco_action_init (&cp);
+
+ /* Initialise the Station manager. */
+ cp_sta_mgr_init (&cp);
+
+ /* Initialise the CP context. */
+ cp.cl = &cl;
+ cp.mac_config = &mac_config;
+ cp.sar = &sar;
+
+ /* Store a fake NID to the station. */
+ cp_sta_own_data_set_nid (&cp, 0x12345678);
+
+ /* Configure our AVLN. */
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+ cp_sta_mgr_set_our_avln (&cp, net);
+
+ /* Configure the station. */
+ cp_sta_own_data_set_tei (&cp, 23);
+ cp_sta_own_data_set_authenticated_status (&cp, true);
+ cp_sta_own_data_set_cco_status (&cp, true);
+
+ /* Stopping the CCo. */
+ cp_av_cco_action_cco__assoc_stop (&cp);
+
+ /* The station shall keep it's TEI.
+ * It shall be authenticated.
+ * have not the CCo status. */
+ test_fail_if (cp_sta_own_data_get_tei (&cp) != 23);
+ test_fail_if (cp_sta_own_data_get_authenticated_status (&cp) ==
+ false);
+ test_fail_if (cp_sta_own_data_get_cco_status (&cp) == true);
+
+ /* It shall choose a SNID and set our AVLN. */
+ net = cp_sta_mgr_get_our_avln (&cp);
+ test_fail_if (net == NULL);
+ test_fail_if (cp_net_get_snid (&cp, net)
+ != cp_sta_own_data_get_snid (&cp));
+ test_fail_if (cp_net_get_nid (&cp, net)
+ != cp_sta_own_data_get_nid (&cp));
+
+ /* Uninitialise the station manager. */
+ cp_sta_mgr_uninit (&cp);
+
+ /* Uninitialise the CCo action module. */
+ cp_cco_action_uninit (&cp);
+ }
+ test_end;
+}
+
+
+void
+test_suite__cco_action__case__cco_to_unassociated_station (test_t test)
+{
+ test_case_begin (test, "CCo to unassociated station");
+
+ test_begin (test, "lets go")
+ {
+ cp_t cp;
+ cl_t cl;
+ sar_t sar;
+ mac_config_t mac_config;
+ cp_net_t *net;
+ cp_sta_t *sta;
+
+ cp_cco_action_init (&cp);
+ cp_sta_mgr_init (&cp);
+
+ cp.cl = &cl;
+ cp.sar = &sar;
+ cp.mac_config = &mac_config;
+ cp.mac_store = mac_store_init ();
+
+ memset (&cl, 0, sizeof (cl_t));
+ memset (&sar, 0, sizeof (sar_t));
+ memset (&mac_config, 0, sizeof (mac_config_t));
+ sar.mac_store = cp.mac_store;
+
+ /* configure the test. */
+ net = cp_sta_mgr_add_avln (&cp, 1, 1);
+ cp_sta_mgr_set_our_avln (&cp, net);
+
+ cp_sta_own_data_set_tei (&cp, 1);
+ cp_sta_own_data_set_authenticated_status (&cp, true);
+ cp_sta_own_data_set_cco_status (&cp, true);
+
+ /* Add some stations. */
+ sta = cp_sta_mgr_sta_add (&cp, net, 0x2, 0x2);
+ slab_release (sta);
+ sta = cp_sta_mgr_sta_add (&cp, net, 0x3, 0x3);
+ slab_release (sta);
+
+ /* Launch the test. */
+ cp_av_cco_action_cco__unassoc_stop (&cp);
+
+ /* TEI, auth and OUR AVLN are reseted by UNASSOCIATED enter function.
+ */
+ test_fail_unless (cp_sta_own_data_get_cco_status (&cp) == false);
+ test_fail_unless (!cp_net_is_empty (&cp, net));
+
+ cp_sta_mgr_uninit (&cp);
+ cp_cco_action_uninit (&cp);
+ mac_store_uninit (cp.mac_store);
+ }
+ test_end;
+}
+
+void
+test_suite__cco_action__station_status (test_t test)
+{
+ test_suite_begin (test, "The Station different status");
+
+ test_suite__cco_action__case__Usta_to_cco (test);
+ test_suite__cco_action__case__sta_to_cco (test);
+ test_suite__cco_action__case__cco_to_station (test);
+ test_suite__cco_action__case__cco_to_unassociated_station (test);
+}
+
+int
+main (void)
+{
+ test_t test;
+
+ test_init (test, 0, NULL);
+
+ test_case_begin (test, "Memory leaks");
+
+ test_suite__cco_action__station_status (test);
+
+ test_begin (test, "Memory leaks verification")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
+bool
+cp_pwl_is_new_beacon_period (cp_t *ctx)
+{
+ return true;
+}
diff --git a/cesar/cp/av/cco/bw/Module b/cesar/cp/av/cco/bw/Module
index 2ba12b179c..6d551d6d8b 100644
--- a/cesar/cp/av/cco/bw/Module
+++ b/cesar/cp/av/cco/bw/Module
@@ -1 +1,3 @@
-SOURCES:=bw.c
+SOURCES := bw.c
+
+MODULES := cp/cco/bw
diff --git a/cesar/cp/av/cco/bw/stub/Module b/cesar/cp/av/cco/bw/stub/Module
index 2ba12b179c..d76f250a93 100644
--- a/cesar/cp/av/cco/bw/stub/Module
+++ b/cesar/cp/av/cco/bw/stub/Module
@@ -1 +1,3 @@
-SOURCES:=bw.c
+SOURCES := bw.c
+
+MODULES := cp/cco/bw/stub
diff --git a/cesar/cp/av/cco/region/Module b/cesar/cp/av/cco/region/Module
index c320911efa..71bd970a97 100644
--- a/cesar/cp/av/cco/region/Module
+++ b/cesar/cp/av/cco/region/Module
@@ -1 +1,3 @@
-SOURCES:=region.c
+SOURCES := region.c
+
+MODULES := cp/cco/region
diff --git a/cesar/cp/av/cco/region/stub/Module b/cesar/cp/av/cco/region/stub/Module
index c320911efa..ba66049fea 100644
--- a/cesar/cp/av/cco/region/stub/Module
+++ b/cesar/cp/av/cco/region/stub/Module
@@ -1 +1,3 @@
-SOURCES:=region.c
+SOURCES := region.c
+
+MODULES := cp/cco/region/stub