gets a Cisco AP to open the data channel.
FossilOrigin-Name: 1bddebbebafcc8672809836c58a669359445338ed8c49f6160748208b19b0b50
This commit is contained in:
		
							
								
								
									
										11
									
								
								src/cw/cw.h
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/cw/cw.h
									
									
									
									
									
								
							| @ -530,7 +530,16 @@ extern int cw_put_radio_operational_states(mbag_t radios, uint8_t * dst, int *ne | ||||
|  */ | ||||
| extern int cw_radio_set_admin_state(mbag_t radios,int rid, int state, int cause); | ||||
| extern int cw_put_elem_radio_administrative_state(uint8_t *dst,int radio_id,mbag_t radio); | ||||
| extern int cw_put_elem_radio_operational_state(uint8_t * dst, int rid, int os, int d7mode); | ||||
| //extern int cw_put_elem_radio_operational_state(uint8_t * dst, int rid, int os, int d7mode); | ||||
|  | ||||
|  | ||||
| static inline int cw_put_elem_radio_operational_state(uint8_t * dst, int rid, int state, int cause) { | ||||
| 	cw_put_byte(dst+4,rid); | ||||
| 	cw_put_byte(dst+5,state); | ||||
| 	cw_put_byte(dst+6,cause); | ||||
| 	return 3+cw_put_elem_hdr(dst,CW_ELEM_RADIO_OPERATIONAL_STATE,3); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ | ||||
|  * @param d7mode puts the Operational Stae element in CAPWAP draft 7 mode. | ||||
|  * @return Number of byes put | ||||
|  */ | ||||
| int cw_put_elem_radio_operational_state(uint8_t * dst, int rid, int os, int d7mode) | ||||
| int xcw_put_elem_radio_operational_state(uint8_t * dst, int rid, int os, int d7mode) | ||||
| { | ||||
| 	uint8_t *d=dst; | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,8 @@ OBJS=\ | ||||
| 	capwap_out_get_session_id.o \ | ||||
| 	capwap_out_get_idle_timeout.o \ | ||||
| 	capwap_out_wtp_descriptor.o \ | ||||
| 	capwap_in_wtp_descriptor.o | ||||
| 	capwap_in_wtp_descriptor.o \ | ||||
| 	capwap_out_ac_ip_list.o | ||||
|  | ||||
|  | ||||
| NAME=libcapwap.a | ||||
|  | ||||
| @ -584,6 +584,8 @@ static cw_action_out_t actions_out[]={ | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| 	/* -------------------------------------------------------------------------- | ||||
| 	 * Join Response Message | ||||
| 	 */ | ||||
| @ -644,6 +646,15 @@ static cw_action_out_t actions_out[]={ | ||||
| 	, | ||||
|  | ||||
|  | ||||
|  | ||||
| 	{ | ||||
| 		.msg_id = CW_MSG_JOIN_RESPONSE, | ||||
| 		.elem_id = CW_ELEM_AC_IPV4_LIST, | ||||
| 		.out = capwap_out_ac_ip_list | ||||
|  | ||||
| 	} | ||||
| 	, | ||||
|  | ||||
| 	/* -------------------------------------------------------------------------- | ||||
| 	 * Configuration Status Response Message - OUT | ||||
| 	 */ | ||||
| @ -668,6 +679,13 @@ static cw_action_out_t actions_out[]={ | ||||
| 	} | ||||
| 	, | ||||
|  | ||||
| 	{ | ||||
| 		.msg_id = CW_MSG_CONFIGURATION_STATUS_RESPONSE, | ||||
| 		.elem_id = CW_ELEM_AC_IPV4_LIST, | ||||
| 		.out = capwap_out_ac_ip_list | ||||
|  | ||||
| 	} | ||||
| 	, | ||||
|  | ||||
|  | ||||
| 	 | ||||
|  | ||||
| @ -22,4 +22,8 @@ extern struct mbag_item * capwap_out_get_idle_timeout(struct conn *conn,struct c | ||||
|  | ||||
| extern struct mbag_item * capwap_out_get_capwap_timers(struct conn *conn,struct cw_action_out * a); | ||||
|  | ||||
| extern int capwap_out_ac_ip_list(struct conn *conn, struct cw_action_out *a, uint8_t * dst); | ||||
|  | ||||
|  | ||||
|  | ||||
| #endif | ||||
|  | ||||
| @ -19,7 +19,10 @@ OBJS=\ | ||||
| 	cisco_items.o \ | ||||
| 	cisco80211_in_mac_operation.o \ | ||||
| 	cisco80211_in_wtp_radio_configuration.o \ | ||||
| 	cisco80211_out_wtp_radio_configuration.o | ||||
| 	cisco80211_out_wtp_radio_configuration.o \ | ||||
| 	cisco_out_manager_ip_addr.o \ | ||||
| 	cisco_out_ac_ipv4_list.o \ | ||||
| 	cisco_out_capwap_up.o | ||||
|  | ||||
|  | ||||
| 	 | ||||
|  | ||||
| @ -40,4 +40,8 @@ int cisco80211_in_wtp_radio_configuration(struct conn *conn, struct cw_action_in | ||||
| 			 int len, struct sockaddr *from); | ||||
| int cisco80211_out_wtp_radio_configuration(struct conn *conn, struct cw_action_out *a, uint8_t * dst); | ||||
|  | ||||
| int cisco_out_manager_ip_addr(struct conn *conn,struct cw_action_out * a,uint8_t *dst) ; | ||||
| int cisco_out_ac_ipv4_list(struct conn *conn, struct cw_action_out *a, uint8_t * dst); | ||||
|  | ||||
|  | ||||
| #endif | ||||
|  | ||||
| @ -437,6 +437,10 @@ static cw_action_in_t actions80211_in[] = { | ||||
|  | ||||
| }; | ||||
|  | ||||
|  | ||||
|  | ||||
| extern int cisco_out_capwap_up(struct conn *conn, struct cw_action_out *a, uint8_t * dst); | ||||
|  | ||||
| static cw_action_out_t actions80211_out[]={ | ||||
|  | ||||
| 	{ | ||||
| @ -446,6 +450,12 @@ static cw_action_out_t actions80211_out[]={ | ||||
| 		.out = cisco80211_out_wtp_radio_configuration, | ||||
| 	} | ||||
| 	, | ||||
| 	{ | ||||
| 		.msg_id = CW_MSG_CONFIGURATION_STATUS_RESPONSE,  | ||||
| 		.out = cisco_out_capwap_up, | ||||
| 	} | ||||
| 	, | ||||
|  | ||||
|  | ||||
|  | ||||
| 	{0,0} | ||||
|  | ||||
| @ -134,7 +134,7 @@ static cw_action_in_t actions_in[] = { | ||||
| 	} | ||||
| 	, | ||||
|  | ||||
| 	/* Element Cisco 802.11 Radio Config - Config Status Resp */ | ||||
| 	/* Element Cisco 802.11 Radio Config - Config Update Resp */ | ||||
| 	{ | ||||
| 		.capwap_state = CW_STATE_RUN,  | ||||
| 		.msg_id = CW_MSG_CONFIGURATION_UPDATE_REQUEST,  | ||||
| @ -181,6 +181,8 @@ static cw_action_in_t actions_in[] = { | ||||
|  | ||||
|  | ||||
| 	/* LWAPP Vendor spec Messages */ | ||||
|  | ||||
| 	/* MWAR Hash Value */ | ||||
| 	{ | ||||
|  | ||||
| 		.proto = CW_ACTION_PROTO_LWAPP, | ||||
| @ -291,6 +293,33 @@ static cw_action_out_t actions_out[]={ | ||||
| 	, | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| 	{0,0} | ||||
|  | ||||
| }; | ||||
|  | ||||
| static cw_action_in_t actions80211_in[] = { | ||||
|  | ||||
|  | ||||
| 	/* Radio Operational State - Change State Event Req */ | ||||
| 	{ | ||||
| 		.capwap_state = CW_STATE_CONFIGURE,  | ||||
| 		.msg_id= CW_MSG_CONFIGURATION_STATUS_RESPONSE, | ||||
| 		.elem_id = CW_ELEM_RADIO_OPERATIONAL_STATE, | ||||
| 		.item_id = CW_RADIOITEM_OPER_STATE, | ||||
| 		.start = cw_in_radio_generic, //operational_state, | ||||
| 		.min_len=3, | ||||
| 		.max_len=3, | ||||
| 		.mand = 0 | ||||
| 	} | ||||
| 	, | ||||
|  | ||||
|  | ||||
| }; | ||||
|  | ||||
| static cw_action_out_t actions80211_out[]={ | ||||
|  | ||||
| 	/* ---------------------------------------------------------------- | ||||
| 	 * Configuration Status Request | ||||
| 	 */ | ||||
| @ -307,16 +336,6 @@ static cw_action_out_t actions_out[]={ | ||||
|  | ||||
|  | ||||
|  | ||||
| 	{0,0} | ||||
|  | ||||
| }; | ||||
|  | ||||
|  | ||||
| static cw_action_out_t actions80211_out[]={ | ||||
|  | ||||
| 	/* ---------------------------------------------------------------- | ||||
| 	 * Configuration Status Request | ||||
| 	 */ | ||||
| 	{ | ||||
| 		.msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST,  | ||||
| 		.item_id = CW_RADIO_SUPPORTED_RATES , | ||||
| @ -374,7 +393,7 @@ int cisco_register_actions80211_wtp(struct cw_actiondef *def) | ||||
|  | ||||
| 	int rc; | ||||
| 	rc=0; | ||||
| //	rc = cw_actionlist_in_register_actions(def->in, actions80211_in); | ||||
| 	rc = cw_actionlist_in_register_actions(def->in, actions80211_in); | ||||
| 	rc += cw_actionlist_out_register_actions(def->out, actions80211_out); | ||||
|  | ||||
| /*	rc += cw_strheap_register_strings(def->strmsg, capwap_strings_msg); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user