2001-02-05 18:46:11 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/param.h>
|
2003-11-06 20:47:59 +00:00
|
|
|
#ifndef __MINGW32__
|
2001-02-05 18:46:11 +00:00
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netinet/in.h>
|
2003-11-06 20:47:59 +00:00
|
|
|
#endif
|
|
|
|
#include "windoze.h"
|
2001-02-05 18:46:11 +00:00
|
|
|
#include "socket.h"
|
|
|
|
#include "byte.h"
|
|
|
|
#include "haveip6.h"
|
|
|
|
#include "ip6.h"
|
|
|
|
|
|
|
|
#ifndef IPV6_MULTICAST_HOPS
|
|
|
|
#undef LIBC_HAS_IP6
|
|
|
|
#endif
|
|
|
|
|
2001-02-05 19:35:33 +00:00
|
|
|
int socket_mchopcount6(int s,char TTL)
|
2001-02-05 18:46:11 +00:00
|
|
|
{
|
|
|
|
#ifdef LIBC_HAS_IP6
|
2003-11-06 20:47:59 +00:00
|
|
|
return winsock2errno(setsockopt(s,IPPROTO_IPV6,IPV6_MULTICAST_HOPS,&TTL,sizeof TTL));
|
2001-02-05 18:46:11 +00:00
|
|
|
#else
|
2003-11-06 20:47:59 +00:00
|
|
|
return winsock2errno(socket_mcttl4(s,TTL));
|
2001-02-05 18:46:11 +00:00
|
|
|
#endif
|
|
|
|
}
|