mirror of
https://github.com/curl/curl.git
synced 2026-08-24 19:03:40 +03:00
cf-socket: make Curl_addr2string static
Move as sockaddr2string() into cf-socket.c where its only callers are. Mark as UNITTEST for unit1609. Move "struct Curl_sockaddr_ex" into sockaddr.h, so connect.h and cf-socket.h can be included without all the system headers needed. Closes #21946
This commit is contained in:
parent
7ec25148c0
commit
30c9c79cf8
11 changed files with 95 additions and 91 deletions
|
|
@ -25,8 +25,6 @@
|
|||
***************************************************************************/
|
||||
#include "curl_setup.h"
|
||||
|
||||
#include "sockaddr.h" /* required for Curl_sockaddr_storage */
|
||||
|
||||
struct Curl_addrinfo;
|
||||
struct Curl_cfilter;
|
||||
struct Curl_easy;
|
||||
|
|
@ -34,23 +32,6 @@ struct connectdata;
|
|||
struct Curl_sockaddr_ex;
|
||||
struct ip_quadruple;
|
||||
|
||||
/*
|
||||
* The Curl_sockaddr_ex structure is libcurl's external API curl_sockaddr
|
||||
* structure with enough space available to directly hold any
|
||||
* protocol-specific address structures. The variable declared here will be
|
||||
* used to pass / receive data to/from the fopensocket callback if this has
|
||||
* been set, before that, it is initialized from parameters.
|
||||
*/
|
||||
struct Curl_sockaddr_ex {
|
||||
int family;
|
||||
int socktype;
|
||||
int protocol;
|
||||
unsigned int addrlen;
|
||||
union {
|
||||
struct sockaddr sa;
|
||||
struct Curl_sockaddr_storage buf;
|
||||
} addr;
|
||||
};
|
||||
#define curl_sa_addr addr.sa
|
||||
#define curl_sa_addrbuf addr.buf
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue