~mingw-w64/mingw-w64/experimental

« back to all changes in this revision

Viewing changes to ros-privexp/mingw-w64-crt/libsrc/ws2tcpip/in6_is_addr_mc_sitelocal.c

  • Committer: NightStrike
  • Date: 2010-08-11 22:20:57 UTC
  • Revision ID: svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:experimental:3266
Branch for adding option for supporting ros

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef WIN32_LEAN_AND_MEAN
 
2
#define WIN32_LEAN_AND_MEAN
 
3
#endif
 
4
#undef  __CRT__NO_INLINE
 
5
#define __CRT__NO_INLINE
 
6
#include <winsock2.h>
 
7
#include <ws2tcpip.h>
 
8
 
 
9
#undef  IN6_IS_ADDR_MULTICAST
 
10
#define IN6_IS_ADDR_MULTICAST(a)        ( (a)->s6_bytes[0] == 0xff )
 
11
 
 
12
int IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *a)
 
13
{
 
14
        return IN6_IS_ADDR_MULTICAST(a) &&
 
15
                ((a->s6_bytes[1] & 0xf) == 5);
 
16
}