Lines Matching refs:record

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