Lines Matching refs:pos

147 	u8 *pos, *start;
180 pos = wpabuf_put(req, miclen);
182 data->specifier, start, pos - start, pos) < 0)
215 const u8 *pos;
218 pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_GPSK, respData, &len);
219 if (pos == NULL || len < 1) {
224 wpa_printf(MSG_DEBUG, "EAP-GPSK: Received frame: opcode=%d", *pos);
226 if (data->state == GPSK_1 && *pos == EAP_GPSK_OPCODE_GPSK_2)
229 if (data->state == GPSK_3 && *pos == EAP_GPSK_OPCODE_GPSK_4)
233 *pos, data->state);
243 const u8 *pos, *end;
254 pos = payload;
257 if (end - pos < 2) {
263 alen = WPA_GET_BE16(pos);
264 pos += 2;
265 if (end - pos < alen) {
278 os_memcpy(data->id_peer, pos, alen);
282 pos += alen;
284 if (end - pos < 2) {
290 alen = WPA_GET_BE16(pos);
291 pos += 2;
292 if (end - pos < alen) {
299 os_memcmp(pos, sm->server_id, alen) != 0) {
305 pos += alen;
307 if (end - pos < EAP_GPSK_RAND_LEN) {
313 os_memcpy(data->rand_peer, pos, EAP_GPSK_RAND_LEN);
316 pos += EAP_GPSK_RAND_LEN;
318 if (end - pos < EAP_GPSK_RAND_LEN) {
324 if (os_memcmp(data->rand_server, pos, EAP_GPSK_RAND_LEN) != 0) {
330 pos, EAP_GPSK_RAND_LEN);
334 pos += EAP_GPSK_RAND_LEN;
336 if (end - pos < 2) {
342 alen = WPA_GET_BE16(pos);
343 pos += 2;
344 if (end - pos < alen) {
351 os_memcmp(pos, data->csuite_list, alen) != 0) {
357 pos += alen;
359 if (end - pos < (int) sizeof(*csuite)) {
365 csuite = (const struct eap_gpsk_csuite *) pos;
383 pos += sizeof(*csuite);
385 if (end - pos < 2) {
391 alen = WPA_GET_BE16(pos);
392 pos += 2;
393 if (end - pos < alen) {
399 wpa_hexdump(MSG_DEBUG, "EAP-GPSK: PD_Payload_1", pos, alen);
400 pos += alen;
438 if (end - pos < (int) miclen) {
441 (unsigned long) (end - pos),
447 data->specifier, payload, pos - payload, mic)
453 if (os_memcmp_const(mic, pos, miclen) != 0) {
455 wpa_hexdump(MSG_DEBUG, "EAP-GPSK: Received MIC", pos, miclen);
460 pos += miclen;
462 if (pos != end) {
465 (unsigned long) (end - pos));
476 const u8 *pos, *end;
486 pos = payload;
489 if (end - pos < 2) {
495 alen = WPA_GET_BE16(pos);
496 pos += 2;
497 if (end - pos < alen) {
503 wpa_hexdump(MSG_DEBUG, "EAP-GPSK: PD_Payload_1", pos, alen);
504 pos += alen;
507 if (end - pos < (int) miclen) {
510 (unsigned long) (end - pos),
516 data->specifier, payload, pos - payload, mic)
522 if (os_memcmp_const(mic, pos, miclen) != 0) {
524 wpa_hexdump(MSG_DEBUG, "EAP-GPSK: Received MIC", pos, miclen);
529 pos += miclen;
531 if (pos != end) {
534 (unsigned long) (end - pos));
545 const u8 *pos;
548 pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_GPSK, respData, &len);
549 if (pos == NULL || len < 1)
552 switch (*pos) {
554 eap_gpsk_process_gpsk_2(sm, data, pos + 1, len - 1);
557 eap_gpsk_process_gpsk_4(sm, data, pos + 1, len - 1);