Add WTP boot and other version
FossilOrigin-Name: 362fb901432f566738e486c02310d8df61e08c2b804e6d1d48fb966e890fa942
This commit is contained in:
parent
12aa9a55d9
commit
7d05035f60
@ -21,6 +21,8 @@ const char CW_ITEM_WTP_HARDWARE_VENDOR=
|
|||||||
|
|
||||||
const char CW_ITEM_WTP_HARDWARE_VERSION[]="wtp_hardware_version";
|
const char CW_ITEM_WTP_HARDWARE_VERSION[]="wtp_hardware_version";
|
||||||
const char CW_ITEM_WTP_SOFTWARE_VERSION[]="wtp_software_version";
|
const char CW_ITEM_WTP_SOFTWARE_VERSION[]="wtp_software_version";
|
||||||
|
const char CW_ITEM_WTP_BOOT_VERSION[]="wtp_boot_version";
|
||||||
|
const char CW_ITEM_WTP_OTHER_VERSION[]="wtp_other_version";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
const char CW_ITEM_WTP_SOFTWARE_VENDOR,
|
const char CW_ITEM_WTP_SOFTWARE_VENDOR,
|
||||||
@ -105,6 +107,8 @@ struct cw_itemdef capwap_itemdefs[] = {
|
|||||||
{CW_ITEM_LOCATION_DATA,CW_ITEM_NONE,MBAG_STR},
|
{CW_ITEM_LOCATION_DATA,CW_ITEM_NONE,MBAG_STR},
|
||||||
{CW_ITEM_WTP_HARDWARE_VERSION,CW_ITEM_NONE,MBAG_VENDORSTR},
|
{CW_ITEM_WTP_HARDWARE_VERSION,CW_ITEM_NONE,MBAG_VENDORSTR},
|
||||||
{CW_ITEM_WTP_SOFTWARE_VERSION,CW_ITEM_NONE,MBAG_VENDORSTR},
|
{CW_ITEM_WTP_SOFTWARE_VERSION,CW_ITEM_NONE,MBAG_VENDORSTR},
|
||||||
|
{CW_ITEM_WTP_BOOT_VERSION,CW_ITEM_NONE,MBAG_VENDORSTR},
|
||||||
|
{CW_ITEM_WTP_OTHER_VERSION,CW_ITEM_NONE,MBAG_VENDORSTR},
|
||||||
{CW_ITEM_WTP_GROUP_NAME,CW_ITEM_NONE,MBAG_STR},
|
{CW_ITEM_WTP_GROUP_NAME,CW_ITEM_NONE,MBAG_STR},
|
||||||
{CW_ITEM_MAXIMUM_MESSAGE_LENGTH,CW_ITEM_NONE,MBAG_WORD},
|
{CW_ITEM_MAXIMUM_MESSAGE_LENGTH,CW_ITEM_NONE,MBAG_WORD},
|
||||||
{CW_ITEM_STATISTICS_TIMER,CW_ITEM_NONE,MBAG_WORD},
|
{CW_ITEM_STATISTICS_TIMER,CW_ITEM_NONE,MBAG_WORD},
|
||||||
|
@ -165,6 +165,8 @@ extern const char CW_ITEM_WTP_BOARD_SERIALNO[];
|
|||||||
|
|
||||||
extern const char CW_ITEM_WTP_SOFTWARE_VERSION[];
|
extern const char CW_ITEM_WTP_SOFTWARE_VERSION[];
|
||||||
extern const char CW_ITEM_WTP_HARDWARE_VERSION[];
|
extern const char CW_ITEM_WTP_HARDWARE_VERSION[];
|
||||||
|
extern const char CW_ITEM_WTP_BOOT_VERSION[];
|
||||||
|
extern const char CW_ITEM_WTP_OTHER_VERSION[];
|
||||||
|
|
||||||
extern const char CW_ITEM_WTP_BOOTLOADER_VERSION[];
|
extern const char CW_ITEM_WTP_BOOTLOADER_VERSION[];
|
||||||
|
|
||||||
|
@ -61,6 +61,21 @@ int cw_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a, uint8_t *
|
|||||||
cw_log(LOG_ERR, "Can't send Software Version in WTP descriptor, not set.");
|
cw_log(LOG_ERR, "Can't send Software Version in WTP descriptor, not set.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i = mbag_get(mbag,CW_ITEM_WTP_BOOT_VERSION);
|
||||||
|
if ( i ) {
|
||||||
|
d += cw_put_version(d,CW_SUBELEM_WTP_BOOTLOADER_VERSION,i->data);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cw_log(LOG_INFO, "Can't send Boot Version in WTP descriptor, not set.");
|
||||||
|
}
|
||||||
|
|
||||||
|
i = mbag_get(mbag,CW_ITEM_WTP_OTHER_VERSION);
|
||||||
|
if ( i ) {
|
||||||
|
d += cw_put_version(d,CW_SUBELEM_WTP_OTHERSOFTWARE_VERSION,i->data);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cw_log(LOG_INFO, "Can't send Other Version in WTP descriptor, not set.");
|
||||||
|
}
|
||||||
|
|
||||||
int len = d-dst-4;
|
int len = d-dst-4;
|
||||||
return len + cw_put_elem_hdr(dst,a->elem_id,len);
|
return len + cw_put_elem_hdr(dst,a->elem_id,len);
|
||||||
|
Loading…
Reference in New Issue
Block a user