Tor  0.4.7.0-alpha-dev
Data Structures | Macros | Typedefs
inaddr_st.h File Reference

Define in6_addr, its members, and related types on platforms that lack it. More...

#include "orconfig.h"
#include <stddef.h>
#include "lib/cc/torint.h"

Go to the source code of this file.

Data Structures

struct  in6_addr
 
struct  sockaddr_in6
 

Macros

#define s6_addr   in6_u.u6_addr8
 
#define s6_addr16   in6_u.u6_addr16
 
#define s6_addr32   in6_u.u6_addr32
 
#define S6_ADDR32(x)   ((uint32_t*)((char*)&(x).s6_addr))
 
#define S6_ADDR16(x)   ((uint16_t*)((char*)&(x).s6_addr))
 

Typedefs

typedef uint16_t sa_family_t
 

Detailed Description

Define in6_addr, its members, and related types on platforms that lack it.

Definition in file inaddr_st.h.

Macro Definition Documentation

◆ S6_ADDR32

#define S6_ADDR32 (   x)    ((uint32_t*)((char*)&(x).s6_addr))

Apparently, MS and Solaris don't define s6_addr16 or s6_addr32; these macros get you a pointer to s6_addr32 or local equivalent.

Definition at line 86 of file inaddr_st.h.

Typedef Documentation

◆ sa_family_t

typedef uint16_t sa_family_t

Many BSD variants seem not to define these.

Definition at line 77 of file inaddr_st.h.