Home
last modified time | relevance | path

Searched refs:address_info (Results 1 – 3 of 3) sorted by relevance

/hal_espressif-3.6.0/examples/protocols/sockets/non_blocking/main/
Dnon_blocking_socket_example.c118 struct addrinfo *address_info; in tcp_client_task() local
121 …EXAMPLE_TCP_CLIENT_CONNECT_ADDRESS, CONFIG_EXAMPLE_TCP_CLIENT_CONNECT_PORT, &hints, &address_info); in tcp_client_task()
122 if (res != 0 || address_info == NULL) { in tcp_client_task()
124 …addrinfo() returns %d, addrinfo=%p", CONFIG_EXAMPLE_TCP_CLIENT_CONNECT_ADDRESS, res, address_info); in tcp_client_task()
129 sock = socket(address_info->ai_family, address_info->ai_socktype, address_info->ai_protocol); in tcp_client_task()
142 if (connect(sock, address_info->ai_addr, address_info->ai_addrlen) != 0) { in tcp_client_task()
199 free(address_info); in tcp_client_task()
236 struct addrinfo *address_info; in tcp_server_task() local
247 …ONFIG_EXAMPLE_TCP_SERVER_BIND_ADDRESS, CONFIG_EXAMPLE_TCP_SERVER_BIND_PORT, &hints, &address_info); in tcp_server_task()
248 if (res != 0 || address_info == NULL) { in tcp_server_task()
[all …]
/hal_espressif-3.6.0/components/esp-tls/
Desp_tls.c133 struct addrinfo *address_info; in esp_tls_hostname_to_fd() local
145 int res = getaddrinfo(use_host, NULL, &hints, &address_info); in esp_tls_hostname_to_fd()
146 if (res != 0 || address_info == NULL) { in esp_tls_hostname_to_fd()
148 "getaddrinfo() returns %d, addrinfo=%p", use_host, res, address_info); in esp_tls_hostname_to_fd()
153 *fd = socket(address_info->ai_family, address_info->ai_socktype, address_info->ai_protocol); in esp_tls_hostname_to_fd()
155 …ocket (family %d socktype %d protocol %d)", address_info->ai_family, address_info->ai_socktype, ad… in esp_tls_hostname_to_fd()
156 freeaddrinfo(address_info); in esp_tls_hostname_to_fd()
160 if (address_info->ai_family == AF_INET) { in esp_tls_hostname_to_fd()
161 struct sockaddr_in *p = (struct sockaddr_in *)address_info->ai_addr; in esp_tls_hostname_to_fd()
167 else if (address_info->ai_family == AF_INET6) { in esp_tls_hostname_to_fd()
[all …]
/hal_espressif-3.6.0/examples/protocols/static_ip/main/
Dstatic_ip_example_main.c172 struct addrinfo *address_info; in wifi_init_sta() local
178 int res = getaddrinfo(EXAMPLE_RESOLVE_DOMAIN, NULL, &hints, &address_info); in wifi_init_sta()
179 if (res != 0 || address_info == NULL) { in wifi_init_sta()
181 … "getaddrinfo() returns %d, addrinfo=%p", EXAMPLE_RESOLVE_DOMAIN, res, address_info); in wifi_init_sta()
183 if (address_info->ai_family == AF_INET) { in wifi_init_sta()
184 struct sockaddr_in *p = (struct sockaddr_in *)address_info->ai_addr; in wifi_init_sta()
188 else if (address_info->ai_family == AF_INET6) { in wifi_init_sta()
189 struct sockaddr_in6 *p = (struct sockaddr_in6 *)address_info->ai_addr; in wifi_init_sta()