Lines Matching refs:buflen

30 static size_t hostapd_write_ht_mcs_bitmask(char *buf, size_t buflen,  in hostapd_write_ht_mcs_bitmask()  argument
36 ret = os_snprintf(buf + len, buflen - len, in hostapd_write_ht_mcs_bitmask()
38 if (os_snprintf_error(buflen - len, ret)) in hostapd_write_ht_mcs_bitmask()
43 len += wpa_snprintf_hex(buf + len, buflen - len, mcs_set, 10); in hostapd_write_ht_mcs_bitmask()
45 ret = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_write_ht_mcs_bitmask()
46 if (os_snprintf_error(buflen - len, ret)) in hostapd_write_ht_mcs_bitmask()
56 char *buf, size_t buflen) in hostapd_get_sta_conn_time() argument
73 ret = os_snprintf(buf, buflen, "connected_time=%lu\n", secs); in hostapd_get_sta_conn_time()
74 if (os_snprintf_error(buflen, ret)) in hostapd_get_sta_conn_time()
82 char *buf, size_t buflen) in hostapd_get_sta_info() argument
91 ret = os_snprintf(buf, buflen, "rx_packets=%lu\ntx_packets=%lu\n" in hostapd_get_sta_info()
97 if (os_snprintf_error(buflen, ret)) in hostapd_get_sta_info()
101 ret = os_snprintf(buf + len, buflen - len, "rx_rate_info=%lu", in hostapd_get_sta_info()
103 if (os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
107 ret = os_snprintf(buf + len, buflen - len, " mcs %u", in hostapd_get_sta_info()
109 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
113 ret = os_snprintf(buf + len, buflen - len, " vhtmcs %u", in hostapd_get_sta_info()
115 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
119 ret = os_snprintf(buf + len, buflen - len, " vhtnss %u", in hostapd_get_sta_info()
121 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
125 ret = os_snprintf(buf + len, buflen - len, " shortGI"); in hostapd_get_sta_info()
126 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
129 ret = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_get_sta_info()
130 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
133 ret = os_snprintf(buf + len, buflen - len, "tx_rate_info=%lu", in hostapd_get_sta_info()
135 if (os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
139 ret = os_snprintf(buf + len, buflen - len, " mcs %u", in hostapd_get_sta_info()
141 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
145 ret = os_snprintf(buf + len, buflen - len, " vhtmcs %u", in hostapd_get_sta_info()
147 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
151 ret = os_snprintf(buf + len, buflen - len, " vhtnss %u", in hostapd_get_sta_info()
153 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
157 ret = os_snprintf(buf + len, buflen - len, " shortGI"); in hostapd_get_sta_info()
158 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
161 ret = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_get_sta_info()
162 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
166 ret = os_snprintf(buf + len, buflen - len, in hostapd_get_sta_info()
173 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
178 len = hostapd_write_ht_mcs_bitmask(buf, buflen, len, in hostapd_get_sta_info()
184 ret = os_snprintf(buf + len, buflen - len, in hostapd_get_sta_info()
186 if (!os_snprintf_error(buflen - len, ret)) in hostapd_get_sta_info()
190 len += hostapd_get_sta_conn_time(sta, &data, buf + len, buflen - len); in hostapd_get_sta_info()
237 char *buf, size_t buflen) in hostapd_ctrl_iface_sta_mib() argument
247 ret = os_snprintf(buf + len, buflen - len, MACSTR "\nflags=", in hostapd_ctrl_iface_sta_mib()
249 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_sta_mib()
253 ret = ap_sta_flags_txt(sta->flags, buf + len, buflen - len); in hostapd_ctrl_iface_sta_mib()
258 ret = os_snprintf(buf + len, buflen - len, "\naid=%d\ncapability=0x%x\n" in hostapd_ctrl_iface_sta_mib()
261 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_sta_mib()
266 ret = os_snprintf(buf + len, buflen - len, "%02x%s", in hostapd_ctrl_iface_sta_mib()
269 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_sta_mib()
274 ret = os_snprintf(buf + len, buflen - len, "\ntimeout_next=%s\n", in hostapd_ctrl_iface_sta_mib()
276 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_sta_mib()
281 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
283 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_sta_mib()
288 res = ieee802_11_get_mib_sta(hapd, sta, buf + len, buflen - len); in hostapd_ctrl_iface_sta_mib()
291 res = wpa_get_mib_sta(sta->wpa_sm, buf + len, buflen - len); in hostapd_ctrl_iface_sta_mib()
294 res = ieee802_1x_get_mib_sta(hapd, sta, buf + len, buflen - len); in hostapd_ctrl_iface_sta_mib()
298 buflen - len); in hostapd_ctrl_iface_sta_mib()
301 res = hostapd_p2p_get_mib_sta(hapd, sta, buf + len, buflen - len); in hostapd_ctrl_iface_sta_mib()
305 len += hostapd_get_sta_info(hapd, sta, buf + len, buflen - len); in hostapd_ctrl_iface_sta_mib()
309 res = os_snprintf(buf + len, buflen - len, "sae_group=%d\n", in hostapd_ctrl_iface_sta_mib()
311 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
320 res = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
322 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
333 res = os_snprintf(buf + len, buflen - len, "%s%d", in hostapd_ctrl_iface_sta_mib()
335 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
340 res = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_ctrl_iface_sta_mib()
341 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
347 res = os_snprintf(buf + len, buflen - len, "vlan_id=%d\n", in hostapd_ctrl_iface_sta_mib()
349 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
353 res = mbo_ap_get_info(sta, buf + len, buflen - len); in hostapd_ctrl_iface_sta_mib()
358 buflen - len > (unsigned) (17 + 2 * sta->supp_op_classes[0])) { in hostapd_ctrl_iface_sta_mib()
359 res = os_snprintf(buf + len, buflen - len, "supp_op_classes="); in hostapd_ctrl_iface_sta_mib()
360 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
362 len += wpa_snprintf_hex(buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
365 res = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_ctrl_iface_sta_mib()
366 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
371 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
375 if (!os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_sta_mib()
381 res = os_snprintf(buf + len, buflen - len, "he_capab="); in hostapd_ctrl_iface_sta_mib()
382 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
384 len += wpa_snprintf_hex(buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
387 res = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_ctrl_iface_sta_mib()
388 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
395 res = os_snprintf(buf + len, buflen - len, "eht_capab="); in hostapd_ctrl_iface_sta_mib()
396 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
398 len += wpa_snprintf_hex(buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
401 res = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_ctrl_iface_sta_mib()
402 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
409 res = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
413 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
416 res = os_snprintf(buf + len, buflen - len, "vht_capab="); in hostapd_ctrl_iface_sta_mib()
417 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
419 len += wpa_snprintf_hex(buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
422 res = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_ctrl_iface_sta_mib()
423 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
429 res = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
433 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
438 buflen - len > (unsigned) (11 + 2 * sta->ext_capability[0])) { in hostapd_ctrl_iface_sta_mib()
439 res = os_snprintf(buf + len, buflen - len, "ext_capab="); in hostapd_ctrl_iface_sta_mib()
440 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
442 len += wpa_snprintf_hex(buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
445 res = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_ctrl_iface_sta_mib()
446 if (!os_snprintf_error(buflen - len, res)) in hostapd_ctrl_iface_sta_mib()
451 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
453 if (!os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_sta_mib()
459 ret = os_snprintf(buf + len, buflen - len, "keyid=%s\n", keyid); in hostapd_ctrl_iface_sta_mib()
460 if (!os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_sta_mib()
466 ret = os_snprintf(buf + len, buflen - len, "dpp_pkhash="); in hostapd_ctrl_iface_sta_mib()
467 if (!os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_sta_mib()
469 len += wpa_snprintf_hex(buf + len, buflen - len, dpp_pkhash, in hostapd_ctrl_iface_sta_mib()
471 ret = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_ctrl_iface_sta_mib()
472 if (!os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_sta_mib()
482 buf + len, buflen - len, in hostapd_ctrl_iface_sta_mib()
485 if (!os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_sta_mib()
496 char *buf, size_t buflen) in hostapd_ctrl_iface_sta_first() argument
498 return hostapd_ctrl_iface_sta_mib(hapd, hapd->sta_list, buf, buflen); in hostapd_ctrl_iface_sta_first()
503 char *buf, size_t buflen) in hostapd_ctrl_iface_sta() argument
511 ret = os_snprintf(buf, buflen, "FAIL\n"); in hostapd_ctrl_iface_sta()
512 if (os_snprintf_error(buflen, ret)) in hostapd_ctrl_iface_sta()
530 buflen); in hostapd_ctrl_iface_sta()
537 ret = hostapd_ctrl_iface_sta_mib(hapd, sta, buf, buflen); in hostapd_ctrl_iface_sta()
538 ret += fst_ctrl_iface_mb_info(addr, buf + ret, buflen - ret); in hostapd_ctrl_iface_sta()
545 char *buf, size_t buflen) in hostapd_ctrl_iface_sta_next() argument
553 ret = os_snprintf(buf, buflen, "FAIL\n"); in hostapd_ctrl_iface_sta_next()
554 if (os_snprintf_error(buflen, ret)) in hostapd_ctrl_iface_sta_next()
562 return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen); in hostapd_ctrl_iface_sta_next()
743 char *buf, size_t buflen) in hostapd_ctrl_iface_signature() argument
757 return retrieve_sta_taxonomy(hapd, sta, buf, buflen); in hostapd_ctrl_iface_signature()
784 size_t buflen) in hostapd_ctrl_iface_status() argument
792 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
819 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
824 ret = os_snprintf(buf + len, buflen - len, "hw_mode=%s\n", in hostapd_ctrl_iface_status()
826 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
832 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
836 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
842 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
853 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
859 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
863 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
888 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
894 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
899 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
906 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
909 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
917 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
920 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
925 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
930 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
939 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
944 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
954 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
961 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
967 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
970 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
978 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
987 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
996 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
1000 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
1006 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
1009 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
1015 len = hostapd_write_ht_mcs_bitmask(buf, buflen, len, in hostapd_ctrl_iface_status()
1020 ret = os_snprintf(buf + len, buflen - len, "supported_rates="); in hostapd_ctrl_iface_status()
1021 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
1026 ret = os_snprintf(buf + len, buflen - len, "%s%02x", in hostapd_ctrl_iface_status()
1029 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
1033 ret = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_ctrl_iface_status()
1034 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
1041 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
1044 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
1053 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
1064 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
1070 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
1077 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
1085 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_status()
1088 if (os_snprintf_error(buflen - len, ret)) in hostapd_ctrl_iface_status()
1538 char *buf, size_t buflen) in hostapd_ctrl_iface_acl_show_mac() argument
1546 ret = os_snprintf(buf + len, buflen - len, in hostapd_ctrl_iface_acl_show_mac()
1550 if (ret < 0 || (size_t) ret >= buflen - len) in hostapd_ctrl_iface_acl_show_mac()