/kernel/liteos_m/components/net/test/ |
H A D | net_socket_test_009.c | 67 LogPrintln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpServer() 90 LogPrintln("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.sin_port)); in SampleTcpServer() 125 LogPrintln("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpClient()
|
H A D | net_socket_test_010.c | 66 LogPrintln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpServer() 85 LogPrintln("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.sin_port)); in SampleTcpServer() 120 LogPrintln("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpClient()
|
/kernel/linux/linux-5.10/net/netfilter/ |
H A D | nf_conntrack_standalone.c | 56 ntohs(tuple->src.u.icmp.id)); in print_tuple() 60 ntohs(tuple->src.u.tcp.port), in print_tuple() 61 ntohs(tuple->dst.u.tcp.port)); in print_tuple() 66 ntohs(tuple->src.u.udp.port), in print_tuple() 67 ntohs(tuple->dst.u.udp.port)); in print_tuple() 72 ntohs(tuple->src.u.dccp.port), in print_tuple() 73 ntohs(tuple->dst.u.dccp.port)); in print_tuple() 77 ntohs(tuple->src.u.sctp.port), in print_tuple() 78 ntohs(tuple->dst.u.sctp.port)); in print_tuple() 84 ntohs(tupl in print_tuple() [all...] |
H A D | nft_queue.c | 85 priv->queuenum = ntohs(nla_get_be16(tb[NFTA_QUEUE_NUM])); in nft_queue_init() 88 priv->queues_total = ntohs(nla_get_be16(tb[NFTA_QUEUE_TOTAL])); in nft_queue_init() 100 priv->flags = ntohs(nla_get_be16(tb[NFTA_QUEUE_FLAGS])); in nft_queue_init() 120 priv->flags = ntohs(nla_get_be16(tb[NFTA_QUEUE_FLAGS])); in nft_queue_sreg_init()
|
H A D | xt_tcpudp.c | 97 ntohs(th->source), in tcp_mt() 101 ntohs(th->dest), in tcp_mt() 149 ntohs(uh->source), in udp_mt() 152 ntohs(uh->dest), in udp_mt()
|
/kernel/linux/linux-5.10/drivers/staging/gdm724x/ |
H A D | gdm_lte.c | 118 if (ntohs(((struct ethhdr *)skb_in->data)->h_proto) == ETH_P_8021Q) { in gdm_lte_emulate_arp() 239 if (ntohs(((struct ethhdr *)skb_in->data)->h_proto) == ETH_P_8021Q) { in gdm_lte_emulate_ndp() 241 if (ntohs(vlan_eth.h_vlan_encapsulated_proto) != ETH_P_IPV6) in gdm_lte_emulate_ndp() 247 if (ntohs(eth.h_proto) != ETH_P_IPV6) in gdm_lte_emulate_ndp() 352 if (ntohs(eth->h_proto) == ETH_P_8021Q) { in gdm_lte_tx_nic_type() 354 mac_proto = ntohs(vlan_eth->h_vlan_encapsulated_proto); in gdm_lte_tx_nic_type() 358 mac_proto = ntohs(eth->h_proto); in gdm_lte_tx_nic_type() 375 if (ntohs(udp->dest) == 67 || ntohs(udp->dest) == 68) in gdm_lte_tx_nic_type() 391 if (ntohs(ud in gdm_lte_tx_nic_type() [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | spectrum_flower.c | 423 ntohs(match.key->dst), in mlxsw_sp_flower_parse_ports() 424 ntohs(match.mask->dst)); in mlxsw_sp_flower_parse_ports() 426 ntohs(match.key->src), in mlxsw_sp_flower_parse_ports() 427 ntohs(match.mask->src)); in mlxsw_sp_flower_parse_ports() 452 .min = ntohs(match.key->tp_min.src), in mlxsw_sp_flower_parse_ports_range() 453 .max = ntohs(match.key->tp_max.src), in mlxsw_sp_flower_parse_ports_range() 471 .min = ntohs(match.key->tp_min.dst), in mlxsw_sp_flower_parse_ports_range() 472 .max = ntohs(match.key->tp_max.dst), in mlxsw_sp_flower_parse_ports_range() 519 ntohs(match.key->flags), in mlxsw_sp_flower_parse_tcp() 520 ntohs(matc in mlxsw_sp_flower_parse_tcp() [all...] |
/kernel/linux/linux-6.6/drivers/staging/gdm724x/ |
H A D | gdm_lte.c | 118 if (ntohs(((struct ethhdr *)skb_in->data)->h_proto) == ETH_P_8021Q) { in gdm_lte_emulate_arp() 238 if (ntohs(((struct ethhdr *)skb_in->data)->h_proto) == ETH_P_8021Q) { in gdm_lte_emulate_ndp() 240 if (ntohs(vlan_eth.h_vlan_encapsulated_proto) != ETH_P_IPV6) in gdm_lte_emulate_ndp() 246 if (ntohs(eth.h_proto) != ETH_P_IPV6) in gdm_lte_emulate_ndp() 351 if (ntohs(eth->h_proto) == ETH_P_8021Q) { in gdm_lte_tx_nic_type() 353 mac_proto = ntohs(vlan_eth->h_vlan_encapsulated_proto); in gdm_lte_tx_nic_type() 357 mac_proto = ntohs(eth->h_proto); in gdm_lte_tx_nic_type() 374 if (ntohs(udp->dest) == 67 || ntohs(udp->dest) == 68) in gdm_lte_tx_nic_type() 390 if (ntohs(ud in gdm_lte_tx_nic_type() [all...] |
/kernel/linux/linux-5.10/drivers/scsi/libfc/ |
H A D | fc_exch.c | 1019 ep->oxid = ntohs(fh->fh_ox_id); in fc_exch_resp() 1058 xid = ntohs(fh->fh_ox_id); /* we originated exch */ in fc_seq_lookup_recip() 1066 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_recip() 1067 else if (ep->rxid != ntohs(fh->fh_rx_id)) { in fc_seq_lookup_recip() 1072 xid = ntohs(fh->fh_rx_id); /* we are the responder */ in fc_seq_lookup_recip() 1181 xid = ntohs((f_ctl & FC_FC_EX_CTX) ? fh->fh_ox_id : fh->fh_rx_id); in fc_seq_lookup_orig() 1192 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_orig() 1582 ep = fc_exch_find(mp, ntohs(fh->fh_ox_id)); in fc_exch_recv_seq_resp() 1592 ep->rxid = ntohs(fh->fh_rx_id); in fc_exch_recv_seq_resp() 1720 low = ntohs(a in fc_exch_abts_resp() [all...] |
/kernel/linux/linux-5.10/net/appletalk/ |
H A D | ddp.c | 245 int netrange = ntohs(atif->nets.nr_lastnet) - in atif_probe_device() 246 ntohs(atif->nets.nr_firstnet) + 1; in atif_probe_device() 247 int probe_net = ntohs(atif->address.s_net); in atif_probe_device() 253 probe_net = ntohs(atif->nets.nr_firstnet); in atif_probe_device() 280 if (probe_net > ntohs(atif->nets.nr_lastnet)) in atif_probe_device() 281 probe_net = ntohs(atif->nets.nr_firstnet); in atif_probe_device() 293 int netrange = ntohs(atif->nets.nr_lastnet) - in atif_proxy_probe_device() 294 ntohs(atif->nets.nr_firstnet) + 1; in atif_proxy_probe_device() 296 int probe_net = ntohs(atif->address.s_net); in atif_proxy_probe_device() 302 probe_net = ntohs(ati in atif_proxy_probe_device() [all...] |
/kernel/linux/linux-6.6/drivers/scsi/libfc/ |
H A D | fc_exch.c | 1017 ep->oxid = ntohs(fh->fh_ox_id); in fc_exch_resp() 1056 xid = ntohs(fh->fh_ox_id); /* we originated exch */ in fc_seq_lookup_recip() 1064 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_recip() 1065 else if (ep->rxid != ntohs(fh->fh_rx_id)) { in fc_seq_lookup_recip() 1070 xid = ntohs(fh->fh_rx_id); /* we are the responder */ in fc_seq_lookup_recip() 1179 xid = ntohs((f_ctl & FC_FC_EX_CTX) ? fh->fh_ox_id : fh->fh_rx_id); in fc_seq_lookup_orig() 1190 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_orig() 1580 ep = fc_exch_find(mp, ntohs(fh->fh_ox_id)); in fc_exch_recv_seq_resp() 1590 ep->rxid = ntohs(fh->fh_rx_id); in fc_exch_recv_seq_resp() 1718 low = ntohs(a in fc_exch_abts_resp() [all...] |
/kernel/linux/linux-6.6/net/appletalk/ |
H A D | ddp.c | 245 int netrange = ntohs(atif->nets.nr_lastnet) - in atif_probe_device() 246 ntohs(atif->nets.nr_firstnet) + 1; in atif_probe_device() 247 int probe_net = ntohs(atif->address.s_net); in atif_probe_device() 253 probe_net = ntohs(atif->nets.nr_firstnet); in atif_probe_device() 280 if (probe_net > ntohs(atif->nets.nr_lastnet)) in atif_probe_device() 281 probe_net = ntohs(atif->nets.nr_firstnet); in atif_probe_device() 293 int netrange = ntohs(atif->nets.nr_lastnet) - in atif_proxy_probe_device() 294 ntohs(atif->nets.nr_firstnet) + 1; in atif_proxy_probe_device() 296 int probe_net = ntohs(atif->address.s_net); in atif_proxy_probe_device() 302 probe_net = ntohs(ati in atif_proxy_probe_device() [all...] |
/kernel/linux/linux-5.10/net/sched/ |
H A D | act_csum.c | 275 ul = ntohs(udph->len); in tcf_csum_ipv4_udp() 331 ul = ntohs(udph->len); in tcf_csum_ipv6_udp() 400 ntohs(iph->tot_len))) in tcf_csum_ipv4() 406 ntohs(iph->tot_len))) in tcf_csum_ipv4() 412 ntohs(iph->tot_len))) in tcf_csum_ipv4() 418 ntohs(iph->tot_len), 0)) in tcf_csum_ipv4() 424 ntohs(iph->tot_len), 1)) in tcf_csum_ipv4() 429 !tcf_csum_sctp(skb, iph->ihl * 4, ntohs(iph->tot_len))) in tcf_csum_ipv4() 501 pl = ntohs(ip6h->payload_len); in tcf_csum_ipv6()
|
/kernel/linux/linux-6.6/include/net/sctp/ |
H A D | sctp.h | 427 _sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length)) 433 pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ 434 ntohs(pos.p->length) >= sizeof(struct sctp_paramhdr);\ 435 pos.v += SCTP_PAD4(ntohs(pos.p->length))) 438 _sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length)) 445 (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ 446 ntohs(err->length) >= sizeof(struct sctp_errhdr); \ 447 err = (struct sctp_errhdr *)((void *)err + SCTP_PAD4(ntohs(err->length)))) 450 _sctp_walk_fwdtsn((pos), (chunk), ntohs((chunk)->chunk_hdr->length) - sizeof(struct sctp_fwdtsn_chunk))
|
/kernel/linux/linux-6.6/drivers/net/ethernet/marvell/prestera/ |
H A D | prestera_flower.c | 241 if (ntohs(match.key->n_proto) == ETH_P_ALL) { in prestera_flower_parse() 320 tp_key = htonl(ntohs(match.key->tp_min.src) | in prestera_flower_parse() 321 (ntohs(match.key->tp_max.src) << 16)); in prestera_flower_parse() 322 tp_mask = htonl(ntohs(match.mask->tp_min.src) | in prestera_flower_parse() 323 (ntohs(match.mask->tp_max.src) << 16)); in prestera_flower_parse() 328 tp_key = htonl(ntohs(match.key->tp_min.dst) | in prestera_flower_parse() 329 (ntohs(match.key->tp_max.dst) << 16)); in prestera_flower_parse() 330 tp_mask = htonl(ntohs(match.mask->tp_min.dst) | in prestera_flower_parse() 331 (ntohs(match.mask->tp_max.dst) << 16)); in prestera_flower_parse()
|
/kernel/linux/linux-6.6/net/sched/ |
H A D | act_csum.c | 276 ul = ntohs(udph->len); in tcf_csum_ipv4_udp() 332 ul = ntohs(udph->len); in tcf_csum_ipv6_udp() 400 ntohs(iph->tot_len))) in tcf_csum_ipv4() 406 ntohs(iph->tot_len))) in tcf_csum_ipv4() 412 ntohs(iph->tot_len))) in tcf_csum_ipv4() 418 ntohs(iph->tot_len), 0)) in tcf_csum_ipv4() 424 ntohs(iph->tot_len), 1)) in tcf_csum_ipv4() 429 !tcf_csum_sctp(skb, iph->ihl * 4, ntohs(iph->tot_len))) in tcf_csum_ipv4() 501 pl = ntohs(ip6h->payload_len); in tcf_csum_ipv6()
|
/kernel/linux/linux-5.10/drivers/net/wireless/marvell/mwifiex/ |
H A D | sta_rx.c | 44 switch (ntohs(eth->h_proto)) { in mwifiex_discard_gratuitous_arp() 116 ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_AARP && in mwifiex_process_rx_packet() 117 ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_IPX))) { in mwifiex_process_rx_packet() 161 ntohs(rx_pkt_hdr->eth803_hdr.h_proto) == ETH_P_TDLS) { in mwifiex_process_rx_packet()
|
/kernel/linux/linux-5.10/include/linux/sunrpc/ |
H A D | svc_xprt.h | 175 return ntohs(sin->sin_port); in svc_addr_port() 177 return ntohs(sin6->sin6_port); in svc_addr_port() 213 ntohs(sin->sin_port)); in __svc_print_addr() 219 ntohs(sin6->sin6_port)); in __svc_print_addr()
|
/kernel/linux/linux-6.6/include/linux/sunrpc/ |
H A D | svc_xprt.h | 186 return ntohs(sin->sin_port); in svc_addr_port() 188 return ntohs(sin6->sin6_port); in svc_addr_port() 224 ntohs(sin->sin_port)); in __svc_print_addr() 230 ntohs(sin6->sin6_port)); in __svc_print_addr()
|
/kernel/linux/linux-6.6/drivers/net/wireless/marvell/mwifiex/ |
H A D | sta_rx.c | 32 switch (ntohs(eth->h_proto)) { in mwifiex_discard_gratuitous_arp() 104 ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_AARP && in mwifiex_process_rx_packet() 105 ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_IPX))) { in mwifiex_process_rx_packet() 149 ntohs(rx_pkt_hdr->eth803_hdr.h_proto) == ETH_P_TDLS) { in mwifiex_process_rx_packet()
|
/kernel/linux/linux-6.6/net/netfilter/ |
H A D | nft_queue.c | 110 priv->queuenum = ntohs(nla_get_be16(tb[NFTA_QUEUE_NUM])); in nft_queue_init() 113 priv->queues_total = ntohs(nla_get_be16(tb[NFTA_QUEUE_TOTAL])); in nft_queue_init() 125 priv->flags = ntohs(nla_get_be16(tb[NFTA_QUEUE_FLAGS])); in nft_queue_init() 145 priv->flags = ntohs(nla_get_be16(tb[NFTA_QUEUE_FLAGS])); in nft_queue_sreg_init()
|
/kernel/linux/linux-5.10/net/sctp/ |
H A D | stream.c | 255 __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(addstr in sctp_process_strreset_addstrm_in() [all...] |
/kernel/linux/linux-6.6/net/sctp/ |
H A D | stream.c | 255 __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(addstr in sctp_process_strreset_addstrm_in() [all...] |
/kernel/linux/linux-6.6/net/smc/ |
H A D | smc_clc.c | 360 if (ntohs(hdr->length) != in smc_clc_msg_prop_valid() 361 sizeof(*pclc) + ntohs(pclc->iparea_offset) + in smc_clc_msg_prop_valid() 368 if (ntohs(hdr->length) != in smc_clc_msg_prop_valid() 398 ntohs(hdr->length) != SMCR_CLC_ACCEPT_CONFIRM_LEN) || in smc_clc_msg_acc_conf_valid() 400 ntohs(hdr->length) != SMCD_CLC_ACCEPT_CONFIRM_LEN)) in smc_clc_msg_acc_conf_valid() 404 ntohs(hdr->length) < SMCD_CLC_ACCEPT_CONFIRM_LEN_V2) in smc_clc_msg_acc_conf_valid() 407 ntohs(hdr->length) < SMCR_CLC_ACCEPT_CONFIRM_LEN_V2) in smc_clc_msg_acc_conf_valid() 422 if (ntohs(hdr->length) != sizeof(struct smc_clc_msg_decline)) in smc_clc_msg_decl_valid() 425 if (ntohs(hdr->length) != sizeof(struct smc_clc_msg_decline_v2)) in smc_clc_msg_decl_valid() 475 ((u8 *)pclc + ntohs(pcl in smc_clc_msg_hdr_valid() [all...] |
/kernel/linux/linux-5.10/drivers/scsi/qedf/ |
H A D | qedf_fip.c | 90 rlen = ntohs(fiph->fip_dl_len) * 4; in qedf_fcoe_process_vlan_resp() 96 vid = ntohs(((struct fip_vlan_desc *)desc)->fd_vlan); in qedf_fcoe_process_vlan_resp() 138 op = ntohs(fiph->fip_op); in qedf_fip_send() 188 op = ntohs(fiph->fip_op); in qedf_fip_recv() 231 rlen = ntohs(fiph->fip_dl_len) * FIP_BPW; in qedf_fip_recv()
|