Home
last modified time | relevance | path

Searched refs:ntohs (Results 1 – 25 of 303) sorted by relevance

12345678910>>...13

/external/ppp/pppd/plugins/rp-pppoe/
Dcommon.c47 UINT16_t len = ntohs(packet->length); in parsePacket()
148 ntohs(conn->cookie.length) + TAG_HDR_SIZE); in sendPADT()
149 memcpy(cursor, &conn->cookie, ntohs(conn->cookie.length) + TAG_HDR_SIZE); in sendPADT()
150 cursor += ntohs(conn->cookie.length) + TAG_HDR_SIZE; in sendPADT()
151 plen += ntohs(conn->cookie.length) + TAG_HDR_SIZE; in sendPADT()
156 ntohs(conn->relayId.length) + TAG_HDR_SIZE); in sendPADT()
157 memcpy(cursor, &conn->relayId, ntohs(conn->relayId.length) + TAG_HDR_SIZE); in sendPADT()
158 cursor += ntohs(conn->relayId.length) + TAG_HDR_SIZE; in sendPADT()
159 plen += ntohs(conn->relayId.length) + TAG_HDR_SIZE; in sendPADT()
173 int len = ntohs(packet->length); in pppoe_printpkt()
[all …]
Ddiscovery.c173 mru = ntohs(mru); in parsePADOTags()
223 mru = ntohs(mru); in parsePADSTags()
394 if (ntohs(packet.length) + HDR_SIZE > len) { in waitForPADO()
396 (unsigned int) ntohs(packet.length)); in waitForPADO()
509 ntohs(conn->cookie.length) + TAG_HDR_SIZE); in sendPADR()
510 memcpy(cursor, &conn->cookie, ntohs(conn->cookie.length) + TAG_HDR_SIZE); in sendPADR()
511 cursor += ntohs(conn->cookie.length) + TAG_HDR_SIZE; in sendPADR()
512 plen += ntohs(conn->cookie.length) + TAG_HDR_SIZE; in sendPADR()
517 ntohs(conn->relayId.length) + TAG_HDR_SIZE); in sendPADR()
518 memcpy(cursor, &conn->relayId, ntohs(conn->relayId.length) + TAG_HDR_SIZE); in sendPADR()
[all …]
/external/android-clat/
Ddump.c45 frag_flags = ntohs(header->frag_off); in dump_ip()
51 printf("tot_len = %x\n", ntohs(header->tot_len)); in dump_ip()
52 printf("id = %x\n", ntohs(header->id)); in dump_ip()
66 printf("checksum = %x\n", ntohs(header->check)); in dump_ip()
81 printf("payload len = %x\n", ntohs(header->ip6_plen)); in dump_ip6()
106 printf("icmp.checksum = %x\n", ntohs(icmp->checksum)); in dump_icmp()
108 printf("icmp.un.echo.id = %x\n", ntohs(icmp->un.echo.id)); in dump_icmp()
109 printf("icmp.un.echo.sequence = %x\n", ntohs(icmp->un.echo.sequence)); in dump_icmp()
143 printf("source = %x\n", ntohs(udp->source)); in dump_udp_generic()
144 printf("dest = %x\n", ntohs(udp->dest)); in dump_udp_generic()
[all …]
/external/u-boot/net/
Dnet.c886 u16 ip_off = ntohs(ip->ip_off); in __net_defragment()
893 len = ntohs(ip->ip_len) - IP_HDR_SIZE; in __net_defragment()
1001 u16 ip_off = ntohs(ip->ip_off); in net_defragment()
1012 u16 ip_off = ntohs(ip->ip_off); in net_defragment()
1044 ntohs(ip->udp_dst), src_ip, in receive_icmp()
1045 ntohs(ip->udp_src), icmph->un.data, in receive_icmp()
1046 ntohs(ip->udp_len)); in receive_icmp()
1086 myvlanid = ntohs(net_our_vlan); in net_process_received_packet()
1089 mynvlanid = ntohs(net_native_vlan); in net_process_received_packet()
1093 eth_proto = ntohs(et->et_protlen); in net_process_received_packet()
[all …]
Drarp.c38 if ((ntohs(arp->ar_op) != RARPOP_REPLY) || in rarp_receive()
39 (ntohs(arp->ar_hrd) != ARP_ETHER) || in rarp_receive()
40 (ntohs(arp->ar_pro) != PROT_IP) || in rarp_receive()
/external/mtpd/
Dl2tp.c205 ntohs(p[1]) != incoming.length || p[2] != local_tunnel) { in recv_packet()
212 incoming.message = ntohs(p[9]); in recv_packet()
218 if ((uint16_t)(ntohs(p[4]) - remote_sequence) > 32767) { in recv_packet()
225 if (ntohs(p[5]) == local_sequence) { in recv_packet()
231 if (ntohs(p[4]) != remote_sequence || !acknowledged) { in recv_packet()
249 uint16_t flag = ntohs(p->flag); in get_attribute_raw()
330 (unsigned)ntohs(local_tunnel)); in l2tp_connect()
435 tunnel_sa.pppol2tp.s_tunnel = ntohs(local_tunnel); in create_pppox_ol2tp()
437 tunnel_sa.pppol2tp.d_tunnel = ntohs(remote_tunnel); in create_pppox_ol2tp()
458 session_sa.pppol2tp.s_tunnel = ntohs(local_tunnel); in create_pppox_ol2tp()
[all …]
Dpptp.c199 incoming.expect = ntohs(incoming.header.length); in recv_packet()
216 (unsigned)ntohs(incoming.header.type)); in recv_packet()
394 src.sa_addr.pptp.call_id = ntohs(local); in create_pppox_pptp()
399 dst.sa_addr.pptp.call_id = ntohs(remote); in create_pppox_pptp()
434 incoming.message = ntohs(incoming.message); in pptp_process()
454 "(local = %u)", (unsigned)ntohs(local)); in pptp_process()
480 (unsigned)ntohs(remote)); in pptp_process()
510 (unsigned)ntohs(remote)); in pptp_process()
519 (unsigned)ntohs(remote)); in pptp_process()
540 "Sending ICRP with error", (unsigned)ntohs(remote), in pptp_process()
[all …]
/external/tcpdump/
Dprint-isakmp.c1314 ND_PRINT((ndo," key len=%d", ntohs(e.len) - 4)); in ikev1_ke_print()
1315 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { in ikev1_ke_print()
1318 if (!rawprint(ndo, (const uint8_t *)(ext + 1), ntohs(e.len) - 4)) in ikev1_ke_print()
1321 return (const u_char *)ext + ntohs(e.len); in ikev1_ke_print()
1391 ND_PRINT((ndo," port=%d", ntohs(doi_id.port))); in ikev1_id_print()
1575 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); in ikev1_hash_print()
1576 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { in ikev1_hash_print()
1579 if (!rawprint(ndo, (const uint8_t *)(ext + 1), ntohs(e.len) - 4)) in ikev1_hash_print()
1582 return (const u_char *)ext + ntohs(e.len); in ikev1_hash_print()
1600 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); in ikev1_sig_print()
[all …]
/external/ipsec-tools/src/racoon/
Dsecurity.c115 len = ntohs(prop->h.len) -
130 len = ntohs(trns->h.len) - sizeof(struct isakmp_pl_t);
134 type = ntohs(d->type) & ~ISAKMP_GEN_MASK;
135 flag = ntohs(d->type) & ISAKMP_GEN_MASK;
136 lorv = ntohs(d->lorv);
149 flag = ntohs(d->type & ISAKMP_GEN_MASK);
156 p->sec_ctx.ctx_strlen = ntohs(p->sec_ctx.ctx_strlen);
Disakmp_cfg.c201 if (tlen < ntohs(ph->len)) {
208 plogdump(LLV_DEBUG, ph, ntohs(ph->len));
217 plen = ntohs(ph->len);
219 plen = ntohs(nph->len);
264 tlen -= ntohs(ph->len);
266 ph = (struct isakmp_gen *)(npp + ntohs(ph->len));
328 tlen = ntohs(attrpl->h.len);
333 type = ntohs(attr->type);
341 s_isakmp_cfg_type(type), ntohs(attr->lorv));
346 attr, ntohs(attrpl->id))) != 0)
[all …]
Dipsec_doi.c562 tlen = ntohs(trns->h.len) - sizeof(*trns);
576 type = ntohs(d->type) & ~ISAKMP_GEN_MASK;
577 flag = ntohs(d->type) & ISAKMP_GEN_MASK;
582 s_oakley_attr_v(type, ntohs(d->lorv)));
597 len = ntohs(d->lorv);
612 sa->enctype = (u_int16_t)ntohs(d->lorv);
616 sa->hashtype = (u_int16_t)ntohs(d->lorv);
620 sa->authmethod = ntohs(d->lorv);
624 sa->dh_group = (u_int16_t)ntohs(d->lorv);
629 int type = (int)ntohs(d->lorv);
[all …]
/external/iptables/extensions/
Dlibip6t_MASQUERADE.c110 printf("%hu", ntohs(r->min_proto.tcp.port)); in MASQUERADE_print()
112 printf("-%hu", ntohs(r->max_proto.tcp.port)); in MASQUERADE_print()
125 printf(" --to-ports %hu", ntohs(r->min_proto.tcp.port)); in MASQUERADE_save()
127 printf("-%hu", ntohs(r->max_proto.tcp.port)); in MASQUERADE_save()
142 xt_xlate_add(xl, " to :%hu", ntohs(r->min_proto.tcp.port)); in MASQUERADE_xlate()
144 xt_xlate_add(xl, "-%hu", ntohs(r->max_proto.tcp.port)); in MASQUERADE_xlate()
Dlibip6t_REDIRECT.c113 printf("%hu", ntohs(range->min_proto.tcp.port)); in REDIRECT_print()
115 printf("-%hu", ntohs(range->max_proto.tcp.port)); in REDIRECT_print()
127 printf("%hu", ntohs(range->min_proto.tcp.port)); in REDIRECT_save()
129 printf("-%hu", ntohs(range->max_proto.tcp.port)); in REDIRECT_save()
142 ntohs(range->min_proto.tcp.port)); in REDIRECT_xlate()
145 ntohs(range->max_proto.tcp.port)); in REDIRECT_xlate()
Dlibipt_MASQUERADE.c112 printf("%hu", ntohs(r->min.tcp.port)); in MASQUERADE_print()
114 printf("-%hu", ntohs(r->max.tcp.port)); in MASQUERADE_print()
128 printf(" --to-ports %hu", ntohs(r->min.tcp.port)); in MASQUERADE_save()
130 printf("-%hu", ntohs(r->max.tcp.port)); in MASQUERADE_save()
147 xt_xlate_add(xl, " to :%hu", ntohs(r->min.tcp.port)); in MASQUERADE_xlate()
149 xt_xlate_add(xl, "-%hu", ntohs(r->max.tcp.port)); in MASQUERADE_xlate()
Dlibipt_REDIRECT.c115 printf("%hu", ntohs(r->min.tcp.port)); in REDIRECT_print()
117 printf("-%hu", ntohs(r->max.tcp.port)); in REDIRECT_print()
130 printf("%hu", ntohs(r->min.tcp.port)); in REDIRECT_save()
132 printf("-%hu", ntohs(r->max.tcp.port)); in REDIRECT_save()
146 xt_xlate_add(xl, "redirect to :%hu", ntohs(r->min.tcp.port)); in REDIRECT_xlate()
148 xt_xlate_add(xl, "-%hu ", ntohs(r->max.tcp.port)); in REDIRECT_xlate()
Dlibxt_TPROXY.c56 ntohs(info->lport), (unsigned int)info->mark_value, in tproxy_tg_print()
69 ntohs(info->lport), (unsigned int)info->mark_value, in tproxy_tg_print4()
82 ntohs(info->lport), (unsigned int)info->mark_value, in tproxy_tg_print6()
90 printf(" --on-port %u", ntohs(info->lport)); in tproxy_tg_save()
103 printf(" --on-port %u", ntohs(info->lport)); in tproxy_tg_save4()
115 printf(" --on-port %u", ntohs(info->lport)); in tproxy_tg_save6()
/external/strace/tests/
Dnetlink_sock_diag.c403 ntohs(req.id.idiag_sport), in test_inet_diag_sockid()
404 ntohs(req.id.idiag_dport), in test_inet_diag_sockid()
426 ntohs(req.id.idiag_sport), in test_inet_diag_sockid()
427 ntohs(req.id.idiag_dport), in test_inet_diag_sockid()
468 ntohs(req.id.idiag_sport), in test_inet_diag_req()
469 ntohs(req.id.idiag_dport), in test_inet_diag_req()
510 ntohs(req.id.idiag_sport), in test_inet_diag_req_v2()
511 ntohs(req.id.idiag_dport), in test_inet_diag_req_v2()
555 ntohs(msg.id.idiag_sport), in test_inet_diag_msg()
556 ntohs(msg.id.idiag_dport), in test_inet_diag_msg()
[all …]
/external/strace/tests-mx32/
Dnetlink_sock_diag.c403 ntohs(req.id.idiag_sport), in test_inet_diag_sockid()
404 ntohs(req.id.idiag_dport), in test_inet_diag_sockid()
426 ntohs(req.id.idiag_sport), in test_inet_diag_sockid()
427 ntohs(req.id.idiag_dport), in test_inet_diag_sockid()
468 ntohs(req.id.idiag_sport), in test_inet_diag_req()
469 ntohs(req.id.idiag_dport), in test_inet_diag_req()
510 ntohs(req.id.idiag_sport), in test_inet_diag_req_v2()
511 ntohs(req.id.idiag_dport), in test_inet_diag_req_v2()
555 ntohs(msg.id.idiag_sport), in test_inet_diag_msg()
556 ntohs(msg.id.idiag_dport), in test_inet_diag_msg()
[all …]
/external/strace/tests-m32/
Dnetlink_sock_diag.c403 ntohs(req.id.idiag_sport), in test_inet_diag_sockid()
404 ntohs(req.id.idiag_dport), in test_inet_diag_sockid()
426 ntohs(req.id.idiag_sport), in test_inet_diag_sockid()
427 ntohs(req.id.idiag_dport), in test_inet_diag_sockid()
468 ntohs(req.id.idiag_sport), in test_inet_diag_req()
469 ntohs(req.id.idiag_dport), in test_inet_diag_req()
510 ntohs(req.id.idiag_sport), in test_inet_diag_req_v2()
511 ntohs(req.id.idiag_dport), in test_inet_diag_req_v2()
555 ntohs(msg.id.idiag_sport), in test_inet_diag_msg()
556 ntohs(msg.id.idiag_dport), in test_inet_diag_msg()
[all …]
/external/ltp/utils/sctp/testlib/
Dsctputil.h91 ntohs((addr).s6_addr16[0]), \
92 ntohs((addr).s6_addr16[1]), \
93 ntohs((addr).s6_addr16[2]), \
94 ntohs((addr).s6_addr16[3]), \
95 ntohs((addr).s6_addr16[4]), \
96 ntohs((addr).s6_addr16[5]), \
97 ntohs((addr).s6_addr16[6]), \
98 ntohs((addr).s6_addr16[7])
/external/kernel-headers/original/uapi/linux/
Dtipc_config.h272 (ntohs(((struct tlv_desc *)tlv)->tlv_len) <= space); in TLV_OK()
278 (ntohs(((struct tlv_desc *)tlv)->tlv_type) == exp_type); in TLV_CHECK()
283 return ntohs(tlv->tlv_len); in TLV_GET_LEN()
293 return (ntohs(tlv->tlv_type) == type); in TLV_CHECK_TYPE()
349 __u16 tlv_space = TLV_ALIGN(ntohs(list->tlv_ptr->tlv_len)); in TLV_LIST_STEP()
/external/toybox/toys/pending/
Ddhcp6.c309 type = ntohs(type); in get_msg_ptr()
311 length = ntohs(length); in get_msg_ptr()
316 type = ntohs(*((uint16_t*)data)); in get_msg_ptr()
317 length = ntohs(*((uint16_t*)(data+2))); in get_msg_ptr()
362 iana_len = ntohs(*((uint16_t*)(t+2))); in parse_ia_na()
370 uint16_t sub_type = ntohs(*((uint16_t*)(t))); in parse_ia_na()
374 content_len = ntohs(*((uint16_t*)(t+2))); in parse_ia_na()
394 content_len = ntohs(*((uint16_t*)(t+2))); in parse_ia_na()
395 dhcp_data.status_code = ntohs(*((uint16_t*)(t+4))); in parse_ia_na()
400 content_len = ntohs(*((uint16_t*)(t+2))); in parse_ia_na()
[all …]
/external/wpa_supplicant_8/src/ap/
Dfils_hlp.c26 sum += ntohs(*pos++); in ip_checksum()
28 sum += ntohs(*pos << 8); in ip_checksum()
142 inet_ntoa(addr.sin_addr), ntohs(addr.sin_port)); in fils_dhcp_request()
176 inet_ntoa(addr.sin_addr), ntohs(addr.sin_port), (int) res); in fils_dhcp_handler()
460 inet_ntoa(addr.sin_addr), ntohs(addr.sin_port), in fils_process_hlp_dhcp()
490 sport = ntohs(udph->uh_sport); in fils_process_hlp_udp()
491 dport = ntohs(udph->uh_dport); in fils_process_hlp_udp()
492 ulen = ntohs(udph->uh_ulen); in fils_process_hlp_udp()
495 sport, dport, ulen, ntohs(udph->uh_sum)); in fils_process_hlp_udp()
524 tot_len = ntohs(iph->tot_len); in fils_process_hlp_ip()
/external/ltp/lib/
Dsafe_net.c36 if (ntohs(sin->sin_port) != 0) { in tst_sock_addr()
38 ntohs(sin->sin_port)); in tst_sock_addr()
52 if (ntohs(sin6->sin6_port) != 0) { in tst_sock_addr()
54 ntohs(sin6->sin6_port)); in tst_sock_addr()
96 return ntohs(sin->sin_port); in tst_getsockport()
101 return ntohs(sin6->sin6_port); in tst_getsockport()
/external/webrtc/webrtc/modules/audio_coding/neteq/test/
DRTPjitter.cc153 len = ntohs(*((uint16_t *)(rtp_vec + rtp_len))); in main()
177 len = ntohs(*((uint16_t *) packet_ptr[k-1])); in main()
197 ntohs(*((uint16_t*) temp_packet)), in main()
199 ntohs(*((uint16_t*) temp_packet))) { in main()

12345678910>>...13