summaryrefslogtreecommitdiff
path: root/include/m_netlib.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-27 21:30:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-27 21:30:30 +0000
commit8549e48fbb8520027d4d8ba74b6f12f3042faebc (patch)
treef4aa951f6c13d179ca711ae5977eb38698dcaf52 /include/m_netlib.h
parentd27904ad1988ba6f85228f3c0cb7de8379a3147b (diff)
ipv6 sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@205 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_netlib.h')
-rw-r--r--include/m_netlib.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/m_netlib.h b/include/m_netlib.h
index af9f21e51e..34a6647c66 100644
--- a/include/m_netlib.h
+++ b/include/m_netlib.h
@@ -424,6 +424,48 @@ typedef struct {
#define Netlib_GetBase64EncodedBufferSize(cbDecoded) (((cbDecoded)*4+11)/12*4+1)
#define MS_NETLIB_BASE64ENCODE "Netlib/Base64Encode"
+// Converts string representation of IP and port into numerical SOCKADDR_INET
+// IPv4 could supplied in formats address:port or address
+// IPv6 could supplied in formats [address]:port or [address]
+// wParam=(WPARAM)(char*) string to convert
+// lParam=(LPARAM)(SOCKADDR_INET*) numeric IP address structure
+// Returns 0 on success
+#define MS_NETLIB_STARINGTOADDRESS "Netlib/StringToAddress"
+
+// Converts numerical representation of IP in SOCKADDR_INET into string representation with IP and port
+// IPv4 will be supplied in formats address:port or address
+// IPv6 will be supplied in formats [address]:port or [address]
+// wParam=(WPARAM)(int) 0 - lParam - (sockaddr_gen*); 1 - lParam - (unsigned) in host byte order
+// lParam=(LPARAM)(sockaddr_gen*) or (unsigned) numeric IP address structure
+// Returns pointer to the string or NULL if not successful
+#define MS_NETLIB_ADDRESSTOSTRING "Netlib/AddressToString"
+
+typedef struct {
+ int cbSize;
+ char szIpPort[64];
+ unsigned dwIpv4;
+ WORD wPort;
+} NETLIBCONNINFO;
+
+// Get connection Information
+// IPv4 will be supplied in formats address:port or address
+// IPv6 will be supplied in formats [address]:port or [address]
+// wParam=(WPARAM)(HANDLE)hConnection
+// lParam=(LPARAM)(NETLIBCONNINFO*) pointer to the connection information structure to fill
+// Returns 0 if successful
+#define MS_NETLIB_GETCONNECTIONINFO "Netlib/GetConnectionInfo"
+
+typedef struct {
+ unsigned cbNum;
+ char szIp[1][64];
+} NETLIBIPLIST;
+
+// Get connection Information
+// wParam=(WPARAM)IP filter 1 - return global only IPv6 address, 0 all IPs
+// Returns (INT_PTR)(NETLIBIPLIST*) numeric IP address address array
+// the last element of the array is all 0s, 0 if not successful
+#define MS_NETLIB_GETMYIP "Netlib/GetMyIP"
+
//Send an HTTP request over a connection
//wParam=(WPARAM)(HANDLE)hConnection
//lParam=(LPARAM)(NETLIBHTTPREQUEST*)&nlhr