Lines Matching refs:pos
186 char *pos;
196 pos = os_strchr(timeout_txt, ' ');
197 if (pos) {
198 *pos++ = '\0';
199 if (hwaddr_aton(pos, addr_buf) == 0)
214 char *pos;
219 for (pos = cmd, len = 0; *pos != '\0'; pos++) {
220 if (*pos < '0' || *pos > '9')
222 pin[len++] = *pos;
256 char *pos)
262 len = os_strlen(pos);
270 if (hexstr2bin(pos, wpabuf_put(buf, len), len) < 0) {
364 char *pos;
367 pos = os_strchr(cmd, ' ');
368 if (pos == NULL)
370 *pos++ = '\0';
379 if (os_strcmp(pos, "WPS-CR") == 0)
416 char *pos;
419 pos = os_strchr(txt, ' ');
420 if (pos)
421 *pos++ = '\0';
429 if (pos)
430 timeout = atoi(pos);
446 if (pos == NULL)
448 pin = pos;
449 pos = os_strchr(pos, ' ');
450 if (pos) {
451 *pos++ = '\0';
452 timeout = atoi(pos);
467 char *pos;
471 pos = os_strchr(txt, ' ');
472 if (!pos)
474 *pos++ = '\0';
476 auth = pos;
477 pos = os_strchr(pos, ' ');
478 if (pos) {
479 *pos++ = '\0';
480 encr = pos;
481 pos = os_strchr(pos, ' ');
482 if (pos) {
483 *pos++ = '\0';
484 key = pos;
513 char *pos, *end;
515 pos = buf;
518 ret = os_snprintf(pos, end - pos, "PBC Status: %s\n",
521 if (ret < 0 || ret >= end - pos)
522 return pos - buf;
523 pos += ret;
525 ret = os_snprintf(pos, end - pos, "Last WPS result: %s\n",
531 if (ret < 0 || ret >= end - pos)
532 return pos - buf;
533 pos += ret;
538 ret = os_snprintf(pos, end - pos,
542 if (ret < 0 || ret >= end - pos)
543 return pos - buf;
544 pos += ret;
548 ret = os_snprintf(pos, end - pos, "Peer Address: " MACSTR "\n",
551 if (ret < 0 || ret >= end - pos)
552 return pos - buf;
553 pos += ret;
556 return pos - buf;
568 u8 buf[1000], *pos;
594 pos = mgmt->u.action.u.bss_tm_req.variable;
596 if (hostapd_drv_send_mlme(hapd, buf, pos - buf, 0) < 0) {
611 u8 buf[1000], *pos;
651 pos = mgmt->u.action.u.bss_tm_req.variable;
654 *pos++ = url_len;
655 os_memcpy(pos, url, url_len);
656 pos += url_len;
658 if (hostapd_drv_send_mlme(hapd, buf, pos - buf, 0) < 0) {
709 char *pos, *end;
711 pos = buf;
714 ret = os_snprintf(pos, end - pos, "bssid=" MACSTR "\n"
719 if (ret < 0 || ret >= end - pos)
720 return pos - buf;
721 pos += ret;
724 ret = os_snprintf(pos, end - pos, "wps_state=%s\n",
728 if (ret < 0 || ret >= end - pos)
729 return pos - buf;
730 pos += ret;
734 ret = os_snprintf(pos, end - pos, "passphrase=%s\n",
736 if (ret < 0 || ret >= end - pos)
737 return pos - buf;
738 pos += ret;
747 ret = os_snprintf(pos, end - pos, "psk=%s\n", hex);
748 if (ret < 0 || ret >= end - pos)
749 return pos - buf;
750 pos += ret;
755 ret = os_snprintf(pos, end - pos, "key_mgmt=");
756 if (ret < 0 || ret >= end - pos)
757 return pos - buf;
758 pos += ret;
761 ret = os_snprintf(pos, end - pos, "WPA-PSK ");
762 if (ret < 0 || ret >= end - pos)
763 return pos - buf;
764 pos += ret;
767 ret = os_snprintf(pos, end - pos, "WPA-EAP ");
768 if (ret < 0 || ret >= end - pos)
769 return pos - buf;
770 pos += ret;
774 ret = os_snprintf(pos, end - pos, "FT-PSK ");
775 if (ret < 0 || ret >= end - pos)
776 return pos - buf;
777 pos += ret;
780 ret = os_snprintf(pos, end - pos, "FT-EAP ");
781 if (ret < 0 || ret >= end - pos)
782 return pos - buf;
783 pos += ret;
788 ret = os_snprintf(pos, end - pos, "WPA-PSK-SHA256 ");
789 if (ret < 0 || ret >= end - pos)
790 return pos - buf;
791 pos += ret;
794 ret = os_snprintf(pos, end - pos, "WPA-EAP-SHA256 ");
795 if (ret < 0 || ret >= end - pos)
796 return pos - buf;
797 pos += ret;
801 ret = os_snprintf(pos, end - pos, "\n");
802 if (ret < 0 || ret >= end - pos)
803 return pos - buf;
804 pos += ret;
808 ret = os_snprintf(pos, end - pos, "group_cipher=%s\n",
810 if (ret < 0 || ret >= end - pos)
811 return pos - buf;
812 pos += ret;
816 ret = os_snprintf(pos, end - pos, "rsn_pairwise_cipher=");
817 if (ret < 0 || ret >= end - pos)
818 return pos - buf;
819 pos += ret;
821 ret = wpa_write_ciphers(pos, end, hapd->conf->rsn_pairwise,
824 return pos - buf;
825 pos += ret;
827 ret = os_snprintf(pos, end - pos, "\n");
828 if (ret < 0 || ret >= end - pos)
829 return pos - buf;
830 pos += ret;
834 ret = os_snprintf(pos, end - pos, "wpa_pairwise_cipher=");
835 if (ret < 0 || ret >= end - pos)
836 return pos - buf;
837 pos += ret;
839 ret = wpa_write_ciphers(pos, end, hapd->conf->rsn_pairwise,
842 return pos - buf;
843 pos += ret;
845 ret = os_snprintf(pos, end - pos, "\n");
846 if (ret < 0 || ret >= end - pos)
847 return pos - buf;
848 pos += ret;
851 return pos - buf;