diff options
author | Alberto Gonzalez Iniesta <agi@inittab.org> | 2013-01-10 17:54:01 +0100 |
---|---|---|
committer | Alberto Gonzalez Iniesta <agi@inittab.org> | 2013-01-10 17:54:01 +0100 |
commit | 9e3cceecfca10ef806f193ec41e0e0a44706c328 (patch) | |
tree | 7198ea4f45a8a88c0828acd4eb4afe817dbe23a7 /src/openvpn/socket.h | |
parent | 9abc160bcbe71cfa43952943c6dff41e8016c32f (diff) |
Imported Upstream version 2.3.0upstream/2.3.0
Diffstat (limited to 'src/openvpn/socket.h')
-rw-r--r-- | src/openvpn/socket.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/openvpn/socket.h b/src/openvpn/socket.h index 44f1098..4e7e7f8 100644 --- a/src/openvpn/socket.h +++ b/src/openvpn/socket.h @@ -237,7 +237,11 @@ struct link_socket #if PASSTOS_CAPABILITY /* used to get/set TOS. */ +#if defined(TARGET_LINUX) uint8_t ptos; +#else /* all the BSDs, Solaris, MacOS use plain "int" -> see "man ip" there */ + int ptos; +#endif bool ptos_defined; #endif @@ -478,11 +482,6 @@ bool unix_socket_get_peer_uid_gid (const socket_descriptor_t sd, int *uid, int * #define GETADDR_UPDATE_MANAGEMENT_STATE (1<<8) #define GETADDR_RANDOMIZE (1<<9) -/* [ab]use flags bits to get socktype info downstream */ -/* TODO(jjo): resolve tradeoff between hackiness|args-overhead */ -#define GETADDR_DGRAM (1<<10) -#define dnsflags_to_socktype(flags) ((flags & GETADDR_DGRAM) ? SOCK_DGRAM : SOCK_STREAM) - in_addr_t getaddr (unsigned int flags, const char *hostname, int resolve_retry_seconds, |