Lines Matching defs:record

36 			     struct ndef_record *record)
42 record->type_length = *pos++;
46 record->payload_length = *pos++;
50 record->payload_length = ntohl(*(u32 *)pos);
57 record->id_length = *pos++;
59 record->id_length = 0;
61 record->type = record->type_length == 0 ? NULL : pos;
62 pos += record->type_length;
64 record->id = record->id_length == 0 ? NULL : pos;
65 pos += record->id_length;
67 record->payload = record->payload_length == 0 ? NULL : pos;
68 pos += record->payload_length;
70 record->total_length = pos - data;
71 if (record->total_length > size)
80 struct ndef_record record;
85 if (ndef_parse_record(data, len, &record) < 0) {
89 if (filter == NULL || filter(&record))
90 return wpabuf_alloc_copy(record.payload,
91 record.payload_length);
92 data += record.total_length;
93 len -= record.total_length;
105 struct wpabuf *record;
119 record = wpabuf_alloc(total_len);
120 if (record == NULL) {
122 "record for build");
131 wpabuf_put_u8(record, local_flag);
133 wpabuf_put_u8(record, type_length);
136 wpabuf_put_u8(record, payload_length);
138 wpabuf_put_be32(record, payload_length);
141 wpabuf_put_u8(record, id_length);
142 wpabuf_put_data(record, type, type_length);
143 wpabuf_put_data(record, id, id_length);
144 wpabuf_put_buf(record, payload);
145 return record;
149 static int wifi_filter(struct ndef_record *record)
151 if (record->type == NULL ||
152 record->type_length != os_strlen(wifi_handover_type))
154 if (os_memcmp(record->type, wifi_handover_type,
175 static int p2p_filter(struct ndef_record *record)
177 if (record->type == NULL ||
178 record->type_length != os_strlen(p2p_handover_type))
180 if (os_memcmp(record->type, p2p_handover_type,