I try to compile the snmpUDPIPv6Domain.c with IPv6 enabled. I use
net-snmp.5.4.0 on Windows.

The following code doesn't compile:

    struct sockaddr_storage ss;
    memset(&ss, 0, sizeof(ss));

    switch (af) {
    case PF_INET:
        if (mask->SS_FAMILY != PF_INET || network->SS_FAMILY != PF_INET)
{

with the following error message:

\build\Appnet-snmp-5.4.0\src\snmplib\snmpUDPIPv6Domain.c(896) : error
C2039: 'SS_FAMILY' : is not a member of 'sockaddr_storage'
        C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinSock2.h(581) : see declaration of
'sockaddr_storage'

The snmpUDPIPv6Domain.c file has the following macro definition:

#if STRUCT_SOCKADDR_STORAGE_HAS_SS_FAMILY
#define SS_FAMILY ss_family
#elif STRUCT_SOCKADDR_STORAGE_HAS___SS_FAMILY
#define SS_FAMILY __ss_family
#endif

But the STRUCT_SOCKADDR_STORAGE_HAS_SS_FAMILY is not defined anywhere.
Actually the only place it's mentioned is in the acconfig.h:

/* Does struct sockaddr_storage have a ss_family field? */
#undef STRUCT_SOCKADDR_STORAGE_HAS_SS_FAMILY

What should I do to turn this macro on?

Thanks,
Katy

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to