/linux/net/ipv6/netfilter/ |
H A D | ip6t_frag.c | 57 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 D | nhc_udp.c | 71 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 D | nf_log_syslog.c | 57 nf_log_buf_add(m, "VPROTO=%04x VID=%u ", ntohs(skb->vlan_proto), vid); in nf_log_dump_vlan() 86 ntohs(eth_hdr(skb)->h_proto)); in dump_arp_packet() 90 ntohs(ah->ar_hrd), ntohs(ah->ar_pro), ntohs(ah->ar_op)); in dump_arp_packet() 207 ntohs(th->source), ntohs(th->dest)); in nf_log_dump_tcp_header() 215 nf_log_buf_add(m, "WINDOW=%u ", ntohs(th->window)); in nf_log_dump_tcp_header() 237 nf_log_buf_add(m, "URGP=%u ", ntohs(th->urg_ptr)); in nf_log_dump_tcp_header() 291 ntohs(uh->source), ntohs(uh->dest), ntohs(uh->len)); in nf_log_dump_udp_header() 327 ih->tos & IPTOS_PREC_MASK, ih->ttl, ntohs(ih->id)); in dump_ipv4_packet() 330 if (ntohs(ih->frag_off) & IP_CE) in dump_ipv4_packet() 332 if (ntohs(ih->frag_off) & IP_DF) in dump_ipv4_packet() [all …]
|
H A D | nf_conntrack_pptp.c | 264 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 D | xt_sctp.c | 71 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 D | nfnetlink_osf.c | 110 mss = ntohs((__force __be16)mss); in nf_osf_match_one() 180 ctx->totlen = ntohs(ip->tot_len); in nf_osf_hdr_ctx_init() 181 ctx->df = ntohs(ip->frag_off) & IP_DF; in nf_osf_hdr_ctx_init() 182 ctx->window = ntohs(tcp->window); in nf_osf_hdr_ctx_init() 239 &ip->saddr, ntohs(tcp->source), in nf_osf_match() 240 &ip->daddr, ntohs(tcp->dest), in nf_osf_match() 251 &ip->saddr, ntohs(tcp->source), in nf_osf_match() 252 &ip->daddr, ntohs(tcp->dest)); in nf_osf_match()
|
H A D | nf_nat_core.c | 423 return ntohs(tuple->src.u.icmp.id) >= ntohs(min->icmp.id) && in l4proto_in_range() 424 ntohs(tuple->src.u.icmp.id) <= ntohs(max->icmp.id); in l4proto_in_range() 436 return ntohs(port) >= ntohs(min->all) && in l4proto_in_range() 437 ntohs(port) <= ntohs(max->all); in l4proto_in_range() 599 min = ntohs(range->min_proto.icmp.id); in nf_nat_l4proto_unique_tuple() 600 range_size = ntohs(range->max_proto.icmp.id) - in nf_nat_l4proto_unique_tuple() 601 ntohs(range->min_proto.icmp.id) + 1; in nf_nat_l4proto_unique_tuple() 620 min = ntohs(range->min_proto.gre.key); in nf_nat_l4proto_unique_tuple() 621 range_size = ntohs(range->max_proto.gre.key) - min + 1; in nf_nat_l4proto_unique_tuple() 646 if (ntohs(*keyptr) < 1024) { in nf_nat_l4proto_unique_tuple() [all …]
|
H A D | xt_dccp.c | 111 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 D | nf_nat_h323.c | 160 &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 …]
|
/linux/net/appletalk/ |
H A D | atalk_proc.c | 71 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 D | ddp.c | 258 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/netfilter/ipvs/ |
H A D | ip_vs_ftp.c | 289 &from.ip, ntohs(port), &cp->caddr.ip, 0); in ip_vs_ftp_out() 310 IP_VS_DBG_ADDR(cp->af, &from), ntohs(port), in ip_vs_ftp_out() 351 ntohs(port) >> 8, in ip_vs_ftp_out() 352 ntohs(port) & 0xFF); in ip_vs_ftp_out() 358 ntohs(port)); in ip_vs_ftp_out() 499 IP_VS_DBG(7, "PORT %pI4:%u detected\n", &to.ip, ntohs(port)); in ip_vs_ftp_in() 504 &to.ip, ntohs(port), &cp->vaddr.ip, in ip_vs_ftp_in() 505 ntohs(cp->vport)-1); in ip_vs_ftp_in() 514 IP_VS_DBG_ADDR(cp->af, &to), ntohs(port)); in ip_vs_ftp_in() 519 IP_VS_DBG_ADDR(cp->af, &to), ntohs(port), in ip_vs_ftp_in() [all …]
|
H A D | ip_vs_conn.c | 306 IP_VS_DBG_ADDR(p->af, p->caddr), ntohs(p->cport), in ip_vs_conn_in_get() 307 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_conn_in_get() 390 IP_VS_DBG_ADDR(p->af, p->caddr), ntohs(p->cport), in ip_vs_ct_in_get() 391 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_ct_in_get() 444 IP_VS_DBG_ADDR(p->af, p->caddr), ntohs(p->cport), in ip_vs_conn_out_get() 445 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_conn_out_get() 618 IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), in ip_vs_bind_dest() 619 IP_VS_DBG_ADDR(cp->af, &cp->vaddr), ntohs(cp->vport), in ip_vs_bind_dest() 620 IP_VS_DBG_ADDR(cp->daf, &cp->daddr), ntohs(cp->dport), in ip_vs_bind_dest() 715 IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), in ip_vs_unbind_dest() [all …]
|
/linux/net/hsr/ |
H A D | hsr_main.h | 66 htons((ntohs(ht->path_and_LSDU_size) & 0x0FFF) | (path << 12)); in set_hsr_tag_path() 71 ht->path_and_LSDU_size = htons((ntohs(ht->path_and_LSDU_size) & in set_hsr_tag_LSDU_size() 147 return ntohs(rct->lan_id_and_LSDU_size) & 0x0FFF; in get_prp_LSDU_size() 152 rct->lan_id_and_LSDU_size = htons((ntohs(rct->lan_id_and_LSDU_size) & in set_prp_lan_id() 157 rct->lan_id_and_LSDU_size = htons((ntohs(rct->lan_id_and_LSDU_size) & in set_prp_LSDU_size() 240 return ntohs(hsr_ethhdr->hsr_tag.sequence_nr); in hsr_get_skb_sequence_nr() 258 return ntohs(rct->sequence_nr); in prp_get_skb_sequence_nr()
|
/linux/drivers/net/slip/ |
H A D | slhc.c | 255 if (ip->protocol != IPPROTO_TCP || (ntohs(ip->frag_off) & 0x3fff)) { in slhc_compress() 370 deltaS = ntohs(th->urg_ptr); in slhc_compress() 380 if((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){ in slhc_compress() 406 ntohs(cs->cs_ip.tot_len) == hlen) in slhc_compress() 417 deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ in slhc_compress() 424 if(deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ in slhc_compress() 431 deltaS = ntohs(ip->id) - ntohs(cs->cs_ip.id); in slhc_compress() 553 i = ntohs(ip->tot_len) - hdrlen; in slhc_uncompress() 561 ntohs(ip->tot_len) - hdrlen); in slhc_uncompress() 577 thp->window = htons( ntohs(thp->window) + x); in slhc_uncompress() [all …]
|
/linux/net/sctp/ |
H A D | sm_make_chunk.c | 288 chunksize += SCTP_PAD4(ntohs(auth_hmacs->length)); in sctp_make_init() 295 chunksize += SCTP_PAD4(ntohs(auth_chunks->length)); in sctp_make_init() 368 sctp_addto_chunk(retval, ntohs(auth_hmacs->length), in sctp_make_init() 371 sctp_addto_chunk(retval, ntohs(auth_chunks->length), in sctp_make_init() 450 chunksize += ntohs(auth_random->length); in sctp_make_init_ack() 454 chunksize += SCTP_PAD4(ntohs(auth_hmacs->length)); in sctp_make_init_ack() 460 chunksize += SCTP_PAD4(ntohs(auth_chunks->length)); in sctp_make_init_ack() 513 sctp_addto_chunk(retval, ntohs(auth_random->length), in sctp_make_init_ack() 516 sctp_addto_chunk(retval, ntohs(auth_hmacs->length), in sctp_make_init_ack() 519 sctp_addto_chunk(retval, ntohs(auth_chunks->length), in sctp_make_init_ack() [all …]
|
/linux/net/bridge/netfilter/ |
H A D | ebt_log.c | 69 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 D | ebt_vlan.c | 47 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 D | ife.c | 76 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 D | nsh.h | 262 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/include/trace/events/ |
H A D | tcp.h | 49 __entry->sport = ntohs(inet->inet_sport); 50 __entry->dport = ntohs(inet->inet_dport); 171 __entry->sport = ntohs(inet->inet_sport); 172 __entry->dport = ntohs(inet->inet_dport); 242 __entry->dport = ntohs(ireq->ir_rmt_port); 302 __entry->sport = ntohs(inet->inet_sport); 303 __entry->dport = ntohs(inet->inet_dport); 390 __entry->sport = ntohs(inet->inet_sport); 391 __entry->dport = ntohs(inet->inet_dport); 456 __entry->sport = ntohs(th->source); [all …]
|
/linux/tools/testing/selftests/net/tcp_ao/ |
H A D | seq-ext.c | 110 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 D | smc_clc.h | 339 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/dsa/ |
H A D | tag_rtl8_4.c | 162 etype = ntohs(tag16[0]); in rtl8_4_read_tag() 170 proto = FIELD_GET(RTL8_4_PROTOCOL, ntohs(tag16[1])); in rtl8_4_read_tag() 179 reason = FIELD_GET(RTL8_4_REASON, ntohs(tag16[1])); in rtl8_4_read_tag() 182 port = FIELD_GET(RTL8_4_TX, ntohs(tag16[3])); in rtl8_4_read_tag()
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | connect_force_port.c | 24 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()
|