Renamed the structs

This commit is contained in:
Gitea 2020-12-08 18:08:45 -06:00
parent 3f038d9a52
commit 30b87553c9

View file

@ -14,36 +14,36 @@ typedef uint16_t in_port_t;
typedef uint32_t in_addr_t;
#endif
typedef struct _ipv4_in_addr {
struct in_addr {
in_addr_t s_addr;
} in_addr;
};
typedef struct _ipv4_sockaddr_in {
struct sockaddr_in{
sa_family_t sin_family;
in_port_t sin_port;
in_addr sin_addr;
} sockaddr_in;
struct in_addr sin_addr;
};
typedef struct _ipv6_in_addr {
struct in6_addr {
uint8_t s6_addr[16];
} in6_addr;
};
typedef struct _ipv6_sockaddr_in {
sa_family_t sin6_family;
in_port_t sin6_port;
uint32_t sin6_flowinfo;
in6_addr sin6_addr;
struct in6_addr sin6_addr;
uint32_t sin6_scope_id;
} sockaddr_in6;
extern const in6_addr in6addr_any;
extern const in6_addr in6addr_loopback;
extern const struct in6_addr in6addr_any;
extern const struct in6_addr in6addr_loopback;
/* Need INIT macros for the above */
typedef struct _ipv6_mreq {
int6_addr ipv6mr_multiaddr;
struct ipv6_mreq {
struct int6_addr ipv6mr_multiaddr;
unsigned ipv6mr_interface;
} ipv6_mreq;
};
#define IPPROTO_IP 4
#define IPPROTO_IPV6 6