/external/wpa_supplicant/ |
D | x509v3.c | 187 struct asn1_hdr hdr; in x509_parse_algorithm_identifier() local 197 if (asn1_get_next(buf, len, &hdr) < 0 || in x509_parse_algorithm_identifier() 198 hdr.class != ASN1_CLASS_UNIVERSAL || in x509_parse_algorithm_identifier() 199 hdr.tag != ASN1_TAG_SEQUENCE) { in x509_parse_algorithm_identifier() 202 hdr.class, hdr.tag); in x509_parse_algorithm_identifier() 205 pos = hdr.payload; in x509_parse_algorithm_identifier() 206 end = pos + hdr.length; in x509_parse_algorithm_identifier() 226 struct asn1_hdr hdr; in x509_parse_public_key() local 239 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in x509_parse_public_key() 240 hdr.class != ASN1_CLASS_UNIVERSAL || in x509_parse_public_key() [all …]
|
D | asn1_test.c | 46 struct asn1_hdr hdr; in asn1_parse() local 60 if (asn1_get_next(pos, end - pos, &hdr) < 0) in asn1_parse() 64 pos = hdr.payload; in asn1_parse() 68 prefix, hdr.class, asn1_class_str(hdr.class), in asn1_parse() 69 hdr.constructed, in asn1_parse() 70 hdr.constructed ? "Constructed" : "Primitive", in asn1_parse() 71 hdr.tag, hdr.length); in asn1_parse() 73 if (hdr.class == ASN1_CLASS_CONTEXT_SPECIFIC && in asn1_parse() 74 hdr.constructed) { in asn1_parse() 75 if (asn1_parse(pos, hdr.length, level + 1) < 0) in asn1_parse() [all …]
|
D | asn1.c | 23 int asn1_get_next(const u8 *buf, size_t len, struct asn1_hdr *hdr) in asn1_get_next() argument 28 os_memset(hdr, 0, sizeof(*hdr)); in asn1_get_next() 32 hdr->identifier = *pos++; in asn1_get_next() 33 hdr->class = hdr->identifier >> 6; in asn1_get_next() 34 hdr->constructed = !!(hdr->identifier & (1 << 5)); in asn1_get_next() 36 if ((hdr->identifier & 0x1f) == 0x1f) { in asn1_get_next() 37 hdr->tag = 0; in asn1_get_next() 47 hdr->tag = (hdr->tag << 7) | (tmp & 0x7f); in asn1_get_next() 50 hdr->tag = hdr->identifier & 0x1f; in asn1_get_next() 60 hdr->length = 0; in asn1_get_next() [all …]
|
D | rsa.c | 41 struct asn1_hdr hdr; in crypto_rsa_parse_integer() local 46 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in crypto_rsa_parse_integer() 47 hdr.class != ASN1_CLASS_UNIVERSAL || hdr.tag != ASN1_TAG_INTEGER) { in crypto_rsa_parse_integer() 49 "tag 0x%x", hdr.class, hdr.tag); in crypto_rsa_parse_integer() 53 if (bignum_set_unsigned_bin(num, hdr.payload, hdr.length) < 0) { in crypto_rsa_parse_integer() 58 return hdr.payload + hdr.length; in crypto_rsa_parse_integer() 72 struct asn1_hdr hdr; in crypto_rsa_import_public_key() local 94 if (asn1_get_next(buf, len, &hdr) < 0 || in crypto_rsa_import_public_key() 95 hdr.class != ASN1_CLASS_UNIVERSAL || in crypto_rsa_import_public_key() 96 hdr.tag != ASN1_TAG_SEQUENCE) { in crypto_rsa_import_public_key() [all …]
|
D | eap_tlv.c | 34 struct eap_hdr *hdr; in eap_tlv_build_nak() local 37 hdr = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_TLV, resp_len, in eap_tlv_build_nak() 39 if (hdr == NULL) in eap_tlv_build_nak() 55 return (u8 *) hdr; in eap_tlv_build_nak() 71 struct eap_hdr *hdr; in eap_tlv_build_result() local 74 hdr = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_TLV, resp_len, in eap_tlv_build_result() 76 if (hdr == NULL) in eap_tlv_build_result() 87 return (u8 *) hdr; in eap_tlv_build_result() 106 const struct eap_hdr *hdr, u8 **resp, size_t *resp_len, in eap_tlv_process() argument 116 left = be_to_host16(hdr->length) - sizeof(struct eap_hdr) - 1; in eap_tlv_process() [all …]
|
/external/wpa_supplicant_6/wpa_supplicant/src/tls/ |
D | x509v3.c | 187 struct asn1_hdr hdr; in x509_parse_algorithm_identifier() local 197 if (asn1_get_next(buf, len, &hdr) < 0 || in x509_parse_algorithm_identifier() 198 hdr.class != ASN1_CLASS_UNIVERSAL || in x509_parse_algorithm_identifier() 199 hdr.tag != ASN1_TAG_SEQUENCE) { in x509_parse_algorithm_identifier() 202 hdr.class, hdr.tag); in x509_parse_algorithm_identifier() 205 pos = hdr.payload; in x509_parse_algorithm_identifier() 206 end = pos + hdr.length; in x509_parse_algorithm_identifier() 226 struct asn1_hdr hdr; in x509_parse_public_key() local 239 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in x509_parse_public_key() 240 hdr.class != ASN1_CLASS_UNIVERSAL || in x509_parse_public_key() [all …]
|
D | asn1_test.c | 46 struct asn1_hdr hdr; in asn1_parse() local 60 if (asn1_get_next(pos, end - pos, &hdr) < 0) in asn1_parse() 64 pos = hdr.payload; in asn1_parse() 68 prefix, hdr.class, asn1_class_str(hdr.class), in asn1_parse() 69 hdr.constructed, in asn1_parse() 70 hdr.constructed ? "Constructed" : "Primitive", in asn1_parse() 71 hdr.tag, hdr.length); in asn1_parse() 73 if (hdr.class == ASN1_CLASS_CONTEXT_SPECIFIC && in asn1_parse() 74 hdr.constructed) { in asn1_parse() 75 if (asn1_parse(pos, hdr.length, level + 1) < 0) in asn1_parse() [all …]
|
D | asn1.c | 23 int asn1_get_next(const u8 *buf, size_t len, struct asn1_hdr *hdr) in asn1_get_next() argument 28 os_memset(hdr, 0, sizeof(*hdr)); in asn1_get_next() 32 hdr->identifier = *pos++; in asn1_get_next() 33 hdr->class = hdr->identifier >> 6; in asn1_get_next() 34 hdr->constructed = !!(hdr->identifier & (1 << 5)); in asn1_get_next() 36 if ((hdr->identifier & 0x1f) == 0x1f) { in asn1_get_next() 37 hdr->tag = 0; in asn1_get_next() 47 hdr->tag = (hdr->tag << 7) | (tmp & 0x7f); in asn1_get_next() 50 hdr->tag = hdr->identifier & 0x1f; in asn1_get_next() 60 hdr->length = 0; in asn1_get_next() [all …]
|
D | tlsv1_cred.c | 271 struct asn1_hdr hdr; in tlsv1_set_dhparams_der() local 285 if (asn1_get_next(pos, len, &hdr) < 0 || in tlsv1_set_dhparams_der() 286 hdr.class != ASN1_CLASS_UNIVERSAL || in tlsv1_set_dhparams_der() 287 hdr.tag != ASN1_TAG_SEQUENCE) { in tlsv1_set_dhparams_der() 290 hdr.class, hdr.tag); in tlsv1_set_dhparams_der() 293 pos = hdr.payload; in tlsv1_set_dhparams_der() 296 if (asn1_get_next(pos, end - pos, &hdr) < 0) in tlsv1_set_dhparams_der() 299 if (hdr.class != ASN1_CLASS_UNIVERSAL || in tlsv1_set_dhparams_der() 300 hdr.tag != ASN1_TAG_INTEGER) { in tlsv1_set_dhparams_der() 302 "class=%d tag=0x%x", hdr.class, hdr.tag); in tlsv1_set_dhparams_der() [all …]
|
D | rsa.c | 42 struct asn1_hdr hdr; in crypto_rsa_parse_integer() local 47 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in crypto_rsa_parse_integer() 48 hdr.class != ASN1_CLASS_UNIVERSAL || hdr.tag != ASN1_TAG_INTEGER) { in crypto_rsa_parse_integer() 50 "tag 0x%x", hdr.class, hdr.tag); in crypto_rsa_parse_integer() 54 if (bignum_set_unsigned_bin(num, hdr.payload, hdr.length) < 0) { in crypto_rsa_parse_integer() 59 return hdr.payload + hdr.length; in crypto_rsa_parse_integer() 73 struct asn1_hdr hdr; in crypto_rsa_import_public_key() local 95 if (asn1_get_next(buf, len, &hdr) < 0 || in crypto_rsa_import_public_key() 96 hdr.class != ASN1_CLASS_UNIVERSAL || in crypto_rsa_import_public_key() 97 hdr.tag != ASN1_TAG_SEQUENCE) { in crypto_rsa_import_public_key() [all …]
|
/external/bluetooth/hcidump/parser/ |
D | avdtp.c | 69 static char *pt2str(uint8_t hdr) in pt2str() argument 71 switch (hdr & 0x0c) { in pt2str() 85 static char *mt2str(uint8_t hdr) in mt2str() argument 87 switch (hdr & 0x03) { in mt2str() 285 static inline void discover(int level, uint8_t hdr, struct frame *frm) in discover() argument 289 switch (hdr & 0x03) { in discover() 307 static inline void get_capabilities(int level, uint8_t hdr, struct frame *frm) in get_capabilities() argument 309 switch (hdr & 0x03) { in get_capabilities() 322 static inline void set_configuration(int level, uint8_t hdr, struct frame *frm) in set_configuration() argument 326 switch (hdr & 0x03) { in set_configuration() [all …]
|
/external/bluetooth/bluez/test/ |
D | avtest.c | 182 static void dump_avctp_header(struct avctp_header *hdr) in dump_avctp_header() argument 184 printf("TL %d PT %d CR %d IPID %d PID 0x%04x\n", hdr->transaction, in dump_avctp_header() 185 hdr->packet_type, hdr->cr, hdr->ipid, ntohs(hdr->pid)); in dump_avctp_header() 188 static void dump_avdtp_header(struct avdtp_header *hdr) in dump_avdtp_header() argument 190 printf("TL %d PT %d MT %d SI %d\n", hdr->transaction, in dump_avdtp_header() 191 hdr->packet_type, hdr->message_type, hdr->signal_id); in dump_avdtp_header() 210 struct avdtp_header *hdr = (void *) buf; in process_avdtp() local 219 dump_avdtp_header(hdr); in process_avdtp() 221 if (hdr->packet_type != AVDTP_PKT_TYPE_SINGLE) { in process_avdtp() 226 if (hdr->message_type != AVDTP_MSG_TYPE_COMMAND) { in process_avdtp() [all …]
|
/external/bluetooth/bluez/sbc/ |
D | sbcinfo.c | 64 static int calc_frame_len(struct sbc_frame_hdr *hdr) in calc_frame_len() argument 68 nrof_subbands = (hdr->subbands + 1) * 4; in calc_frame_len() 69 nrof_blocks = (hdr->blocks + 1) * 4; in calc_frame_len() 71 switch (hdr->channel_mode) { in calc_frame_len() 74 tmp = nrof_blocks * hdr->bitpool; in calc_frame_len() 77 tmp = nrof_blocks * hdr->bitpool * 2; in calc_frame_len() 80 tmp = nrof_blocks * hdr->bitpool; in calc_frame_len() 83 tmp = nrof_blocks * hdr->bitpool + nrof_subbands; in calc_frame_len() 92 static double calc_bit_rate(struct sbc_frame_hdr *hdr) in calc_bit_rate() argument 97 nrof_subbands = (hdr->subbands + 1) * 4; in calc_bit_rate() [all …]
|
/external/wpa_supplicant_6/wpa_supplicant/src/eap_common/ |
D | eap_common.c | 40 const struct eap_hdr *hdr; in eap_hdr_validate() local 44 hdr = wpabuf_head(msg); in eap_hdr_validate() 46 if (wpabuf_len(msg) < sizeof(*hdr)) { in eap_hdr_validate() 51 len = be_to_host16(hdr->length); in eap_hdr_validate() 52 if (len < sizeof(*hdr) + 1 || len > wpabuf_len(msg)) { in eap_hdr_validate() 57 pos = (const u8 *) (hdr + 1); in eap_hdr_validate() 62 if (len < sizeof(*hdr) + 8) { in eap_hdr_validate() 78 *plen = len - sizeof(*hdr) - 8; in eap_hdr_validate() 85 *plen = len - sizeof(*hdr) - 1; in eap_hdr_validate() 111 struct eap_hdr *hdr; in eap_msg_alloc() local [all …]
|
/external/tcpdump/ |
D | print-pflog.c | 98 pflog_print(const struct pfloghdr *hdr) in pflog_print() argument 102 rulenr = ntohl(hdr->rulenr); in pflog_print() 103 subrulenr = ntohl(hdr->subrulenr); in pflog_print() 107 printf("rule %u.%s.%u/", rulenr, hdr->ruleset, subrulenr); in pflog_print() 110 tok2str(pf_reasons, "unkn(%u)", hdr->reason), in pflog_print() 111 tok2str(pf_actions, "unkn(%u)", hdr->action), in pflog_print() 112 tok2str(pf_directions, "unkn(%u)", hdr->dir), in pflog_print() 113 hdr->ifname); in pflog_print() 122 const struct pfloghdr *hdr; in pflog_if_print() local 132 hdr = (struct pfloghdr *)p; in pflog_if_print() [all …]
|
D | print-igrp.c | 82 register struct igrphdr *hdr; in igrp_print() local 86 hdr = (struct igrphdr *)bp; in igrp_print() 87 cp = (u_char *)(hdr + 1); in igrp_print() 91 TCHECK(*hdr); in igrp_print() 92 nint = EXTRACT_16BITS(&hdr->ig_ni); in igrp_print() 93 nsys = EXTRACT_16BITS(&hdr->ig_ns); in igrp_print() 94 next = EXTRACT_16BITS(&hdr->ig_nx); in igrp_print() 97 tok2str(op2str, "op-#%d", IGRP_OP(hdr->ig_vop)), in igrp_print() 98 IGRP_V(hdr->ig_vop), in igrp_print() 99 hdr->ig_ed, in igrp_print() [all …]
|
/external/libpcap/ |
D | savefile.c | 856 struct pcap_file_header hdr; in sf_write_header() local 858 hdr.magic = TCPDUMP_MAGIC; in sf_write_header() 859 hdr.version_major = PCAP_VERSION_MAJOR; in sf_write_header() 860 hdr.version_minor = PCAP_VERSION_MINOR; in sf_write_header() 862 hdr.thiszone = thiszone; in sf_write_header() 863 hdr.snaplen = snaplen; in sf_write_header() 864 hdr.sigfigs = 0; in sf_write_header() 865 hdr.linktype = linktype; in sf_write_header() 867 if (fwrite((char *)&hdr, sizeof(hdr), 1, fp) != 1) in sf_write_header() 982 struct pcap_file_header hdr; in pcap_fopen_offline() local [all …]
|
/external/qemu/audio/ |
D | wavaudio.c | 123 uint8_t hdr[] = { in wav_out_init() local 151 hdr[34] = bits16 ? 0x10 : 0x08; in wav_out_init() 164 le_store (hdr + 22, hw->info.nchannels, 2); in wav_out_init() 165 le_store (hdr + 24, hw->info.freq, 4); in wav_out_init() 166 le_store (hdr + 28, hw->info.freq << (bits16 + stereo), 4); in wav_out_init() 167 le_store (hdr + 32, 1 << (bits16 + stereo), 2); in wav_out_init() 178 qemu_put_buffer (wav->f, hdr, sizeof (hdr)); in wav_out_init() 256 uint8_t hdr[44]; in wav_in_init() local 267 if (qemu_get_buffer (wav->f, hdr, sizeof(hdr)) != (int)sizeof(hdr)) { in wav_in_init() 273 if ( hdr[0] != 'R' || hdr[1] != 'I' || hdr[2] != 'F' || hdr[3] != 'F' || in wav_in_init() [all …]
|
/external/libvpx/build/make/ |
D | obj_int_extract.c | 243 Elf32_Ehdr hdr; member 250 COPY_STRUCT(&elf->hdr, elf->buf, 0, elf->sz); in parse_elf32_header() 251 res = elf->hdr.e_ident[EI_MAG0] == ELFMAG0; in parse_elf32_header() 252 res &= elf->hdr.e_ident[EI_MAG1] == ELFMAG1; in parse_elf32_header() 253 res &= elf->hdr.e_ident[EI_MAG2] == ELFMAG2; in parse_elf32_header() 254 res &= elf->hdr.e_ident[EI_MAG3] == ELFMAG3; in parse_elf32_header() 255 res &= elf->hdr.e_ident[EI_CLASS] == ELFCLASS32; in parse_elf32_header() 256 res &= elf->hdr.e_ident[EI_DATA] == ELFDATA2LSB in parse_elf32_header() 257 || elf->hdr.e_ident[EI_DATA] == ELFDATA2MSB; in parse_elf32_header() 261 elf->le_data = elf->hdr.e_ident[EI_DATA] == ELFDATA2LSB; in parse_elf32_header() [all …]
|
/external/dhcpcd/ |
D | if-linux.c | 187 send_netlink(struct nlmsghdr *hdr) in send_netlink() argument 204 iov.iov_base = hdr; in send_netlink() 205 iov.iov_len = hdr->nlmsg_len; in send_netlink() 212 hdr->nlmsg_flags |= NLM_F_ACK; in send_netlink() 213 hdr->nlmsg_seq = ++seq; in send_netlink() 269 struct nlmsghdr hdr; member 276 struct nlmsghdr hdr; member 290 nlm->hdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); in if_address() 291 nlm->hdr.nlmsg_flags = NLM_F_REQUEST; in if_address() 293 nlm->hdr.nlmsg_flags |= NLM_F_CREATE | NLM_F_REPLACE; in if_address() [all …]
|
D | if-bsd.c | 117 struct rt_msghdr hdr; in if_route() member 141 rtm.hdr.rtm_version = RTM_VERSION; in if_route() 142 rtm.hdr.rtm_seq = 1; in if_route() 144 rtm.hdr.rtm_type = RTM_CHANGE; in if_route() 146 rtm.hdr.rtm_type = RTM_ADD; in if_route() 148 rtm.hdr.rtm_type = RTM_DELETE; in if_route() 149 rtm.hdr.rtm_flags = RTF_UP; in if_route() 154 rtm.hdr.rtm_flags |= RTF_STATIC; in if_route() 155 rtm.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY; in if_route() 157 rtm.hdr.rtm_flags |= RTF_HOST; in if_route() [all …]
|
/external/qemu/hw/ |
D | bt-l2cap.c | 51 const l2cap_hdr *hdr, int len); 191 l2cap_cmd_hdr *hdr; in l2cap_command_reject() local 200 hdr = (void *) (pkt + 0); in l2cap_command_reject() 203 hdr->code = L2CAP_COMMAND_REJ; in l2cap_command_reject() 204 hdr->ident = id; in l2cap_command_reject() 205 memcpy(&hdr->len, &len, sizeof(hdr->len)); in l2cap_command_reject() 228 l2cap_cmd_hdr *hdr; in l2cap_connection_response() local 233 hdr = (void *) (pkt + 0); in l2cap_connection_response() 236 hdr->code = L2CAP_CONN_RSP; in l2cap_connection_response() 237 hdr->ident = l2cap->last_id; in l2cap_connection_response() [all …]
|
/external/ipsec-tools/src/racoon/ |
D | privsep.c | 327 reply->hdr.ac_cmd = combuf->hdr.ac_cmd; in privsep_init() 328 reply->hdr.ac_len = sizeof(*reply); in privsep_init() 330 switch(combuf->hdr.ac_cmd) { in privsep_init() 357 reply->hdr.ac_errno = errno; in privsep_init() 362 reply->hdr.ac_len = sizeof(*reply) + privkey->l; in privsep_init() 363 reply = racoon_realloc(reply, reply->hdr.ac_len); in privsep_init() 487 reply->hdr.ac_errno = errno; in privsep_init() 492 reply->hdr.ac_len = sizeof(*reply) + psk->l; in privsep_init() 493 reply = racoon_realloc(reply, reply->hdr.ac_len); in privsep_init() 539 reply->hdr.ac_errno = EINVAL; in privsep_init() [all …]
|
/external/iproute2/tc/ |
D | m_ematch.c | 180 struct tcf_ematch_hdr hdr = { in parse_tree() local 185 hdr.flags |= TCF_EM_INVERT; in parse_tree() 191 addraw_l(n, MAX_MSG, &hdr, sizeof(hdr)); in parse_tree() 216 hdr.kind = num; in parse_tree() 217 if (e->parse_eopt(n, &hdr, t->args->next) < 0) in parse_tree() 341 struct tcf_ematch_tree_hdr hdr = { in parse_ematch() local 348 addattr_l(n, MAX_MSG, TCA_EMATCH_TREE_HDR, &hdr, sizeof(hdr)); in parse_ematch() 370 struct tcf_ematch_hdr *hdr; in print_ematch_seq() local 378 dlen = RTA_PAYLOAD(tb[i]) - sizeof(*hdr); in print_ematch_seq() 379 data = (void *) RTA_DATA(tb[i]) + sizeof(*hdr); in print_ematch_seq() [all …]
|
/external/qemu/ |
D | loader.c | 357 static void bswap_uboot_header(uboot_image_header_t *hdr) in bswap_uboot_header() argument 360 bswap32s(&hdr->ih_magic); in bswap_uboot_header() 361 bswap32s(&hdr->ih_hcrc); in bswap_uboot_header() 362 bswap32s(&hdr->ih_time); in bswap_uboot_header() 363 bswap32s(&hdr->ih_size); in bswap_uboot_header() 364 bswap32s(&hdr->ih_load); in bswap_uboot_header() 365 bswap32s(&hdr->ih_ep); in bswap_uboot_header() 366 bswap32s(&hdr->ih_dcrc); in bswap_uboot_header() 462 uboot_image_header_t *hdr = &h; in load_uimage() local 470 size = read(fd, hdr, sizeof(uboot_image_header_t)); in load_uimage() [all …]
|