Lines Matching defs:gbuf
160 * gbuf: is a global buf, which is used to communicate between the user and
163 static wldp_t *gbuf = NULL;
1178 (void) memset(gbuf, 0, MAX_BUF_LEN);
1182 gbuf->wldp_length = buf_len + WIFI_BUF_OFFSET;
1183 stri.ic_len = gbuf->wldp_length;
1186 gbuf->wldp_length = sizeof (wldp_t);
1187 stri.ic_len = gbuf->wldp_length;
1194 gbuf->wldp_type = NET_802_11;
1195 gbuf->wldp_id = params;
1199 stri.ic_dp = (char *)gbuf;
1202 gbuf->wldp_result = 0xffff;
1208 return (gbuf->wldp_result != WL_SUCCESS ?
1613 gbuf->wldp_result = WL_LACK_FEATURE;
1618 if (gbuf->wldp_result == WL_SUCCESS) {
1779 (void) strlcpy(essid, ((wl_essid_t *)(gbuf->wldp_buf))->wl_essid_essid,
1791 (*(wl_linkstatus_t *)(gbuf->wldp_buf) == WL_CONNECTED)) {
1834 ess_num = ((wl_ess_list_t *)(gbuf->wldp_buf))->wl_ess_list_num;
1839 p_ess_conf[i] = ((wl_ess_list_t *)gbuf->wldp_buf)
2084 (void) strlcpy(essid, ((wl_essid_t *)(gbuf->wldp_buf))->wl_essid_essid,
2090 ((uint8_t *)gbuf->wldp_buf)[0],
2091 ((uint8_t *)gbuf->wldp_buf)[1],
2092 ((uint8_t *)gbuf->wldp_buf)[2],
2093 ((uint8_t *)gbuf->wldp_buf)[3],
2094 ((uint8_t *)gbuf->wldp_buf)[4],
2095 ((uint8_t *)gbuf->wldp_buf)[5]);
2279 (*(wl_linkstatus_t *)(gbuf->wldp_buf) == WL_CONNECTED)) {
2290 ((uint8_t *)gbuf->wldp_buf)[0],
2291 ((uint8_t *)gbuf->wldp_buf)[1],
2292 ((uint8_t *)gbuf->wldp_buf)[2],
2293 ((uint8_t *)gbuf->wldp_buf)[3],
2294 ((uint8_t *)gbuf->wldp_buf)[4],
2295 ((uint8_t *)gbuf->wldp_buf)[5]);
2999 (void) memmove(gbuf->wldp_buf, &wepkey_tab, sizeof (wl_wep_key_tab_t));
3166 if (*(wl_linkstatus_t *)(gbuf->wldp_buf) == WL_NOTCONNECTED) {
3183 signal = *(wl_rssi_t *)(gbuf->wldp_buf);
3271 (void) memmove(gbuf->wldp_buf, &essid, sizeof (wl_essid_t));
3302 (void) memmove(gbuf->wldp_buf, &bsstype, sizeof (wl_bss_type_t));
3328 (void) memmove(gbuf->wldp_buf, &create_ibss,
3355 (void) memmove(gbuf->wldp_buf, &phy_conf, sizeof (wl_phy_conf_t));
3374 rates_num = ((wl_rates_t *)(gbuf->wldp_buf))->wl_rates_num;
3379 value = ((wl_rates_t *)gbuf->wldp_buf)
3505 ((wl_rates_t *)(gbuf->wldp_buf))->wl_rates_num = num;
3507 ((wl_rates_t *)gbuf->wldp_buf)->wl_rates_rates[i]
3552 (void) memmove(gbuf->wldp_buf, &ps_mode, sizeof (wl_ps_mode_t));
3578 (void) memmove(gbuf->wldp_buf, &auth_mode, sizeof (wl_authmode_t));
3603 (void) memmove(gbuf->wldp_buf, &encryption, sizeof (wl_encryption_t));
3624 (void) memmove(gbuf->wldp_buf, &wep_key_id, sizeof (wl_wep_key_id_t));
3649 (void) memmove(gbuf->wldp_buf, &radio, sizeof (wl_radio_t));
3653 * print_gbuf: After each ioctl system call, gbuf will contain result, gbuf
3680 assert(gbuf->wldp_length < MAX_BUF_LEN);
3686 if (memcmp((uint8_t *)gbuf->wldp_buf, bssid, sizeof (bssid))
3692 if (memcmp((uint8_t *)gbuf->wldp_buf, bssid, sizeof (bssid))
3698 (void) printf("%02x:", ((uint8_t *)gbuf->wldp_buf)[i]);
3699 (void) printf("%02x\n", ((uint8_t *)gbuf->wldp_buf)[i]);
3702 (void) printf("\tessid: %s\n", ((wl_essid_t *)(gbuf->wldp_buf))
3706 bsstype = *(wl_bss_type_t *)(gbuf->wldp_buf);
3724 createibss = *(wl_create_ibss_t *)(gbuf->wldp_buf);
3739 subtype = ((wl_fhss_t *)(gbuf->wldp_buf))->wl_fhss_subtype;
3747 (gbuf->wldp_buf))->wl_fhss_channel);
3751 (gbuf->wldp_buf))
3761 rates_num = ((wl_rates_t *)(gbuf->wldp_buf))->wl_rates_num;
3765 rate = ((wl_rates_t *)gbuf->wldp_buf)
3779 ps_mode = (wl_ps_mode_t *)(gbuf->wldp_buf);
3798 authmode = *(wl_authmode_t *)(gbuf->wldp_buf);
3814 encryption = *(wl_encryption_t *)(gbuf->wldp_buf);
3830 wepkeyid = *(wl_wep_key_id_t *)(gbuf->wldp_buf);
3834 signal = *(wl_rssi_t *)(gbuf->wldp_buf);
3838 radioon = *(wl_radio_t *)(gbuf->wldp_buf);
3853 linkstatus = *(wl_linkstatus_t *)(gbuf->wldp_buf);
3868 ess_num = ((wl_ess_list_t *)(gbuf->wldp_buf))->wl_ess_list_num;
3872 p_ess_conf[i] = ((wl_ess_list_t *)gbuf->wldp_buf)
3956 * do_get_xxx: will send ioctl to driver, then the driver will fill gbuf
3957 * with related value. gbuf has a format of wldp_t structure.
4539 if (gbuf->wldp_result != WL_SUCCESS) {
4544 print_error(gbuf->wldp_result);
4614 print_error(gbuf->wldp_result);
4713 gbuf = safe_malloc(MAX_BUF_LEN);
4915 free(gbuf);