Home
last modified time | relevance | path

Searched refs:sin_port (Results 1 – 25 of 184) sorted by relevance

12345678

/kernel/linux/linux-5.10/samples/bpf/
Dtest_probe_write_user_user.c65 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/
Dnet_socket_test_008.c73 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()
Dnet_socket_test_003.c61 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()
Dnet_socket_test_010.c64 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()
Dnet_socket_test_009.c65 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()
Dnet_socket_test_002.c62 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()
Dnet_socket_test_007.c66 srvAddr.sin_port = htons(STACK_PORT); in UdpTestMoreTask()
73 clnAddr.sin_port = htons(PEER_PORT); in UdpTestMoreTask()
Dnet_socket_test_013.c56 srvAddr.sin_port = htons(STACK_PORT_TCP_LONG); in SampleTcpServer()
92 srvAddr.sin_port = htons(STACK_PORT_TCP_LONG); in SampleTcpClient()
Dnet_socket_test_012.c63 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/
Dfin_ack_lat.c56 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()
Dpsock_lib.h88 saddr.sin_port = htons(port); in pair_udp_open()
93 daddr.sin_port = htons(port + 1); in pair_udp_open()
Dreuseport_dualstack.c43 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()
Dreuseport_bpf_numa.c43 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/
Dnet_socket_test_003.cpp70 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()
Dnet_socket_test_008.cpp131 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()
Dnet_socket_test_009.cpp130 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()
Dnet_socket_test_002.cpp66 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/
Dprobe_user.c44 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/
Dnet_probe_common.h11 v4->sin_port = inet->inet_sport; \
15 v4->sin_port = inet->inet_dport; \
/kernel/linux/linux-5.10/arch/um/drivers/
Dumcast_user.c37 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/
Dnet_fuzz.c84 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/
Dtftpc.c113 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/
Dprotocol.c161 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/
Dqedr_iw_cm.c52 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/
Daddr.h27 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()

12345678