Lines Matching full:len
410 char *data, size_t len)
414 size_t buflen = sizeof(*o) + len;
442 if (written > len) {
444 "len (%d)",oid, (unsigned int) written, len);
457 buf = os_zalloc(sizeof(*o) + len);
462 o->Length = len;
465 wpa_printf(MSG_DEBUG, "%s: oid=0x%x len (%d) failed",
466 __func__, oid, len);
470 if (o->Length > len) {
471 wpa_printf(MSG_DEBUG, "%s: oid=0x%x Length (%d) > len (%d)",
472 __func__, oid, (unsigned int) o->Length, len);
485 const char *data, size_t len)
494 wpa_hexdump_key(MSG_MSGDUMP, txt, data, len);
496 buflen = sizeof(*o) + len;
506 os_memcpy(o->Data, data, len);
522 wpa_hexdump_key(MSG_MSGDUMP, txt, data, len);
524 buf = os_zalloc(sizeof(*o) + len);
529 o->Length = len;
531 os_memcpy(o->Data, data, len);
534 wpa_printf(MSG_DEBUG, "%s: oid=0x%x len (%d) failed",
535 __func__, oid, len);
774 int len, j;
781 len = ndis_get_oid(drv, OID_802_11_BSSID_LIST, (char *) b, blen);
782 if (len < 0) {
875 size_t len;
878 len = 12 + key_len;
879 wep = os_zalloc(len);
882 wep->Length = len;
894 (char *) wep, len);
895 res = ndis_set_oid(drv, OID_802_11_ADD_WEP, (char *) wep, len);
908 size_t len, i;
935 len = 12 + 6 + 6 + 8 + key_len;
937 nkey = os_zalloc(len);
941 nkey->Length = len;
964 (char *) nkey, len);
965 res = ndis_set_oid(drv, OID_802_11_ADD_KEY, (char *) nkey, len);
1091 int len, count, i, ret;
1103 len = 8 + count * sizeof(BSSID_INFO);
1104 p = os_zalloc(len);
1108 p->Length = len;
1116 wpa_hexdump(MSG_MSGDUMP, "NDIS: OID_802_11_PMKID", (char *) p, len);
1117 ret = ndis_set_oid(drv, OID_802_11_PMKID, (char *) p, len);
1222 int len;
1227 len = ndis_get_oid(drv, OID_802_11_ASSOCIATION_INFORMATION, buf,
1229 if (len < 0) {
1234 if (len > sizeof(buf)) {
1240 "information length %d", len);
1241 len = ndis_get_oid(drv, OID_802_11_ASSOCIATION_INFORMATION,
1243 if (len < -1) {
1248 if (len > sizeof(buf)) {
1250 " information length %d (re-read)", len);
1251 len = sizeof(buf);
1254 wpa_hexdump(MSG_MSGDUMP, "NDIS: association information", buf, len);
1255 if (len < sizeof(*ai)) {
1267 if (ai->OffsetRequestIEs + ai->RequestIELength > (unsigned) len ||
1268 ai->OffsetResponseIEs + ai->ResponseIELength > (unsigned) len) {
1289 len = ndis_get_oid(drv, OID_802_11_BSSID_LIST, (char *) b, blen);
1290 if (len < 0) {
1412 "Event (len=%d)", data_len);
1446 "Event (len=%d)", data_len);
1626 int len;
1632 len = ndis_get_oid(drv, OID_802_11_CAPABILITY, buf, sizeof(buf));
1633 if (len < 0) {
1638 wpa_hexdump(MSG_MSGDUMP, "OID_802_11_CAPABILITY", buf, len);
1640 if (len < sizeof(*c) || c->Version != 2) {
1654 if ((char *) (ae + 1) > buf + len) {
1744 DWORD len, flags;
1746 if (!ReadMsgQueue(drv->event_queue, buf, NDISUIO_MSG_SIZE, &len, 0,
1753 if (len < sizeof(NDISUIO_DEVICE_NOTIFICATION)) {
1755 "Too short message (len=%d)", (int) len);
1760 wpa_printf(MSG_DEBUG, "NDIS: Notification received: len=%d type=0x%x",
1761 (int) len, hdr->dwNotificationType);
1909 size_t j, len, dlen;
1930 len = b->DeviceNameLength;
1931 if (len >= sizeof(name))
1932 len = sizeof(name) - 1;
1933 for (j = 0; j < len; j++)
1935 name[len] = '\0';
1938 len = b->DeviceDescrLength;
1939 if (len >= sizeof(desc))
1940 len = sizeof(desc) - 1;
1941 for (j = 0; j < len; j++)
1943 desc[len] = '\0';
2005 ULONG len;
2016 len = 8192;
2017 _names = os_zalloc(len);
2021 res = PacketGetAdapterNames(_names, &len);
2022 if (!res && len > 8192) {
2024 _names = os_zalloc(len);
2027 res = PacketGetAdapterNames(_names, &len);
2043 while (pos2 < names + len) {
2058 while (pos < names + len) {
2060 while (*pos && pos < names + len)
2062 if (pos + 1 >= names + len) {
2082 while (pos < names + len) {
2084 while (*pos && pos < names + len)
2086 if (pos + 1 >= names + len) {
2243 int len;
2245 len = _tcslen(drv->adapter_name);
2246 if (len > 80)
2257 len++;
2258 memcpy(multi, drv->adapter_name, len * sizeof(TCHAR));
2259 memcpy(&multi[len], TEXT("NDISUIO\0"), 9 * sizeof(TCHAR));
2260 len += 9;
2263 multi, len * sizeof(TCHAR), NULL, 0, NULL, NULL))
2268 (u8 *) multi, len * sizeof(TCHAR));
2289 DWORD i, hnd, len;
2325 len = sizeof(keyname);
2326 ret = RegEnumKeyEx(hk, i, keyname, &len, NULL, NULL, NULL,
2343 len = sizeof(devname);
2345 (LPBYTE) devname, &len);
2363 len = sizeof(hnd);
2365 (PUCHAR) &hnd, &len);
2614 size_t len, i, pos;
2622 len = pos + os_strlen(drv->ifname);
2623 if (len >= MAX_NDIS_DEVICE_NAME_LEN)
2627 for (i = pos; i < len; i++)
2632 ifname, len * sizeof(WCHAR), NULL, 0, &written,
2637 (const u8 *) ifname, len * sizeof(WCHAR));