Home
last modified time | relevance | path

Searched refs:sa46 (Results 1 – 21 of 21) sorted by relevance

/third_party/libwebsockets/lib/misc/
Dpeer-limits.c83 lws_sockaddr46 sa46; in lws_get_or_create_peer() local
93 rlen = sizeof(sa46); in lws_get_or_create_peer()
94 if (getpeername(sockfd, (struct sockaddr*)&sa46, &rlen)) in lws_get_or_create_peer()
99 if (sa46.sa4.sin_family == AF_INET6) { in lws_get_or_create_peer()
100 q = &sa46.sa6.sin6_addr; in lws_get_or_create_peer()
101 rlen = sizeof(sa46.sa6.sin6_addr); in lws_get_or_create_peer()
105 q = &sa46.sa4.sin_addr; in lws_get_or_create_peer()
106 rlen = sizeof(sa46.sa4.sin_addr); in lws_get_or_create_peer()
122 if (peerx->sa46.sa4.sin_family == sa46.sa4.sin_family) { in lws_get_or_create_peer()
124 if (sa46.sa4.sin_family == AF_INET6 && in lws_get_or_create_peer()
[all …]
/third_party/libwebsockets/lib/system/dhcpclient/
Ddhcpc4.c122 if (r->is.sa46[LWSDH_SA46_IP].sa4.sin_family != AF_INET) in lws_dhcpc4_prep()
126 lws_ser_wu32be(p, r->is.sa46[LWSDH_SA46_IP].sa4.sin_addr.s_addr); in lws_dhcpc4_prep()
130 lws_ser_wu32be(p, r->is.sa46[LWSDH_SA46_DHCP_SERVER].sa4.sin_addr.s_addr); in lws_dhcpc4_prep()
327 r->is.sa46[which].sa4.sin_family = AF_INET; in lws_sa46_set_ipv4()
328 r->is.sa46[which].sa4.sin_addr.s_addr = ntohl(lws_ser_ru32be(p)); in lws_sa46_set_ipv4()
466 memset(r->is.sa46, 0, sizeof(r->is.sa46)); in lws_dhcpc4_parse()
479 lws_sa46_write_numeric_address(&r->is.sa46[n], in lws_dhcpc4_parse()
490 if (!r->is.sa46[LWSDH_SA46_IP].sa4.sin_family || in lws_dhcpc4_parse()
491 !r->is.sa46[LWSDH_SA46_DHCP_SERVER].sa4.sin_family || in lws_dhcpc4_parse()
492 !r->is.sa46[LWSDH_SA46_IPV4_ROUTER].sa4.sin_family || in lws_dhcpc4_parse()
[all …]
Ddhcpclient.c57 lws_dhcpc_status(struct lws_context *context, lws_sockaddr46 *sa46) in lws_dhcpc_status() argument
65 if (sa46) { in lws_dhcpc_status()
66 memcpy(sa46, &r->is.sa46[LWSDH_SA46_DNS_SRV_1], in lws_dhcpc_status()
67 sizeof(*sa46)); in lws_dhcpc_status()
/third_party/libwebsockets/lib/core-net/
Dnetwork.c131 lws_sockaddr46 sa46; in lws_get_peer_simple_fd() local
132 socklen_t len = sizeof(sa46); in lws_get_peer_simple_fd()
134 if (getpeername(fd, (struct sockaddr *)&sa46, &len) < 0) { in lws_get_peer_simple_fd()
140 lws_sa46_write_numeric_address(&sa46, name, namelen); in lws_get_peer_simple_fd()
786 lws_sa46_parse_numeric_address(const char *ads, lws_sockaddr46 *sa46) in lws_sa46_parse_numeric_address() argument
797 sa46->sa6.sin6_family = AF_INET6; in lws_sa46_parse_numeric_address()
798 memcpy(sa46->sa6.sin6_addr.s6_addr, a, in lws_sa46_parse_numeric_address()
799 sizeof(sa46->sa6.sin6_addr.s6_addr)); in lws_sa46_parse_numeric_address()
808 sa46->sa4.sin_family = AF_INET; in lws_sa46_parse_numeric_address()
809 memcpy(&sa46->sa4.sin_addr.s_addr, a, in lws_sa46_parse_numeric_address()
[all …]
Doutput.c204 wsi->udp->sa46_pending = wsi->udp->sa46; in lws_issue_raw()
254 socklen_t slt = sizeof(wsi->udp->sa46); in lws_ssl_capable_read_no_ssl()
261 sa46_sockaddr(&wsi->udp->sa46), &slt); in lws_ssl_capable_read_no_ssl()
336 len, 0, sa46_sockaddr(&wsi->udp->sa46), in lws_ssl_capable_write_no_ssl()
337 sa46_socklen(&wsi->udp->sa46)); in lws_ssl_capable_write_no_ssl()
Dprivate-lib-core-net.h170 lws_sockaddr46 sa46; member
249 lws_sockaddr46 sa46; /* nameserver */ member
1608 lws_sa46_4to6(lws_sockaddr46 *sa46, const uint8_t *v4addr, uint16_t port);
Dadopt.c517 &peer->sa46); in lws_adopt_descriptor_vhost_via_info()
758 wsi->udp->sa46 = s->dest; in lws_create_adopt_udp2()
/third_party/libwebsockets/lib/system/async-dns/
Dasync-dns.c348 memset(&dns->sa46, 0, sizeof(dns->sa46)); in lws_async_dns_init()
351 if (lws_dhcpc_status(context, &dns->sa46)) in lws_async_dns_init()
355 n = lws_plat_asyncdns_init(context, &dns->sa46); in lws_async_dns_init()
368 dns->sa46.sa4.sin_port = htons(53); in lws_async_dns_init()
369 lws_write_numeric_address((uint8_t *)&dns->sa46.sa4.sin_addr.s_addr, 4, in lws_async_dns_init()
380 context->async_dns.wsi->udp->sa46 = dns->sa46; in lws_async_dns_init()
654 lws_sockaddr46 *sa46; in lws_async_dns_query() local
746 sa46 = (lws_sockaddr46 *)&ai[1]; in lws_async_dns_query()
749 c->name = (const char *)&sa46[1]; in lws_async_dns_query()
751 ai->ai_canonname = (char *)&sa46[1]; in lws_async_dns_query()
[all …]
/third_party/libwebsockets/lib/plat/freertos/
Dfreertos-resolv.c29 lws_plat_asyncdns_init(struct lws_context *context, lws_sockaddr46 *sa46) in lws_plat_asyncdns_init() argument
36 sa46->sa4.sin_family = AF_INET; in lws_plat_asyncdns_init()
37 if (sa46->sa4.sin_addr.s_addr == ipv4) in lws_plat_asyncdns_init()
40 sa46->sa4.sin_addr.s_addr = ipv4; in lws_plat_asyncdns_init()
/third_party/libwebsockets/lib/plat/unix/android/
Dandroid-resolv.c29 lws_plat_asyncdns_init(struct lws_context *context, lws_sockaddr46 *sa46) in lws_plat_asyncdns_init() argument
48 n = ip32 == sa46->sa4.sin_addr.s_addr; in lws_plat_asyncdns_init()
49 sa46->sa4.sin_family = AF_INET; in lws_plat_asyncdns_init()
50 sa46->sa4.sin_addr.s_addr = ip32; in lws_plat_asyncdns_init()
/third_party/libwebsockets/lib/core-net/client/
Dsort-dns.c149 lws_sort_dns_scope(lws_sockaddr46 *sa46) in lws_sort_dns_scope() argument
151 if (sa46->sa4.sin_family == AF_INET) { in lws_sort_dns_scope()
152 uint8_t *p = (uint8_t *)&sa46->sa4.sin_addr; in lws_sort_dns_scope()
162 return lws_ipv6_unicast_scope(&sa46->sa6); in lws_sort_dns_scope()
166 lws_sort_dns_classify(lws_sockaddr46 *sa46, lws_dns_score_t *score) in lws_sort_dns_classify() argument
175 if (sa46->sa4.sin_family == AF_INET) { in lws_sort_dns_classify()
179 (const uint8_t *)&sa46->sa4.sin_addr); in lws_sort_dns_classify()
182 sa46 = &s; in lws_sort_dns_classify()
186 po = (uint8_t *)&sa46->sa6.sin6_addr.s6_addr; in lws_sort_dns_classify()
/third_party/libwebsockets/lib/plat/unix/
Dunix-resolv.c28 lws_plat_asyncdns_init(struct lws_context *context, lws_sockaddr46 *sa46) in lws_plat_asyncdns_init() argument
81 if (!lws_sa46_compare_ads(sa46, &sa46t)) in lws_plat_asyncdns_init()
84 *sa46 = sa46t; in lws_plat_asyncdns_init()
Dunix-sockets.c532 memcpy(&ifr.ifr_addr, &is->sa46[LWSDH_SA46_IP], sizeof(struct sockaddr)); in lws_plat_ifconfig()
538 if (is->sa46[LWSDH_SA46_IP].sa4.sin_family == AF_INET) { in lws_plat_ifconfig()
553 &is->sa46[LWSDH_SA46_IPV4_ROUTER].sa4, in lws_plat_ifconfig()
567 sa46[LWSDH_SA46_IPV4_ROUTER]. in lws_plat_ifconfig()
/third_party/libwebsockets/lib/plat/freertos/esp32/drivers/netdev/
Dwifi-esp32.c321 espip_to_sa46(lws_sockaddr46 *sa46, esp_ip_addr_t *eip)
323 memset(sa46, 0, sizeof(sa46));
327 sa46->sa4.sin_family = AF_INET;
328 memcpy(sa46->sa4.sin_addr, &eip->u_addr.ip4.addr, );
/third_party/libwebsockets/lib/plat/windows/
Dwindows-resolv.c29 lws_plat_asyncdns_init(struct lws_context *context, lws_sockaddr46 *sa46) in lws_plat_asyncdns_init() argument
65 fi->DnsServerList.IpAddress.String, sa46); in lws_plat_asyncdns_init()
/third_party/libwebsockets/include/libwebsockets/
Dlws-network-helper.h215 lws_sa46_parse_numeric_address(const char *ads, lws_sockaddr46 *sa46);
246 lws_sa46_write_numeric_address(lws_sockaddr46 *sa46, char *buf, size_t len);
Dlws-system.h317 lws_sockaddr46 sa46[_LWSDH_SA46_COUNT]; member
359 lws_dhcpc_status(struct lws_context *context, lws_sockaddr46 *sa46);
Dlws-adopt.h118 lws_sockaddr46 sa46; member
Dlws-context-vhost.h260 lws_sockaddr46 *sa46);
/third_party/libwebsockets/minimal-examples/raw/minimal-raw-adopt-udp/
Dminimal-raw-adopt-udp.c116 sendlen, 0, sa46_sockaddr(&udp.sa46), in callback_raw_test()
117 sa46_socklen(&udp.sa46)); in callback_raw_test()
/third_party/libwebsockets/minimal-examples/api-tests/api-test-dhcpc/
Dmain.c37 lws_sa46_write_numeric_address(&is->sa46[n], buf, sizeof(buf)); in lws_dhcpc_cb()