/kernel/linux/common_modules/newip/examples/ |
D | nip_udp_server_demo.c | 48 si_remote.sin_addr.NIP_ADDR_FIELD16[0], ntohs(si_remote.sin_port)); in recv_send() 56 si_remote.sin_addr.NIP_ADDR_FIELD8[0], ntohs(si_remote.sin_port)); in recv_send() 79 si_local.sin_addr.NIP_ADDR_FIELD8[INDEX_0] = 0xDE; in main() 80 si_local.sin_addr.NIP_ADDR_FIELD8[INDEX_1] = 0x00; in main() 81 si_local.sin_addr.bitlen = NIP_ADDR_BIT_LEN_16; // 2-byte: 16bit in main() 89 si_local.sin_addr.NIP_ADDR_FIELD8[INDEX_0], in main() 90 si_local.sin_addr.NIP_ADDR_FIELD8[INDEX_1], UDP_SERVER_PORT); in main()
|
D | nip_tcp_server_demo.c | 70 si_local.sin_addr.NIP_ADDR_FIELD8[INDEX_0] = 0xDE; in main() 71 si_local.sin_addr.NIP_ADDR_FIELD8[INDEX_1] = 0x00; in main() 72 si_local.sin_addr.bitlen = NIP_ADDR_BIT_LEN_16; // 2-byte: 16bit in main() 79 si_local.sin_addr.NIP_ADDR_FIELD8[INDEX_0], in main() 80 si_local.sin_addr.NIP_ADDR_FIELD8[INDEX_1], TCP_SERVER_PORT); in main()
|
D | nip_tcp_client_demo.c | 122 si_server.sin_addr.NIP_ADDR_FIELD8[INDEX_0] = 0xDE; in main() 123 si_server.sin_addr.NIP_ADDR_FIELD8[INDEX_1] = 0x00; in main() 124 si_server.sin_addr.bitlen = NIP_ADDR_BIT_LEN_16; // 2-byte: 16bit in main() 130 si_server.sin_addr.NIP_ADDR_FIELD8[INDEX_0], in main() 131 si_server.sin_addr.NIP_ADDR_FIELD8[INDEX_1], TCP_SERVER_PORT); in main()
|
D | nip_udp_client_demo.c | 120 si_server.sin_addr.NIP_ADDR_FIELD8[INDEX_0] = 0xDE; in main() 121 si_server.sin_addr.NIP_ADDR_FIELD8[INDEX_1] = 0x00; in main() 122 si_server.sin_addr.bitlen = NIP_ADDR_BIT_LEN_16; // 2-byte: 16bit in main()
|
/kernel/liteos_m/components/net/test/ |
D | net_socket_test_008.c | 72 srvAddr.sin_addr.s_addr = inet_addr(STACK_IP); in SampleTcpServer() 75 …LogPrintln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_por… in SampleTcpServer() 83 …LogPrintln("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.s… in SampleTcpServer() 115 srvAddr.sin_addr.s_addr = inet_addr(PEER_IP); in SampleTcpClient() 118 …LogPrintln("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_p… in SampleTcpClient() 124 …sfd, inet_ntoa(((struct sockaddr_in*)&addr)->sin_addr), ntohs(((struct sockaddr_in*)&addr)->sin_po… in SampleTcpClient() 127 ICUNIT_ASSERT_EQUAL(((struct sockaddr_in*)&addr)->sin_addr.s_addr, \ in SampleTcpClient() 133 …sfd, inet_ntoa(((struct sockaddr_in*)&addr)->sin_addr), ntohs(((struct sockaddr_in*)&addr)->sin_po… in SampleTcpClient() 136 ICUNIT_ASSERT_EQUAL(((struct sockaddr_in*)&addr)->sin_addr.s_addr, \ in SampleTcpClient()
|
D | net_socket_test_003.c | 60 srvAddr.sin_addr.s_addr = inet_addr(STACK_IP); in SampleTcpServer() 63 …LogPrintln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_por… in SampleTcpServer() 71 …LogPrintln("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.s… in SampleTcpServer() 90 clnAddr.sin_addr.s_addr = inet_addr(PEER_IP); in SampleTcpServer() 149 srvAddr.sin_addr.s_addr = inet_addr(PEER_IP); in SampleTcpClient() 152 …LogPrintln("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_p… in SampleTcpClient() 158 …sfd, inet_ntoa(((struct sockaddr_in*)&addr)->sin_addr), ntohs(((struct sockaddr_in*)&addr)->sin_po… in SampleTcpClient() 161 ICUNIT_ASSERT_EQUAL(((struct sockaddr_in*)&addr)->sin_addr.s_addr, \ in SampleTcpClient() 167 …sfd, inet_ntoa(((struct sockaddr_in*)&addr)->sin_addr), ntohs(((struct sockaddr_in*)&addr)->sin_po… in SampleTcpClient() 170 ICUNIT_ASSERT_EQUAL(((struct sockaddr_in*)&addr)->sin_addr.s_addr, \ in SampleTcpClient() [all …]
|
D | net_socket_test_010.c | 63 srvAddr.sin_addr.s_addr = inet_addr(STACK_IP); in SampleTcpServer() 66 …LogPrintln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_por… in SampleTcpServer() 85 …LogPrintln("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.s… in SampleTcpServer() 117 srvAddr.sin_addr.s_addr = inet_addr(PEER_IP); in SampleTcpClient() 120 …LogPrintln("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_p… in SampleTcpClient()
|
D | net_socket_test_009.c | 64 srvAddr.sin_addr.s_addr = inet_addr(STACK_IP); in SampleTcpServer() 67 …LogPrintln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_por… in SampleTcpServer() 90 …LogPrintln("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.s… in SampleTcpServer() 122 srvAddr.sin_addr.s_addr = inet_addr(PEER_IP); in SampleTcpClient() 125 …LogPrintln("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_p… in SampleTcpClient()
|
D | net_socket_test_002.c | 61 srvAddr.sin_addr.s_addr = inet_addr(STACK_IP); in UdpTestTask() 68 clnAddr.sin_addr.s_addr = inet_addr(PEER_IP); in UdpTestTask() 88 clnAddr.sin_addr.s_addr = inet_addr(PEER_IP); in UdpTestTask()
|
/kernel/linux/linux-5.10/net/sctp/ |
D | protocol.c | 89 addr->a.v4.sin_addr.s_addr = ifa->ifa_local; in sctp_v4_copy_addrlist() 226 sa->sin_addr.s_addr = ip_hdr(skb)->saddr; in sctp_v4_from_skb() 229 sa->sin_addr.s_addr = ip_hdr(skb)->daddr; in sctp_v4_from_skb() 239 addr->v4.sin_addr.s_addr = inet_sk(sk)->inet_rcv_saddr; in sctp_v4_from_sk() 246 inet_sk(sk)->inet_rcv_saddr = addr->v4.sin_addr.s_addr; in sctp_v4_to_sk_saddr() 252 inet_sk(sk)->inet_daddr = addr->v4.sin_addr.s_addr; in sctp_v4_to_sk_daddr() 265 addr->v4.sin_addr.s_addr = param->v4.addr.s_addr; in sctp_v4_from_addr_param() 281 param->v4.addr.s_addr = addr->v4.sin_addr.s_addr; in sctp_v4_to_addr_param() 292 saddr->v4.sin_addr.s_addr = fl4->saddr; in sctp_v4_dst_saddr() 304 if (addr1->v4.sin_addr.s_addr != addr2->v4.sin_addr.s_addr) in sctp_v4_cmp_addr() [all …]
|
/kernel/liteos_a/testsuites/unittest/net/socket/smoke/ |
D | net_socket_test_003.cpp | 69 srvAddr.sin_addr.s_addr = inet_addr(STACK_IP); in SampleTcpServer() 72 …LogPrintln("bind socket %d to %s:%d: %d", lsfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_por… in SampleTcpServer() 82 …LogPrintln("accept socket %d: %d <%s:%d>", lsfd, sfd, inet_ntoa(clnAddr.sin_addr), ntohs(clnAddr.s… in SampleTcpServer() 108 clnAddr.sin_addr.s_addr = inet_addr(PEER_IP); in SampleTcpServer() 176 srvAddr.sin_addr.s_addr = inet_addr(PEER_IP); in SampleTcpClient() 179 …LogPrintln("connect socket %d to %s:%d: %d", sfd, inet_ntoa(srvAddr.sin_addr), ntohs(srvAddr.sin_p… in SampleTcpClient() 184 …tpeername %d %s:%d: %d", sfd, inet_ntoa((reinterpret_cast<struct sockaddr_in *>(&addr))->sin_addr), in SampleTcpClient() 188 ICUNIT_ASSERT_EQUAL((reinterpret_cast<struct sockaddr_in *>(&addr))->sin_addr.s_addr, in SampleTcpClient() 189 inet_addr(PEER_IP), (static_cast<struct sockaddr_in *>(&addr))->sin_addr.s_addr); in SampleTcpClient() 193 …tsockname %d %s:%d: %d", sfd, inet_ntoa((reinterpret_cast<struct sockaddr_in *>(&addr))->sin_addr), in SampleTcpClient() [all …]
|
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() 169 sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK); in ClientsThread() 176 …LogPrintln("[%d]<%d>connected to %s:%d successful", fd, thrNo, inet_ntoa(sa.sin_addr), SERVER_PORT… in ClientsThread() 225 sa.sin_addr.s_addr = htonl(INADDR_ANY); 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() 169 sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK); in ClientsThread() 176 …LogPrintln("[%d]<%d>connected to %s:%d successful", fd, thrNo, inet_ntoa(sa.sin_addr), SERVER_PORT… in ClientsThread() 225 sa.sin_addr.s_addr = htonl(INADDR_ANY); in PollTest()
|
D | net_socket_test_013.cpp | 143 ip = (reinterpret_cast<struct sockaddr_in *>(&(ifr.ifr_addr)))->sin_addr.s_addr; in GetIp() 159 msk = (reinterpret_cast<struct sockaddr_in *>(&(ifr.ifr_addr)))->sin_addr.s_addr; in GetNetmask() 208 sa.sin_addr.s_addr = brdcast; in ClientsThread() 215 …LogPrintln("[%d]<%d>connected to udp://%s:%d successful", fd, thrNo, inet_ntoa(sa.sin_addr), SERVE… in ClientsThread() 264 sa.sin_addr.s_addr = htonl(INADDR_ANY); in UdpBrdcastSelectTest()
|
D | net_socket_test_002.cpp | 65 srvAddr.sin_addr.s_addr = inet_addr(STACK_IP); in UdpTest() 72 clnAddr.sin_addr.s_addr = inet_addr(PEER_IP); in UdpTest() 91 clnAddr.sin_addr.s_addr = inet_addr(PEER_IP); in UdpTest()
|
/kernel/linux/linux-5.10/samples/bpf/ |
D | test_probe_write_user_user.c | 66 serv_addr_in->sin_addr.s_addr = htonl(INADDR_LOOPBACK); in main() 72 ip = inet_ntoa(serv_addr_in->sin_addr); in main() 78 mapped_addr_in->sin_addr.s_addr = inet_addr("255.255.255.255"); in main() 84 ip = inet_ntoa(mapped_addr_in->sin_addr); in main() 90 ip = inet_ntoa(tmp_addr_in->sin_addr); in main() 97 ip = inet_ntoa(tmp_addr_in->sin_addr); in main()
|
D | cookie_uid_helper_example.c | 226 if (inet_aton("127.0.0.1", &si_other.sin_addr) == 0) in udp_client() 250 res = memcmp(&(si_other.sin_addr), &(si_me.sin_addr), in udp_client() 251 sizeof(si_me.sin_addr)); in udp_client()
|
/kernel/linux/linux-5.10/arch/um/drivers/ |
D | umcast_user.c | 34 sin->sin_addr.s_addr = in_aton(addr); in new_addr() 36 sin->sin_addr.s_addr = INADDR_ANY; in new_addr() 73 if ((!pri->unicast && lsin->sin_addr.s_addr == 0) || in umcast_open() 74 (rsin->sin_addr.s_addr == 0) || in umcast_open() 124 mreq.imr_multiaddr.s_addr = lsin->sin_addr.s_addr; in umcast_open() 156 mreq.imr_multiaddr.s_addr = lsin->sin_addr.s_addr; in umcast_close()
|
/kernel/linux/linux-5.10/include/linux/sunrpc/ |
D | addr.h | 56 return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; in rpc_cmp_addr4() 66 dsin->sin_addr.s_addr = ssin->sin_addr.s_addr; in __rpc_copy_addr4()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
D | probe_user.c | 45 in->sin_addr.s_addr = inet_addr("255.255.255.255"); 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/tools/testing/selftests/bpf/ |
D | test_flow_dissector.c | 87 .sin_addr.s_addr = __constant_htonl(addr4), \ 126 off = __builtin_offsetof(struct sockaddr_in, sin_addr); in util_printaddr() 315 in_saddr4.sin_addr.s_addr, in build_packet() 316 in_daddr4.sin_addr.s_addr, in build_packet() 338 out_saddr4.sin_addr.s_addr, in build_packet() 339 out_daddr4.sin_addr.s_addr, in build_packet() 374 extra_saddr4.sin_addr.s_addr, in build_packet() 375 extra_daddr4.sin_addr.s_addr, in build_packet() 604 parse_addr(AF_INET, &addr->sin_addr, optarg); in parse_addr4()
|
/kernel/linux/linux-5.10/net/rds/ |
D | bind.c | 182 sin->sin_addr.s_addr == htonl(INADDR_ANY) || in rds_bind() 183 sin->sin_addr.s_addr == htonl(INADDR_BROADCAST) || in rds_bind() 184 ipv4_is_multicast(sin->sin_addr.s_addr)) in rds_bind() 186 ipv6_addr_set_v4mapped(sin->sin_addr.s_addr, &v6addr); in rds_bind()
|
/kernel/linux/linux-5.10/include/trace/events/ |
D | net_probe_common.h | 12 v4->sin_addr.s_addr = inet->inet_saddr; \ 16 v4->sin_addr.s_addr = inet->inet_daddr; \
|
/kernel/linux/linux-5.10/drivers/net/ppp/ |
D | pptp.c | 61 if (opt->dst_addr.sin_addr.s_addr != s_addr) in lookup_chan() 85 opt->dst_addr.sin_addr.s_addr == d_addr) in lookup_chan_dst() 155 opt->dst_addr.sin_addr.s_addr, in pptp_xmit() 156 opt->src_addr.sin_addr.s_addr, in pptp_xmit() 419 if (lookup_chan_dst(sp->sa_addr.pptp.call_id, sp->sa_addr.pptp.sin_addr.s_addr)) in pptp_connect() 435 if (!opt->src_addr.sin_addr.s_addr || !sp->sa_addr.pptp.sin_addr.s_addr) { in pptp_connect() 444 opt->dst_addr.sin_addr.s_addr, in pptp_connect() 445 opt->src_addr.sin_addr.s_addr, in pptp_connect()
|
/kernel/linux/linux-5.10/include/net/ |
D | vxlan.h | 391 return ipa->sin.sin_addr.s_addr == htonl(INADDR_ANY); in vxlan_addr_any() 399 return ipv4_is_multicast(ipa->sin.sin_addr.s_addr); in vxlan_addr_multicast() 406 return ipa->sin.sin_addr.s_addr == htonl(INADDR_ANY); in vxlan_addr_any() 411 return ipv4_is_multicast(ipa->sin.sin_addr.s_addr); in vxlan_addr_multicast() 506 rdst->remote_ip.sin.sin_addr.s_addr = nhc->nhc_gw.ipv4; in vxlan_fdb_nh_path_select()
|