| /linux/net/ipv6/netfilter/ |
| H A D | ip6t_frag.c | 55 (fh->reserved || (ntohs(fh->frag_off) & 0x6))) && in frag_mt6() 57 (ntohs(fh->frag_off) & ~0x7)) && in frag_mt6() 59 !(ntohs(fh->frag_off) & IP6_MF)) && in frag_mt6() 61 (ntohs(fh->frag_off) & IP6_MF)); in frag_mt6()
|
| /linux/net/6lowpan/ |
| H A D | nhc_udp.c | 71 ntohs(uh.source), ntohs(uh.dest)); 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_conntrack_pptp.c | 204 msg = ntohs(ctlh->messageType); in pptp_inbound_pkt() 241 ntohs(cid), ntohs(pcid)); in pptp_inbound_pkt() 257 pr_debug("%s, CID=%X\n", pptp_msg_name(msg), ntohs(cid)); in pptp_inbound_pkt() 276 pr_debug("%s, PCID=%X\n", pptp_msg_name(msg), ntohs(pcid)); in pptp_inbound_pkt() 286 pr_debug("%s, CID=%X\n", pptp_msg_name(msg), ntohs(cid)); in pptp_inbound_pkt() 313 msg, ntohs(cid), ntohs(pcid), info->cstate, info->sstate, in pptp_inbound_pkt() 314 ntohs(info->pns_call_id), ntohs(info->pac_call_id)); in pptp_inbound_pkt() 334 msg = ntohs(ctlh->messageType); in pptp_outbound_pkt() 357 pr_debug("%s, CID=%X\n", pptp_msg_name(msg), ntohs(cid)); in pptp_outbound_pkt() 372 ntohs(cid), ntohs(pcid)); in pptp_outbound_pkt() [all …]
|
| 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() 89 ntohs(eth_hdr(skb)->h_proto)); in dump_arp_packet() 93 ntohs(ah->ar_hrd), ntohs(ah->ar_pro), ntohs(ah->ar_op)); in dump_arp_packet() 218 ntohs(th->source), ntohs(th->dest)); in nf_log_dump_tcp_header() 226 nf_log_buf_add(m, "WINDOW=%u ", ntohs(th->window)); in nf_log_dump_tcp_header() 250 nf_log_buf_add(m, "URGP=%u ", ntohs(th->urg_ptr)); in nf_log_dump_tcp_header() 304 ntohs(uh->source), ntohs(uh->dest), udp_get_len_short(uh)); in nf_log_dump_udp_header() 340 ih->tos & IPTOS_PREC_MASK, ih->ttl, ntohs(ih->id)); in dump_ipv4_packet() 343 if (ntohs(ih->frag_off) & IP_CE) in dump_ipv4_packet() 345 if (ntohs(ih->frag_off) & IP_DF) in dump_ipv4_packet() [all …]
|
| H A D | xt_sctp.c | 60 offset += SCTP_PAD4(ntohs(sch->length)); in match_packet() 120 return SCCHECK(ntohs(sh->source) >= info->spts[0] in sctp_mt() 121 && ntohs(sh->source) <= info->spts[1], in sctp_mt() 123 SCCHECK(ntohs(sh->dest) >= info->dpts[0] in sctp_mt() 124 && ntohs(sh->dest) <= info->dpts[1], in sctp_mt()
|
| H A D | nf_nat_core.c | 403 return ntohs(tuple->src.u.icmp.id) >= ntohs(min->icmp.id) && in l4proto_in_range() 404 ntohs(tuple->src.u.icmp.id) <= ntohs(max->icmp.id); in l4proto_in_range() 414 return ntohs(port) >= ntohs(min->all) && in l4proto_in_range() 415 ntohs(port) <= ntohs(max->all); in l4proto_in_range() 577 min = ntohs(range->min_proto.icmp.id); in nf_nat_l4proto_unique_tuple() 578 range_size = ntohs(range->max_proto.icmp.id) - in nf_nat_l4proto_unique_tuple() 579 ntohs(range->min_proto.icmp.id) + 1; in nf_nat_l4proto_unique_tuple() 598 min = ntohs(range->min_proto.gre.key); in nf_nat_l4proto_unique_tuple() 599 range_size = ntohs(range->max_proto.gre.key) - min + 1; in nf_nat_l4proto_unique_tuple() 622 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 | 163 &addr.ip, ntohs(port), in set_ras_addr() 165 ntohs(ct->tuplehash[!dir].tuple.dst.u.udp.port)); in set_ras_addr() 211 htons(ntohs(info->rtp_port[i][dir]) + 1); in nat_rtp_rtcp() 226 for (nated_port = ntohs(rtp_exp->tuple.dst.u.udp.port); in nat_rtp_rtcp() 265 ntohs(rtp_exp->tuple.src.u.udp.port), in nat_rtp_rtcp() 267 ntohs(rtp_exp->tuple.dst.u.udp.port)); in nat_rtp_rtcp() 270 ntohs(rtcp_exp->tuple.src.u.udp.port), in nat_rtp_rtcp() 272 ntohs(rtcp_exp->tuple.dst.u.udp.port)); in nat_rtp_rtcp() 285 u_int16_t nated_port = ntohs(port); in nat_t120() 308 ntohs(exp->tuple.src.u.tcp.port), in nat_t120() [all …]
|
| /linux/net/sctp/ |
| H A D | sm_make_chunk.c | 280 chunksize += SCTP_PAD4(ntohs(auth_hmacs->length)); in sctp_make_init() 287 chunksize += SCTP_PAD4(ntohs(auth_chunks->length)); in sctp_make_init() 360 sctp_addto_chunk(retval, ntohs(auth_hmacs->length), in sctp_make_init() 363 sctp_addto_chunk(retval, ntohs(auth_chunks->length), in sctp_make_init() 442 chunksize += ntohs(auth_random->length); in sctp_make_init_ack() 446 chunksize += SCTP_PAD4(ntohs(auth_hmacs->length)); in sctp_make_init_ack() 452 chunksize += SCTP_PAD4(ntohs(auth_chunks->length)); in sctp_make_init_ack() 505 sctp_addto_chunk(retval, ntohs(auth_random->length), in sctp_make_init_ack() 508 sctp_addto_chunk(retval, ntohs(auth_hmacs->length), in sctp_make_init_ack() 511 sctp_addto_chunk(retval, ntohs(auth_chunks->length), in sctp_make_init_ack() [all …]
|
| H A D | auth.c | 196 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() 413 ntohs(random->length) != sizeof(*random) + SCTP_AUTH_RANDOM_LENGTH) in sctp_auth_verify_cookie_params() 417 hmacs_len = ntohs(hmacs->param_hdr.length); in sctp_auth_verify_cookie_params() 429 u16 hmac_id = ntohs(hmacs->hmac_ids[i]); in sctp_auth_verify_cookie_params() 440 chunks_len = ntohs(chunks->param_hdr.length); in sctp_auth_verify_cookie_params() 550 n_elt = (ntohs(hmacs->param_hdr.length) - in sctp_auth_asoc_get_hmac() 553 id = ntohs(hmacs->hmac_ids[i]); in sctp_auth_asoc_get_hmac() 586 n_elt = (ntohs(hmacs->param_hdr.length) - in sctp_auth_asoc_verify_hmac_id() [all …]
|
| H A D | stream.c | 26 BIT(ntohs(type) - ntohs(SCTP_PARAM_RESET_OUT_REQUEST)) in sctp_stream_shrink_out() 264 __u16 sid = ntohs(str_list[i]); 570 nums = (ntohs(param.p->length) - sizeof(*outreq)) / sizeof(__u16); in sctp_process_strreset_outreq() 573 if (ntohs(str_p[i]) >= stream->incnt) { in sctp_process_strreset_outreq() 606 SCTP_SI(stream, ntohs(str_p[i]))->mid = 0; in sctp_process_strreset_inreq() 657 nums = (ntohs(param.p->length) - sizeof(*inreq)) / sizeof(__u16); in sctp_process_strreset_inreq() 663 if (ntohs(str_p[i]) >= stream->outcnt) { in sctp_process_strreset_inreq() 681 SCTP_SO(stream, ntohs(str_p[i]))->state = in sctp_process_strreset_inreq() 825 in = ntohs(addstr in sctp_process_strreset_addstrm_out() [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() 138 return ntohs(rct->lan_id_and_LSDU_size) & 0x0FFF; in get_prp_LSDU_size() 143 rct->lan_id_and_LSDU_size = htons((ntohs(rct->lan_id_and_LSDU_size) & in set_prp_lan_id() 148 rct->lan_id_and_LSDU_size = htons((ntohs(rct->lan_id_and_LSDU_size) & in set_prp_LSDU_size() 238 return ntohs(hsr_ethhdr->hsr_tag.sequence_nr); in hsr_get_skb_sequence_nr() 256 return ntohs(rct->sequence_nr); in prp_get_skb_sequence_nr()
|
| /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/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/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/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() 80 *port_ptr = ntohs(get_socket_local_port(server_fd)); in run_test()
|
| /linux/net/dsa/ |
| H A D | tag_rtl8_4.c | 168 etype = ntohs(tag16[0]); in rtl8_4_read_tag() 176 proto = FIELD_GET(RTL8_4_PROTOCOL, ntohs(tag16[1])); in rtl8_4_read_tag() 185 reason = FIELD_GET(RTL8_4_REASON, ntohs(tag16[1])); in rtl8_4_read_tag() 188 port = FIELD_GET(RTL8_4_TX, ntohs(tag16[3])); in rtl8_4_read_tag()
|
| /linux/drivers/net/ethernet/chelsio/libcxgb/ |
| H A D | libcxgb_cm.c | 60 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 D | ip_vs_conn.c | 432 IP_VS_DBG_ADDR(p->af, p->caddr), ntohs(p->cport), in ip_vs_conn_in_get() 433 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_conn_in_get() 532 IP_VS_DBG_ADDR(p->af, p->caddr), ntohs(p->cport), in ip_vs_ct_in_get() 533 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_ct_in_get() 596 IP_VS_DBG_ADDR(p->af, p->caddr), ntohs(p->cport), in ip_vs_conn_out_get() 597 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_conn_out_get() 1135 IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), in ip_vs_bind_dest() 1136 IP_VS_DBG_ADDR(cp->af, &cp->vaddr), ntohs(cp->vport), in ip_vs_bind_dest() 1137 IP_VS_DBG_ADDR(cp->daf, &cp->daddr), ntohs(cp->dport), in ip_vs_bind_dest() 1231 IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), in ip_vs_unbind_dest() [all …]
|
| H A D | ip_vs_nfct.c | 55 ntohs((T)->src.u.all), \ 57 ntohs((T)->dst.u.all), \ 62 ntohs((C)->cport), \ 64 ntohs((C)->vport), \ 66 ntohs((C)->dport), \
|
| /linux/include/net/sctp/ |
| H A D | sctp.h | 425 _sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length)) 431 pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ 432 ntohs(pos.p->length) >= sizeof(struct sctp_paramhdr);\ 433 pos.v += SCTP_PAD4(ntohs(pos.p->length))) 436 _sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length)) 443 (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ 444 ntohs(err->length) >= sizeof(struct sctp_errhdr); \ 445 err = (struct sctp_errhdr *)((void *)err + SCTP_PAD4(ntohs(err->length)))) 448 _sctp_walk_fwdtsn((pos), (chunk), ntohs((chunk)->chunk_hdr->length) - sizeof(struct sctp_fwdtsn_chu…
|
| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| H A D | spectrum_flower.c | 433 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 D | prestera_flower.c | 245 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()
|