[tor-commits] [obfsproxy/master] Removed fake sockaddr_in6 definition.
nickm at torproject.org
nickm at torproject.org
Mon Jun 20 14:42:26 UTC 2011
commit c896b0536ae84c9b197a921f4fd650921bec2ce1
Author: George Kadianakis <desnacked at gmail.com>
Date: Mon Jun 20 04:07:09 2011 +0200
Removed fake sockaddr_in6 definition.
---
src/socks.c | 35 ++---------------------------------
1 files changed, 2 insertions(+), 33 deletions(-)
diff --git a/src/socks.c b/src/socks.c
index 13d5375..7e6f6b2 100644
--- a/src/socks.c
+++ b/src/socks.c
@@ -5,6 +5,7 @@
#include <sys/types.h>
#ifdef _WIN32
#include <Winsock2.h>
+#include <Ws2tcpip.h>
#else
#include <arpa/inet.h>
#include <sys/socket.h>
@@ -54,38 +55,6 @@ static enum socks_ret socks5_do_negotiation(struct evbuffer *dest,
typedef unsigned char uchar;
-/*
- Necessary definitions for platforms that don't support
- sockaddr_in6 and u_int16_t
-*/
-#ifdef _WIN32
-typedef uint16_t sa_family_t;
-
-struct in6_addr
-{
- union {
- uint8_t u6_addr8[16];
- uint16_t u6_addr16[8];
- uint32_t u6_addr32[4];
- } in6_u;
-#define s6_addr in6_u.u6_addr8
-#define s6_addr16 in6_u.u6_addr16
-#define s6_addr32 in6_u.u6_addr32
-};
-
-/* Define struct sockaddr_in6 on platforms that do not have it. See notes
- * on struct in6_addr. */
-struct sockaddr_in6 {
- sa_family_t sin6_family;
- uint16_t sin6_port;
- // uint32_t sin6_flowinfo;
- struct in6_addr sin6_addr;
- // uint32_t sin6_scope_id;
-};
-
-typedef unsigned short u_int16_t;
-#endif
-
socks_state_t *
socks_state_new(void)
{
@@ -166,7 +135,7 @@ socks5_handle_request(struct evbuffer *source, struct parsereq *parsereq)
/** XXX: max FQDN size is 255. */
/* #define MAXFQDN */
char destaddr[255+1]; /* Dest address */
- u_int16_t destport; /* Dest port */
+ uint16_t destport; /* Dest port */
unsigned int buflength = evbuffer_get_length(source);
More information about the tor-commits
mailing list