mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
IPv6 server side code
+ IPv6 server side support !!! Auth need to be fixed
This commit is contained in:
1 parent
ccf606fd9e
commit
a30d5d51a5
15 files changed
+141
-122
No files matched your search
+10
-4
@@ -109,11 +109,13 @@ int
|
||||
#define SAADDR(sa) (((struct sockaddr_in *)sa)->sin_family == AF_INET6? (unsigned char *)((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr : (unsigned char *)&((struct sockaddr_in *)sa)->sin_addr.s_addr)
|
||||
#define SAADDRLEN(sa) (((struct sockaddr_in *)sa)->sin_family == AF_INET6? 16:4)
|
||||
#define SASOCK(sa) (((struct sockaddr_in *)sa)->sin_family == AF_INET6? PF_INET6:PF_INET)
|
||||
#define SASIZE(sa) (((struct sockaddr_in *)sa)->sin_family == AF_INET6? sizeof(struct sockaddr_in6):sizeof(struct sockaddr_in))
|
||||
#else
|
||||
#define SAPORT(sa) (&((struct sockaddr_in *)sa)->sin_port)
|
||||
#define SAADDR(sa) ((unsigned char *)&((struct sockaddr_in *)sa)->sin_addr.a_addr)
|
||||
#define SAADDRLEN(sa) (4)
|
||||
#define SASOCK(sa) (PF_INET)
|
||||
#define SASIZE(sa) (sizeof(struct sockaddr_in))
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
@@ -431,8 +433,12 @@ struct clientparam {
|
||||
uint64_t
|
||||
maxtrafin64,
|
||||
maxtrafout64;
|
||||
struct sockaddr_in sinc,
|
||||
sins,
|
||||
#ifndef NOIPV6
|
||||
struct sockaddr_in6 sincl, sincr;
|
||||
#else
|
||||
struct sockaddr_in sincl, sincr;
|
||||
#endif
|
||||
struct sockaddr_in sins,
|
||||
req;
|
||||
|
||||
uint64_t statscli64,
|
||||
@@ -620,8 +626,8 @@ struct pluginlink {
|
||||
struct commands * commandhandlers;
|
||||
void * (*findbyname)(const char *name);
|
||||
int (*socksend)(SOCKET sock, unsigned char * buf, int bufsize, int to);
|
||||
int (*socksendto)(SOCKET sock, struct sockaddr_in * sin, unsigned char * buf, int bufsize, int to);
|
||||
int (*sockrecvfrom)(SOCKET sock, struct sockaddr_in * sin, unsigned char * buf, int bufsize, int to);
|
||||
int (*socksendto)(SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to);
|
||||
int (*sockrecvfrom)(SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to);
|
||||
int (*sockgetcharcli)(struct clientparam * param, int timeosec, int timeousec);
|
||||
int (*sockgetcharsrv)(struct clientparam * param, int timeosec, int timeousec);
|
||||
int (*sockgetlinebuf)(struct clientparam * param, DIRECTION which, unsigned char * buf, int bufsize, int delim, int to);
|
||||
|
||||
Reference in new issue
Block a user