f4ebe841a5
FossilOrigin-Name: 8a43dd9d05a4cb73210243ddd8df2a26f16c7ef2c4d4e36ab446de1f65d88223
32 lines
658 B
C
32 lines
658 B
C
|
|
#include "conn.h"
|
|
#include "capwap.h"
|
|
|
|
|
|
|
|
void cw_init(struct conn * conn, uint8_t *buffer, int type, int seqnum, struct radioinfo * radioinfo)
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void cw_init_response(struct conn * conn, uint8_t *req)
|
|
{
|
|
uint8_t *buffer=conn->resp_buffer;
|
|
int shbytes = cw_get_hdr_msg_offset(req);
|
|
int dhbytes;
|
|
memcpy(buffer,req,shbytes);
|
|
cw_set_hdr_hlen(buffer,2);
|
|
cw_set_hdr_flags(buffer,CW_FLAG_HDR_M,1);
|
|
dhbytes = cw_get_hdr_msg_offset(buffer);
|
|
|
|
uint8_t * msgptr = req+shbytes;
|
|
uint8_t * dmsgptr = buffer+dhbytes;
|
|
|
|
cw_set_msg_type(dmsgptr,cw_get_msg_type(msgptr)+1);
|
|
cw_set_msg_seqnum(dmsgptr,cw_get_msg_seqnum(msgptr));
|
|
cw_set_msg_flags(dmsgptr,0);
|
|
}
|