mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
getip46() added
int getip46(int family, unsigned char *name, struct sockaddr_storage *sa) family: IPv4/IPv6 preference order 4, 6, 46, 64 or 0 for getip() compatibility. name - hostname, sa - destination sockaddr (must be large enougth) returns: 0 fo failed resolution IP address for family = 0 AF_INET/AF_INET6 overwise.
This commit is contained in:
1 parent
aad2559004
commit
6b99de69c4
2 files changed
+69
-3
No files matched your search
@@ -47,6 +47,10 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#ifndef NOIPV6
|
||||
#include <Ws2tcpip.h>
|
||||
|
||||
#endif
|
||||
#ifndef _WINCE
|
||||
#include <io.h>
|
||||
#else
|
||||
@@ -188,6 +192,11 @@ int myinet_ntoa(struct in_addr in, char * buf);
|
||||
extern unsigned long nservers[MAXNSERVERS];
|
||||
extern unsigned long authnserver;
|
||||
unsigned long getip(unsigned char *name);
|
||||
#ifdef NOIPV6
|
||||
unsigned long getip46(int family, unsigned char *name, struct sockaddr_in *sa){
|
||||
#else
|
||||
unsigned long getip46(int family, unsigned char *name, struct sockaddr_storage *sa){
|
||||
#endif
|
||||
unsigned long myresolver(unsigned char *);
|
||||
unsigned long fakeresolver (unsigned char *name);
|
||||
int initdnshashtable(unsigned nhashsize);
|
||||
|
||||
Reference in new issue
Block a user