From 9be158369991834e2da8afc7308ceee0c7ef9b13 Mon Sep 17 00:00:00 2001 From: fcolin Date: Wed, 20 Oct 2010 14:13:05 +0000 Subject: 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é --- src/ivysocket.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/ivysocket.h') 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 } -- cgit v1.1