summaryrefslogtreecommitdiff
path: root/src/ivysocket.h
diff options
context:
space:
mode:
authorfcolin2010-10-20 14:13:05 +0000
committerfcolin2010-10-20 14:13:05 +0000
commit9be158369991834e2da8afc7308ceee0c7ef9b13 (patch)
tree877c204fe3224758efa7683d16a6f856dd5b8657 /src/ivysocket.h
parent83a8edca09bd2d9da7df4e690a0352aa193057d9 (diff)
downloadivy-c-9be158369991834e2da8afc7308ceee0c7ef9b13.zip
ivy-c-9be158369991834e2da8afc7308ceee0c7ef9b13.tar.gz
ivy-c-9be158369991834e2da8afc7308ceee0c7ef9b13.tar.bz2
ivy-c-9be158369991834e2da8afc7308ceee0c7ef9b13.tar.xz
portage IPV6
reste a revoir la routine d'analyse du domaine IVY et pour l'instant on ne peut pas utiliser IPV6 et IPV4 en simultané
Diffstat (limited to 'src/ivysocket.h')
-rw-r--r--src/ivysocket.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ivysocket.h b/src/ivysocket.h
index 8096084..5e8da13 100644
--- a/src/ivysocket.h
+++ b/src/ivysocket.h
@@ -58,7 +58,7 @@ typedef void (*SocketInterpretation) (Client client, const void *data, char *lig
/* Server Part */
typedef struct _server *Server;
-extern Server SocketServer(unsigned short port,
+extern Server SocketServer(int ipv6, unsigned short port,
void*(*create)(Client client),
void(*handle_delete)(Client client, const void *data),
void(*handle_decongestion)(Client client, const void *data),
@@ -76,14 +76,14 @@ extern char *SocketGetPeerHost( Client client );
extern void SocketSetData( Client client, const void *data );
extern const void *SocketGetData( Client client );
extern void SocketBroadcast( char *fmt, ... );
-extern Client SocketConnect( char * host, unsigned short port,
+extern Client SocketConnect( int ipv6, char * host, unsigned short port,
void *data,
SocketInterpretation interpretation,
void (*handle_delete)(Client client, const void *data),
void(*handle_decongestion)(Client client, const void *data)
);
-extern Client SocketConnectAddr( struct in_addr * addr, unsigned short port,
+extern Client SocketConnectAddr( int ipv6, struct sockaddr* addr, unsigned short port,
void *data,
SocketInterpretation interpretation,
void (*handle_delete)(Client client, const void *data),
@@ -96,15 +96,17 @@ extern int SocketWaitForReply( Client client, char *buffer, int size, int delai)
/* Creation d'une socket en mode non connecte */
/* et ecoute des messages */
extern Client SocketBroadcastCreate(
+ int ipv6,
unsigned short port,
void *data,
SocketInterpretation interpretation
);
/* Socket Multicast */
extern int SocketAddMember( Client client, unsigned long host );
+extern int SocketAddMember6( Client client, struct in6_addr* host );
/* recuperation de l'emetteur du message */
-extern struct in_addr * SocketGetRemoteAddr( Client client );
+extern struct sockaddr* SocketGetRemoteAddr( Client client );
extern void SocketSetUuid (Client client, const char *uuid);
extern const char* SocketGetUuid (const Client client);
extern int SocketCmpUuid (const Client c1, const Client c2);
@@ -114,6 +116,7 @@ extern unsigned short int SocketGetLocalPort ( Client client );
extern unsigned short int SocketGetRemotePort ( Client client );
/* emmission d'un broadcast UDP */
extern void SocketSendBroadcast( Client client, unsigned long host, unsigned short port, char *fmt, ... );
+extern void SocketSendBroadcast6( Client client, struct in6_addr* host, unsigned short port, char *fmt, ... );
#ifdef __cplusplus
}