xref: /freebsd/contrib/wpa/src/fst/fst_ctrl_defs.h (revision 911f0260390e18cf85f3dbf2c719b593efdc1e3c)
1 /*
2  * FST module - shared Control interface definitions
3  * Copyright (c) 2014, Qualcomm Atheros, Inc.
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef FST_CTRL_DEFS_H
10 #define FST_CTRL_DEFS_H
11 
12 /* Undefined value */
13 #define FST_CTRL_PVAL_NONE                     "NONE"
14 
15 /* FST-ATTACH parameters */
16 #define FST_ATTACH_CMD_PNAME_LLT      "llt"      /* pval = desired LLT */
17 #define FST_ATTACH_CMD_PNAME_PRIORITY "priority" /* pval = desired priority */
18 
19 /* FST-MANAGER parameters */
20 /* FST Session states */
21 #define FST_CS_PVAL_STATE_INITIAL              "INITIAL"
22 #define FST_CS_PVAL_STATE_SETUP_COMPLETION     "SETUP_COMPLETION"
23 #define FST_CS_PVAL_STATE_TRANSITION_DONE      "TRANSITION_DONE"
24 #define FST_CS_PVAL_STATE_TRANSITION_CONFIRMED "TRANSITION_CONFIRMED"
25 
26 /* FST Session reset reasons */
27 #define FST_CS_PVAL_REASON_TEARDOWN     "REASON_TEARDOWN"
28 #define FST_CS_PVAL_REASON_SETUP        "REASON_SETUP"
29 #define FST_CS_PVAL_REASON_SWITCH       "REASON_SWITCH"
30 #define FST_CS_PVAL_REASON_STT          "REASON_STT"
31 #define FST_CS_PVAL_REASON_REJECT       "REASON_REJECT"
32 #define FST_CS_PVAL_REASON_ERROR_PARAMS "REASON_ERROR_PARAMS"
33 #define FST_CS_PVAL_REASON_RESET        "REASON_RESET"
34 #define FST_CS_PVAL_REASON_DETACH_IFACE "REASON_DETACH_IFACE"
35 
36 /* FST Session responses */
37 #define FST_CS_PVAL_RESPONSE_ACCEPT "ACCEPT"
38 #define FST_CS_PVAL_RESPONSE_REJECT "REJECT"
39 
40 /* FST Session action initiator */
41 #define FST_CS_PVAL_INITIATOR_LOCAL  "LOCAL"
42 #define FST_CS_PVAL_INITIATOR_REMOTE "REMOTE"
43 
44 /* FST-CLI subcommands and parameter names */
45 #define FST_CMD_LIST_GROUPS      "list_groups"
46 #define FST_CMD_LIST_IFACES      "list_ifaces"
47 #define FST_CMD_IFACE_PEERS      "iface_peers"
48 #define FST_CMD_GET_PEER_MBIES   "get_peer_mbies"
49 #define FST_CMD_LIST_SESSIONS    "list_sessions"
50 #define FST_CMD_SESSION_ADD      "session_add"
51 #define FST_CMD_SESSION_REMOVE   "session_remove"
52 #define FST_CMD_SESSION_GET      "session_get"
53 #define FST_CSG_PNAME_OLD_PEER_ADDR  "old_peer_addr" /* pval = address string */
54 #define FST_CSG_PNAME_NEW_PEER_ADDR  "new_peer_addr" /* pval = address string */
55 #define FST_CSG_PNAME_OLD_IFNAME "old_ifname" /* pval = ifname */
56 #define FST_CSG_PNAME_NEW_IFNAME "new_ifname" /* pval = ifname */
57 #define FST_CSG_PNAME_LLT        "llt"        /* pval = numeric llt value */
58 #define FST_CSG_PNAME_STATE      "state"      /* pval = FST_CS_PVAL_STATE_... */
59 #define FST_CMD_SESSION_SET      "session_set"
60 #define FST_CSS_PNAME_OLD_PEER_ADDR  FST_CSG_PNAME_OLD_PEER_ADDR
61 #define FST_CSS_PNAME_NEW_PEER_ADDR  FST_CSG_PNAME_NEW_PEER_ADDR
62 #define FST_CSS_PNAME_OLD_IFNAME     FST_CSG_PNAME_OLD_IFNAME
63 #define FST_CSS_PNAME_NEW_IFNAME     FST_CSG_PNAME_NEW_IFNAME
64 #define FST_CSS_PNAME_LLT            FST_CSG_PNAME_LLT
65 #define FST_CMD_SESSION_INITIATE "session_initiate"
66 #define FST_CMD_SESSION_RESPOND  "session_respond"
67 #define FST_CMD_SESSION_TRANSFER "session_transfer"
68 #define FST_CMD_SESSION_TEARDOWN "session_teardown"
69 
70 #ifdef CONFIG_FST_TEST
71 #define FST_CTR_PVAL_BAD_NEW_BAND        "bad_new_band"
72 
73 #define FST_CMD_TEST_REQUEST    "test_request"
74 #define FST_CTR_IS_SUPPORTED        "is_supported"
75 #define FST_CTR_SEND_SETUP_REQUEST  "send_setup_request"
76 #define FST_CTR_SEND_SETUP_RESPONSE "send_setup_response"
77 #define FST_CTR_SEND_ACK_REQUEST    "send_ack_request"
78 #define FST_CTR_SEND_ACK_RESPONSE   "send_ack_response"
79 #define FST_CTR_SEND_TEAR_DOWN      "send_tear_down"
80 #define FST_CTR_GET_FSTS_ID         "get_fsts_id"
81 #define FST_CTR_GET_LOCAL_MBIES     "get_local_mbies"
82 #endif /* CONFIG_FST_TEST */
83 
84 /* Events */
85 #define FST_CTRL_EVENT_IFACE "FST-EVENT-IFACE"
86 #define FST_CEI_PNAME_IFNAME       "ifname"
87 #define FST_CEI_PNAME_GROUP        "group"
88 #define FST_CEI_PNAME_ATTACHED     "attached"
89 #define FST_CEI_PNAME_DETACHED     "detached"
90 #define FST_CTRL_EVENT_PEER "FST-EVENT-PEER"
91 #define FST_CEP_PNAME_IFNAME       "ifname"
92 #define FST_CEP_PNAME_ADDR         "peer_addr"
93 #define FST_CEP_PNAME_CONNECTED    "connected"
94 #define FST_CEP_PNAME_DISCONNECTED "disconnected"
95 #define FST_CTRL_EVENT_SESSION "FST-EVENT-SESSION"
96 #define FST_CES_PNAME_SESSION_ID "session_id"
97 #define FST_CES_PNAME_EVT_TYPE   "event_type"
98 #define FST_PVAL_EVT_TYPE_SESSION_STATE "EVENT_FST_SESSION_STATE"
99 /* old_state/new_state: pval = FST_CS_PVAL_STATE_... */
100 #define FST_CES_PNAME_OLD_STATE   "old_state"
101 #define FST_CES_PNAME_NEW_STATE   "new_state"
102 #define FST_CES_PNAME_REASON      "reason" /* pval = FST_CS_PVAL_REASON_... */
103 #define FST_CES_PNAME_REJECT_CODE "reject_code" /* pval = u8 code */
104 /* pval = FST_CS_PVAL_INITIATOR_... */
105 #define FST_CES_PNAME_INITIATOR   "initiator"
106 #define FST_PVAL_EVT_TYPE_ESTABLISHED "EVENT_FST_ESTABLISHED"
107 #define FST_PVAL_EVT_TYPE_SETUP "EVENT_FST_SETUP"
108 
109 #endif /* FST_CTRL_DEFS_H */
110