Lines Matching +full:vendor +full:- +full:extension

2  * Wi-Fi Protected Setup - device attributes
21 len = dev->manufacturer ? os_strlen(dev->manufacturer) : 0; in wps_build_manufacturer()
25 * Some deployed WPS implementations fail to parse zero-length in wps_build_manufacturer()
35 wpabuf_put_data(msg, dev->manufacturer, len); in wps_build_manufacturer()
45 len = dev->model_name ? os_strlen(dev->model_name) : 0; in wps_build_model_name()
49 * Some deployed WPS implementations fail to parse zero-length in wps_build_model_name()
59 wpabuf_put_data(msg, dev->model_name, len); in wps_build_model_name()
69 len = dev->model_number ? os_strlen(dev->model_number) : 0; in wps_build_model_number()
73 * Some deployed WPS implementations fail to parse zero-length in wps_build_model_number()
83 wpabuf_put_data(msg, dev->model_number, len); in wps_build_model_number()
93 len = dev->serial_number ? os_strlen(dev->serial_number) : 0; in wps_build_serial_number()
97 * Some deployed WPS implementations fail to parse zero-length in wps_build_serial_number()
107 wpabuf_put_data(msg, dev->serial_number, len); in wps_build_serial_number()
117 wpabuf_put_data(msg, dev->pri_dev_type, WPS_DEV_TYPE_LEN); in wps_build_primary_dev_type()
125 if (!dev->num_sec_dev_types) in wps_build_secondary_dev_type()
130 wpabuf_put_be16(msg, WPS_DEV_TYPE_LEN * dev->num_sec_dev_types); in wps_build_secondary_dev_type()
131 wpabuf_put_data(msg, dev->sec_dev_type, in wps_build_secondary_dev_type()
132 WPS_DEV_TYPE_LEN * dev->num_sec_dev_types); in wps_build_secondary_dev_type()
163 len = dev->device_name ? os_strlen(dev->device_name) : 0; in wps_build_dev_name()
167 * Some deployed WPS implementations fail to parse zero-length in wps_build_dev_name()
177 wpabuf_put_data(msg, dev->device_name, len); in wps_build_dev_name()
190 return -1; in wps_build_device_attrs()
200 wpabuf_put_be32(msg, 0x80000000 | dev->os_version); in wps_build_os_version()
207 if (dev->vendor_ext_m1 != NULL) { in wps_build_vendor_ext_m1()
208 wpa_hexdump(MSG_DEBUG, "WPS: * Vendor Extension M1", in wps_build_vendor_ext_m1()
209 wpabuf_head_u8(dev->vendor_ext_m1), in wps_build_vendor_ext_m1()
210 wpabuf_len(dev->vendor_ext_m1)); in wps_build_vendor_ext_m1()
212 wpabuf_put_be16(msg, wpabuf_len(dev->vendor_ext_m1)); in wps_build_vendor_ext_m1()
213 wpabuf_put_buf(msg, dev->vendor_ext_m1); in wps_build_vendor_ext_m1()
222 return wps_build_rf_bands_attr(msg, rf_band ? rf_band : dev->rf_bands); in wps_build_rf_bands()
231 if (dev->vendor_ext[i] == NULL) in wps_build_vendor_ext()
233 wpa_hexdump(MSG_DEBUG, "WPS: * Vendor Extension", in wps_build_vendor_ext()
234 wpabuf_head_u8(dev->vendor_ext[i]), in wps_build_vendor_ext()
235 wpabuf_len(dev->vendor_ext[i])); in wps_build_vendor_ext()
237 wpabuf_put_be16(msg, wpabuf_len(dev->vendor_ext[i])); in wps_build_vendor_ext()
238 wpabuf_put_buf(msg, dev->vendor_ext[i]); in wps_build_vendor_ext()
247 if (!dev->application_ext) in wps_build_application_ext()
250 wpa_hexdump_buf(MSG_DEBUG, "WPS: * Application Extension", in wps_build_application_ext()
251 dev->application_ext); in wps_build_application_ext()
253 wpabuf_put_be16(msg, wpabuf_len(dev->application_ext)); in wps_build_application_ext()
254 wpabuf_put_buf(msg, dev->application_ext); in wps_build_application_ext()
265 return -1; in wps_process_manufacturer()
270 os_free(dev->manufacturer); in wps_process_manufacturer()
271 dev->manufacturer = dup_binstr(str, str_len); in wps_process_manufacturer()
272 if (dev->manufacturer == NULL) in wps_process_manufacturer()
273 return -1; in wps_process_manufacturer()
284 return -1; in wps_process_model_name()
289 os_free(dev->model_name); in wps_process_model_name()
290 dev->model_name = dup_binstr(str, str_len); in wps_process_model_name()
291 if (dev->model_name == NULL) in wps_process_model_name()
292 return -1; in wps_process_model_name()
303 return -1; in wps_process_model_number()
308 os_free(dev->model_number); in wps_process_model_number()
309 dev->model_number = dup_binstr(str, str_len); in wps_process_model_number()
310 if (dev->model_number == NULL) in wps_process_model_number()
311 return -1; in wps_process_model_number()
322 return -1; in wps_process_serial_number()
327 os_free(dev->serial_number); in wps_process_serial_number()
328 dev->serial_number = dup_binstr(str, str_len); in wps_process_serial_number()
329 if (dev->serial_number == NULL) in wps_process_serial_number()
330 return -1; in wps_process_serial_number()
341 return -1; in wps_process_dev_name()
346 os_free(dev->device_name); in wps_process_dev_name()
347 dev->device_name = dup_binstr(str, str_len); in wps_process_dev_name()
348 if (dev->device_name == NULL) in wps_process_dev_name()
349 return -1; in wps_process_dev_name()
364 return -1; in wps_process_primary_dev_type()
367 os_memcpy(dev->pri_dev_type, dev_type, WPS_DEV_TYPE_LEN); in wps_process_primary_dev_type()
369 wps_dev_type_bin2str(dev->pri_dev_type, devtype, in wps_process_primary_dev_type()
379 if (wps_process_manufacturer(dev, attr->manufacturer, in wps_process_device_attrs()
380 attr->manufacturer_len) || in wps_process_device_attrs()
381 wps_process_model_name(dev, attr->model_name, in wps_process_device_attrs()
382 attr->model_name_len) || in wps_process_device_attrs()
383 wps_process_model_number(dev, attr->model_number, in wps_process_device_attrs()
384 attr->model_number_len) || in wps_process_device_attrs()
385 wps_process_serial_number(dev, attr->serial_number, in wps_process_device_attrs()
386 attr->serial_number_len) || in wps_process_device_attrs()
387 wps_process_primary_dev_type(dev, attr->primary_dev_type) || in wps_process_device_attrs()
388 wps_process_dev_name(dev, attr->dev_name, attr->dev_name_len)) in wps_process_device_attrs()
389 return -1; in wps_process_device_attrs()
398 return -1; in wps_process_os_version()
401 dev->os_version = WPA_GET_BE32(ver); in wps_process_os_version()
402 wpa_printf(MSG_DEBUG, "WPS: OS Version %08x", dev->os_version); in wps_process_os_version()
410 dev->multi_ap_ext = ext; in wps_process_vendor_ext_m1()
411 wpa_printf(MSG_DEBUG, "WPS: Multi-AP extension value %02x", in wps_process_vendor_ext_m1()
412 dev->multi_ap_ext); in wps_process_vendor_ext_m1()
420 return -1; in wps_process_rf_bands()
423 dev->rf_bands = *bands; in wps_process_rf_bands()
424 wpa_printf(MSG_DEBUG, "WPS: Enrollee RF Bands 0x%x", dev->rf_bands); in wps_process_rf_bands()
432 os_free(dev->device_name); in wps_device_data_free()
433 dev->device_name = NULL; in wps_device_data_free()
434 os_free(dev->manufacturer); in wps_device_data_free()
435 dev->manufacturer = NULL; in wps_device_data_free()
436 os_free(dev->model_name); in wps_device_data_free()
437 dev->model_name = NULL; in wps_device_data_free()
438 os_free(dev->model_number); in wps_device_data_free()
439 dev->model_number = NULL; in wps_device_data_free()
440 os_free(dev->serial_number); in wps_device_data_free()
441 dev->serial_number = NULL; in wps_device_data_free()
442 wpabuf_free(dev->application_ext); in wps_device_data_free()
443 dev->application_ext = NULL; in wps_device_data_free()