Lines Matching defs:record

36 			     struct ndef_record *record)
42 record->type_length = *pos++;
46 record->payload_length = *pos++;
55 record->payload_length = len;
62 record->id_length = *pos++;
64 record->id_length = 0;
66 record->type = record->type_length == 0 ? NULL : pos;
67 pos += record->type_length;
69 record->id = record->id_length == 0 ? NULL : pos;
70 pos += record->id_length;
72 record->payload = record->payload_length == 0 ? NULL : pos;
73 pos += record->payload_length;
75 record->total_length = pos - data;
76 if (record->total_length > size ||
77 record->total_length < record->payload_length)
86 struct ndef_record record;
91 if (ndef_parse_record(data, len, &record) < 0) {
95 if (filter == NULL || filter(&record))
96 return wpabuf_alloc_copy(record.payload,
97 record.payload_length);
98 data += record.total_length;
99 len -= record.total_length;
111 struct wpabuf *record;
125 record = wpabuf_alloc(total_len);
126 if (record == NULL) {
128 "record for build");
137 wpabuf_put_u8(record, local_flag);
139 wpabuf_put_u8(record, type_length);
142 wpabuf_put_u8(record, payload_length);
144 wpabuf_put_be32(record, payload_length);
147 wpabuf_put_u8(record, id_length);
148 wpabuf_put_data(record, type, type_length);
149 wpabuf_put_data(record, id, id_length);
150 wpabuf_put_buf(record, payload);
151 return record;
155 static int wifi_filter(struct ndef_record *record)
157 if (record->type == NULL ||
158 record->type_length != os_strlen(wifi_handover_type))
160 if (os_memcmp(record->type, wifi_handover_type,
181 static int p2p_filter(struct ndef_record *record)
183 if (record->type == NULL ||
184 record->type_length != os_strlen(p2p_handover_type))
186 if (os_memcmp(record->type, p2p_handover_type,