More Cisco specific stuff
FossilOrigin-Name: ba1217e4069e946c852d379efe8a1c7bc95a6a545c85853ae54cdc3786b60dac
This commit is contained in:
@ -128,8 +128,10 @@ CAPWAPOBJS= \
|
||||
cw_readelem_vendor_specific_payload.o \
|
||||
cw_readelem_capwap_local_ip_addr.o \
|
||||
cw_readelem_wtp_reboot_statistics.o\
|
||||
cwmsg_addelem_vendor_cisco_ap_timesync.o \
|
||||
lw_checksum.o
|
||||
cwmsg_addelem_vendor_cisco_ap_timesync.o \
|
||||
cwmsg_addelem_vendor_cisco_mwar_addr.o \
|
||||
lw_checksum.o \
|
||||
#cwmsg_addelem_session_id.o
|
||||
|
||||
# cwsend_image_data_request.o
|
||||
# cwmsg_set_control_header.o
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef __BSTR_H
|
||||
#define __BSTR_H
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef uint8_t* bstr_t;
|
||||
|
||||
extern uint8_t * bstr_create(uint8_t *data, uint8_t len);
|
||||
extern uint8_t * bstr_create_from_cfgstr(const char * s);
|
||||
@ -9,3 +13,7 @@ extern uint8_t * bstr_replace( uint8_t ** dst, uint8_t * bstr);
|
||||
|
||||
#define bstr_len(s) (*(s))
|
||||
#define bstr_data(s) (s+1)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -29,5 +29,4 @@ uint8_t * bstr_create(uint8_t *data, uint8_t len)
|
||||
*str=len;
|
||||
memcpy(str+1,data,len);
|
||||
return str;
|
||||
|
||||
}
|
||||
|
@ -36,9 +36,8 @@ uint8_t * bstr_create_from_cfgstr(const char * s)
|
||||
if (l<=2)
|
||||
return bstr_create((uint8_t*)s,l+1);
|
||||
|
||||
if (s[1]=='.'){
|
||||
if (s[1]=='.')
|
||||
return bstr_create((uint8_t*)s+1,l);
|
||||
}
|
||||
|
||||
if (s[1]=='x'){
|
||||
uint8_t * ns=0;
|
||||
@ -71,7 +70,6 @@ uint8_t * bstr_create_from_cfgstr(const char * s)
|
||||
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -16,17 +16,28 @@
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __CAPWAP_CISCO_H
|
||||
#define __CAPWAP_CISCO_H
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define CWVENDOR_CISCO_MWAR_ADDR 2
|
||||
#define CWVENDOR_CISCO_RAD 3
|
||||
#define CWVENDOR_CISCO_RAD_SLOT 4
|
||||
#define CWVENDOR_CISCO_RAD_NAME 5
|
||||
#define CWVENDOR_CISCO_MWAR 6
|
||||
|
||||
#define CWVENDOR_CISCO_AP_GROUP_NAME 124
|
||||
#define CWVENDOR_CISCO_AP_TIMESYNC 151
|
||||
|
||||
|
||||
extern void cwmsg_addelem_vendor_cisco_ap_timesync(struct cwmsg * cwmsg);
|
||||
|
||||
|
||||
/* rad_name payload */
|
||||
#define cwmsg_addelem_vendor_cisco_rad_name(cwmsg,str) \
|
||||
cwmsg_addelem_vendor_specific_payload(cwmsg,CW_VENDOR_ID_CISCO, \
|
||||
CWVENDOR_CISCO_RAD_NAME,str,strlen((char*)str))
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -17,6 +17,7 @@ struct cwmsg{
|
||||
int rid;
|
||||
int seqnum;
|
||||
int type;
|
||||
int capwap_mode;
|
||||
};
|
||||
|
||||
struct conn;
|
||||
@ -37,4 +38,9 @@ extern void cwmsg_addelem_image_identifier(struct cwmsg *msg,uint32_t vendor_id,
|
||||
|
||||
extern void cwmsg_addelem_radio_operational_state(struct cwmsg * cwmsg, struct radioinfo * ri);
|
||||
|
||||
extern void cwmsg_addelem_vendor_cosco_mwar_addr(struct cwmsg *msg, struct conn *conn);
|
||||
|
||||
#define cwmsg_addelem_session_id(msg,session_id) \
|
||||
cwmsg_addelem(msg,CWMSGELEM_SESSION_ID,bstr_data(session_id),bstr_len(session_id));
|
||||
|
||||
#endif
|
||||
|
@ -30,26 +30,41 @@
|
||||
|
||||
void cwmsg_addelem_cw_local_ip_addr(struct cwmsg *msg, struct conn * conn)
|
||||
{
|
||||
|
||||
struct sockaddr_storage a;
|
||||
socklen_t alen = sizeof(struct sockaddr_storage);
|
||||
getsockname (conn->sock,(struct sockaddr *)&a,&alen);
|
||||
|
||||
int cw_mode = msg->capwap_mode;
|
||||
|
||||
switch (((struct sockaddr*)&a)->sa_family){
|
||||
case AF_INET:
|
||||
{
|
||||
struct sockaddr_in * sain = (struct sockaddr_in*)&a;
|
||||
cwmsg_addelem(msg,CWMSGELEM_CAPWAP_LOCAL_IPV4_ADDRESS,(uint8_t*)&sain->sin_addr,4);
|
||||
}
|
||||
int id;
|
||||
if (cw_mode == CWMODE_CISCO)
|
||||
id = CWMSGELEM_WTP_IPV4_IP_ADDR;
|
||||
else
|
||||
id = CWMSGELEM_CAPWAP_LOCAL_IPV4_ADDRESS;
|
||||
|
||||
cwmsg_addelem(msg,id,(uint8_t*)&sain->sin_addr,4);
|
||||
break;
|
||||
#ifdef WITH_IPV6
|
||||
}
|
||||
|
||||
|
||||
case AF_INET6:
|
||||
{
|
||||
int id;
|
||||
if (cw_mode == CWMODE_CISCO)
|
||||
id = CWMSGELEM_WTP_IPV6_IP_ADDR;
|
||||
else
|
||||
id = CWMSGELEM_CAPWAP_LOCAL_IPV6_ADDRESS;
|
||||
struct sockaddr_in6 * sain = (struct sockaddr_in6*)&a;
|
||||
cwmsg_addelem(msg,CWMSGELEM_CAPWAP_LOCAL_IPV6_ADDRESS,(uint8_t*)&sain->sin6_addr,16);
|
||||
return cwmsg_addelem(msg,id,(uint8_t*)&sain->sin6_addr,16);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,23 +5,12 @@
|
||||
#include "bstr.h"
|
||||
|
||||
|
||||
static inline int wtpdesc_addsubelem(uint8_t * dst,uint8_t type,uint32_t vendorid,uint8_t * str)
|
||||
static inline int wtpdesc_addsubelem(uint8_t * dst,uint8_t type,uint32_t vendorid,bstr_t str)
|
||||
{
|
||||
// printf("add subelem\n");
|
||||
int l;
|
||||
*((uint32_t*)(dst))=htonl(vendorid);
|
||||
// printf("htonl done\n");
|
||||
// if (len==-1)
|
||||
// l=strlen((char*)str);
|
||||
// else
|
||||
// l=len;S
|
||||
|
||||
l = bstr_len(str);
|
||||
|
||||
|
||||
// printf("strlne got %d\n",l);
|
||||
*((uint32_t*)(dst+4))=htonl((type<<16)|l);
|
||||
// printf("memcopy str %d\n",l);
|
||||
memcpy(dst+8,bstr_data(str),l);
|
||||
return l+8;
|
||||
}
|
||||
@ -36,50 +25,40 @@ void cwmsg_addelem_wtp_descriptor(struct cwmsg * cwmsg, struct wtpinfo * wtpinfo
|
||||
*(d+1)=wtpinfo->radios_in_use;
|
||||
len=2;
|
||||
|
||||
switch (wtpinfo->capwap_mode){
|
||||
switch (cwmsg->capwap_mode){
|
||||
case CWMODE_CISCO:
|
||||
*((uint16_t*)(d+len))=0;
|
||||
len+=2;
|
||||
break;
|
||||
default:
|
||||
/* number of encryption elemnts */
|
||||
*(d+len)=0;
|
||||
len += 1;
|
||||
/* encryption elements */
|
||||
|
||||
|
||||
/* *(d+len)=CWTH_WBID_IEEE80211;
|
||||
uint16_t val = 0;
|
||||
*((uint16_t*)(d+len+1))=htons(val);
|
||||
len+=3;
|
||||
*/
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/* number of encryption elemnts */
|
||||
// *(d+len)=1;
|
||||
// len+=1;
|
||||
// *(d+len)=0;
|
||||
// len+=1;
|
||||
|
||||
/* encryption elements */
|
||||
/* hardware version subelem*/
|
||||
len+=wtpdesc_addsubelem(d+len,CWMSGSUBELEM_WTP_DESCRIPTOR_HARDWARE_VERSION,
|
||||
wtpinfo->hardware_vendor_id,wtpinfo->hardware_version);
|
||||
|
||||
|
||||
/* *(d+len)=CWTH_WBID_IEEE80211;
|
||||
uint16_t val = 0;
|
||||
*((uint16_t*)(d+len+1))=htons(val);
|
||||
len+=3;
|
||||
*/
|
||||
|
||||
/* uint8_t hww[2];
|
||||
hww[0]=0x1c;
|
||||
hww[1]=0;
|
||||
*/
|
||||
/* software subelem*/
|
||||
/* software version subelem*/
|
||||
len+=wtpdesc_addsubelem(d+len,CWMSGSUBELEM_WTP_DESCRIPTOR_SOFTWARE_VERSION,
|
||||
wtpinfo->software_vendor_id,wtpinfo->software_version);
|
||||
|
||||
/* hardware subelem*/
|
||||
len+=wtpdesc_addsubelem(d+len,CWMSGSUBELEM_WTP_DESCRIPTOR_HARDWARE_VERSION,
|
||||
wtpinfo->hardware_vendor_id,wtpinfo->hardware_version);
|
||||
/*
|
||||
len+=wtpdesc_addsubelem(d+len,CWMSGSUBELEM_WTP_DESCRIPTOR_HARDWARE_VERSION,
|
||||
wtpinfo->hardware_vendor_id,hww,2);
|
||||
*/
|
||||
|
||||
/* bootloader subelem*/
|
||||
/* bootloader version subelem*/
|
||||
len+=wtpdesc_addsubelem(d+len,CWMSGSUBELEM_WTP_DESCRIPTOR_BOOTLOADER_VERSION,
|
||||
wtpinfo->bootloader_vendor_id,wtpinfo->bootloader_version);
|
||||
|
||||
|
||||
cwmsg_addelem(cwmsg,CWMSGELEM_WTP_DESCRIPTOR,d,len);
|
||||
}
|
||||
|
@ -31,26 +31,13 @@ void cwmsg_addelem_wtp_radio_info(struct cwmsg * msg,struct radioinfo *radioinfo
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void cwmsg_addelem_wtp_radio_infos(struct cwmsg * msg,struct wtpinfo * wtpinfo)
|
||||
{
|
||||
int i;
|
||||
for (i=1; i<30; i++)
|
||||
{
|
||||
if (wtpinfo->radioinfo[i].rid!=0)
|
||||
cwmsg_addelem_wtp_radio_info(msg,&wtpinfo->radioinfo[i]);
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
void cwmsg_addelem_wtp_radio_infos(struct cwmsg * msg,struct radioinfo * radioinfos)
|
||||
{
|
||||
int i;
|
||||
for (i=1; i<=30; i++)
|
||||
for (i=0; i<2; i++)
|
||||
{
|
||||
if (radioinfos[i].rid!=0)
|
||||
// if (radioinfos[i].rid!=0)
|
||||
cwmsg_addelem_wtp_radio_info(msg,&radioinfos[i]);
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,9 @@
|
||||
*/
|
||||
|
||||
#include "capwap.h"
|
||||
#include "capwap_cisco.h"
|
||||
|
||||
|
||||
#include "conn.h"
|
||||
#include "cwmsg.h"
|
||||
|
||||
@ -26,42 +29,50 @@ int cwsend_discovery_request(struct conn * conn,struct radioinfo * radioinfo,str
|
||||
struct cwmsg cwmsg;
|
||||
|
||||
cwmsg_init(&cwmsg,buffer,CWMSG_DISCOVERY_REQUEST,conn_get_next_seqnum(conn),NULL /*radioinfo*/);
|
||||
|
||||
cwmsg.capwap_mode=conn->capwap_mode;
|
||||
|
||||
|
||||
/* Mandatory elements */
|
||||
|
||||
/* discovery type */
|
||||
cwmsg_addelem(&cwmsg,CWMSGELEM_DISCOVERY_TYPE,&wtpinfo->discovery_type,sizeof(uint8_t));
|
||||
|
||||
/* wtp board data */
|
||||
cwmsg_addelem_wtp_board_data(&cwmsg,wtpinfo);
|
||||
// cwmsg_addelem_wtp_descriptor(&cwmsg,wtpinfo);
|
||||
|
||||
/* wtp descriptor */
|
||||
cwmsg_addelem_wtp_descriptor(&cwmsg,wtpinfo);
|
||||
|
||||
/* wtp frame tunnel mode */
|
||||
cwmsg_addelem(&cwmsg,CWMSGELEM_WTP_FRAME_TUNNEL_MODE,&wtpinfo->frame_tunnel_mode,sizeof(uint8_t));
|
||||
|
||||
/* mac type */
|
||||
cwmsg_addelem(&cwmsg,CWMSGELEM_WTP_MAC_TYPE,&wtpinfo->mac_type,sizeof(uint8_t));
|
||||
|
||||
//cwmsg_addelem(&cwmsg,CWMSGELEM_CAPWAP_LOCAL_IPV4_ADDRESS);
|
||||
//cwmsg_addelem_cw_local_ip_addr(&cwmsg,conn);
|
||||
|
||||
/* radio infos */
|
||||
cwmsg_addelem_wtp_radio_infos(&cwmsg,wtpinfo->radioinfo);
|
||||
|
||||
|
||||
if (conn->mtu_discovery)
|
||||
cwmsg_addelem_mtu_discovery_padding(&cwmsg,conn);
|
||||
/* Non-mandatory elements */
|
||||
|
||||
switch (cwmsg.capwap_mode){
|
||||
case CWMODE_CISCO:
|
||||
cwmsg_addelem_vendor_cisco_rad_name(&cwmsg,(uint8_t*)wtpinfo->name);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
default:
|
||||
|
||||
if (conn->mtu_discovery)
|
||||
cwmsg_addelem_mtu_discovery_padding(&cwmsg,conn);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//uint8_t zven[] = {0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,0x66,0x69,0x73,0x68,0x00,0x02,0xFC,0xF5,0x28,0xCA,0xAE,0xE4,0x00,0x03,0x10,0x10,
|
||||
//0x04, 0x10, 0x00,0x00,0x10,0x00,0x00,0x06,0xFC,0xF5,0x28,0xCA,0xAE,0xE5,0xC4,0x2E,0xC4,0x2E,0xC4,0x2E,0xC4,0x2E,0xC4,0x2E,
|
||||
//0xC4,0x2E,0xC4,0x2E,0xC4,0x2E,0xC4,0x2E };
|
||||
|
||||
|
||||
/*
|
||||
uint8_t zven [] = {
|
||||
// 0x00, 00 03 7A 00 02
|
||||
0x22, 0xE0, 00, 00, 00, 00, 00, 00, 00, 0x01, 0x66, 0x69, 0x73,0x68,0x00,0x02,0xFC,0xF5,0x28,0xCA,0xAE,0xE4,0x00,0x03,0x10,0x10 ,
|
||||
0x04,0x10,0x00, 00, 0x10, 00, 00,0x06,0xFC,0xF5,0x28,0xCA,0xAE,0xE5,0xAB,0x37,0xAB,0x37,0xAB,0x37,0xAB,0x37,0xAB,0x37,0xAB,0x37,0xAB,0x37,0xAB,0x37,0xAB,0x37,
|
||||
00, 0x07, 00, 00, 0x27,0x11,0x00,0x08,0x00,0x00 };
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// cwmsg_addelem_vendor_specific_payload(&cwmsg,890,2,zven,sizeof(zven));
|
||||
|
||||
|
||||
return conn_send_cwmsg(conn,&cwmsg);
|
||||
}
|
||||
|
@ -22,34 +22,61 @@
|
||||
#include "conn.h"
|
||||
#include "cwmsg.h"
|
||||
|
||||
int cwsend_join_request(struct conn * conn,struct radioinfo * radioinfo,struct wtpinfo * wtpinfo)
|
||||
int cwsend_join_request(struct conn *conn, struct radioinfo *radioinfo, struct wtpinfo *wtpinfo)
|
||||
{
|
||||
uint8_t buffer[CWMSG_MAX_SIZE];
|
||||
struct cwmsg cwmsg;
|
||||
|
||||
cwmsg_init(&cwmsg,buffer,CWMSG_JOIN_REQUEST,conn_get_next_seqnum(conn),radioinfo);
|
||||
cwmsg_init(&cwmsg, buffer, CWMSG_JOIN_REQUEST, conn_get_next_seqnum(conn), radioinfo);
|
||||
cwmsg.capwap_mode = conn->capwap_mode;
|
||||
|
||||
cwmsg_addelem(&cwmsg,CWMSGELEM_LOCATION_DATA,wtpinfo->location,strlen((char*)wtpinfo->location));
|
||||
cwmsg_addelem_wtp_board_data(&cwmsg,wtpinfo);
|
||||
cwmsg_addelem_wtp_descriptor(&cwmsg,wtpinfo);
|
||||
cwmsg_addelem(&cwmsg,CWMSGELEM_WTP_NAME,wtpinfo->name,strlen((char*)wtpinfo->name));
|
||||
/* Mandatory elements */
|
||||
|
||||
if (wtpinfo->session_id_len>0){
|
||||
cwmsg_addelem(&cwmsg,CWMSGELEM_SESSION_ID,wtpinfo->session_id,wtpinfo->session_id_len);
|
||||
/* location data */
|
||||
cwmsg_addelem(&cwmsg, CWMSGELEM_LOCATION_DATA, wtpinfo->location,
|
||||
strlen((char *) wtpinfo->location));
|
||||
|
||||
/* wtp board data */
|
||||
cwmsg_addelem_wtp_board_data(&cwmsg, wtpinfo);
|
||||
|
||||
/* wtp descriptor */
|
||||
cwmsg_addelem_wtp_descriptor(&cwmsg, wtpinfo);
|
||||
|
||||
/* wtp name */
|
||||
cwmsg_addelem(&cwmsg, CWMSGELEM_WTP_NAME, wtpinfo->name, strlen((char *) wtpinfo->name));
|
||||
|
||||
/* session id */
|
||||
cwmsg_addelem_session_id(&cwmsg, wtpinfo->session_id);
|
||||
|
||||
/* frame tunnel mode */
|
||||
cwmsg_addelem(&cwmsg, CWMSGELEM_WTP_FRAME_TUNNEL_MODE, &wtpinfo->frame_tunnel_mode,
|
||||
sizeof(uint8_t));
|
||||
|
||||
/* WTP MAC type */
|
||||
cwmsg_addelem(&cwmsg, CWMSGELEM_WTP_MAC_TYPE, &wtpinfo->mac_type, sizeof(uint8_t));
|
||||
|
||||
/* WTP radio information elements */
|
||||
cwmsg_addelem_wtp_radio_infos(&cwmsg, wtpinfo->radioinfo);
|
||||
|
||||
switch (conn->capwap_mode) {
|
||||
case CWMODE_CISCO:
|
||||
cwmsg_addelem_vendor_cisco_mwar_addr(&cwmsg,conn);
|
||||
break;
|
||||
default:
|
||||
/* ECN support */
|
||||
cwmsg_addelem(&cwmsg, CWMSGELEM_ECN_SUPPORT, &wtpinfo->ecn_support,
|
||||
sizeof(uint8_t));
|
||||
}
|
||||
|
||||
cwmsg_addelem(&cwmsg,CWMSGELEM_WTP_FRAME_TUNNEL_MODE,&wtpinfo->frame_tunnel_mode,sizeof(uint8_t));
|
||||
cwmsg_addelem(&cwmsg,CWMSGELEM_WTP_MAC_TYPE,&wtpinfo->mac_type,sizeof(uint8_t));
|
||||
cwmsg_addelem_wtp_radio_infos(&cwmsg,wtpinfo->radioinfo);
|
||||
|
||||
if (wtpinfo->capwap_mode != CWMODE_CISCO){
|
||||
cwmsg_addelem(&cwmsg,CWMSGELEM_ECN_SUPPORT,&wtpinfo->ecn_support,sizeof(uint8_t));
|
||||
cwmsg_addelem_cw_local_ip_addr(&cwmsg,conn);
|
||||
}
|
||||
/* local ip address */
|
||||
cwmsg_addelem_cw_local_ip_addr(&cwmsg, conn);
|
||||
|
||||
|
||||
/* Non-mandatory elements */
|
||||
|
||||
/* maximum message length */
|
||||
uint16_t l = htons(wtpinfo->max_msg_len);
|
||||
cwmsg_addelem(&cwmsg,CWMSGELEM_MAXIMUM_MESSAGE_LENGTH,(uint8_t*)&l,sizeof(l));
|
||||
cwmsg_addelem(&cwmsg, CWMSGELEM_MAXIMUM_MESSAGE_LENGTH, (uint8_t *) & l, sizeof(l));
|
||||
|
||||
return conn_send_cwmsg(conn,&cwmsg);
|
||||
return conn_send_cwmsg(conn, &cwmsg);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "radioinfo.h"
|
||||
|
||||
#include "bstr.h"
|
||||
|
||||
|
||||
struct wtp_reboot_statistics{
|
||||
@ -41,7 +41,6 @@ struct wtp_reboot_statistics{
|
||||
/* structure to hold info about a wtp */
|
||||
struct wtpinfo{
|
||||
|
||||
int capwap_mode;
|
||||
|
||||
|
||||
uint8_t *ac_name;
|
||||
@ -61,8 +60,10 @@ struct wtpinfo{
|
||||
uint8_t frame_tunnel_mode;
|
||||
|
||||
uint8_t mac_type;
|
||||
uint8_t * session_id;
|
||||
int session_id_len;
|
||||
|
||||
|
||||
bstr_t session_id;
|
||||
// int session_id_len;
|
||||
|
||||
struct radioinfo radioinfo[31];
|
||||
|
||||
|
@ -205,8 +205,8 @@ int wtpinfo_print(char *str, struct wtpinfo * wtpinfo)
|
||||
s+=sprintf (s,"\tSession ID: ");
|
||||
if (wtpinfo->session_id) {
|
||||
int i;
|
||||
for (i=0; i<wtpinfo->session_id_len; i++)
|
||||
s+=sprintf(s,"%02X",wtpinfo->session_id[i]);
|
||||
for (i=0; i<bstr_len(wtpinfo->session_id); i++)
|
||||
s+=sprintf(s,"%02X",bstr_data(wtpinfo->session_id)[i]);
|
||||
}
|
||||
else
|
||||
s+=sprintf(s,"Not set");
|
||||
|
@ -13,9 +13,11 @@ int wtpinfo_readelem_session_id(struct wtpinfo * wtpinfo, int type, uint8_t * ms
|
||||
if (type != CWMSGELEM_SESSION_ID)
|
||||
return 0;
|
||||
|
||||
wtpinfo->session_id = realloc(wtpinfo->session_id,len);
|
||||
memcpy(wtpinfo->session_id,msgelem,len);
|
||||
wtpinfo->session_id_len=len;
|
||||
wtpinfo->session_id = bstr_create(msgelem,len);
|
||||
|
||||
// wtpinfo->session_id = realloc(wtpinfo->session_id,len);
|
||||
// memcpy(wtpinfo->session_id,msgelem,len);
|
||||
// wtpinfo->session_id_len=len;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user