/external/tcpdump/ |
D | print-mobility.c | 175 int mhlen, hlen, type; in mobility_print() local 207 hlen = IP6M_MINLEN; in mobility_print() 213 hlen = IP6M_MINLEN; in mobility_print() 215 TCHECK2(*mh, hlen + 8); in mobility_print() 218 EXTRACT_32BITS(&bp[hlen]), in mobility_print() 219 EXTRACT_32BITS(&bp[hlen + 4])); in mobility_print() 221 hlen += 8; in mobility_print() 229 hlen = IP6M_MINLEN; in mobility_print() 231 TCHECK2(*mh, hlen + 8); in mobility_print() 234 EXTRACT_32BITS(&bp[hlen]), in mobility_print() [all …]
|
D | print-sl.c | 117 u_int hlen; in sliplink_print() local 145 hlen = IP_HL(ip); in sliplink_print() 146 hlen += TH_OFF((struct tcphdr *)&((int *)ip)[hlen]); in sliplink_print() 147 lastlen[dir][lastconn] = length - (hlen << 2); in sliplink_print() 195 register u_int flags, hlen; in compressed_sl_print() local 235 hlen = IP_HL(ip); in compressed_sl_print() 236 hlen += TH_OFF((struct tcphdr *)&((int32_t *)ip)[hlen]); in compressed_sl_print() 237 lastlen[dir][lastconn] = length - (hlen << 2); in compressed_sl_print()
|
D | print-tcp.c | 197 register u_int hlen; in tcp_print() local 225 hlen = TH_OFF(tp) * 4; in tcp_print() 233 if (!qflag && hlen >= sizeof(*tp) && hlen <= length) { in tcp_print() 236 nfsreq_print((u_char *)tp + hlen + 4, length - hlen, in tcp_print() 242 nfsreply_print((u_char *)tp + hlen + 4, length - hlen, in tcp_print() 274 if (hlen < sizeof(*tp)) { in tcp_print() 276 length - hlen, hlen, (unsigned long)sizeof(*tp)); in tcp_print() 288 (void)printf("tcp %d", length - hlen); in tcp_print() 289 if (hlen > length) { in tcp_print() 291 hlen, length); in tcp_print() [all …]
|
D | print-ip.c | 562 u_int hlen; in ip_print() local 583 hlen = IP_HL(ipds->ip) * 4; in ip_print() 584 if (hlen < sizeof (struct ip)) { in ip_print() 585 (void)printf("bad-hlen %u", hlen); in ip_print() 593 if (ipds->len < hlen) { in ip_print() 616 ipds->len -= hlen; in ip_print() 654 if ((hlen - sizeof(struct ip)) > 0) { in ip_print() 656 ip_optprint((u_char *)(ipds->ip + 1), hlen - sizeof(struct ip)); in ip_print() 660 if ((u_char *)ipds->ip + hlen <= snapend) { in ip_print() 661 sum = in_cksum((const u_short *)ipds->ip, hlen, 0); in ip_print() [all …]
|
D | print-dccp.c | 225 u_int hlen; in dccp_print() local 251 hlen = dh->dccph_doff * 4; in dccp_print() 268 (void)printf(" %d", len - hlen); in dccp_print() 269 if (hlen > len) { in dccp_print() 271 hlen, len); in dccp_print() 382 if (hlen > dccp_basic_hdr_len(dh) + extlen){ in dccp_print() 388 hlen -= dccp_basic_hdr_len(dh) + extlen; in dccp_print() 393 if (hlen <= optlen) break; in dccp_print() 394 hlen -= optlen; in dccp_print()
|
D | print-icmp.c | 347 u_int hlen, dport, mtu, obj_tlen, obj_class_num, obj_ctype; in icmp_print() local 383 hlen = IP_HL(oip) * 4; in icmp_print() 384 ouh = (struct udphdr *)(((u_char *)oip) + hlen); in icmp_print() 619 hlen = plen - ICMP_EXTD_MINLEN; in icmp_print() 624 hlen); in icmp_print() 626 hlen -= 4; /* subtract common header size */ in icmp_print() 629 while (hlen > sizeof(struct icmp_mpls_ext_object_header_t)) { in icmp_print() 644 … hlen-=sizeof(struct icmp_mpls_ext_object_header_t); /* length field includes tlv header */ in icmp_print() 678 if (hlen < obj_tlen) in icmp_print() 680 hlen -= obj_tlen; in icmp_print()
|
/external/qemu/slirp-android/ |
D | ip_icmp.c | 72 icmp_input(struct mbuf *m, int hlen) in icmp_input() argument 96 m->m_len -= hlen; in icmp_input() 97 m->m_data += hlen; in icmp_input() 103 m->m_len += hlen; in icmp_input() 104 m->m_data -= hlen; in icmp_input() 113 ip->ip_len += hlen; /* since ip_input subtracts this */ in icmp_input() 209 unsigned hlen, shlen, s_ip_len; in icmp_error() local 254 hlen= sizeof(struct ip ); /* no options in reply */ in icmp_error() 257 m->m_data += hlen; in icmp_error() 258 m->m_len -= hlen; in icmp_error() [all …]
|
D | ip_output.c | 60 register int hlen = sizeof(struct ip ); in ip_output() local 80 ip->ip_hl = hlen >> 2; in ip_output() 101 ip->ip_sum = cksum(m, hlen); in ip_output() 117 len = (IF_MTU - hlen) &~ 7; /* ip databytes per packet */ in ip_output() 133 for (off = hlen + len; off < (u_int16_t)ip->ip_len; off += len) { in ip_output() 152 mhip->ip_off = ((off - hlen) >> 3) + (ip->ip_off & ~IP_MF); in ip_output() 178 m_adj(m, hlen + firstlen - (u_int16_t)ip->ip_len); in ip_output() 182 ip->ip_sum = cksum(m, hlen); in ip_output()
|
D | ip_input.c | 79 int hlen; in ip_input() local 99 hlen = ip->ip_hl << 2; in ip_input() 100 if (hlen<sizeof(struct ip ) || hlen>m->m_len) {/* min header length */ in ip_input() 109 if(cksum(m,hlen)) { in ip_input() 118 if (ip->ip_len < hlen) { in ip_input() 208 ip->ip_len -= hlen; in ip_input() 233 ip->ip_len -= hlen; in ip_input() 241 tcp_input(m, hlen, (struct socket *)NULL); in ip_input() 244 udp_input(m, hlen); in ip_input() 247 icmp_input(m, hlen); in ip_input() [all …]
|
/external/qemu/slirp/ |
D | ip_icmp.c | 71 icmp_input(struct mbuf *m, int hlen) in icmp_input() argument 95 m->m_len -= hlen; in icmp_input() 96 m->m_data += hlen; in icmp_input() 102 m->m_len += hlen; in icmp_input() 103 m->m_data -= hlen; in icmp_input() 112 ip->ip_len += hlen; /* since ip_input subtracts this */ in icmp_input() 207 unsigned hlen, shlen, s_ip_len; in icmp_error() local 252 hlen= sizeof(struct ip ); /* no options in reply */ in icmp_error() 255 m->m_data += hlen; in icmp_error() 256 m->m_len -= hlen; in icmp_error() [all …]
|
D | ip_output.c | 60 register int hlen = sizeof(struct ip ); in ip_output() local 80 ip->ip_hl = hlen >> 2; in ip_output() 101 ip->ip_sum = cksum(m, hlen); in ip_output() 117 len = (IF_MTU - hlen) &~ 7; /* ip databytes per packet */ in ip_output() 133 for (off = hlen + len; off < (u_int16_t)ip->ip_len; off += len) { in ip_output() 152 mhip->ip_off = ((off - hlen) >> 3) + (ip->ip_off & ~IP_MF); in ip_output() 178 m_adj(m, hlen + firstlen - (u_int16_t)ip->ip_len); in ip_output() 182 ip->ip_sum = cksum(m, hlen); in ip_output()
|
D | ip_input.c | 79 int hlen; in ip_input() local 99 hlen = ip->ip_hl << 2; in ip_input() 100 if (hlen<sizeof(struct ip ) || hlen>m->m_len) {/* min header length */ in ip_input() 109 if(cksum(m,hlen)) { in ip_input() 118 if (ip->ip_len < hlen) { in ip_input() 208 ip->ip_len -= hlen; in ip_input() 233 ip->ip_len -= hlen; in ip_input() 241 tcp_input(m, hlen, (struct socket *)NULL); in ip_input() 244 udp_input(m, hlen); in ip_input() 247 icmp_input(m, hlen); in ip_input() [all …]
|
/external/libppp/src/ |
D | slcompress.c | 164 register u_int hlen = ip->ip_hl; in sl_compress_tcp() local 183 th = (struct tcphdr *) & ((int *) ip)[hlen]; in sl_compress_tcp() 235 hlen += th->th_off; in sl_compress_tcp() 236 hlen <<= 2; in sl_compress_tcp() 237 if (hlen > m->m_len) in sl_compress_tcp() 265 oth = (struct tcphdr *) & ((int *) &cs->cs_ip)[hlen]; in sl_compress_tcp() 266 deltaS = hlen; in sl_compress_tcp() 267 hlen += th->th_off; in sl_compress_tcp() 268 hlen <<= 2; in sl_compress_tcp() 269 if (hlen > m->m_len) in sl_compress_tcp() [all …]
|
D | tcpmss.c | 101 size_t hlen, olen, optlen; in MSSFixup() local 106 hlen = tc->th_off << 2; in MSSFixup() 109 if (hlen <= sizeof(struct tcphdr) || hlen > pktlen) in MSSFixup() 116 for (olen = hlen - sizeof(struct tcphdr), opt = (u_char *)(tc + 1); in MSSFixup() 147 size_t hlen, plen; in tcpmss_Check() local 155 hlen = pip->ip_hl << 2; in tcpmss_Check() 162 ntohs(pip->ip_len) == plen && hlen <= plen && in tcpmss_Check() 163 plen >= sizeof(struct tcphdr) + hlen) in tcpmss_Check() 164 MSSFixup((struct tcphdr *)(MBUF_CTOP(bp) + hlen), plen - hlen, in tcpmss_Check()
|
/external/qemu/ |
D | net-checksum.c | 58 int hlen, plen, proto, csum_offset; in net_checksum_calculate() local 63 hlen = (data[14] & 0x0f) * 4; in net_checksum_calculate() 64 plen = (data[16] << 8 | data[17]) - hlen; in net_checksum_calculate() 81 data[14+hlen+csum_offset] = 0; in net_checksum_calculate() 82 data[14+hlen+csum_offset+1] = 0; in net_checksum_calculate() 83 csum = net_checksum_tcpudp(plen, proto, data+14+12, data+14+hlen); in net_checksum_calculate() 84 data[14+hlen+csum_offset] = csum >> 8; in net_checksum_calculate() 85 data[14+hlen+csum_offset+1] = csum & 0xff; in net_checksum_calculate()
|
/external/wpa_supplicant_8/src/tls/ |
D | tlsv1_client_write.c | 433 size_t rlen, hlen, clen; in tls_write_client_certificate_verify() local 476 hlen = SHA256_MAC_LEN; in tls_write_client_certificate_verify() 478 crypto_hash_finish(conn->verify.sha256_cert, hpos, &hlen) < in tls_write_client_certificate_verify() 501 os_memmove(hash + 19, hash, hlen); in tls_write_client_certificate_verify() 502 hlen += 19; in tls_write_client_certificate_verify() 509 hlen = MD5_MAC_LEN; in tls_write_client_certificate_verify() 511 crypto_hash_finish(conn->verify.md5_cert, hpos, &hlen) < 0) in tls_write_client_certificate_verify() 525 hlen = SHA1_MAC_LEN; in tls_write_client_certificate_verify() 527 crypto_hash_finish(conn->verify.sha1_cert, hpos, &hlen) < 0) { in tls_write_client_certificate_verify() 536 hlen += MD5_MAC_LEN; in tls_write_client_certificate_verify() [all …]
|
D | tlsv1_server_read.c | 772 size_t hlen, buflen; in tls_process_certificate_verify() local 871 hlen = SHA256_MAC_LEN; in tls_process_certificate_verify() 873 crypto_hash_finish(conn->verify.sha256_cert, hpos, &hlen) < in tls_process_certificate_verify() 885 hlen = MD5_MAC_LEN; in tls_process_certificate_verify() 887 crypto_hash_finish(conn->verify.md5_cert, hpos, &hlen) < 0) in tls_process_certificate_verify() 901 hlen = SHA1_MAC_LEN; in tls_process_certificate_verify() 903 crypto_hash_finish(conn->verify.sha1_cert, hpos, &hlen) < 0) { in tls_process_certificate_verify() 912 hlen += MD5_MAC_LEN; in tls_process_certificate_verify() 918 wpa_hexdump(MSG_MSGDUMP, "TLSv1: CertificateVerify hash", hash, hlen); in tls_process_certificate_verify() 992 if (buflen != hlen || os_memcmp(buf, hash, buflen) != 0) { in tls_process_certificate_verify() [all …]
|
D | tlsv1_record.c | 282 size_t i, rlen, hlen; in tlsv1_record_receive() local 451 hlen = sizeof(hash); in tlsv1_record_receive() 452 if (crypto_hash_finish(hmac, hash, &hlen) < 0) { in tlsv1_record_receive() 458 if (hlen != rl->hash_size || in tlsv1_record_receive() 459 os_memcmp(hash, out_data + plen, hlen) != 0 || in tlsv1_record_receive()
|
D | tlsv1_server_write.c | 575 size_t rlen, hlen; in tls_write_server_finished() local 587 hlen = SHA256_MAC_LEN; in tls_write_server_finished() 589 crypto_hash_finish(conn->verify.sha256_server, hash, &hlen) in tls_write_server_finished() 600 hlen = MD5_MAC_LEN; in tls_write_server_finished() 602 crypto_hash_finish(conn->verify.md5_server, hash, &hlen) < 0) { in tls_write_server_finished() 611 hlen = SHA1_MAC_LEN; in tls_write_server_finished() 614 &hlen) < 0) { in tls_write_server_finished() 621 hlen = MD5_MAC_LEN + SHA1_MAC_LEN; in tls_write_server_finished() 629 "server finished", hash, hlen, in tls_write_server_finished()
|
/external/openssh/ |
D | ssh-rsa.c | 213 u_int ret, rsasize, oidlen = 0, hlen = 0; in openssh_RSA_verify() local 223 hlen = 20; in openssh_RSA_verify() 228 hlen = 16; in openssh_RSA_verify() 233 if (hashlen != hlen) { in openssh_RSA_verify() 249 if (len < 0 || (u_int)len != hlen + oidlen) { in openssh_RSA_verify() 250 error("bad decrypted len: %d != %d + %d", len, hlen, oidlen); in openssh_RSA_verify() 254 hashmatch = timingsafe_bcmp(decrypted + oidlen, hash, hlen) == 0; in openssh_RSA_verify()
|
/external/wpa_supplicant_8/src/ap/ |
D | iapp.c | 317 int len, hlen; in iapp_receive_udp() local 346 hlen = be_to_host16(hdr->length); in iapp_receive_udp() 351 be_to_host16(hdr->identifier), hlen); in iapp_receive_udp() 357 if (hlen > len) { in iapp_receive_udp() 358 printf("Underflow IAPP frame (hlen=%d len=%d)\n", hlen, len); in iapp_receive_udp() 361 if (hlen < len) { in iapp_receive_udp() 363 len - hlen); in iapp_receive_udp() 364 len = hlen; in iapp_receive_udp() 369 iapp_process_add_notify(iapp, &from, hdr, hlen - sizeof(*hdr)); in iapp_receive_udp()
|
/external/wpa_supplicant_6/wpa_supplicant/src/tls/ |
D | tlsv1_client_write.c | 439 size_t rlen, hlen, clen; in tls_write_client_certificate_verify() local 481 hlen = MD5_MAC_LEN; in tls_write_client_certificate_verify() 483 crypto_hash_finish(conn->verify.md5_cert, hpos, &hlen) < 0) in tls_write_client_certificate_verify() 497 hlen = SHA1_MAC_LEN; in tls_write_client_certificate_verify() 499 crypto_hash_finish(conn->verify.sha1_cert, hpos, &hlen) < 0) { in tls_write_client_certificate_verify() 508 hlen += MD5_MAC_LEN; in tls_write_client_certificate_verify() 510 wpa_hexdump(MSG_MSGDUMP, "TLSv1: CertificateVerify hash", hash, hlen); in tls_write_client_certificate_verify() 527 crypto_private_key_sign_pkcs1(conn->cred->key, hash, hlen, in tls_write_client_certificate_verify() 595 size_t rlen, hlen; in tls_write_client_finished() local 605 hlen = MD5_MAC_LEN; in tls_write_client_finished() [all …]
|
D | tlsv1_server_read.c | 758 size_t hlen, buflen; in tls_process_certificate_verify() local 830 hlen = MD5_MAC_LEN; in tls_process_certificate_verify() 832 crypto_hash_finish(conn->verify.md5_cert, hpos, &hlen) < 0) in tls_process_certificate_verify() 846 hlen = SHA1_MAC_LEN; in tls_process_certificate_verify() 848 crypto_hash_finish(conn->verify.sha1_cert, hpos, &hlen) < 0) { in tls_process_certificate_verify() 857 hlen += MD5_MAC_LEN; in tls_process_certificate_verify() 859 wpa_hexdump(MSG_MSGDUMP, "TLSv1: CertificateVerify hash", hash, hlen); in tls_process_certificate_verify() 898 if (buflen != hlen || os_memcmp(buf, hash, buflen) != 0) { in tls_process_certificate_verify() 972 size_t left, len, hlen; in tls_process_client_finished() local 1029 hlen = MD5_MAC_LEN; in tls_process_client_finished() [all …]
|
D | tlsv1_record.c | 249 size_t i, rlen, hlen; in tlsv1_record_receive() local 383 hlen = sizeof(hash); in tlsv1_record_receive() 384 if (crypto_hash_finish(hmac, hash, &hlen) < 0) { in tlsv1_record_receive() 389 if (hlen != rl->hash_size || in tlsv1_record_receive() 390 os_memcmp(hash, out_data + *out_len, hlen) != 0) { in tlsv1_record_receive()
|
/external/iptables/iptables/ |
D | xtoptions.c | 527 cb->val.hlen = (afinfo->family == NFPROTO_IPV4) ? 32 : 128; in xtopt_parse_host() 679 cb->val.hlen = (afinfo->family == NFPROTO_IPV4) ? 32 : 128; in xtopt_parse_plen() 680 if (!xtables_strtoui(cb->arg, NULL, &prefix_len, 0, cb->val.hlen)) in xtopt_parse_plen() 684 cb->ext_name, entry->name, 0, cb->val.hlen); in xtopt_parse_plen() 686 cb->val.hlen = prefix_len; in xtopt_parse_plen() 703 if (cb->val.hlen == 0) { in xtopt_parse_plenmask() 705 } else if (cb->val.hlen <= 32) { in xtopt_parse_plenmask() 706 mask[0] <<= 32 - cb->val.hlen; in xtopt_parse_plenmask() 708 } else if (cb->val.hlen <= 64) { in xtopt_parse_plenmask() 709 mask[1] <<= 32 - (cb->val.hlen - 32); in xtopt_parse_plenmask() [all …]
|