Home
last modified time | relevance | path

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

12345678910>>...19

/linux/net/ipv6/netfilter/
H A Dip6t_frag.c57 pr_debug("OFFSET %04X ", ntohs(fh->frag_off) & ~0x7); in frag_mt6()
58 pr_debug("RES %02X %04X", fh->reserved, ntohs(fh->frag_off) & 0x6); in frag_mt6()
69 ntohs(fh->frag_off) & 0x6, in frag_mt6()
71 (fh->reserved || (ntohs(fh->frag_off) & 0x06)))); in frag_mt6()
74 ntohs(fh->frag_off) & ~0x7, in frag_mt6()
76 (ntohs(fh->frag_off) & ~0x7))); in frag_mt6()
79 ntohs(fh->frag_off) & IP6_MF, in frag_mt6()
81 !((ntohs(fh->frag_off) & IP6_MF)))); in frag_mt6()
84 ntohs(fh->frag_off) & IP6_MF, in frag_mt6()
86 (ntohs(fh->frag_off) & IP6_MF))); in frag_mt6()
[all …]
/linux/net/6lowpan/
H A Dnhc_udp.c71 ntohs(uh.source), ntohs(uh.dest)); in udp_uncompress()
100 pr_debug("uncompressed UDP length: src = %d", ntohs(uh.len)); in udp_uncompress()
120 if (((ntohs(uh->source) & LOWPAN_NHC_UDP_4BIT_MASK) == in udp_compress()
122 ((ntohs(uh->dest) & LOWPAN_NHC_UDP_4BIT_MASK) == in udp_compress()
129 tmp = ntohs(uh->dest) - LOWPAN_NHC_UDP_4BIT_PORT + in udp_compress()
130 ((ntohs(uh->source) - LOWPAN_NHC_UDP_4BIT_PORT) << 4); in udp_compress()
132 } else if ((ntohs(uh->dest) & LOWPAN_NHC_UDP_8BIT_MASK) == in udp_compress()
141 tmp = ntohs(uh->dest) - LOWPAN_NHC_UDP_8BIT_PORT; in udp_compress()
143 } else if ((ntohs(uh->source) & LOWPAN_NHC_UDP_8BIT_MASK) == in udp_compress()
150 tmp = ntohs(uh->source) - LOWPAN_NHC_UDP_8BIT_PORT; in udp_compress()
/linux/net/netfilter/
H A Dnf_conntrack_pptp.c264 msg = ntohs(ctlh->messageType); in pptp_inbound_pkt()
301 ntohs(cid), ntohs(pcid)); in pptp_inbound_pkt()
317 pr_debug("%s, CID=%X\n", pptp_msg_name(msg), ntohs(cid)); in pptp_inbound_pkt()
336 pr_debug("%s, PCID=%X\n", pptp_msg_name(msg), ntohs(pcid)); in pptp_inbound_pkt()
346 pr_debug("%s, CID=%X\n", pptp_msg_name(msg), ntohs(cid)); in pptp_inbound_pkt()
373 msg, ntohs(cid), ntohs(pcid), info->cstate, info->sstate, in pptp_inbound_pkt()
374 ntohs(info->pns_call_id), ntohs(info->pac_call_id)); in pptp_inbound_pkt()
391 msg = ntohs(ctlh->messageType); in pptp_outbound_pkt()
414 pr_debug("%s, CID=%X\n", pptp_msg_name(msg), ntohs(cid)); in pptp_outbound_pkt()
429 ntohs(cid), ntohs(pcid)); in pptp_outbound_pkt()
[all …]
H A Dxt_sctp.c71 offset += SCTP_PAD4(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()
H A Dnfnetlink_osf.c102 mss = ntohs((__force __be16)mss); in nf_osf_match_one()
169 ctx->totlen = ntohs(ip->tot_len); in nf_osf_hdr_ctx_init()
170 ctx->df = ntohs(ip->frag_off) & IP_DF; in nf_osf_hdr_ctx_init()
171 ctx->window = ntohs(tcp->window); in nf_osf_hdr_ctx_init()
228 &ip->saddr, ntohs(tcp->source), in nf_osf_match()
229 &ip->daddr, ntohs(tcp->dest), in nf_osf_match()
240 &ip->saddr, ntohs(tcp->source), in nf_osf_match()
241 &ip->daddr, ntohs(tcp->dest)); in nf_osf_match()
H A Dxt_dccp.c111 return DCCHECK(ntohs(dh->dccph_sport) >= info->spts[0] in dccp_mt()
112 && ntohs(dh->dccph_sport) <= info->spts[1], in dccp_mt()
114 && DCCHECK(ntohs(dh->dccph_dport) >= info->dpts[0] in dccp_mt()
115 && ntohs(dh->dccph_dport) <= info->dpts[1], in dccp_mt()
/linux/net/ipv4/netfilter/
H A Dnf_nat_h323.c160 &addr.ip, ntohs(port), in set_ras_addr()
162 ntohs(ct->tuplehash[!dir].tuple.dst.u.udp.port)); in set_ras_addr()
204 htons(ntohs(info->rtp_port[i][dir]) + 1); in nat_rtp_rtcp()
219 for (nated_port = ntohs(rtp_exp->tuple.dst.u.udp.port); in nat_rtp_rtcp()
267 ntohs(rtp_exp->tuple.src.u.udp.port), in nat_rtp_rtcp()
269 ntohs(rtp_exp->tuple.dst.u.udp.port)); in nat_rtp_rtcp()
272 ntohs(rtcp_exp->tuple.src.u.udp.port), in nat_rtp_rtcp()
274 ntohs(rtcp_exp->tuple.dst.u.udp.port)); in nat_rtp_rtcp()
287 u_int16_t nated_port = ntohs(port); in nat_t120()
310 ntohs(exp->tuple.src.u.tcp.port), in nat_t120()
[all …]
H A Dnf_nat_pptp.c143 switch (msg = ntohs(ctlh->messageType)) { in pptp_outbound_pkt()
186 ntohs(REQ_CID(pptpReq, cid_off)), ntohs(new_callid)); in pptp_outbound_pkt()
250 switch (msg = ntohs(ctlh->messageType)) { in pptp_inbound_pkt()
287 ntohs(REQ_CID(pptpReq, pcid_off)), ntohs(new_pcid)); in pptp_inbound_pkt()
/linux/net/appletalk/
H A Datalk_proc.c71 iface->dev->name, ntohs(iface->address.s_net), in atalk_seq_interface_show()
72 iface->address.s_node, ntohs(iface->nets.nr_firstnet), in atalk_seq_interface_show()
73 ntohs(iface->nets.nr_lastnet), iface->status); in atalk_seq_interface_show()
132 ntohs(rt->gateway.s_net), rt->gateway.s_node, in atalk_seq_route_show()
138 ntohs(rt->target.s_net), rt->target.s_node, in atalk_seq_route_show()
139 ntohs(rt->gateway.s_net), rt->gateway.s_node, in atalk_seq_route_show()
179 s->sk_type, ntohs(at->src_net), at->src_node, at->src_port, in atalk_seq_socket_show()
180 ntohs(at->dest_net), at->dest_node, at->dest_port, in atalk_seq_socket_show()
H A Dddp.c258 int netrange = ntohs(atif->nets.nr_lastnet) - in atif_probe_device()
259 ntohs(atif->nets.nr_firstnet) + 1; in atif_probe_device()
260 int probe_net = ntohs(atif->address.s_net); in atif_probe_device()
266 probe_net = ntohs(atif->nets.nr_firstnet); in atif_probe_device()
293 if (probe_net > ntohs(atif->nets.nr_lastnet)) in atif_probe_device()
294 probe_net = ntohs(atif->nets.nr_firstnet); in atif_probe_device()
306 int netrange = ntohs(atif->nets.nr_lastnet) - in atif_proxy_probe_device()
307 ntohs(atif->nets.nr_firstnet) + 1; in atif_proxy_probe_device()
309 int probe_net = ntohs(atif->address.s_net); in atif_proxy_probe_device()
315 probe_net = ntohs(atif->nets.nr_firstnet); in atif_proxy_probe_device()
[all …]
/linux/net/bridge/netfilter/
H A Debt_log.c69 pr_cont(" SPT=%u DPT=%u", ntohs(pptr->src), ntohs(pptr->dst)); in print_ports()
90 ntohs(eth_hdr(skb)->h_proto)); in ebt_log_packet()
150 ntohs(ah->ar_hrd), ntohs(ah->ar_pro), in ebt_log_packet()
151 ntohs(ah->ar_op)); in ebt_log_packet()
H A Debt_vlan.c47 TCI = ntohs(fp->h_vlan_TCI); in ebt_vlan_mt()
85 ntohs(e->ethproto)); in ebt_vlan_mt_check()
141 if ((unsigned short) ntohs(info->encap) < ETH_ZLEN) { in ebt_vlan_mt_check()
143 "minimal\n", ntohs(info->encap)); in ebt_vlan_mt_check()
/linux/net/ife/
H A Dife.c76 ifehdrln = ntohs(ifehdr->metalen); in ife_decode()
109 tlvlen = ntohs(tlv->len); in __ife_tlv_meta_valid()
136 *dlen = ntohs(tlv->len) - NLA_HDRLEN; in ife_tlv_meta_decode()
137 *attrtype = ntohs(tlv->type); in ife_tlv_meta_decode()
149 u16 tlvlen = ntohs(tlv->len); in ife_tlv_meta_next()
/linux/include/net/
H A Dnsh.h262 return ((ntohs(nsh->ver_flags_ttl_len) & NSH_LEN_MASK) in nsh_hdr_len()
268 return (ntohs(nsh->ver_flags_ttl_len) & NSH_VER_MASK) in nsh_get_ver()
274 return (ntohs(nsh->ver_flags_ttl_len) & NSH_FLAGS_MASK) in nsh_get_flags()
280 return (ntohs(nsh->ver_flags_ttl_len) & NSH_TTL_MASK) in nsh_get_ttl()
/linux/tools/testing/selftests/net/tcp_ao/
H A Dseq-ext.c110 saddr.sin6_port = htons(ntohs(saddr.sin6_port) + 1); in server_fn()
112 saddr.sin_port = htons(ntohs(saddr.sin_port) + 1); in server_fn()
207 client_new_port = ntohs(saddr.sin6_port) + 1; in client_fn()
208 saddr.sin6_port = htons(ntohs(saddr.sin6_port) + 1); in client_fn()
210 client_new_port = ntohs(saddr.sin_port) + 1; in client_fn()
211 saddr.sin_port = htons(ntohs(saddr.sin_port) + 1); in client_fn()
/linux/net/smc/
H A Dsmc_clc.h339 u16 offset = ntohs(pclc->iparea_offset); in smc_clc_proposal_get_prefix()
373 ntohs(prop->iparea_offset) != sizeof(struct smc_clc_msg_smcd)) in smc_get_clc_msg_smcd()
389 if (!prop_smcd || !ntohs(prop_smcd->v2_ext_offset) || in smc_get_clc_v2_ext()
390 ntohs(prop_smcd->v2_ext_offset) > max_offset) in smc_get_clc_v2_ext()
397 ntohs(prop_smcd->v2_ext_offset)); in smc_get_clc_v2_ext()
410 if (!ntohs(prop_v2ext->hdr.smcd_v2_ext_offset) || in smc_get_clc_smcd_v2_ext()
411 ntohs(prop_v2ext->hdr.smcd_v2_ext_offset) > max_offset) in smc_get_clc_smcd_v2_ext()
419 ntohs(prop_v2ext->hdr.smcd_v2_ext_offset)); in smc_get_clc_smcd_v2_ext()
/linux/net/sctp/
H A Dauth.c196 random_len = ntohs(random->param_hdr.length); in sctp_auth_make_key_vector()
197 hmacs_len = ntohs(hmacs->param_hdr.length); in sctp_auth_make_key_vector()
199 chunks_len = ntohs(chunks->param_hdr.length); in sctp_auth_make_key_vector()
475 n_elt = (ntohs(hmacs->param_hdr.length) - in sctp_auth_asoc_get_hmac()
478 id = ntohs(hmacs->hmac_ids[i]); in sctp_auth_asoc_get_hmac()
511 n_elt = (ntohs(hmacs->param_hdr.length) - in sctp_auth_asoc_verify_hmac_id()
534 n_params = (ntohs(hmacs->param_hdr.length) - in sctp_auth_asoc_set_default_hmac()
537 id = ntohs(hmacs->hmac_ids[i]); in sctp_auth_asoc_set_default_hmac()
556 len = ntohs(param->param_hdr.length) - sizeof(struct sctp_paramhdr); in __sctp_auth_cid()
630 key_id = ntohs(auth->auth_hdr.shkey_id); in sctp_auth_calculate_hmac()
[all …]
H A Dstream.c255 __u16 sid = ntohs(str_list[i]); in sctp_stream_outq_is_empty()
554 nums = (ntohs(param.p->length) - sizeof(*outreq)) / sizeof(__u16); in sctp_process_strreset_outreq()
557 if (ntohs(str_p[i]) >= stream->incnt) { in sctp_process_strreset_outreq()
589 SCTP_SI(stream, ntohs(str_p[i]))->mid = 0; in sctp_process_strreset_outreq()
640 nums = (ntohs(param.p->length) - sizeof(*inreq)) / sizeof(__u16); in sctp_process_strreset_inreq()
643 if (ntohs(str_p[i]) >= stream->outcnt) { in sctp_process_strreset_inreq()
661 SCTP_SO(stream, ntohs(str_p[i]))->state = in sctp_process_strreset_inreq()
805 in = ntohs(addstrm->number_of_streams); in sctp_process_strreset_addstrm_out()
841 0, ntohs(addstrm->number_of_streams), 0, GFP_ATOMIC); in sctp_process_strreset_addstrm_out()
884 out = ntohs(addstrm->number_of_streams); in sctp_process_strreset_addstrm_in()
[all …]
/linux/include/trace/events/
H A Dicmp.h45 __entry->sport = ntohs(uh->source);
46 __entry->dport = ntohs(uh->dest);
47 __entry->ulen = ntohs(uh->len);
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dconnect_force_port.c24 if (ntohs(port) != expected_local) { in verify_ports()
25 log_err("Unexpected local port %d, expected %d", ntohs(port), in verify_ports()
40 if (ntohs(port) != expected_peer) { in verify_ports()
41 log_err("Unexpected peer port %d, expected %d", ntohs(port), in verify_ports()
80 *port_ptr = ntohs(get_socket_local_port(server_fd)); in run_test()
/linux/drivers/net/ethernet/chelsio/libcxgb/
H A Dlibcxgb_cm.c60 ntohs(tcp->source), ntohs(tcp->dest)); in cxgb_get_4tuple()
67 ntohs(tcp->source), ntohs(tcp->dest)); in cxgb_get_4tuple()
/linux/net/netfilter/ipvs/
H A Dip_vs_nfct.c55 ntohs((T)->src.u.all), \
57 ntohs((T)->dst.u.all), \
62 ntohs((C)->cport), \
64 ntohs((C)->vport), \
66 ntohs((C)->dport), \
/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum_flower.c433 ntohs(match.key->dst), in mlxsw_sp_flower_parse_ports()
434 ntohs(match.mask->dst)); in mlxsw_sp_flower_parse_ports()
436 ntohs(match.key->src), in mlxsw_sp_flower_parse_ports()
437 ntohs(match.mask->src)); in mlxsw_sp_flower_parse_ports()
462 .min = ntohs(match.key->tp_min.src), in mlxsw_sp_flower_parse_ports_range()
463 .max = ntohs(match.key->tp_max.src), in mlxsw_sp_flower_parse_ports_range()
481 .min = ntohs(match.key->tp_min.dst), in mlxsw_sp_flower_parse_ports_range()
482 .max = ntohs(match.key->tp_max.dst), in mlxsw_sp_flower_parse_ports_range()
529 ntohs(match.key->flags), in mlxsw_sp_flower_parse_tcp()
530 ntohs(match.mask->flags)); in mlxsw_sp_flower_parse_tcp()
[all …]
/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_flower.c245 if (ntohs(match.key->n_proto) == ETH_P_ALL) { in prestera_flower_parse()
324 tp_key = htonl(ntohs(match.key->tp_min.src) | in prestera_flower_parse()
325 (ntohs(match.key->tp_max.src) << 16)); in prestera_flower_parse()
326 tp_mask = htonl(ntohs(match.mask->tp_min.src) | in prestera_flower_parse()
327 (ntohs(match.mask->tp_max.src) << 16)); in prestera_flower_parse()
332 tp_key = htonl(ntohs(match.key->tp_min.dst) | in prestera_flower_parse()
333 (ntohs(match.key->tp_max.dst) << 16)); in prestera_flower_parse()
334 tp_mask = htonl(ntohs(match.mask->tp_min.dst) | in prestera_flower_parse()
335 (ntohs(match.mask->tp_max.dst) << 16)); in prestera_flower_parse()
/linux/net/sched/
H A Dact_csum.c277 ul = ntohs(udph->len); in tcf_csum_ipv4_udp()
333 ul = ntohs(udph->len); in tcf_csum_ipv6_udp()
401 ntohs(iph->tot_len))) in tcf_csum_ipv4()
407 ntohs(iph->tot_len))) in tcf_csum_ipv4()
413 ntohs(iph->tot_len))) in tcf_csum_ipv4()
419 ntohs(iph->tot_len), 0)) in tcf_csum_ipv4()
425 ntohs(iph->tot_len), 1)) in tcf_csum_ipv4()
430 !tcf_csum_sctp(skb, iph->ihl * 4, ntohs(iph->tot_len))) in tcf_csum_ipv4()
502 pl = ntohs(ip6h->payload_len); in tcf_csum_ipv6()

12345678910>>...19