summaryrefslogtreecommitdiff
path: root/cesar/cp/msg/inc/cc_assoc.h
blob: 5d5e8a1ae1abf0505df3035b93216a8766dc1d09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef cp_msg_inc_cc_assoc_h
#define cp_msg_inc_cc_assoc_h
/* Cesar project {{{
 *
 * Copyright (C) 2008 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    cp/msg/inc/cc_assoc.h
 * \brief   CC_ASSOC messages.
 * \ingroup cp_msg
 */

/** CC_ASSOC.REQ request type. */
enum cp_msg_cc_assoc_req_type_t
{
    CP_MSG_CC_ASSOC_REQ_TYPE_NEW,
    CP_MSG_CC_ASSOC_REQ_TYPE_RENEW,
    CP_MSG_CC_ASSOC_REQ_TYPE_NB
};

/** CC_ASSOC.CNF result. */
enum cp_msg_cc_assoc_cnf_result_t
{
    CP_MSG_CC_ASSOC_CNF_RESULT_SUCCESS,
    CP_MSG_CC_ASSOC_CNF_RESULT_FAILURE_TEMPORARY_RESSOURCE_EXHAUSTION,
    CP_MSG_CC_ASSOC_CNF_RESULT_FAILURE_PERMANANT_RESSOURCE_EXHAUSTION,
    CP_MSG_CC_ASSOC_CNF_RESULT_FAILURE_OTHER_REASON,
    CP_MSG_CC_ASSOC_CNF_RESULT_SUCCESS_WL_ACCEPT_ALL,
    CP_MSG_CC_ASSOC_CNF_RESULT_NB
};

/** Data associated with a CC_ASSOC.REQ message. */
struct cp_msg_cc_assoc_req_t
{
    /** Request type. */
    enum cp_msg_cc_assoc_req_type_t request_type;
    /** NID of the AVLN. */
    cp_nid_t nid;
    /** Station CCo capability. */
    u8 cco_cap;
    /** Station proxy capability. */
    u8 proxy_cap;
};
typedef struct cp_msg_cc_assoc_req_t cp_msg_cc_assoc_req_t;

/** Data associated with a CC_ASSOC.CNF message. */
struct cp_msg_cc_assoc_cnf_t
{
    /** Association result. */
    enum cp_msg_cc_assoc_cnf_result_t result;
    /** NID of the AVLN. */
    cp_nid_t nid;
    /** SNID of the AVLN. */
    cp_snid_t snid;
    /** Station TEI. */
    cp_tei_t sta_tei;
    /** Lease time for the TEI. */
    u16 lease_time_min;
};
typedef struct cp_msg_cc_assoc_cnf_t cp_msg_cc_assoc_cnf_t;

#define MASTER_GOLDEN_DPW "SPIDCOM-TEST-MASTER"

#endif /* cp_msg_inc_cc_assoc_h */