From 74d9bf0d5525426feae4ea21e2a81034ddcf4d7f Mon Sep 17 00:00:00 2001 From: Robin Cornelius Date: Mon, 28 Mar 2011 11:20:06 +0100 Subject: VWR-20801 Implement SOCKS 5 Proxy for the viewer --- indra/llmessage/net.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llmessage/net.h') diff --git a/indra/llmessage/net.h b/indra/llmessage/net.h index 9f4f5c5821..d93ed20c98 100644 --- a/indra/llmessage/net.h +++ b/indra/llmessage/net.h @@ -52,6 +52,11 @@ U32 get_sender_ip(void); LLHost get_receiving_interface(); U32 get_receiving_interface_ip(void); +// Some helpful tcp functions added for the socks 5 proxy support +S32 tcp_open_channel(LLHost host); // Open a tcp channel to a given host +void tcp_close_channel(S32 handle); // Close an open tcp channel +int tcp_handshake(S32 handle, char * dataout, int outlen, char * datain, int maxinlen); // Do a TCP data handshake + const char* u32_to_ip_string(U32 ip); // Returns pointer to internal string buffer, "(bad IP addr)" on failure, cannot nest calls char* u32_to_ip_string(U32 ip, char *ip_string); // NULL on failure, ip_string on success, you must allocate at least MAXADDRSTR chars U32 ip_string_to_u32(const char* ip_string); // Wrapper for inet_addr() -- cgit v1.2.3 From 6ce2c20a06e32825f4e4260575059a9867510ecd Mon Sep 17 00:00:00 2001 From: Logan Dethrow Date: Fri, 10 Jun 2011 17:34:00 -0400 Subject: STORM-1112 First pass at cleanup of SOCKS 5 proxy code based on Linden Coding Standard and comments in the code review. --- indra/llmessage/net.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llmessage/net.h') diff --git a/indra/llmessage/net.h b/indra/llmessage/net.h index d93ed20c98..047e8ce646 100644 --- a/indra/llmessage/net.h +++ b/indra/llmessage/net.h @@ -46,10 +46,10 @@ S32 receive_packet(int hSocket, char * receiveBuffer); BOOL send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort); // Returns TRUE on success. //void get_sender(char * tmp); -LLHost get_sender(); +LLHost get_sender(); U32 get_sender_port(); U32 get_sender_ip(void); -LLHost get_receiving_interface(); +LLHost get_receiving_interface(); U32 get_receiving_interface_ip(void); // Some helpful tcp functions added for the socks 5 proxy support -- cgit v1.2.3 From 20100ba38c6d3fa16ab11be2ed326ab0964c4c21 Mon Sep 17 00:00:00 2001 From: Logan Dethrow Date: Tue, 21 Jun 2011 17:09:12 -0400 Subject: Refactored SOCKS 5 handshake to use existing LLSocket class. --- indra/llmessage/net.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/llmessage/net.h') diff --git a/indra/llmessage/net.h b/indra/llmessage/net.h index 047e8ce646..0d91cf2a2f 100644 --- a/indra/llmessage/net.h +++ b/indra/llmessage/net.h @@ -27,6 +27,9 @@ #ifndef LL_NET_H #define LL_NET_H +#include "lliosocket.h" +#include "llapr.h" + class LLTimer; class LLHost; @@ -52,10 +55,10 @@ U32 get_sender_ip(void); LLHost get_receiving_interface(); U32 get_receiving_interface_ip(void); -// Some helpful tcp functions added for the socks 5 proxy support -S32 tcp_open_channel(LLHost host); // Open a tcp channel to a given host -void tcp_close_channel(S32 handle); // Close an open tcp channel -int tcp_handshake(S32 handle, char * dataout, int outlen, char * datain, int maxinlen); // Do a TCP data handshake +// Some helpful TCP functions +LLSocket::ptr_t tcp_open_channel(LLHost host); // Open a TCP channel to a given host +void tcp_close_channel(LLSocket::ptr_t handle); // Close an open TCP channel +int tcp_handshake(LLSocket::ptr_t handle, char * dataout, apr_size_t outlen, char * datain, apr_size_t maxinlen); // Do a TCP data handshake const char* u32_to_ip_string(U32 ip); // Returns pointer to internal string buffer, "(bad IP addr)" on failure, cannot nest calls char* u32_to_ip_string(U32 ip, char *ip_string); // NULL on failure, ip_string on success, you must allocate at least MAXADDRSTR chars -- cgit v1.2.3 From f91d40c25949ee8c5b1d5c1babab62d6dd90d0c8 Mon Sep 17 00:00:00 2001 From: Logan Dethrow Date: Wed, 22 Jun 2011 14:35:31 -0400 Subject: Merge, fixed build issues by refactoring SOCKS 5 code. --- indra/llmessage/net.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'indra/llmessage/net.h') diff --git a/indra/llmessage/net.h b/indra/llmessage/net.h index 0d91cf2a2f..0f2437479d 100644 --- a/indra/llmessage/net.h +++ b/indra/llmessage/net.h @@ -27,9 +27,6 @@ #ifndef LL_NET_H #define LL_NET_H -#include "lliosocket.h" -#include "llapr.h" - class LLTimer; class LLHost; @@ -55,11 +52,6 @@ U32 get_sender_ip(void); LLHost get_receiving_interface(); U32 get_receiving_interface_ip(void); -// Some helpful TCP functions -LLSocket::ptr_t tcp_open_channel(LLHost host); // Open a TCP channel to a given host -void tcp_close_channel(LLSocket::ptr_t handle); // Close an open TCP channel -int tcp_handshake(LLSocket::ptr_t handle, char * dataout, apr_size_t outlen, char * datain, apr_size_t maxinlen); // Do a TCP data handshake - const char* u32_to_ip_string(U32 ip); // Returns pointer to internal string buffer, "(bad IP addr)" on failure, cannot nest calls char* u32_to_ip_string(U32 ip, char *ip_string); // NULL on failure, ip_string on success, you must allocate at least MAXADDRSTR chars U32 ip_string_to_u32(const char* ip_string); // Wrapper for inet_addr() -- cgit v1.2.3