Home
last modified time | relevance | path

Searched refs:ntohs (Results 1 – 200 of 443) sorted by relevance

123

/linux-4.1.27/net/ipv6/netfilter/
Dip6t_frag.c60 pr_debug("OFFSET %04X ", ntohs(fh->frag_off) & ~0x7); in frag_mt6()
61 pr_debug("RES %02X %04X", fh->reserved, ntohs(fh->frag_off) & 0x6); in frag_mt6()
72 ntohs(fh->frag_off) & 0x6, in frag_mt6()
74 (fh->reserved || (ntohs(fh->frag_off) & 0x06)))); in frag_mt6()
77 ntohs(fh->frag_off) & ~0x7, in frag_mt6()
79 (ntohs(fh->frag_off) & ~0x7))); in frag_mt6()
82 ntohs(fh->frag_off) & IP6_MF, in frag_mt6()
84 !((ntohs(fh->frag_off) & IP6_MF)))); in frag_mt6()
87 ntohs(fh->frag_off) & IP6_MF, in frag_mt6()
89 (ntohs(fh->frag_off) & IP6_MF))); in frag_mt6()
[all …]
Dnf_nat_proto_icmpv6.c28 return ntohs(tuple->src.u.icmp.id) >= ntohs(min->icmp.id) && in icmpv6_in_range()
29 ntohs(tuple->src.u.icmp.id) <= ntohs(max->icmp.id); in icmpv6_in_range()
43 range_size = ntohs(range->max_proto.icmp.id) - in icmpv6_unique_tuple()
44 ntohs(range->min_proto.icmp.id) + 1; in icmpv6_unique_tuple()
50 tuple->src.u.icmp.id = htons(ntohs(range->min_proto.icmp.id) + in icmpv6_unique_tuple()
Dnf_log_ipv6.c68 ntohs(ih->payload_len) + sizeof(struct ipv6hdr), in dump_ipv6_packet()
104 nf_log_buf_add(m, "%u ", ntohs(fh->frag_off) & 0xFFF8); in dump_ipv6_packet()
113 if (ntohs(fh->frag_off) & 0xFFF8) in dump_ipv6_packet()
242 ntohs(ic->icmp6_identifier), in dump_ipv6_packet()
243 ntohs(ic->icmp6_sequence)); in dump_ipv6_packet()
305 ntohs(eth_hdr(skb)->h_proto)); in dump_ipv6_mac_header()
Dnf_conntrack_l3proto_ipv6.c257 &tuple.src.u3.ip6, ntohs(tuple.src.u.tcp.port), in ipv6_getorigdst()
258 &tuple.dst.u3.ip6, ntohs(tuple.dst.u.tcp.port)); in ipv6_getorigdst()
/linux-4.1.27/net/6lowpan/
Dnhc_udp.c57 ntohs(uh.source), ntohs(uh.dest)); in udp_uncompress()
75 pr_debug("uncompressed UDP length: src = %d", ntohs(uh.len)); in udp_uncompress()
95 if (((ntohs(uh->source) & LOWPAN_NHC_UDP_4BIT_MASK) == in udp_compress()
97 ((ntohs(uh->dest) & LOWPAN_NHC_UDP_4BIT_MASK) == in udp_compress()
104 tmp = ntohs(uh->dest) - LOWPAN_NHC_UDP_4BIT_PORT + in udp_compress()
105 ((ntohs(uh->source) - LOWPAN_NHC_UDP_4BIT_PORT) << 4); in udp_compress()
107 } else if ((ntohs(uh->dest) & LOWPAN_NHC_UDP_8BIT_MASK) == in udp_compress()
116 tmp = ntohs(uh->dest) - LOWPAN_NHC_UDP_8BIT_PORT; in udp_compress()
118 } else if ((ntohs(uh->source) & LOWPAN_NHC_UDP_8BIT_MASK) == in udp_compress()
125 tmp = ntohs(uh->source) - LOWPAN_NHC_UDP_8BIT_PORT; in udp_compress()
Diphc.c377 hdr.version, ntohs(hdr.payload_len), hdr.nexthdr, in lowpan_header_decompress()
433 hdr->version, ntohs(hdr->payload_len), hdr->nexthdr, in lowpan_header_compress()
/linux-4.1.27/net/netfilter/
Dnf_nat_proto_common.c32 return ntohs(port) >= ntohs(min->all) && in nf_nat_l4proto_in_range()
33 ntohs(port) <= ntohs(max->all); in nf_nat_l4proto_in_range()
59 if (ntohs(*portptr) < 1024) { in nf_nat_l4proto_unique_tuple()
61 if (ntohs(*portptr) < 512) { in nf_nat_l4proto_unique_tuple()
73 min = ntohs(range->min_proto.all); in nf_nat_l4proto_unique_tuple()
74 range_size = ntohs(range->max_proto.all) - min + 1; in nf_nat_l4proto_unique_tuple()
Dnf_conntrack_pptp.c279 msg = ntohs(ctlh->messageType); in pptp_inbound_pkt()
316 ntohs(cid), ntohs(pcid)); in pptp_inbound_pkt()
332 pr_debug("%s, CID=%X\n", pptp_msg_name[msg], ntohs(cid)); in pptp_inbound_pkt()
351 pr_debug("%s, PCID=%X\n", pptp_msg_name[msg], ntohs(pcid)); in pptp_inbound_pkt()
361 pr_debug("%s, CID=%X\n", pptp_msg_name[msg], ntohs(cid)); in pptp_inbound_pkt()
389 msg, ntohs(cid), ntohs(pcid), info->cstate, info->sstate, in pptp_inbound_pkt()
390 ntohs(info->pns_call_id), ntohs(info->pac_call_id)); in pptp_inbound_pkt()
407 msg = ntohs(ctlh->messageType); in pptp_outbound_pkt()
430 pr_debug("%s, CID=%X\n", pptp_msg_name[msg], ntohs(cid)); in pptp_outbound_pkt()
445 ntohs(cid), ntohs(pcid)); in pptp_outbound_pkt()
[all …]
Dxt_sctp.c71 offset += WORD_ROUND(ntohs(sch->length)); in match_packet()
135 pr_debug("spt: %d\tdpt: %d\n", ntohs(sh->source), ntohs(sh->dest)); in sctp_mt()
137 return SCCHECK(ntohs(sh->source) >= info->spts[0] in sctp_mt()
138 && ntohs(sh->source) <= info->spts[1], in sctp_mt()
140 && SCCHECK(ntohs(sh->dest) >= info->dpts[0] in sctp_mt()
141 && ntohs(sh->dest) <= info->dpts[1], in sctp_mt()
Dnf_log_common.c49 ntohs(uh->source), ntohs(uh->dest), ntohs(uh->len)); in nf_log_dump_udp_header()
78 ntohs(th->source), ntohs(th->dest)); in nf_log_dump_tcp_header()
86 nf_log_buf_add(m, "WINDOW=%u ", ntohs(th->window)); in nf_log_dump_tcp_header()
108 nf_log_buf_add(m, "URGP=%u ", ntohs(th->urg_ptr)); in nf_log_dump_tcp_header()
Dxt_TPROXY.c165 protocol, ntohl(saddr), ntohs(sport), ntohl(daddr), ntohs(dport), lookup_type, sk); in nf_tproxy_get_sock_v4()
186 daddr, ntohs(dport), in nf_tproxy_get_sock_v6()
197 saddr, sport, daddr, ntohs(dport), in nf_tproxy_get_sock_v6()
229 protocol, saddr, ntohs(sport), daddr, ntohs(dport), lookup_type, sk); in nf_tproxy_get_sock_v6()
337 iph->protocol, &iph->daddr, ntohs(hp->dest), in tproxy_tg4()
338 &laddr, ntohs(lport), skb->mark); in tproxy_tg4()
345 iph->protocol, &iph->saddr, ntohs(hp->source), in tproxy_tg4()
346 &iph->daddr, ntohs(hp->dest), skb->mark); in tproxy_tg4()
504 tproto, &iph->saddr, ntohs(hp->source), in tproxy_tg6_v1()
505 laddr, ntohs(lport), skb->mark); in tproxy_tg6_v1()
[all …]
Dxt_osf.c215 totlen = ntohs(ip->tot_len); in xt_osf_match_packet()
216 df = ntohs(ip->frag_off) & IP_DF; in xt_osf_match_packet()
217 window = ntohs(tcp->window); in xt_osf_match_packet()
274 mss = ntohs((__force __be16)mss); in xt_osf_match_packet()
334 &ip->saddr, ntohs(tcp->source), in xt_osf_match_packet()
335 &ip->daddr, ntohs(tcp->dest), in xt_osf_match_packet()
348 &ip->saddr, ntohs(tcp->source), in xt_osf_match_packet()
349 &ip->daddr, ntohs(tcp->dest)); in xt_osf_match_packet()
Dxt_AUDIT.c51 ntohs(pptr[0]), ntohs(pptr[1])); in audit_proto()
86 &ih->saddr, &ih->daddr, ntohs(ih->id), ih->protocol); in audit_ip4()
88 if (ntohs(ih->frag_off) & IP_OFFSET) { in audit_ip4()
145 ntohs(eth_hdr(skb)->h_proto)); in audit_tg()
Dxt_dccp.c114 return DCCHECK(ntohs(dh->dccph_sport) >= info->spts[0] in dccp_mt()
115 && ntohs(dh->dccph_sport) <= info->spts[1], in dccp_mt()
117 && DCCHECK(ntohs(dh->dccph_dport) >= info->dpts[0] in dccp_mt()
118 && ntohs(dh->dccph_dport) <= info->dpts[1], in dccp_mt()
Dnft_queue.c73 priv->queuenum = ntohs(nla_get_be16(tb[NFTA_QUEUE_NUM])); in nft_queue_init()
76 priv->queues_total = ntohs(nla_get_be16(tb[NFTA_QUEUE_TOTAL])); in nft_queue_init()
78 priv->flags = ntohs(nla_get_be16(tb[NFTA_QUEUE_FLAGS])); in nft_queue_init()
Dxt_tcpudp.c98 ntohs(th->source), in tcp_mt()
102 ntohs(th->dest), in tcp_mt()
151 ntohs(uh->source), in udp_mt()
154 ntohs(uh->dest), in udp_mt()
Dxt_length.c27 u_int16_t pktlen = ntohs(ip_hdr(skb)->tot_len); in length_mt()
36 const u_int16_t pktlen = ntohs(ipv6_hdr(skb)->payload_len) + in length_mt6()
Dnf_conntrack_proto_udp.c70 ntohs(tuple->src.u.udp.port), in udp_print_tuple()
71 ntohs(tuple->dst.u.udp.port)); in udp_print_tuple()
129 if (ntohs(hdr->len) > udplen || ntohs(hdr->len) < sizeof(*hdr)) { in udp_error()
Dxt_conntrack.c137 ntohs(tuple->src.u.all), in ct_proto_port_check_v3()
143 ntohs(tuple->dst.u.all), in ct_proto_port_check_v3()
151 ntohs(tuple->src.u.all), in ct_proto_port_check_v3()
157 ntohs(tuple->dst.u.all), in ct_proto_port_check_v3()
Dxt_l2tp.c102 flags = ntohs(lh->val16[0]); in l2tp_udp_mt()
129 data.tid = (u32) ntohs(lh->val16[0]); in l2tp_udp_mt()
130 data.sid = (u32) ntohs(lh->val16[1]); in l2tp_udp_mt()
Dxt_multiport.c94 return ports_match_v1(multiinfo, ntohs(pptr[0]), ntohs(pptr[1])); in multiport_mt()
Dnf_conntrack_proto_udplite.c78 ntohs(tuple->src.u.udp.port), in udplite_print_tuple()
79 ntohs(tuple->dst.u.udp.port)); in udplite_print_tuple()
139 cscov = ntohs(hdr->len); in udplite_error()
Dnft_log.c89 li->u.ulog.group = ntohs(nla_get_be16(tb[NFTA_LOG_GROUP])); in nft_log_init()
96 ntohs(nla_get_be16(tb[NFTA_LOG_QTHRESHOLD])); in nft_log_init()
Dnf_conntrack_proto_gre.c216 if (ntohs(grehdr->protocol) != GRE_PROTOCOL_PPTP) { in gre_pkt_to_tuple()
233 ntohs(tuple->src.u.gre.key), in gre_print_tuple()
234 ntohs(tuple->dst.u.gre.key)); in gre_print_tuple()
Dnf_nat_sip.c120 buflen = sip_sprintf_addr_port(ct, buffer, &newaddr, ntohs(newport)); in map_addr()
248 buflen = sprintf(buffer, "%u", ntohs(p)); in nf_nat_sip()
371 port = ntohs(ct->tuplehash[!dir].tuple.dst.u.udp.port); in nf_nat_sip_expect()
373 port = ntohs(exp->tuple.dst.u.udp.port); in nf_nat_sip_expect()
573 for (port = ntohs(rtp_exp->tuple.dst.u.udp.port); in nf_nat_sdp_media()
Dnf_nat_amanda.c47 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) { in help()
Dnf_conntrack_irc.c163 &iph->saddr, ntohs(th->source), in help()
164 &iph->daddr, ntohs(th->dest)); in help()
Dxt_ipcomp.c63 ntohs(chdr->cpi), in comp_mt()
Dnf_nat_irc.c50 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) { in help()
Dxt_TCPMSS.c218 newlen = htons(ntohs(iph->tot_len) + ret); in tcpmss_tg4()
247 ipv6h->payload_len = htons(ntohs(ipv6h->payload_len) + ret); in tcpmss_tg6()
Dnfnetlink_cttimeout.c90 l3num = ntohs(nla_get_be16(cda[CTA_TIMEOUT_L3PROTO])); in cttimeout_new_timeout()
360 l3num = ntohs(nla_get_be16(cda[CTA_TIMEOUT_L3PROTO])); in cttimeout_default_set()
447 l3num = ntohs(nla_get_be16(cda[CTA_TIMEOUT_L3PROTO])); in cttimeout_default_get()
Dnf_nat_ftp.c86 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) { in nf_nat_ftp()
Dxt_HMARK.c68 src = ntohs(hp.b16.src); in hmark_swap_ports()
69 dst = ntohs(hp.b16.dst); in hmark_swap_ports()
Dxt_hashlimit.c803 ntohs(ent->dst.src_port), in dl_seq_real_show()
805 ntohs(ent->dst.dst_port), in dl_seq_real_show()
814 ntohs(ent->dst.src_port), in dl_seq_real_show()
816 ntohs(ent->dst.dst_port), in dl_seq_real_show()
Dnf_conntrack_tftp.c55 switch (ntohs(tfh->opcode)) { in tftp_help()
Dnft_byteorder.c58 d[i].u16 = ntohs((__force __be16)s[i].u16); in nft_byteorder_eval()
Dnf_conntrack_proto_dccp.c469 return ((u64)ntohs(dhack->dccph_ack_nr_high) << 32) + in dccp_ack_seq()
625 ntohs(tuple->src.u.dccp.port), in dccp_print_tuple()
626 ntohs(tuple->dst.u.dccp.port)); in dccp_print_tuple()
/linux-4.1.27/net/ipv4/netfilter/
Dnf_log_ipv4.c64 ntohs(ih->tot_len), ih->tos & IPTOS_TOS_MASK, in dump_ipv4_packet()
65 ih->tos & IPTOS_PREC_MASK, ih->ttl, ntohs(ih->id)); in dump_ipv4_packet()
68 if (ntohs(ih->frag_off) & IP_CE) in dump_ipv4_packet()
70 if (ntohs(ih->frag_off) & IP_DF) in dump_ipv4_packet()
72 if (ntohs(ih->frag_off) & IP_MF) in dump_ipv4_packet()
76 if (ntohs(ih->frag_off) & IP_OFFSET) in dump_ipv4_packet()
77 nf_log_buf_add(m, "FRAG:%u ", ntohs(ih->frag_off) & IP_OFFSET); in dump_ipv4_packet()
103 ntohs(ih->frag_off) & IP_OFFSET, in dump_ipv4_packet()
110 ntohs(ih->frag_off) & IP_OFFSET, in dump_ipv4_packet()
138 if (ntohs(ih->frag_off) & IP_OFFSET) in dump_ipv4_packet()
[all …]
Dnf_nat_proto_icmp.c26 return ntohs(tuple->src.u.icmp.id) >= ntohs(min->icmp.id) && in icmp_in_range()
27 ntohs(tuple->src.u.icmp.id) <= ntohs(max->icmp.id); in icmp_in_range()
41 range_size = ntohs(range->max_proto.icmp.id) - in icmp_unique_tuple()
42 ntohs(range->min_proto.icmp.id) + 1; in icmp_unique_tuple()
48 tuple->src.u.icmp.id = htons(ntohs(range->min_proto.icmp.id) + in icmp_unique_tuple()
Dnf_nat_h323.c161 &addr.ip, ntohs(port), in set_ras_addr()
163 ntohs(ct->tuplehash[!dir].tuple.dst.u.udp.port)); in set_ras_addr()
205 htons(ntohs(info->rtp_port[i][dir]) + 1); in nat_rtp_rtcp()
220 for (nated_port = ntohs(rtp_exp->tuple.dst.u.udp.port); in nat_rtp_rtcp()
268 ntohs(rtp_exp->tuple.src.u.udp.port), in nat_rtp_rtcp()
270 ntohs(rtp_exp->tuple.dst.u.udp.port)); in nat_rtp_rtcp()
273 ntohs(rtcp_exp->tuple.src.u.udp.port), in nat_rtp_rtcp()
275 ntohs(rtcp_exp->tuple.dst.u.udp.port)); in nat_rtp_rtcp()
288 u_int16_t nated_port = ntohs(port); in nat_t120()
324 ntohs(exp->tuple.src.u.tcp.port), in nat_t120()
[all …]
Dnf_nat_proto_gre.c67 min = ntohs(range->min_proto.gre.key); in gre_unique_tuple()
68 range_size = ntohs(range->max_proto.gre.key) - min + 1; in gre_unique_tuple()
112 pr_debug("call_id -> 0x%04x\n", ntohs(tuple->dst.u.gre.key)); in gre_manip_pkt()
Dnf_nat_pptp.c133 switch (msg = ntohs(ctlh->messageType)) { in pptp_outbound_pkt()
177 ntohs(REQ_CID(pptpReq, cid_off)), ntohs(new_callid)); in pptp_outbound_pkt()
233 switch (msg = ntohs(ctlh->messageType)) { in pptp_inbound_pkt()
272 ntohs(REQ_CID(pptpReq, pcid_off)), ntohs(new_pcid)); in pptp_inbound_pkt()
Dnf_log_arp.c60 ntohs(ah->ar_hrd), ntohs(ah->ar_pro), ntohs(ah->ar_op)); in dump_arp_packet()
Dnf_conntrack_l3proto_ipv4.c296 &sin.sin_addr.s_addr, ntohs(sin.sin_port)); in getorigdst()
304 &tuple.src.u3.ip, ntohs(tuple.src.u.tcp.port), in getorigdst()
305 &tuple.dst.u3.ip, ntohs(tuple.dst.u.tcp.port)); in getorigdst()
/linux-4.1.27/net/hsr/
Dhsr_main.h73 return ntohs(ht->path_and_LSDU_size) >> 12; in get_hsr_tag_path()
78 return ntohs(ht->path_and_LSDU_size) & 0x0FFF; in get_hsr_tag_LSDU_size()
84 (ntohs(ht->path_and_LSDU_size) & 0x0FFF) | (path << 12)); in set_hsr_tag_path()
90 (ntohs(ht->path_and_LSDU_size) & 0xF000) | in set_hsr_tag_LSDU_size()
180 return ntohs(hsr_ethhdr->hsr_tag.sequence_nr); in hsr_get_skb_sequence_nr()
/linux-4.1.27/net/dccp/
Dprobe.c83 if (port == 0 || ntohs(inet->inet_dport) == port || in jdccp_sendmsg()
84 ntohs(inet->inet_sport) == port) { in jdccp_sendmsg()
87 &inet->inet_saddr, ntohs(inet->inet_sport), in jdccp_sendmsg()
88 &inet->inet_daddr, ntohs(inet->inet_dport), size, in jdccp_sendmsg()
94 &inet->inet_saddr, ntohs(inet->inet_sport), in jdccp_sendmsg()
95 &inet->inet_daddr, ntohs(inet->inet_dport), in jdccp_sendmsg()
Doptions.c185 elapsed_time = ntohs(opt_val2); in dccp_parse_options()
203 elapsed_time = ntohs(opt_val2); in dccp_parse_options()
/linux-4.1.27/net/rxrpc/
Dar-proc.c66 ntohs(trans->local->srx.transport.sin.sin_port)); in rxrpc_call_seq_show()
70 ntohs(trans->peer->srx.transport.sin.sin_port)); in rxrpc_call_seq_show()
77 ntohs(call->conn->service_id), in rxrpc_call_seq_show()
149 ntohs(trans->local->srx.transport.sin.sin_port)); in rxrpc_connection_seq_show()
153 ntohs(trans->peer->srx.transport.sin.sin_port)); in rxrpc_connection_seq_show()
160 ntohs(conn->service_id), in rxrpc_connection_seq_show()
Dar-transport.c88 ntohs(local->srx.transport.sin.sin_port), in rxrpc_get_transport()
90 ntohs(peer->srx.transport.sin.sin_port)); in rxrpc_get_transport()
160 ntohs(local->srx.transport.sin.sin_port), in rxrpc_find_transport()
162 ntohs(peer->srx.transport.sin.sin_port)); in rxrpc_find_transport()
Dar-local.c147 ntohs(srx->transport.sin.sin_port)); in rxrpc_lookup_local()
159 ntohs(local->srx.transport.sin.sin_port)); in rxrpc_lookup_local()
205 ntohs(local->srx.transport.sin.sin_port)); in rxrpc_lookup_local()
220 ntohs(local->srx.transport.sin.sin_port)); in rxrpc_lookup_local()
Dar-peer.c116 ntohs(srx->transport.sin.sin_port)); in rxrpc_get_peer()
173 ntohs(peer->srx.transport.sin.sin_port)); in rxrpc_get_peer()
Dar-error.c57 _net("Rx UDP Error from %pI4:%hu", &addr, ntohs(port)); in rxrpc_UDP_error_report()
/linux-4.1.27/net/appletalk/
Datalk_proc.c74 iface->dev->name, ntohs(iface->address.s_net), in atalk_seq_interface_show()
75 iface->address.s_node, ntohs(iface->nets.nr_firstnet), in atalk_seq_interface_show()
76 ntohs(iface->nets.nr_lastnet), iface->status); in atalk_seq_interface_show()
135 ntohs(rt->gateway.s_net), rt->gateway.s_node, in atalk_seq_route_show()
141 ntohs(rt->target.s_net), rt->target.s_node, in atalk_seq_route_show()
142 ntohs(rt->gateway.s_net), rt->gateway.s_node, in atalk_seq_route_show()
182 s->sk_type, ntohs(at->src_net), at->src_node, at->src_port, in atalk_seq_socket_show()
183 ntohs(at->dest_net), at->dest_node, at->dest_port, in atalk_seq_socket_show()
Dddp.c250 int netrange = ntohs(atif->nets.nr_lastnet) - in atif_probe_device()
251 ntohs(atif->nets.nr_firstnet) + 1; in atif_probe_device()
252 int probe_net = ntohs(atif->address.s_net); in atif_probe_device()
258 probe_net = ntohs(atif->nets.nr_firstnet); in atif_probe_device()
285 if (probe_net > ntohs(atif->nets.nr_lastnet)) in atif_probe_device()
286 probe_net = ntohs(atif->nets.nr_firstnet); in atif_probe_device()
298 int netrange = ntohs(atif->nets.nr_lastnet) - in atif_proxy_probe_device()
299 ntohs(atif->nets.nr_firstnet) + 1; in atif_proxy_probe_device()
301 int probe_net = ntohs(atif->address.s_net); in atif_proxy_probe_device()
307 probe_net = ntohs(atif->nets.nr_firstnet); in atif_proxy_probe_device()
[all …]
/linux-4.1.27/drivers/net/slip/
Dslhc.c253 if (ip->protocol != IPPROTO_TCP || (ntohs(ip->frag_off) & 0x3fff)) { in slhc_compress()
364 deltaS = ntohs(th->urg_ptr); in slhc_compress()
374 if((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){ in slhc_compress()
400 ntohs(cs->cs_ip.tot_len) == hlen) in slhc_compress()
411 deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ in slhc_compress()
418 if(deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ in slhc_compress()
425 deltaS = ntohs(ip->id) - ntohs(cs->cs_ip.id); in slhc_compress()
543 i = ntohs(ip->tot_len) - hdrlen; in slhc_uncompress()
551 ntohs(ip->tot_len) - hdrlen); in slhc_uncompress()
567 thp->window = htons( ntohs(thp->window) + x); in slhc_uncompress()
[all …]
/linux-4.1.27/net/netfilter/ipvs/
Dip_vs_conn.c309 IP_VS_DBG_ADDR(p->af, p->caddr), ntohs(p->cport), in ip_vs_conn_in_get()
310 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_conn_in_get()
392 IP_VS_DBG_ADDR(p->af, p->caddr), ntohs(p->cport), in ip_vs_ct_in_get()
393 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_ct_in_get()
434 IP_VS_DBG_ADDR(p->af, p->caddr), ntohs(p->cport), in ip_vs_conn_out_get()
435 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_conn_out_get()
597 IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), in ip_vs_bind_dest()
598 IP_VS_DBG_ADDR(cp->af, &cp->vaddr), ntohs(cp->vport), in ip_vs_bind_dest()
599 IP_VS_DBG_ADDR(cp->daf, &cp->daddr), ntohs(cp->dport), in ip_vs_bind_dest()
694 IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), in ip_vs_unbind_dest()
[all …]
Dip_vs_ftp.c219 &from.ip, ntohs(port), &cp->caddr.ip, 0); in ip_vs_ftp_out()
258 ntohs(port) >> 8, in ip_vs_ftp_out()
259 ntohs(port) & 0xFF); in ip_vs_ftp_out()
381 IP_VS_DBG(7, "PORT %pI4:%d detected\n", &to.ip, ntohs(port)); in ip_vs_ftp_in()
391 &to.ip, ntohs(port), &cp->vaddr.ip, 0); in ip_vs_ftp_in()
397 htons(ntohs(cp->vport)-1), &p); in ip_vs_ftp_in()
402 htons(ntohs(cp->dport)-1), in ip_vs_ftp_in()
Dip_vs_nfct.c71 #define ARG_TUPLE(T) &(T)->src.u3.ip, ntohs((T)->src.u.all), \
72 &(T)->dst.u3.ip, ntohs((T)->dst.u.all), \
76 #define ARG_CONN(C) &((C)->caddr.ip), ntohs((C)->cport), \
77 &((C)->vaddr.ip), ntohs((C)->vport), \
78 &((C)->daddr.ip), ntohs((C)->dport), \
Dip_vs_sh.c99 return (offset + (ntohs(port) + ntohl(addr_fold))*2654435761UL) & in ip_vs_sh_hashkey()
141 IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port)); in ip_vs_sh_get_fallback()
157 ntohs(dest->port), roffset); in ip_vs_sh_get_fallback()
346 ntohs(dest->port)); in ip_vs_sh_schedule()
Dip_vs_proto.c262 &ih->saddr, ntohs(pptr[0]), in ip_vs_tcpudp_debug_packet_v4()
263 &ih->daddr, ntohs(pptr[1])); in ip_vs_tcpudp_debug_packet_v4()
294 &ih->saddr, ntohs(pptr[0]), in ip_vs_tcpudp_debug_packet_v6()
295 &ih->daddr, ntohs(pptr[1])); in ip_vs_tcpudp_debug_packet_v6()
Dip_vs_sched.c160 &svc->addr.in6, ntohs(svc->port), msg); in ip_vs_scheduler_err()
165 &svc->addr.ip, ntohs(svc->port), msg); in ip_vs_scheduler_err()
Dip_vs_proto_sctp.c402 int clen = ntohs(sch->length); in set_sctp_state()
436 ntohs(cp->dport), in set_sctp_state()
438 ntohs(cp->cport), in set_sctp_state()
533 ntohs(cp->cport), in sctp_app_conn_bind()
535 ntohs(cp->vport), in sctp_app_conn_bind()
536 inc->name, ntohs(inc->port)); in sctp_app_conn_bind()
Dip_vs_core.c260 IP_VS_DBG_ADDR(svc->af, &iph->saddr), ntohs(src_port), in ip_vs_sched_persist()
261 IP_VS_DBG_ADDR(svc->af, &iph->daddr), ntohs(dst_port), in ip_vs_sched_persist()
513 IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), in ip_vs_schedule()
514 IP_VS_DBG_ADDR(cp->af, &cp->vaddr), ntohs(cp->vport), in ip_vs_schedule()
515 IP_VS_DBG_ADDR(cp->daf, &cp->daddr), ntohs(cp->dport), in ip_vs_schedule()
786 ntohs(inout ? ports[1] : ports[0]), in ip_vs_nat_icmp_v6()
787 ntohs(inout ? cp->vport : cp->dport)); in ip_vs_nat_icmp_v6()
902 ic->type, ntohs(icmp_id(ic)), in ip_vs_out_icmp()
984 ic->icmp6_type, ntohs(icmpv6_id(ic)), in ip_vs_out_icmp_v6()
1365 ic->type, ntohs(icmp_id(ic)), in ip_vs_in_icmp()
[all …]
Dip_vs_fo.c48 ntohs(hweight->port), in ip_vs_fo_schedule()
Dip_vs_lc.c63 ntohs(least->port), in ip_vs_lc_schedule()
Dip_vs_proto_tcp.c514 ntohs(cp->dport), in set_tcp_state()
516 ntohs(cp->cport), in set_tcp_state()
635 ntohs(cp->cport), in tcp_app_conn_bind()
637 ntohs(cp->vport), in tcp_app_conn_bind()
638 inc->name, ntohs(inc->port)); in tcp_app_conn_bind()
Dip_vs_sync.c598 m->size = htons(ntohs(m->size) + len); in ip_vs_sync_conn_v0()
709 m->size = htons(ntohs(m->size) + pad + len); in ip_vs_sync_conn()
973 flags = ntohs(s->flags) | IP_VS_CONN_F_SYNC; in ip_vs_process_message_v0()
987 state = ntohs(s->state); in ip_vs_process_message_v0()
1147 state = ntohs(s->v4.state); in ip_vs_proc_sync_conn()
1217 if (buflen != ntohs(m2->size)) { in ip_vs_process_message()
1244 size = ntohs(s->v4.ver_size) & SVER_MASK; in ip_vs_process_message()
1251 if (ntohs(s->v4.ver_size) >> SVER_SHIFT) { in ip_vs_process_message()
1253 ntohs(s->v4.ver_size) >> SVER_SHIFT); in ip_vs_process_message()
1585 msize = ntohs(msg->size); in ip_vs_send_sync_msg()
Dip_vs_wlc.c84 ntohs(least->port), in ip_vs_wlc_schedule()
Dip_vs_nq.c111 ntohs(least->port), in ip_vs_nq_schedule()
Dip_vs_sed.c112 ntohs(least->port), in ip_vs_sed_schedule()
Dip_vs_lblcr.c205 ntohs(least->port), in ip_vs_dest_set_min()
250 IP_VS_DBG_ADDR(most->af, &most->addr), ntohs(most->port), in ip_vs_dest_set_max()
614 ntohs(least->port), in __ip_vs_lblcr_schedule()
715 IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port)); in ip_vs_lblcr_schedule()
Dip_vs_app.c116 pp->name, inc->name, ntohs(inc->port)); in ip_vs_app_inc_new()
141 pp->name, inc->name, ntohs(inc->port)); in ip_vs_app_inc_release()
585 ntohs(inc->port), in ip_vs_app_seq_show()
Dip_vs_proto_udp.c411 ntohs(cp->cport), in udp_app_conn_bind()
413 ntohs(cp->vport), in udp_app_conn_bind()
414 inc->name, ntohs(inc->port)); in udp_app_conn_bind()
Dip_vs_rr.c98 IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port), in ip_vs_rr_schedule()
Dip_vs_ctl.c269 register unsigned int porth = ntohs(port); in ip_vs_svc_hashkey()
433 && (vport == FTPDATA || ntohs(vport) >= PROT_SOCK)) { in ip_vs_service_find()
452 IP_VS_DBG_ADDR(af, vaddr), ntohs(vport), in ip_vs_service_find()
486 ntohs(svc->port)); in __ip_vs_svc_put()
502 register unsigned int porth = ntohs(port); in ip_vs_rs_hashkey()
674 ntohs(dest->port), in ip_vs_trash_get_dest()
975 IP_VS_DBG_ADDR(udest->af, &daddr), ntohs(dport), in ip_vs_add_dest()
979 ntohs(dest->vport)); in ip_vs_add_dest()
1053 IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port), in __ip_vs_del_dest()
1152 ntohs(dest->port)); in ip_vs_dest_trash_expire()
[all …]
Dip_vs_pe_sip.c128 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_sip_ct_match()
Dip_vs_lblc.c450 ntohs(least->port), in __ip_vs_lblc_schedule()
530 IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port)); in ip_vs_lblc_schedule()
Dip_vs_dh.c238 ntohs(dest->port)); in ip_vs_dh_schedule()
/linux-4.1.27/net/sctp/
Dsm_make_chunk.c289 chunksize += WORD_ROUND(ntohs(auth_hmacs->length)); in sctp_make_init()
296 chunksize += WORD_ROUND(ntohs(auth_chunks->length)); in sctp_make_init()
371 sctp_addto_chunk(retval, ntohs(auth_hmacs->length), in sctp_make_init()
374 sctp_addto_chunk(retval, ntohs(auth_chunks->length), in sctp_make_init()
445 chunksize += ntohs(auth_random->length); in sctp_make_init_ack()
449 chunksize += WORD_ROUND(ntohs(auth_hmacs->length)); in sctp_make_init_ack()
455 chunksize += WORD_ROUND(ntohs(auth_chunks->length)); in sctp_make_init_ack()
508 sctp_addto_chunk(retval, ntohs(auth_random->length), in sctp_make_init_ack()
511 sctp_addto_chunk(retval, ntohs(auth_hmacs->length), in sctp_make_init_ack()
514 sctp_addto_chunk(retval, ntohs(auth_chunks->length), in sctp_make_init_ack()
[all …]
Dauth.c198 random_len = ntohs(random->param_hdr.length); in sctp_auth_make_key_vector()
199 hmacs_len = ntohs(hmacs->param_hdr.length); in sctp_auth_make_key_vector()
201 chunks_len = ntohs(chunks->param_hdr.length); in sctp_auth_make_key_vector()
544 n_elt = (ntohs(hmacs->param_hdr.length) - sizeof(sctp_paramhdr_t)) >> 1; in sctp_auth_asoc_get_hmac()
546 id = ntohs(hmacs->hmac_ids[i]); in sctp_auth_asoc_get_hmac()
595 n_elt = (ntohs(hmacs->param_hdr.length) - sizeof(sctp_paramhdr_t)) >> 1; in sctp_auth_asoc_verify_hmac_id()
618 n_params = (ntohs(hmacs->param_hdr.length) in sctp_auth_asoc_set_default_hmac()
622 id = ntohs(hmacs->hmac_ids[i]); in sctp_auth_asoc_set_default_hmac()
647 len = ntohs(param->param_hdr.length) - sizeof(sctp_paramhdr_t); in __sctp_auth_cid()
724 key_id = ntohs(auth->auth_hdr.shkey_id); in sctp_auth_calculate_hmac()
[all …]
Dinput.c670 if (ntohs(ch->length) < sizeof(sctp_chunkhdr_t)) in sctp_rcv_ootb()
673 ch_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length)); in sctp_rcv_ootb()
768 hash = sctp_ep_hashfn(net, ntohs(laddr->v4.sin_port)); in __sctp_rcv_lookup_endpoint()
862 hash = sctp_assoc_hashfn(net, ntohs(local->v4.sin_port), in __sctp_lookup_association()
863 ntohs(peer->v4.sin_port)); in __sctp_lookup_association()
1048 if (ntohs(ch->length) < sizeof(sctp_chunkhdr_t)) in __sctp_rcv_walk_lookup()
1051 ch_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length)); in __sctp_rcv_walk_lookup()
1112 if (WORD_ROUND(ntohs(ch->length)) > skb->len) in __sctp_rcv_lookup_harder()
Dulpevent.c158 ntohs(chunk->chunk_hdr->length) - in sctp_ulpevent_make_assoc_change()
383 elen = WORD_ROUND(ntohs(ch->length)) - sizeof(sctp_errhdr_t); in sctp_ulpevent_make_remote_error()
435 int len = ntohs(chunk->chunk_hdr->length); in sctp_ulpevent_make_send_failed()
687 len = ntohs(chunk->chunk_hdr->length); in sctp_ulpevent_make_rcvmsg()
704 event->stream = ntohs(chunk->subh.data_hdr->stream); in sctp_ulpevent_make_rcvmsg()
705 event->ssn = ntohs(chunk->subh.data_hdr->ssn); in sctp_ulpevent_make_rcvmsg()
Dsm_statefuns.c171 __u16 chunk_length = ntohs(chunk->chunk_hdr->length); in sctp_chunk_length_valid()
373 ntohs(err_chunk->chunk_hdr->length) - in sctp_sf_do_5_1B_init()
420 len = ntohs(err_chunk->chunk_hdr->length) - in sctp_sf_do_5_1B_init()
545 ntohs(err_chunk->chunk_hdr->length) - in sctp_sf_do_5_1C_ack()
694 if (!pskb_pull(chunk->skb, ntohs(chunk->chunk_hdr->length) - in sctp_sf_do_5_1D_ce()
1075 paylen = ntohs(chunk->chunk_hdr->length) - sizeof(sctp_chunkhdr_t); in sctp_sf_beat_8_3()
1077 if (ntohs(param_hdr->length) > paylen) in sctp_sf_beat_8_3()
1147 if (ntohs(hbinfo->param_hdr.length) != in sctp_sf_backbeat_8_3()
1446 ntohs(err_chunk->chunk_hdr->length) - in sctp_sf_do_unexpected_init()
1510 len = ntohs(err_chunk->chunk_hdr->length) - in sctp_sf_do_unexpected_init()
[all …]
Dinqueue.c169 chunk->chunk_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length)); in sctp_inq_pop()
198 ntohs(chunk->chunk_hdr->length), chunk->skb->len); in sctp_inq_pop()
Doutqueue.c1110 for (i = 0; i < ntohs(sack->num_gap_ack_blocks); i++) { in sctp_sack_update_unack_data()
1111 unack_data -= ((ntohs(frags[i].gab.end) - in sctp_sack_update_unack_data()
1112 ntohs(frags[i].gab.start) + 1)); in sctp_sack_update_unack_data()
1144 gap_ack_blocks = ntohs(sack->num_gap_ack_blocks); in sctp_outq_sack()
1186 highest_tsn += ntohs(frags[gap_ack_blocks - 1].gab.end); in sctp_outq_sack()
1660 for (i = 0; i < ntohs(sack->num_gap_ack_blocks); ++i) { in sctp_acked()
1661 if (TSN_lte(ntohs(frags[i].gab.start), gap) && in sctp_acked()
1662 TSN_lte(gap, ntohs(frags[i].gab.end))) in sctp_acked()
/linux-4.1.27/net/bridge/netfilter/
Debt_log.c70 printk(" SPT=%u DPT=%u", ntohs(pptr->src), ntohs(pptr->dst)); in print_ports()
91 ntohs(eth_hdr(skb)->h_proto)); in ebt_log_packet()
151 ntohs(ah->ar_hrd), ntohs(ah->ar_pro), in ebt_log_packet()
152 ntohs(ah->ar_op)); in ebt_log_packet()
Debt_vlan.c59 TCI = ntohs(fp->h_vlan_TCI); in ebt_vlan_mt()
96 ntohs(e->ethproto)); in ebt_vlan_mt_check()
148 if ((unsigned short) ntohs(info->encap) < ETH_ZLEN) { in ebt_vlan_mt_check()
150 "minimal\n", ntohs(info->encap)); in ebt_vlan_mt_check()
Debt_ip.c56 if (ntohs(ih->frag_off) & IP_OFFSET) in ebt_ip_mt()
63 u32 dst = ntohs(pptr->dst); in ebt_ip_mt()
70 u32 src = ntohs(pptr->src); in ebt_ip_mt()
Dnf_tables_bridge.c34 len = ntohs(iph->tot_len); in nft_bridge_iphdr_validate()
59 pkt_len = ntohs(hdr->payload_len); in nft_bridge_ip6hdr_validate()
Debt_ip6.c78 u16 dst = ntohs(pptr->tcpudphdr.dst); in ebt_ip6_mt()
84 u16 src = ntohs(pptr->tcpudphdr.src); in ebt_ip6_mt()
Dnft_reject_bridge.c102 if (pskb_trim_rcsum(oldskb, ntohs(ip_hdr(oldskb)->tot_len))) in nft_reject_br_send_v4_unreach()
192 pskb_trim_rcsum(skb, ntohs(ip6h->payload_len) + sizeof(*ip6h))) in reject6_br_csum_ok()
/linux-4.1.27/include/uapi/linux/
Dtipc_config.h266 (ntohs(((struct tlv_desc *)tlv)->tlv_len) <= space); in TLV_OK()
272 (ntohs(((struct tlv_desc *)tlv)->tlv_type) == exp_type); in TLV_CHECK()
277 return ntohs(tlv->tlv_len); in TLV_GET_LEN()
287 return (ntohs(tlv->tlv_type) == type); in TLV_CHECK_TYPE()
343 __u16 tlv_space = TLV_ALIGN(ntohs(list->tlv_ptr->tlv_len)); in TLV_LIST_STEP()
/linux-4.1.27/include/net/sctp/
Dsctp.h443 _sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length), member)
447 pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\
448 ntohs(pos.p->length) >= sizeof(sctp_paramhdr_t);\
449 pos.v += WORD_ROUND(ntohs(pos.p->length)))
452 _sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length))
457 (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\
458 ntohs(err->length) >= sizeof(sctp_errhdr_t); \
459 err = (sctp_errhdr_t *)((void *)err + WORD_ROUND(ntohs(err->length))))
462 _sctp_walk_fwdtsn((pos), (chunk), ntohs((chunk)->chunk_hdr->length) - sizeof(struct sctp_fwdtsn_chu…
/linux-4.1.27/include/net/netfilter/
Dnf_conntrack_tuple.h86 &t->src.u3.ip, ntohs(t->src.u.all), in nf_ct_dump_tuple_ip()
87 &t->dst.u3.ip, ntohs(t->dst.u.all)); in nf_ct_dump_tuple_ip()
96 t->src.u3.all, ntohs(t->src.u.all), in nf_ct_dump_tuple_ipv6()
97 t->dst.u3.all, ntohs(t->dst.u.all)); in nf_ct_dump_tuple_ipv6()
Dnf_tables_ipv4.h20 pkt->xt.fragoff = ntohs(ip->frag_off) & IP_OFFSET; in nft_set_pktinfo_ipv4()
/linux-4.1.27/include/linux/sunrpc/
Dsvc_xprt.h156 return ntohs(sin->sin_port); in svc_addr_port()
158 return ntohs(sin6->sin6_port); in svc_addr_port()
194 ntohs(sin->sin_port)); in __svc_print_addr()
200 ntohs(sin6->sin6_port)); in __svc_print_addr()
Daddr.h26 return ntohs(((struct sockaddr_in *)sap)->sin_port); in rpc_get_port()
28 return ntohs(((struct sockaddr_in6 *)sap)->sin6_port); in rpc_get_port()
/linux-4.1.27/net/sched/
Dact_csum.c235 ul = ntohs(udph->len); in tcf_csum_ipv4_udp()
288 ul = ntohs(udph->len); in tcf_csum_ipv6_udp()
337 ntohs(iph->tot_len))) in tcf_csum_ipv4()
343 ntohs(iph->tot_len))) in tcf_csum_ipv4()
349 ntohs(iph->tot_len))) in tcf_csum_ipv4()
355 ntohs(iph->tot_len), 0)) in tcf_csum_ipv4()
361 ntohs(iph->tot_len), 1)) in tcf_csum_ipv4()
435 pl = ntohs(ip6h->payload_len); in tcf_csum_ipv6()
Dcls_flow.c91 return ntohs(flow->port16[0]); in flow_get_proto_src()
99 return ntohs(flow->port16[1]); in flow_get_proto_dst()
171 return ntohs(CTTUPLE(skb, src.u.all)); in flow_get_nfct_proto_src()
178 return ntohs(CTTUPLE(skb, dst.u.all)); in flow_get_nfct_proto_dst()
/linux-4.1.27/net/tipc/
Dudp_media.c100 if (ntohs(ua->proto) == ETH_P_IP) { in tipc_udp_media_addr_set()
103 } else if (ntohs(ua->proto) == ETH_P_IPV6) { in tipc_udp_media_addr_set()
116 if (ntohs(ua->proto) == ETH_P_IP) in tipc_udp_addr2str()
117 snprintf(buf, size, "%pI4:%u", &ua->ipv4, ntohs(ua->udp_port)); in tipc_udp_addr2str()
118 else if (ntohs(ua->proto) == ETH_P_IPV6) in tipc_udp_addr2str()
119 snprintf(buf, size, "%pI6:%u", &ua->ipv6, ntohs(ua->udp_port)); in tipc_udp_addr2str()
252 if (ntohs(remote->proto) == ETH_P_IP) { in enable_mcast()
/linux-4.1.27/include/net/
Ddsfield.h23 return ntohs(*(const __be16 *)ipv6h) >> 4; in ipv6_get_dsfield()
30 __u32 check = ntohs((__force __be16)iph->check); in ipv4_change_dsfield()
Dip_vs.h1231 ntohs(cp->cport), in ip_vs_control_del()
1233 ntohs(cp->vport)); in ip_vs_control_del()
1241 ntohs(cp->cport), in ip_vs_control_del()
1243 ntohs(ctl_cp->cport)); in ip_vs_control_del()
1250 ntohs(cp->cport), in ip_vs_control_del()
1252 ntohs(cp->vport)); in ip_vs_control_del()
1266 ntohs(cp->cport), in ip_vs_control_add()
1268 ntohs(cp->vport)); in ip_vs_control_add()
1276 ntohs(cp->cport), in ip_vs_control_add()
1278 ntohs(ctl_cp->cport)); in ip_vs_control_add()
Dinet_hashtables.h269 daddr, ntohs(dport), dif); in inet_lookup_listener()
339 ntohs(dport), dif); in inet_lookup_established()
348 u16 hnum = ntohs(dport); in __inet_lookup()
Dmld.h97 unsigned long ret, mc_mrc = ntohs(mlh2->mld2q_mrc); in mldv2_mrc()
Dinet6_hashtables.h91 &ipv6_hdr(skb)->daddr, ntohs(dport), in __inet6_lookup_skb()
Dudplite.h48 cscov = ntohs(uh->len); in udplite_checksum_init()
/linux-4.1.27/drivers/staging/gdm724x/
Dgdm_lte.c122 if (ntohs(((struct ethhdr *)skb_in->data)->h_proto) == ETH_P_8021Q) { in gdm_lte_emulate_arp()
247 if (ntohs(((struct ethhdr *)skb_in->data)->h_proto) == ETH_P_8021Q) { in gdm_lte_emulate_ndp()
249 if (ntohs(vlan_eth.h_vlan_encapsulated_proto) != ETH_P_IPV6) in gdm_lte_emulate_ndp()
255 if (ntohs(eth.h_proto) != ETH_P_IPV6) in gdm_lte_emulate_ndp()
363 if (ntohs(eth->h_proto) == ETH_P_8021Q) { in gdm_lte_tx_nic_type()
365 mac_proto = ntohs(vlan_eth->h_vlan_encapsulated_proto); in gdm_lte_tx_nic_type()
369 mac_proto = ntohs(eth->h_proto); in gdm_lte_tx_nic_type()
386 if (ntohs(udp->dest) == 67 || ntohs(udp->dest) == 68) in gdm_lte_tx_nic_type()
402 if (ntohs(udp->dest) == 546 || ntohs(udp->dest) == 547) in gdm_lte_tx_nic_type()
452 nic->vlan_id = ntohs(vlan_eth->h_vlan_TCI) & VLAN_VID_MASK; in gdm_lte_tx()
/linux-4.1.27/drivers/net/wireless/mwifiex/
Dsta_rx.c44 switch (ntohs(eth->h_proto)) { in mwifiex_discard_gratuitous_arp()
105 ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_AARP && in mwifiex_process_rx_packet()
106 ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_IPX)) { in mwifiex_process_rx_packet()
150 ntohs(rx_pkt_hdr->eth803_hdr.h_proto) == ETH_P_TDLS) { in mwifiex_process_rx_packet()
Duap_txrx.c117 ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_AARP && in mwifiex_uap_queue_bridged_pkt()
118 ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_IPX)) { in mwifiex_uap_queue_bridged_pkt()
/linux-4.1.27/drivers/scsi/libfc/
Dfc_disc.c110 len = ntohs(rp->rscn_plen); in fc_disc_recv_rscn_req()
532 seq_cnt = ntohs(fh->fh_seq_cnt); in fc_disc_gpn_ft_resp()
539 } else if (ntohs(cp->ct_cmd) == FC_FS_ACC) { in fc_disc_gpn_ft_resp()
544 } else if (ntohs(cp->ct_cmd) == FC_FS_RJT) { in fc_disc_gpn_ft_resp()
554 "%x\n", ntohs(cp->ct_cmd)); in fc_disc_gpn_ft_resp()
604 if (ntohs(cp->ct_cmd) == FC_FS_ACC) { in fc_disc_gpn_id_resp()
628 } else if (ntohs(cp->ct_cmd) == FC_FS_RJT) { in fc_disc_gpn_id_resp()
634 ntohs(cp->ct_cmd)); in fc_disc_gpn_id_resp()
Dfc_exch.c982 ep->oxid = ntohs(fh->fh_ox_id); in fc_exch_resp()
1021 xid = ntohs(fh->fh_ox_id); /* we originated exch */ in fc_seq_lookup_recip()
1029 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_recip()
1030 else if (ep->rxid != ntohs(fh->fh_rx_id)) { in fc_seq_lookup_recip()
1035 xid = ntohs(fh->fh_rx_id); /* we are the responder */ in fc_seq_lookup_recip()
1144 xid = ntohs((f_ctl & FC_FC_EX_CTX) ? fh->fh_ox_id : fh->fh_rx_id); in fc_seq_lookup_orig()
1155 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_orig()
1532 ep = fc_exch_find(mp, ntohs(fh->fh_ox_id)); in fc_exch_recv_seq_resp()
1542 ep->rxid = ntohs(fh->fh_rx_id); in fc_exch_recv_seq_resp()
1666 low = ntohs(ap->ba_low_seq_cnt); in fc_exch_abts_resp()
[all …]
Dfc_elsct.c131 switch (ntohs(ct->ct_cmd)) { in fc_els_resp_type()
Dfc_rport.c212 mfs = ntohs(flp->fl_csp.sp_bb_data) & FC_SP_BB_DATA_MASK; in fc_plogi_get_maxframe()
215 mfs = ntohs(flp->fl_cssp[3 - 1].cp_rdfs); in fc_plogi_get_maxframe()
628 csp_flags = ntohs(flogi->fl_csp.sp_features); in fc_rport_login_complete()
908 rdata->sp_features = ntohs(plp->fl_csp.sp_features); in fc_rport_plogi_resp()
912 csp_seq = ntohs(plp->fl_csp.sp_tot_seq); in fc_rport_plogi_resp()
913 cssp_seq = ntohs(plp->fl_cssp[3 - 1].cp_con_seq); in fc_rport_plogi_resp()
1736 plen = ntohs(pp->prli.prli_len); in fc_rport_recv_prli_req()
1852 plen = ntohs(pp->prlo.prlo_len); in fc_rport_recv_prlo_req()
/linux-4.1.27/net/rds/
Dbind.c105 ntohs(port)); in rds_find_bound()
133 rs, &addr, (int)ntohs(*port)); in rds_add_bound()
152 ntohs(rs->rs_bound_port)); in rds_remove_bound()
Dcong.c297 &map->m_addr, ntohs(port), map); in rds_cong_set_bit()
311 &map->m_addr, ntohs(port), map); in rds_cong_clear_bit()
372 rs->rs_cong_mask |= RDS_CONG_MONITOR_MASK(ntohs(port)); in rds_cong_wait()
Dtcp_listen.c108 &inet->inet_saddr, ntohs(inet->inet_sport), in rds_tcp_accept_one()
109 &inet->inet_daddr, ntohs(inet->inet_dport)); in rds_tcp_accept_one()
Drecv.c84 ntohs(rs->rs_bound_port), rs->rs_rcv_bytes, in rds_recv_rcvbuf_delta()
452 ntohs(inc->i_hdr.h_sport)); in rds_recvmsg()
/linux-4.1.27/net/batman-adv/
Dfragmentation.c144 seqno = ntohs(frag_packet->seqno); in batadv_frag_insert_packet()
198 ntohs(frag_packet->total_size) > batadv_frag_size_limit()) { in batadv_frag_insert_packet()
204 } else if (ntohs(frag_packet->total_size) == chain->size) { in batadv_frag_insert_packet()
240 size = ntohs(packet->total_size); in batadv_frag_merge_packets()
353 total_size = ntohs(packet->total_size); in batadv_frag_skb_fwd()
Dmain.c325 prio = ntohs(vhdr->h_vlan_TCI) & VLAN_PRIO_MASK; in batadv_skb_set_priority()
716 tvlv_len += ntohs(tvlv->tvlv_hdr.len); in batadv_tvlv_container_list_size()
789 memcpy(tvlv_new + 1, tvlv_value, ntohs(tvlv_new->tvlv_hdr.len)); in batadv_tvlv_container_register()
878 memcpy(tvlv_value, tvlv + 1, ntohs(tvlv->tvlv_hdr.len)); in batadv_tvlv_container_ogm_append()
879 tvlv_value = (uint8_t *)tvlv_value + ntohs(tvlv->tvlv_hdr.len); in batadv_tvlv_container_ogm_append()
969 tvlv_value_cont_len = ntohs(tvlv_hdr->len); in batadv_tvlv_containers_process()
1025 tvlv_value_len = ntohs(batadv_ogm_packet->tvlv_len); in batadv_tvlv_ogm_receive()
1195 vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK; in batadv_get_vid()
Dmulticast.c352 switch (ntohs(ethhdr->h_proto)) { in batadv_mcast_forw_mode_check()
376 switch (ntohs(ethhdr->h_proto)) { in batadv_mcast_forw_want_all_ip_count()
470 switch (ntohs(ethhdr->h_proto)) { in batadv_mcast_forw_ip_node_get()
Dbridge_loop_avoidance.c662 crc = ntohs(*((__be16 *)(&an_addr[4]))); in batadv_handle_announce()
834 if (ntohs(bla_dst->group) > ntohs(bla_dst_own->group)) { in batadv_check_claim_group()
837 ntohs(bla_dst->group)); in batadv_check_claim_group()
1644 ntohs(bat_priv->bla.claim_dest.group)); in batadv_bla_claim_table_seq_print_text()
1689 ntohs(bat_priv->bla.claim_dest.group)); in batadv_bla_backbone_table_seq_print_text()
/linux-4.1.27/include/trace/events/
Dnet.h44 __entry->vlan_proto = ntohs(skb->vlan_proto);
46 __entry->protocol = ntohs(skb->protocol);
178 __entry->vlan_proto = ntohs(skb->vlan_proto);
180 __entry->protocol = ntohs(skb->protocol);
Dskb.h29 __entry->protocol = ntohs(skb->protocol);
/linux-4.1.27/drivers/infiniband/hw/cxgb4/
Ddevice.c261 &lsin->sin_addr, ntohs(lsin->sin_port), in dump_qp()
262 ntohs(mapped_lsin->sin_port), in dump_qp()
263 &rsin->sin_addr, ntohs(rsin->sin_port), in dump_qp()
264 ntohs(mapped_rsin->sin_port)); in dump_qp()
286 ntohs(lsin6->sin6_port), in dump_qp()
287 ntohs(mapped_lsin6->sin6_port), in dump_qp()
289 ntohs(rsin6->sin6_port), in dump_qp()
290 ntohs(mapped_rsin6->sin6_port)); in dump_qp()
572 &lsin->sin_addr, ntohs(lsin->sin_port), in dump_ep()
573 ntohs(mapped_lsin->sin_port), in dump_ep()
[all …]
Dcm.c846 mpa->private_data_size = htons(ntohs(mpa->private_data_size) + in send_mpa_req()
936 mpa->private_data_size = htons(ntohs(mpa->private_data_size) + in send_mpa_reject()
1017 mpa->private_data_size = htons(ntohs(mpa->private_data_size) + in send_mpa_reply()
1080 set_emss(ep, ntohs(req->tcp_opt)); in act_establish()
1343 plen = ntohs(mpa->private_data_size); in process_mpa_reply()
1393 resp_ird = ntohs(mpa_v2_params->ird) & in process_mpa_reply()
1395 resp_ord = ntohs(mpa_v2_params->ord) & in process_mpa_reply()
1426 if (ntohs(mpa_v2_params->ird) & in process_mpa_reply()
1428 if (ntohs(mpa_v2_params->ord) & in process_mpa_reply()
1432 else if (ntohs(mpa_v2_params->ord) & in process_mpa_reply()
[all …]
/linux-4.1.27/drivers/net/ethernet/brocade/bna/
Dbfa_msgq.c241 cmdq->consumer_index = ntohs(dbell->idx.cmdq_ci); in bfa_msgq_cmdq_ci_update()
247 if (ntohs(cmd->msg_hdr->num_entries) <= in bfa_msgq_cmdq_ci_update()
278 cmdq->offset = ntohs(req->offset); in bfa_msgq_cmdq_copy_req()
279 cmdq->bytes_to_copy = ntohs(req->len); in bfa_msgq_cmdq_copy_req()
475 rspq->producer_index = ntohs(dbell->idx.rspq_pi); in bfa_msgq_rspq_pi_update()
483 num_entries = ntohs(msghdr->num_entries); in bfa_msgq_rspq_pi_update()
634 if (ntohs(cmd->msg_hdr->num_entries) <= in bfa_msgq_cmd_post()
Dbfa_cee.c50 ntohs(lldp_cfg->time_to_live); in bfa_cee_format_lldp_cfg()
52 ntohs(lldp_cfg->enabled_system_cap); in bfa_cee_format_lldp_cfg()
/linux-4.1.27/include/linux/byteorder/
Dgeneric.h129 #undef ntohs
141 #define ntohs(x) ___ntohs(x) macro
/linux-4.1.27/drivers/net/ethernet/rocker/
Drocker.h441 ROCKER_GROUP_VLAN_SET(ntohs(vlan_id)) | ROCKER_GROUP_PORT_SET(port))
447 ROCKER_GROUP_VLAN_SET(ntohs(vlan_id)) | ROCKER_GROUP_INDEX_SET(index))
450 ROCKER_GROUP_VLAN_SET(ntohs(vlan_id)) | ROCKER_GROUP_INDEX_SET(index))
/linux-4.1.27/drivers/net/bonding/
Dbond_3ad.c426 if (((ntohs(lacpdu->partner_port) == port->actor_port_number) && in __choose_matched()
427 (ntohs(lacpdu->partner_port_priority) == port->actor_port_priority) && in __choose_matched()
429 (ntohs(lacpdu->partner_system_priority) == port->actor_system_priority) && in __choose_matched()
430 (ntohs(lacpdu->partner_key) == port->actor_oper_port_key) && in __choose_matched()
458 partner->port_number = ntohs(lacpdu->actor_port); in __record_pdu()
459 partner->port_priority = ntohs(lacpdu->actor_port_priority); in __record_pdu()
461 partner->system_priority = ntohs(lacpdu->actor_system_priority); in __record_pdu()
462 partner->key = ntohs(lacpdu->actor_key); in __record_pdu()
523 if (ntohs(lacpdu->actor_port) != partner->port_number || in __update_selected()
524 ntohs(lacpdu->actor_port_priority) != partner->port_priority || in __update_selected()
[all …]
/linux-4.1.27/net/ipv4/
Dping.c318 sk, &addr->sin_addr.s_addr, ntohs(addr->sin_port)); in ping_check_bind_addr()
345 sk, addr->sin6_addr.s6_addr, ntohs(addr->sin6_port)); in ping_check_bind_addr()
432 snum = ntohs(((struct sockaddr_in *)uaddr)->sin_port); in ping_bind()
516 skb->protocol, type, code, ntohs(icmph->un.echo.id), in ping_err()
517 ntohs(icmph->un.echo.sequence)); in ping_err()
519 sk = ping_lookup(net, skb, ntohs(icmph->un.echo.id)); in ping_err()
971 skb, ntohs(icmph->un.echo.id), ntohs(icmph->un.echo.sequence)); in ping_rcv()
976 sk = ping_lookup(net, skb, ntohs(icmph->un.echo.id)); in ping_rcv()
1109 __u16 destp = ntohs(inet->inet_dport); in ping_v4_format_sock()
1110 __u16 srcp = ntohs(inet->inet_sport); in ping_v4_format_sock()
Dinet_lro.c41 (ntohs(iph->tot_len) - IP_HDR_LEN(iph) - TCP_HDR_LEN(tcph))
59 if (ntohs(iph->tot_len) != len) in lro_tcp_ip_check()
164 lro_desc->ip_tot_len = ntohs(iph->tot_len); in lro_init_desc()
Dipconfig.c520 if (rarp->ar_hln != dev->addr_len || dev->type != ntohs(rarp->ar_hrd)) in ic_rarp_recv()
857 if (dev_hard_header(skb, dev, ntohs(skb->protocol), in ic_bootp_send_if()
935 ic_dev_mtu = ntohs(mtu); in ic_do_bootp_ext()
983 if (skb->len < ntohs(h->tot_len)) in ic_bootp_recv()
992 if (ntohs(h->tot_len) < ntohs(b->udph.len) + sizeof(struct iphdr)) in ic_bootp_recv()
995 len = ntohs(b->udph.len) - sizeof(struct udphdr); in ic_bootp_recv()
1041 u8 *end = (u8 *) b + ntohs(b->iph.tot_len); in ic_bootp_recv()
Dfou.c58 iph->tot_len = htons(ntohs(iph->tot_len) - len); in fou_recv_pull()
81 size_t start = ntohs(pd[0]); in gue_remcsum()
82 size_t offset = ntohs(pd[1]); in gue_remcsum()
135 ip_hdr(skb)->tot_len = htons(ntohs(ip_hdr(skb)->tot_len) - len); in gue_udp_recv()
229 size_t start = ntohs(pd[0]); in gue_gro_remcsum()
230 size_t offset = ntohs(pd[1]); in gue_gro_remcsum()
Dtcp_probe.c115 ntohs(inet->inet_dport) == port || in jtcp_rcv_established()
116 ntohs(inet->inet_sport) == port || in jtcp_rcv_established()
Dxfrm4_input.c133 iph->tot_len = htons(ntohs(iph->tot_len) - len); in xfrm4_udp_encap_rcv()
Dudp.c498 unsigned short hnum = ntohs(dport); in __udp4_lib_lookup()
1663 unsigned short hnum = ntohs(uh->dest); in __udp4_lib_mcast_deliver()
1761 ulen = ntohs(uh->len); in __udp4_lib_rcv()
1840 &saddr, ntohs(uh->source), in __udp4_lib_rcv()
1842 &daddr, ntohs(uh->dest)); in __udp4_lib_rcv()
1852 &saddr, ntohs(uh->source), &daddr, ntohs(uh->dest), in __udp4_lib_rcv()
1871 unsigned short hnum = ntohs(loc_port); in __udp4_lib_mcast_demux_lookup()
1927 unsigned short hnum = ntohs(loc_port); in __udp4_lib_demux_lookup()
2420 __u16 destp = ntohs(inet->inet_dport); in udp4_format_sock()
2421 __u16 srcp = ntohs(inet->inet_sport); in udp4_format_sock()
Dtcp_ipv4.c375 th->dest, iph->saddr, ntohs(th->source), in tcp_v4_err()
641 ntohs(th->source), inet_iif(skb)); in tcp_v4_send_reset()
1165 &iph->saddr, ntohs(th->source), in tcp_v4_inbound_md5_hash()
1166 &iph->daddr, ntohs(th->dest), in tcp_v4_inbound_md5_hash()
1471 iph->daddr, ntohs(th->dest), in tcp_v4_early_demux()
2174 ntohs(ireq->ir_rmt_port), in get_openreq4()
2197 __u16 destp = ntohs(inet->inet_dport); in get_tcp4_sock()
2198 __u16 srcp = ntohs(inet->inet_sport); in get_tcp4_sock()
2255 destp = ntohs(tw->tw_dport); in get_timewait4_sock()
2256 srcp = ntohs(tw->tw_sport); in get_timewait4_sock()
/linux-4.1.27/drivers/scsi/cxgbi/cxgb3i/
Dcxgb3i.c180 &req->local_ip, ntohs(req->local_port), in send_act_open_req()
181 &req->peer_ip, ntohs(req->peer_port), in send_act_open_req()
493 csk->rss_qid = G_QNUM(ntohs(skb->csum)); in do_act_establish()
509 cxgbi_sock_established(csk, ntohl(req->snd_isn), ntohs(req->tcp_opt)); in do_act_establish()
577 &csk->saddr.sin_addr.s_addr, ntohs(csk->saddr.sin_port), in do_act_open_rpl()
578 &csk->daddr.sin_addr.s_addr, ntohs(csk->daddr.sin_port)); in do_act_open_rpl()
775 len = hdr_len = ntohs(hdr_cpl->len); in do_iscsi_hdr()
795 cxgbi_skcb_rx_pdulen(skb) = ntohs(ddp_cpl.len); in do_iscsi_hdr()
818 data_len = ntohs(data_cpl.len); in do_iscsi_hdr()
854 csk, csk->state, csk->flags, csk->tid, ntohs(hdr->credits)); in do_wr_ack()
[all …]
/linux-4.1.27/drivers/staging/ft1000/ft1000-pcmcia/
Dft1000_hw.c603 ntohs(ft1000_read_dpram_mag_16 in ft1000_hbchk()
613 tempword = ntohs(ft1000_read_dpram_mag_16(dev, in ft1000_hbchk()
668 ntohs(ft1000_read_dpram_mag_16 in ft1000_hbchk()
683 tempword = ntohs(ft1000_read_dpram_mag_16(dev, in ft1000_hbchk()
734 pr_debug("length = %d\n", ntohs(*ptempbuffer)); in ft1000_send_cmd()
819 size = ntohs(ft1000_read_dpram_mag_16(dev, FT1000_MAG_PH_LEN, in ft1000_receive_cmd()
835 *pbuffer++ = ntohs(tempword); in ft1000_receive_cmd()
866 *pbuffer = ntohs(tempword); in ft1000_receive_cmd()
927 msgtype = ntohs(pdrvmsg->type); in ft1000_proc_drvmsg()
1025 if (ntohs(pdspinitmsg->length) == in ft1000_proc_drvmsg()
[all …]
Dft1000_dnld.c522 temp = ntohs(*pUsData); in card_download()
577 ntohs(*pUsFile++); in card_download()
579 ntohs(*pUsFile++); in card_download()
712 usHdrLength = ntohs(pHdr->length); /* Byte length for PROV records */ in card_download()
/linux-4.1.27/net/netfilter/ipset/
Dip_set_hash_ipport.c179 port_to = port = ntohs(e.port); in hash_ipport4_uadt()
189 p = retried && ip == ntohl(h->next.ip) ? ntohs(h->next.port) in hash_ipport4_uadt()
331 port = ntohs(e.port); in hash_ipport6_uadt()
337 port = ntohs(h->next.port); in hash_ipport6_uadt()
Dip_set_hash_ipportip.c185 port_to = port = ntohs(e.port); in hash_ipportip4_uadt()
195 p = retried && ip == ntohl(h->next.ip) ? ntohs(h->next.port) in hash_ipportip4_uadt()
343 port = ntohs(e.port); in hash_ipportip6_uadt()
349 port = ntohs(h->next.port); in hash_ipportip6_uadt()
Dip_set_hash_ipportnet.c257 port_to = port = ntohs(e.port); in hash_ipportnet4_uadt()
280 p = retried && ip == ntohl(h->next.ip) ? ntohs(h->next.port) in hash_ipportnet4_uadt()
286 p == ntohs(h->next.port) in hash_ipportnet4_uadt()
498 port = ntohs(e.port); in hash_ipportnet6_uadt()
504 port = ntohs(h->next.port); in hash_ipportnet6_uadt()
Dip_set_hash_netportnet.c268 port_to = port = ntohs(e.port); in hash_netportnet4_uadt()
294 p = retried && ip == ntohl(h->next.ip[0]) ? ntohs(h->next.port) in hash_netportnet4_uadt()
299 p == ntohs(h->next.port)) ? ntohl(h->next.ip[1]) in hash_netportnet4_uadt()
528 port = ntohs(e.port); in hash_netportnet6_uadt()
534 port = ntohs(h->next.port); in hash_netportnet6_uadt()
Dip_set_hash_netport.c229 port = port_to = ntohs(e.port); in hash_netport4_uadt()
252 p = retried && ip == ntohl(h->next.ip) ? ntohs(h->next.port) in hash_netport4_uadt()
449 port = ntohs(e.port); in hash_netport6_uadt()
455 port = ntohs(h->next.port); in hash_netport6_uadt()
Dip_set_getport.c108 if (ntohs(iph->frag_off) & IP_OFFSET) in ip_set_get_ip4_port()
/linux-4.1.27/drivers/staging/ft1000/ft1000-usb/
Dft1000_debug.c499 get_stat_data.LedStat = ntohs(ledStat); in ft1000_ioctl()
502 get_stat_data.ConStat = ntohs(conStat); in ft1000_ioctl()
557 msgsz = ntohs(msgsz); in ft1000_ioctl()
589 qtype = ntohs(dpram_data->pseudohdr.qos_class) & 0xff; in ft1000_ioctl()
698 msglen = ntohs(*(u16 *)pdpram_blk->pbuffer) + PSEUDOSZ; in ft1000_ioctl()
Dft1000_download.c184 handshake = ntohs(handshake); in get_handshake()
258 handshake = ntohs(handshake); in get_handshake_usb()
864 templong = ntohs(*s_file++); in scram_dnldr()
865 temp = ntohs(*s_file++); in scram_dnldr()
970 pseudo_header_len = ntohs(pseudo_header->length); /* Byte length for PROV records */ in scram_dnldr()
Dft1000_hw.c532 hdr.length = ntohs(count); in ft1000_copy_down_pkt()
982 size = ntohs(size) + PSEUDOSZ; in ft1000_receive_cmd()
1019 *pbuffer = ntohs(tempword); in ft1000_receive_cmd()
1149 msgtype = ntohs(pdrvmsg->type); in ft1000_proc_drvmsg()
1202 if (ntohs(pdspinitmsg->length) == in ft1000_proc_drvmsg()
1236 tempword = ntohs(pdrvmsg->length); in ft1000_proc_drvmsg()
1478 size = ntohs(data) + 16 + 2; in ft1000_poll()
/linux-4.1.27/net/ipv6/
Dexthdrs_core.c98 if (ntohs(*frag_offp) & ~0x7) in ipv6_skip_exthdr()
251 _frag_off = ntohs(*fp) & ~0x7; in ipv6_find_hdr()
Dtcp_ipv6.c338 &hdr->saddr, ntohs(th->source), in tcp_v6_err()
665 &ip6h->saddr, ntohs(th->source), in tcp_v6_inbound_md5_hash()
666 &ip6h->daddr, ntohs(th->dest)); in tcp_v6_inbound_md5_hash()
868 ntohs(th->source), tcp_v6_iif(skb)); in tcp_v6_send_reset()
959 &ipv6_hdr(skb)->daddr, ntohs(th->dest), in tcp_v6_hnd_req()
1494 ntohs(th->dest), tcp_v6_iif(skb)); in tcp_v6_rcv()
1538 &hdr->daddr, ntohs(th->dest), in tcp_v6_early_demux()
1666 ntohs(inet_rsk(req)->ir_rmt_port), in get_openreq6()
1691 destp = ntohs(inet->inet_dport); in get_tcp6_sock()
1692 srcp = ntohs(inet->inet_sport); in get_tcp6_sock()
[all …]
Dudp.c291 unsigned short hnum = ntohs(dport); in __udp6_lib_lookup()
774 &ipv6_hdr(skb)->saddr, ntohs(udp_hdr(skb)->source), in udp6_csum_zero_error()
775 &ipv6_hdr(skb)->daddr, ntohs(udp_hdr(skb)->dest)); in udp6_csum_zero_error()
789 unsigned short hnum = ntohs(uh->dest); in __udp6_lib_mcast_deliver()
860 ulen = ntohs(uh->len); in __udp6_lib_rcv()
945 saddr, ntohs(uh->source), in __udp6_lib_rcv()
947 daddr, ntohs(uh->dest)); in __udp6_lib_rcv()
1473 __u16 srcp = ntohs(inet->inet_sport); in udp6_seq_show()
1474 __u16 destp = ntohs(inet->inet_dport); in udp6_seq_show()
Dping.c208 __u16 srcp = ntohs(inet->inet_sport); in ping_v6_seq_show()
209 __u16 destp = ntohs(inet->inet_dport); in ping_v6_seq_show()
Dip6_offload.c129 offset += (ntohs(ipv6h->payload_len) - in ipv6_gso_segment()
192 flush += ntohs(iph->payload_len) != skb_gro_len(skb); in ipv6_gro_receive()
/linux-4.1.27/net/ipx/
Dipx_proc.c200 ipxs->node[4], ipxs->node[5], ntohs(ipxs->port)); in ipx_seq_socket_show()
203 ntohs(ipxs->port)); in ipx_seq_socket_show()
213 ntohs(ipxs->dest_addr.sock)); in ipx_seq_socket_show()
Daf_ipx.c455 if (intrfc == ipx_primary_net && ntohs(ipx->ipx_dest.sock) == 0x451) in ipxitf_demux_socket()
470 const int dsock = ntohs(ipx->ipx_dest.sock); in ipxitf_demux_socket()
796 ntohs(ipx->ipx_pktsize) < sizeof(struct ipxhdr) + in ipxitf_pprop()
1092 switch (ntohs(dlink_type)) { in ipxitf_auto_create()
1247 switch (ntohs(frame)) { in ipx_frame_name()
1434 if (ntohs(addr->sipx_port) < IPX_MIN_EPHEMERAL_SOCKET && in __ipx_bind()
1460 ntohs(addr->sipx_port)); in __ipx_bind()
1475 ntohs(addr->sipx_port)); in __ipx_bind()
1488 ntohs((int)addr->sipx_port)); in __ipx_bind()
1651 ipx_pktsize = ntohs(ipx_hdr(skb)->ipx_pktsize); in ipx_rcv()
[all …]
/linux-4.1.27/include/linux/
Ddccp.h95 __u64 seq_nr = ntohs(dh->dccph_seq); in dccp_hdr_seq()
120 return ((u64)ntohs(dhack->dccph_ack_nr_high) << 32) + ntohl(dhack->dccph_ack_nr_low); in dccp_hdr_ack_seq()
Dif_vlan.h431 *vlan_tci = ntohs(veth->h_vlan_TCI); in __vlan_get_tag()
542 if (ntohs(proto) >= ETH_P_802_3_MIN) { in vlan_set_encap_proto()
/linux-4.1.27/arch/nios2/include/asm/
Dchecksum.h63 : "r" (daddr), "r" ((ntohs(len) << 16) + (proto * 256)), in csum_tcpudp_nofold()
/linux-4.1.27/security/
Dlsm_audit.c58 if (ntohs(ih->frag_off) & IP_OFFSET) in ipv4_skb_to_auditdata()
194 audit_log_format(ab, " %s=%d", name2, ntohs(port)); in print_ipv6_addr()
203 audit_log_format(ab, " %s=%d", name2, ntohs(port)); in print_ipv4_addr()
/linux-4.1.27/arch/mn10300/include/asm/
Dchecksum.h48 tmp = (__wsum) ntohs(len) << 16; in csum_tcpudp_nofold()
/linux-4.1.27/Documentation/networking/timestamping/
Dtxtimestamp.c355 udph->source = ntohs(9000); /* random spoof */ in do_test()
356 udph->dest = ntohs(dest_port); in do_test()
357 udph->len = ntohs(sizeof(*udph) + cfg_payload_len); in do_test()
/linux-4.1.27/drivers/infiniband/core/
Diwpm_util.c502 ntohs(sockaddr_v4->sin_port), in iwpm_print_sockaddr()
503 ntohs(sockaddr_v4->sin_port)); in iwpm_print_sockaddr()
509 ntohs(sockaddr_v6->sin6_port), in iwpm_print_sockaddr()
510 ntohs(sockaddr_v6->sin6_port)); in iwpm_print_sockaddr()
/linux-4.1.27/drivers/scsi/fnic/
Dfnic_fcs.c288 op = ntohs(fiph->fip_op); in is_fnic_fip_flogi_reject()
297 rlen = ntohs(fiph->fip_dl_len) * 4; in is_fnic_fip_flogi_reject()
405 ntohs(fiph->fip_op), fiph->fip_subcode); in fnic_fcoe_process_vlan_resp()
407 rlen = ntohs(fiph->fip_dl_len) * 4; in fnic_fcoe_process_vlan_resp()
415 vid = ntohs(((struct fip_vlan_desc *)desc)->fd_vlan); in fnic_fcoe_process_vlan_resp()
540 op = ntohs(fiph->fip_op); in fnic_fcoe_handle_fip_frame()
546 if (ntohs(fiph->fip_dl_len) * FIP_BPW + sizeof(*fiph) > skb->len) in fnic_fcoe_handle_fip_frame()
550 if (fnic_fcoe_vlan_check(fnic, ntohs(fiph->fip_flags))) in fnic_fcoe_handle_fip_frame()
/linux-4.1.27/include/linux/lockd/
Dlockd.h301 if (ntohs(sin->sin_port) > 1023) in __nlm_privileged_request4()
312 if (ntohs(sin6->sin6_port) > 1023) in __nlm_privileged_request6()
/linux-4.1.27/net/sunrpc/
Daddr.c278 port = ntohs(((struct sockaddr_in *)sap)->sin_port); in rpc_sockaddr2uaddr()
283 port = ntohs(((struct sockaddr_in6 *)sap)->sin6_port); in rpc_sockaddr2uaddr()
/linux-4.1.27/net/ieee802154/6lowpan/
Dtx.c157 __func__, ntohs(frag_tag)); in lowpan_xmit_fragmented()
178 __func__, ntohs(frag_tag), skb_offset); in lowpan_xmit_fragmented()
/linux-4.1.27/arch/score/include/asm/
Dchecksum.h133 unsigned long tmp = (ntohs(len) << 16) + proto * 256; in csum_tcpudp_nofold()
/linux-4.1.27/drivers/scsi/cxgbi/cxgb4i/
Dcxgb4i.c225 csk, &req->local_ip, ntohs(req->local_port), in send_act_open_req()
226 &req->peer_ip, ntohs(req->peer_port), in send_act_open_req()
249 csk, &req->local_ip, ntohs(req->local_port), in send_act_open_req()
250 &req->peer_ip, ntohs(req->peer_port), in send_act_open_req()
343 &csk->saddr6.sin6_addr, ntohs(csk->saddr.sin_port), in send_act_open_req6()
344 &csk->daddr6.sin6_addr, ntohs(csk->daddr.sin_port), in send_act_open_req6()
706 unsigned short tcp_opt = ntohs(req->tcp_opt); in do_act_establish()
766 cxgbi_sock_established(csk, ntohl(req->snd_isn), ntohs(req->tcp_opt)); in do_act_establish()
1093 __pskb_trim(skb, ntohs(cpl->len)); in do_rx_iscsi_hdr()
1113 hlen = ntohs(cpl->len); in do_rx_iscsi_hdr()
[all …]
/linux-4.1.27/net/llc/
Dllc_station.c81 data_size = ntohs(eth_hdr(skb)->h_proto) - 3; in llc_station_ac_send_test_r()
Dllc_input.c131 s32 data_size = ntohs(pdulen) - llc_len; in llc_fixup_skb()
Dllc_s_ac.c155 data_size = ntohs(eth_hdr(skb)->h_proto) - 3; in llc_sap_action_send_test_r()
/linux-4.1.27/drivers/net/ethernet/cisco/enic/
Denic_clsf.c38 data.u.ipv4.src_port = ntohs(keys->port16[0]); in enic_addfltr_5t()
39 data.u.ipv4.dst_port = ntohs(keys->port16[1]); in enic_addfltr_5t()
/linux-4.1.27/drivers/infiniband/hw/nes/
Dnes_cm.c280 priv_data_len = ntohs(mpa_frame->priv_data_len); in parse_mpa()
350 rtr_ctrl_ird = ntohs(rtr_msg->ctrl_ird); in parse_mpa()
351 rtr_ctrl_ord = ntohs(rtr_msg->ctrl_ord); in parse_mpa()
606 *port_num = ntohs(in_addr->sin_port); in record_sockaddr_info()
1771 tmp = ntohs(all_options->as_mss.mss); in process_options()
2265 cm_node->tcp_cntxt.snd_wnd = ntohs(tcph->window) << in handle_tcp_options()
2743 nfo.loc_port = ntohs(tcph->dest); in mini_cm_recv_pkt()
2745 nfo.rem_port = ntohs(tcph->source); in mini_cm_recv_pkt()
2749 nfo.mapped_loc_port = ntohs(tcph->dest); in mini_cm_recv_pkt()
2751 nfo.mapped_rem_port = ntohs(tcph->source); in mini_cm_recv_pkt()
[all …]
/linux-4.1.27/net/core/
Dtso.c61 tso->ip_id = ntohs(ip_hdr(skb)->id); in tso_start()
Dnet-procfs.c257 hash = ntohs(pt->type) & PTYPE_HASH_MASK; in ptype_seq_next()
284 seq_printf(seq, "%04x", ntohs(pt->type)); in ptype_seq_show()
/linux-4.1.27/net/l2tp/
Dl2tp_debugfs.c140 ntohs(inet->inet_sport), ntohs(inet->inet_dport)); in l2tp_dfs_seq_tunnel_show()
Dl2tp_core.c677 ns = ntohs(*(__be16 *) ptr); in l2tp_recv_common()
679 nr = ntohs(*(__be16 *) ptr); in l2tp_recv_common()
761 offset = ntohs(*(__be16 *)ptr); in l2tp_recv_common()
880 hdrflags = ntohs(*(__be16 *) ptr); in l2tp_udp_recv_core()
911 tunnel_id = ntohs(*(__be16 *) ptr); in l2tp_udp_recv_core()
913 session_id = ntohs(*(__be16 *) ptr); in l2tp_udp_recv_core()
/linux-4.1.27/drivers/scsi/fcoe/
Dfcoe_ctlr.c717 fip->flogi_oxid = ntohs(fh->fh_ox_id); in fcoe_ctlr_els_send()
911 fcf->flags = ntohs(fiph->fip_flags); in fcoe_ctlr_parse_adv()
919 rlen = ntohs(fiph->fip_dl_len) * 4; in fcoe_ctlr_parse_adv()
969 fcf->vfid = ntohs(fab->fd_vfid); in fcoe_ctlr_parse_adv()
1163 rlen = ntohs(fiph->fip_dl_len) * 4; in fcoe_ctlr_recv_els()
1262 if (fip->flogi_oxid == ntohs(fh->fh_ox_id)) { in fcoe_ctlr_recv_els()
1349 rlen = ntohs(fh->fip_dl_len) * FIP_BPW; in fcoe_ctlr_recv_clr_vlink()
1532 op = ntohs(fiph->fip_op); in fcoe_ctlr_recv_handler()
1537 if (ntohs(fiph->fip_dl_len) * FIP_BPW + sizeof(*fiph) > skb->len) in fcoe_ctlr_recv_handler()
1884 fip->flogi_oxid == ntohs(fh->fh_ox_id)) { in fcoe_ctlr_recv_flogi()
[all …]
/linux-4.1.27/net/openvswitch/
Dflow.c335 if (ntohs(proto) >= ETH_P_802_3_MIN) in parse_ethertype()
352 if (ntohs(llc->ethertype) >= ETH_P_802_3_MIN) in parse_ethertype()
580 if (ntohs(arp->ar_op) <= 0xff) in key_extract()
581 key->ip.proto = ntohs(arp->ar_op); in key_extract()
Dflow_netlink.c819 } else if (ntohs(eth_type) < ETH_P_802_3_MIN) { in ovs_key_from_nlattrs()
821 ntohs(eth_type), ETH_P_802_3_MIN); in ovs_key_from_nlattrs()
908 ntohs(arp_key->arp_op), is_mask); in ovs_key_from_nlattrs()
1156 ntohs(eth_type)); in ovs_nla_get_match()
1166 ntohs(tci)); in ovs_nla_get_match()
1449 icmp_key->icmp_type = ntohs(output->tp.src); in __ovs_nla_put_key()
1450 icmp_key->icmp_code = ntohs(output->tp.dst); in __ovs_nla_put_key()
1460 icmpv6_key->icmpv6_type = ntohs(output->tp.src); in __ovs_nla_put_key()
1461 icmpv6_key->icmpv6_code = ntohs(output->tp.dst); in __ovs_nla_put_key()
/linux-4.1.27/drivers/media/dvb-core/
Ddvb_net.c154 if (ntohs(eth->h_proto) >= ETH_P_802_3_MIN) in dvb_net_eth_type_trans()
197 if(ntohs(hdr->h_proto) < ETH_P_802_3_MIN) { in ule_bridged_sndu()
200 if(framelen != ntohs(hdr->h_proto)) { in ule_bridged_sndu()
246 p->ule_sndu_type = ntohs(*(__be16 *)p->ule_next_hdr); in handle_one_ule_extension()
249 p->ule_sndu_type = ntohs(*(__be16 *)(p->ule_next_hdr + ((p->ule_dbit ? 2 : 3) * ETH_ALEN))); in handle_one_ule_extension()
263 p->ule_sndu_type = ntohs( *(__be16 *)(p->ule_next_hdr-2) ); in handle_one_ule_extension()
/linux-4.1.27/drivers/infiniband/hw/usnic/
Dusnic_transport.c178 *port = ntohs(((struct sockaddr_in *)&sock_addr)->sin_port); in usnic_transport_sock_get_addr()
/linux-4.1.27/security/keys/
Dtrusted.h18 #define LOAD16(buffer, offset) (ntohs(*(uint16_t *)&buffer[offset]))
/linux-4.1.27/drivers/net/wan/
Dhdlc_cisco.c171 switch (ntohs(data->protocol)) { in cisco_rx()
248 netdev_info(dev, "Unsupported protocol %x\n", ntohs(data->protocol)); in cisco_rx()
Dhdlc_ppp.c456 pid = ntohs(hdr->protocol); in ppp_rx()
465 len = ntohs(cp->len); in ppp_rx()
492 pid = ntohs(*(__be16*)skb->data); in ppp_rx()
/linux-4.1.27/drivers/scsi/csiostor/
Dcsio_attr.c92 rport->maxframe_size = ntohs(sp->csp.sp_bb_data); in csio_reg_rnode()
93 if (ntohs(sp->clsp[2].cp_class) & FC_CPC_VALID) in csio_reg_rnode()
195 fc_host_maxframe_size(shost) = ntohs(ln->ln_sparm.csp.sp_bb_data); in csio_fchost_attr_init()
Dcsio_mb.c400 *caps = ntohs(rsp->u.info.pcap); in csio_mb_process_read_port_rsp()
594 iq_params->physiqid = ntohs(rsp->physiqid); in csio_mb_iq_alloc_write_rsp()
595 iq_params->iqid = ntohs(rsp->iqid); in csio_mb_iq_alloc_write_rsp()
596 iq_params->fl0id = ntohs(rsp->fl0id); in csio_mb_iq_alloc_write_rsp()
597 iq_params->fl1id = ntohs(rsp->fl1id); in csio_mb_iq_alloc_write_rsp()
1134 ntohs(dbg->u.prt.dprtstridx)); in csio_mb_dump_fw_dbg()
Dcsio_lnode.c270 if (ntohs(csio_ct_rsp(cmd)) != FC_FS_ACC) { in csio_ln_fdmi_done()
303 if (ntohs(csio_ct_rsp(cmd)) != FC_FS_ACC) { in csio_ln_fdmi_rhba_cbfn()
411 if (ntohs(csio_ct_rsp(cmd)) != FC_FS_ACC) { in csio_ln_fdmi_dprt_cbfn()
512 if (ntohs(csio_ct_rsp(cmd)) != FC_FS_ACC) { in csio_ln_fdmi_dhba_cbfn()
784 ntohs(rsp->priority_pkd)); in csio_ln_read_fcf_cbfn()
785 fcf_info->vf_id = ntohs(rsp->vf_id); in csio_ln_read_fcf_cbfn()
787 fcf_info->max_fcoe_size = ntohs(rsp->max_fcoe_size); in csio_ln_read_fcf_cbfn()
/linux-4.1.27/drivers/net/ipvlan/
Dipvlan_core.c147 pktlen = ntohs(ip4h->tot_len); in ipvlan_get_L3_hdr()
421 ntohs(skb->protocol)); in ipvlan_process_outbound()
442 ntohs(skb->protocol)); in ipvlan_process_outbound()
/linux-4.1.27/drivers/net/
Dvxlan.c244 return &vn->sock_list[hash_32(ntohs(port), PORT_HASH_BITS)]; in vs_head()
1212 md.gbp = ntohs(gbp->policy_id); in vxlan_udp_encap_recv()
1587 switch (ntohs(eth_hdr(skb)->h_proto)) { in route_shortcircuit()
2060 if (ntohs(eth->h_proto) == ETH_P_ARP) in vxlan_xmit()
2063 else if (ntohs(eth->h_proto) == ETH_P_IPV6 && in vxlan_xmit()
2082 (ntohs(eth->h_proto) == ETH_P_IP || in vxlan_xmit()
2083 ntohs(eth->h_proto) == ETH_P_IPV6)) { in vxlan_xmit()
2443 if (ntohs(p->high) < ntohs(p->low)) { in vxlan_validate()
2445 ntohs(p->low), ntohs(p->high)); in vxlan_validate()
2522 pr_info("Cannot bind port %d, err=%ld\n", ntohs(port), in vxlan_socket_create()
[all …]
/linux-4.1.27/arch/x86/net/
Dbpf_jit.S57 rol $8,%ax # ntohs()
/linux-4.1.27/drivers/net/ethernet/intel/ixgbe/
Dixgbe_82599.c1635 u32 mask = ntohs(input_mask->formatted.dst_port); in ixgbe_get_fdirtcpm_82599()
1638 mask |= ntohs(input_mask->formatted.src_port); in ixgbe_get_fdirtcpm_82599()
1660 ntohs(((u16)(_value) >> 8) | ((u16)(_value) << 8))
1709 switch (ntohs(input_mask->formatted.vlan_id) & 0xEFFF) { in ixgbe_fdir_set_input_mask_82599()
1779 fdirport = ntohs(input->formatted.dst_port); in ixgbe_fdir_write_perfect_filter_82599()
1781 fdirport |= ntohs(input->formatted.src_port); in ixgbe_fdir_write_perfect_filter_82599()
1787 fdirvlan |= ntohs(input->formatted.vlan_id); in ixgbe_fdir_write_perfect_filter_82599()
/linux-4.1.27/drivers/isdn/i4l/
Disdn_net.c197 u_short proto = ntohs(skb->protocol); in isdn_net_unreachable()
881 unsigned short proto = ntohs(skb->protocol); in isdn_net_log_skb()
897 proto = ntohs(*(__be16 *)&buf[0]); in isdn_net_log_skb()
901 proto = ntohs(*(__be16 *)&buf[12]); in isdn_net_log_skb()
905 proto = ntohs(*(__be16 *)&buf[2]); in isdn_net_log_skb()
910 proto = ntohs(skb->protocol); in isdn_net_log_skb()
931 sprintf(addinfo, " TCP, port: %d -> %d", ntohs(ipp->source), in isdn_net_log_skb()
932 ntohs(ipp->dest)); in isdn_net_log_skb()
942 sprintf(addinfo, " UDP, port: %d -> %d", ntohs(ipp->source), in isdn_net_log_skb()
943 ntohs(ipp->dest)); in isdn_net_log_skb()
[all …]
/linux-4.1.27/drivers/net/ethernet/sfc/
Drx.c924 spec.rem_host, ntohs(ports[0]), spec.loc_host, in efx_filter_rfs()
925 ntohs(ports[1]), rxq_index, flow_id, rc); in efx_filter_rfs()
930 spec.rem_host, ntohs(ports[0]), spec.loc_host, in efx_filter_rfs()
931 ntohs(ports[1]), rxq_index, flow_id, rc); in efx_filter_rfs()
Dselftest.c334 "%s loopback test\n", ntohs(received->iteration), in efx_loopback_rx_packet()
335 ntohs(payload->iteration), LOOPBACK_MODE(efx)); in efx_loopback_rx_packet()
387 payload->iteration = htons(ntohs(payload->iteration) + 1); in efx_iterate_state()
/linux-4.1.27/fs/ocfs2/cluster/
Dtcp.c79 ntohs(sc->sc_node->nd_ipv4_port)
1897 ntohs(sin.sin_port)); in o2net_accept_one()
1910 ntohs(local_node->nd_ipv4_port), in o2net_accept_one()
1913 ntohs(sin.sin_port)); in o2net_accept_one()
1924 ntohs(sin.sin_port)); in o2net_accept_one()
1941 ntohs(sin.sin_port)); in o2net_accept_one()
2077 "%pI4:%u\n", ret, &addr, ntohs(port)); in o2net_open_listening_sock()
2084 ret, &addr, ntohs(port)); in o2net_open_listening_sock()
Dnetdebug.c353 &saddr, inet ? ntohs(sport) : 0, in sc_show_sock_container()
354 &daddr, inet ? ntohs(dport) : 0, in sc_show_sock_container()
/linux-4.1.27/net/bridge/
Dbr_multicast.c982 num = ntohs(ih->ngrec); in br_ip4_multicast_igmp3_report()
994 len += ntohs(grec->grec_nsrcs) * 4; in br_ip4_multicast_igmp3_report()
1037 num = ntohs(icmp6h->icmp6_dataun.un_data16[1]); in br_ip6_multicast_mld2_report()
1052 sizeof(struct in6_addr) * ntohs(*nsrcs))) in br_ip6_multicast_mld2_report()
1057 sizeof(struct in6_addr) * ntohs(*nsrcs); in br_ip6_multicast_mld2_report()
1343 max_delay = msecs_to_jiffies(ntohs(mld->mld_maxdelay)); in br_ip6_multicast_query()
1589 len = ntohs(iph->tot_len); in br_multicast_ipv4_rcv()
1690 len = ntohs(ip6h->payload_len) + sizeof(*ip6h); in br_multicast_ipv6_rcv()

123