/kernel/linux/linux-5.10/samples/bpf/ |
D | test_probe_write_user_user.c | 65 serv_addr_in->sin_port = 0; in main() 73 printf("Server bound to: %s:%d\n", ip, ntohs(serv_addr_in->sin_port)); in main() 77 mapped_addr_in->sin_port = htons(5555); in main() 86 ip, ntohs(mapped_addr_in->sin_port)); in main() 93 ip, ntohs(tmp_addr_in->sin_port)); in main() 99 ip, ntohs(tmp_addr_in->sin_port)); in main()
|
/kernel/liteos_m/components/net/test/ |
D | net_socket_test_008.c | 73 srvAddr.sin_port = htons(STACK_PORT_8); in SampleTcpServer() 75 …ln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpServer() 83 …n("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.sin_port)); in SampleTcpServer() 116 srvAddr.sin_port = htons(STACK_PORT_8); in SampleTcpClient() 118 …("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpClient() 124 …_ntoa(((struct sockaddr_in*)&addr)->sin_addr), ntohs(((struct sockaddr_in*)&addr)->sin_port), ret); in SampleTcpClient() 133 …_ntoa(((struct sockaddr_in*)&addr)->sin_addr), ntohs(((struct sockaddr_in*)&addr)->sin_port), ret); in SampleTcpClient()
|
D | net_socket_test_003.c | 61 srvAddr.sin_port = htons(STACK_PORT); in SampleTcpServer() 63 …ln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpServer() 71 …n("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.sin_port)); in SampleTcpServer() 91 clnAddr.sin_port = htons(PEER_PORT); in SampleTcpServer() 150 srvAddr.sin_port = htons(PEER_PORT); in SampleTcpClient() 152 …("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpClient() 158 …_ntoa(((struct sockaddr_in*)&addr)->sin_addr), ntohs(((struct sockaddr_in*)&addr)->sin_port), ret); in SampleTcpClient() 167 …_ntoa(((struct sockaddr_in*)&addr)->sin_addr), ntohs(((struct sockaddr_in*)&addr)->sin_port), ret); in SampleTcpClient() 190 clnAddr.sin_port = htons(PEER_PORT); in SampleTcpClient()
|
D | net_socket_test_010.c | 64 srvAddr.sin_port = htons(STACK_PORT_10); in SampleTcpServer() 66 …ln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpServer() 85 …n("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.sin_port)); in SampleTcpServer() 118 srvAddr.sin_port = htons(STACK_PORT_10); in SampleTcpClient() 120 …("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpClient()
|
D | net_socket_test_009.c | 65 srvAddr.sin_port = htons(STACK_PORT_9); in SampleTcpServer() 67 …ln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpServer() 90 …n("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.sin_port)); in SampleTcpServer() 123 srvAddr.sin_port = htons(STACK_PORT_9); in SampleTcpClient() 125 …("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpClient()
|
D | net_socket_test_002.c | 62 srvAddr.sin_port = htons(STACK_PORT); in UdpTestTask() 69 clnAddr.sin_port = htons(PEER_PORT); in UdpTestTask() 89 clnAddr.sin_port = htons(PEER_PORT); in UdpTestTask()
|
D | net_socket_test_007.c | 66 srvAddr.sin_port = htons(STACK_PORT); in UdpTestMoreTask() 73 clnAddr.sin_port = htons(PEER_PORT); in UdpTestMoreTask()
|
D | net_socket_test_013.c | 56 srvAddr.sin_port = htons(STACK_PORT_TCP_LONG); in SampleTcpServer() 92 srvAddr.sin_port = htons(STACK_PORT_TCP_LONG); in SampleTcpClient()
|
D | net_socket_test_012.c | 63 srvAddr.sin_port = htons(g_portServer); in SampleTcpServer() 100 srvAddr.sin_port = htons(g_portClient); in SampleTcpClient()
|
/kernel/linux/linux-5.10/tools/testing/selftests/net/ |
D | fin_ack_lat.c | 56 addr.sin_port = htons(port); in client() 78 ntohs(laddr.sin_port), lat, in client() 132 address.sin_port = 0; in main() 143 fprintf(stderr, "server port: %d\n", ntohs(laddr.sin_port)); in main() 146 client(ntohs(laddr.sin_port)); in main()
|
D | psock_lib.h | 88 saddr.sin_port = htons(port); in pair_udp_open() 93 daddr.sin_port = htons(port + 1); in pair_udp_open()
|
D | reuseport_dualstack.c | 43 addr4->sin_port = htons(PORT); in build_rcv_fd() 80 saddr.sin_port = 0; in send_from_v4() 84 daddr.sin_port = htons(PORT); in send_from_v4()
|
D | reuseport_bpf_numa.c | 43 addr4->sin_port = htons(PORT); in build_rcv_group() 119 saddr4->sin_port = 0; in send_from_node() 124 daddr4->sin_port = htons(PORT); in send_from_node()
|
/kernel/liteos_a/testsuites/unittest/net/socket/smoke/ |
D | net_socket_test_003.cpp | 70 srvAddr.sin_port = htons(STACK_PORT); in SampleTcpServer() 72 …ln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpServer() 82 …n("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.sin_port)); in SampleTcpServer() 109 clnAddr.sin_port = htons(PEER_PORT); in SampleTcpServer() 177 srvAddr.sin_port = htons(PEER_PORT); in SampleTcpClient() 179 …("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_port), ret); in SampleTcpClient() 185 ntohs((reinterpret_cast<struct sockaddr_in *>(&addr))->sin_port), ret); in SampleTcpClient() 194 ntohs((reinterpret_cast<struct sockaddr_in *>(&addr))->sin_port), ret); in SampleTcpClient() 224 clnAddr.sin_port = htons(PEER_PORT); in SampleTcpClient()
|
D | net_socket_test_008.cpp | 131 LogPrintln("Too many clients, refuse %s:%d", inet_ntoa(sa.sin_addr), ntohs(sa.sin_port)); in HandleAccept() 135 LogPrintln("New client %d: %s:%d", fd, inet_ntoa(sa.sin_addr), ntohs(sa.sin_port)); in HandleAccept() 170 sa.sin_port = htons(SERVER_PORT); in ClientsThread() 226 sa.sin_port = htons(SERVER_PORT); in SelectTest()
|
D | net_socket_test_009.cpp | 130 LogPrintln("Too many clients, refuse %s:%d", inet_ntoa(sa.sin_addr), ntohs(sa.sin_port)); in HandleAccept() 134 LogPrintln("New client %d: %s:%d", fd, inet_ntoa(sa.sin_addr), ntohs(sa.sin_port)); in HandleAccept() 170 sa.sin_port = htons(SERVER_PORT); in ClientsThread() 226 sa.sin_port = htons(SERVER_PORT); in PollTest()
|
D | net_socket_test_002.cpp | 66 srvAddr.sin_port = htons(STACK_PORT); in UdpTest() 73 clnAddr.sin_port = htons(PEER_PORT); in UdpTest() 92 clnAddr.sin_port = htons(PEER_PORT); in UdpTest()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
D | probe_user.c | 44 in->sin_port = htons(5555); in test_probe_user() 63 inet_ntoa(in->sin_addr), ntohs(in->sin_port))) in test_probe_user() 71 inet_ntoa(in->sin_addr), ntohs(in->sin_port))) in test_probe_user()
|
/kernel/linux/linux-5.10/include/trace/events/ |
D | net_probe_common.h | 11 v4->sin_port = inet->inet_sport; \ 15 v4->sin_port = inet->inet_dport; \
|
/kernel/linux/linux-5.10/arch/um/drivers/ |
D | umcast_user.c | 37 sin->sin_port = htons(port); in new_addr() 75 (lsin->sin_port == 0) || (rsin->sin_port == 0)) in umcast_open()
|
/kernel/liteos_m/testsuites/unittest/fuzz/src/socket/ |
D | net_fuzz.c | 84 srvAddr.sin_port = htons(g_udpPort); in SampleUdpServer() 123 clnAddr.sin_port = htons(g_udpPort); in SampleUdpClient() 218 srvAddr.sin_port = htons(STACK_PORT); in SampleTcpServer() 256 srvAddr.sin_port = htons(PEER_PORT); in SampleTcpClient()
|
/kernel/liteos_a/apps/tftp/src/ |
D | tftpc.c | 113 stClientAddr.sin_port = 0; in lwip_tftp_create_bind_socket() 280 pstServerAddr->sin_port = stFromAddr.sin_port; in lwip_tftp_recv_from_server() 293 (pstServerAddr->sin_port != stFromAddr.sin_port)) { in lwip_tftp_recv_from_server() 423 (pstServerAddr->sin_port != stFromAddr.sin_port)) { in lwip_tftp_validate_data_pkt() 668 stServerAddr.sin_port = htons(usTempServPort); in lwip_tftp_get_file_by_filename() 1031 stServerAddr.sin_port = htons(usTempServPort); in lwip_tftp_put_file_by_filename() 1357 (pstServerAddr->sin_port != stFromAddr.sin_port)) { in lwip_tftp_inner_put_file() 1508 stServerAddr.sin_port = htons(usTempServPort); in lwip_tftp_get_file_by_filename_to_rawmem()
|
/kernel/linux/linux-5.10/net/sctp/ |
D | protocol.c | 161 laddr.v4.sin_port = htons(bp->port); in sctp_copy_local_addr_list() 225 sa->sin_port = sh->source; in sctp_v4_from_skb() 228 sa->sin_port = sh->dest; in sctp_v4_from_skb() 238 addr->v4.sin_port = 0; in sctp_v4_from_sk() 264 addr->v4.sin_port = port; in sctp_v4_from_addr_param() 291 saddr->v4.sin_port = port; in sctp_v4_dst_saddr() 302 if (addr1->v4.sin_port != addr2->v4.sin_port) in sctp_v4_cmp_addr() 315 addr->v4.sin_port = port; in sctp_v4_inaddr_any() 432 fl4->fl4_dport = daddr->v4.sin_port; in sctp_v4_get_dst() 442 fl4->fl4_sport = saddr->v4.sin_port; in sctp_v4_get_dst() [all …]
|
/kernel/linux/linux-5.10/drivers/infiniband/hw/qedr/ |
D | qedr_iw_cm.c | 52 laddr->sin_port = htons(cm_info->local_port); in qedr_fill_sockaddr4() 53 raddr->sin_port = htons(cm_info->remote_port); in qedr_fill_sockaddr4() 552 ntohs(((struct sockaddr_in *)&cm_id->remote_addr)->sin_port), in qedr_iw_connect() 553 ntohs(raddr->sin_port)); in qedr_iw_connect() 559 if (!laddr->sin_port || !raddr->sin_port) in qedr_iw_connect() 592 cm_info->remote_port = ntohs(raddr->sin_port); in qedr_iw_connect() 593 cm_info->local_port = ntohs(laddr->sin_port); in qedr_iw_connect() 693 iparams.port = ntohs(laddr->sin_port); in qedr_iw_create_listen()
|
/kernel/linux/linux-5.10/include/linux/sunrpc/ |
D | addr.h | 27 return ntohs(((struct sockaddr_in *)sap)->sin_port); in rpc_get_port() 39 ((struct sockaddr_in *)sap)->sin_port = htons(port); in rpc_set_port()
|