Lines Matching refs:p_rec
81 UINT8 *p_rec = p_msg;
99 for (count = 0; p_rec < p_end; count++)
102 if (p_rec + 3 > p_end)
105 rec_hdr = *p_rec++;
112 type_len = *p_rec++;
116 payload_len = *p_rec++;
120 if (p_rec + 4 > p_end)
123 BE_STREAM_TO_UINT32 (payload_len, p_rec);
130 if (p_rec + 1 > p_end)
133 id_len = *p_rec++;
191 p_rec += (payload_len + type_len + id_len);
203 /* p_rec should equal p_end if all the length fields were correct */
204 if (p_rec != p_end)
222 UINT8 *p_rec = p_msg;
231 rec_hdr = *p_rec++;
237 type_len = *p_rec++;
241 payload_len = *p_rec++;
243 BE_STREAM_TO_UINT32 (payload_len, p_rec);
247 id_len = *p_rec++;
252 p_rec += (payload_len + type_len + id_len);
366 UINT8 *p_rec = p_msg;
374 return (p_rec);
376 rec_hdr = *p_rec++;
382 type_len = *p_rec++;
386 payload_len = *p_rec++;
388 BE_STREAM_TO_UINT32 (payload_len, p_rec);
392 id_len = *p_rec++;
397 p_rec += (payload_len + type_len + id_len);
417 UINT8 *p_rec = p_msg;
424 pRecStart = p_rec;
425 rec_hdr = *p_rec++;
431 type_len = *p_rec++;
435 payload_len = *p_rec++;
437 BE_STREAM_TO_UINT32 (payload_len, p_rec);
441 id_len = *p_rec++;
446 p_rec += (payload_len + type_len + id_len);
465 UINT8 *p_rec = p_msg;
472 pRecStart = p_rec;
474 rec_hdr = *p_rec++;
477 type_len = *p_rec++;
481 payload_len = *p_rec++;
483 BE_STREAM_TO_UINT32 (payload_len, p_rec);
487 id_len = *p_rec++;
491 /* At this point, p_rec points to the start of the type field. We need to */
495 && (!memcmp (p_rec, p_type, tlen)) )
503 p_rec += (payload_len + type_len + id_len);
522 UINT8 *p_rec;
528 if ((p_rec = NDEF_MsgGetNextRec (p_cur_rec)) == NULL)
533 pRecStart = p_rec;
535 rec_hdr = *p_rec++;
538 type_len = *p_rec++;
542 payload_len = *p_rec++;
544 BE_STREAM_TO_UINT32 (payload_len, p_rec);
548 id_len = *p_rec++;
552 /* At this point, p_rec points to the start of the type field. We need to */
556 && (!memcmp (p_rec, p_type, tlen)) )
564 p_rec += (payload_len + type_len + id_len);
584 UINT8 *p_rec = p_msg;
591 pRecStart = p_rec;
593 rec_hdr = *p_rec++;
596 type_len = *p_rec++;
600 payload_len = *p_rec++;
602 BE_STREAM_TO_UINT32 (payload_len, p_rec);
606 id_len = *p_rec++;
610 /* At this point, p_rec points to the start of the type field. Skip it */
611 p_rec += type_len;
613 /* At this point, p_rec points to the start of the ID field. Compare length and data */
614 if ( (id_len == ilen) && (!memcmp (p_rec, p_id, ilen)) )
622 p_rec += (id_len + payload_len);
641 UINT8 *p_rec;
647 if ((p_rec = NDEF_MsgGetNextRec (p_cur_rec)) == NULL)
652 pRecStart = p_rec;
654 rec_hdr = *p_rec++;
657 type_len = *p_rec++;
661 payload_len = *p_rec++;
663 BE_STREAM_TO_UINT32 (payload_len, p_rec);
667 id_len = *p_rec++;
671 /* At this point, p_rec points to the start of the type field. Skip it */
672 p_rec += type_len;
674 /* At this point, p_rec points to the start of the ID field. Compare length and data */
675 if ( (id_len == ilen) && (!memcmp (p_rec, p_id, ilen)) )
683 p_rec += (id_len + payload_len);
699 UINT8 *NDEF_RecGetType (UINT8 *p_rec, UINT8 *p_tnf, UINT8 *p_type_len)
704 rec_hdr = *p_rec++;
707 type_len = *p_rec++;
711 p_rec += 1;
713 p_rec += 4;
717 p_rec++;
719 /* At this point, p_rec points to the start of the type field. */
726 return (p_rec);
738 UINT8 *NDEF_RecGetId (UINT8 *p_rec, UINT8 *p_id_len)
743 rec_hdr = *p_rec++;
746 type_len = *p_rec++;
750 p_rec++;
752 p_rec += 4;
756 *p_id_len = *p_rec++;
760 /* p_rec now points to the start of the type field. The ID field follows it */
764 return (p_rec + type_len);
777 UINT8 *NDEF_RecGetPayload (UINT8 *p_rec, UINT32 *p_payload_len)
783 rec_hdr = *p_rec++;
786 type_len = *p_rec++;
790 payload_len = *p_rec++;
792 BE_STREAM_TO_UINT32 (payload_len, p_rec);
798 id_len = *p_rec++;
802 /* p_rec now points to the start of the type field. The ID field follows it, then the payload */
806 return (p_rec + type_len + id_len);
841 UINT8 *p_rec = p_msg + *p_cur_size;
860 *p_rec = tnf | NDEF_MB_MASK | NDEF_ME_MASK;
870 *p_rec = tnf | NDEF_ME_MASK;
874 *p_rec |= NDEF_SR_MASK;
877 *p_rec |= NDEF_IL_MASK;
879 p_rec++;
882 *p_rec++ = type_len;
886 *p_rec++ = (UINT8)payload_len;
888 UINT32_TO_BE_STREAM (p_rec, payload_len);
892 *p_rec++ = id_len;
898 memcpy (p_rec, p_type, type_len);
900 p_rec += type_len;
907 memcpy (p_rec, p_id, id_len);
909 p_rec += id_len;
914 memcpy (p_rec, p_payload, payload_len);
937 UINT8 *p_rec;
950 || ((p_rec = NDEF_MsgGetRecByIndex(p_msg, index)) == NULL) )
961 shiftdown (p_rec, (UINT32)(*p_cur_size - (p_rec - p_msg)), recSize);
965 *p_rec = tnf | NDEF_MB_MASK;
967 *p_rec = tnf;
970 *p_rec |= NDEF_SR_MASK;
973 *p_rec |= NDEF_IL_MASK;
975 p_rec++;
978 *p_rec++ = type_len;
982 *p_rec++ = (UINT8)payload_len;
984 UINT32_TO_BE_STREAM (p_rec, payload_len);
988 *p_rec++ = id_len;
994 memcpy (p_rec, p_type, type_len);
996 p_rec += type_len;
1003 memcpy (p_rec, p_id, id_len);
1005 p_rec += id_len;
1010 memcpy (p_rec, p_payload, payload_len);
1030 UINT8 *p_rec;
1043 p_rec = p_msg;
1053 p_rec = p_msg + *p_cur_size;
1060 memcpy (p_rec, p_new_rec, new_rec_len);
1079 UINT8 *p_rec, UINT8 *p_add_pl, UINT32 add_pl_len)
1087 pp = p_rec + 1;
1093 if (*p_rec & NDEF_SR_MASK)
1099 if (*p_rec & NDEF_IL_MASK)
1118 pp = p_rec + 2;
1130 *p_rec &= ~NDEF_SR_MASK;
1140 if ((*p_rec & NDEF_ME_MASK) == 0)
1163 UINT8 *p_rec, UINT8 *p_new_pl, UINT32 new_pl_len)
1171 pp = p_rec + 1;
1177 if (*p_rec & NDEF_SR_MASK)
1183 if (*p_rec & NDEF_IL_MASK)
1191 pp = p_rec + 2;
1208 *p_rec &= ~NDEF_SR_MASK;
1225 if ((*p_rec & NDEF_ME_MASK) == 0)
1242 *p_rec |= NDEF_SR_MASK;
1257 if ((*p_rec & NDEF_ME_MASK) == 0)
1282 UINT8 *p_rec, UINT8 *p_new_type, UINT8 new_type_len)
1289 pp = p_rec + 1;
1295 if (*p_rec & NDEF_SR_MASK)
1300 if (*p_rec & NDEF_IL_MASK)
1333 p_rec[1] = new_type_len;
1354 UINT8 *p_rec, UINT8 *p_new_id, UINT8 new_id_len)
1362 pp = p_rec + 1;
1368 if (*p_rec & NDEF_SR_MASK)
1375 if (*p_rec & NDEF_IL_MASK)
1397 *p_rec |= NDEF_IL_MASK;
1423 *p_rec &= ~NDEF_IL_MASK;
1453 UINT8 *p_rec = NDEF_MsgGetRecByIndex (p_msg, index);
1456 if (!p_rec)
1460 if (*p_rec & NDEF_MB_MASK)
1478 if (*p_rec & NDEF_ME_MASK)
1488 *p_cur_size = (UINT32)(p_rec - p_msg);
1494 if ((pNext = NDEF_MsgGetNextRec (p_rec)) == NULL)
1497 /* We are removing p_rec, so shift from pNext to the end */
1498 shiftup (p_rec, pNext, (UINT32)(*p_cur_size - (pNext - p_msg)));
1500 *p_cur_size -= (UINT32)(pNext - p_rec);
1521 UINT8 *p_rec;
1538 p_rec = p_src;
1541 while ((p_rec != NULL) && (status == NDEF_OK))
1543 p_type = NDEF_RecGetType (p_rec, &tnf, &type_len);
1544 p_id = NDEF_RecGetId (p_rec, &id_len);
1545 p_pay = NDEF_RecGetPayload (p_rec, &pay_len);
1563 p_rec = NDEF_MsgGetNextRec (p_rec);