Tag: adapter

If your application is looking for network adapters, it may be blind to see

A really long and annoying troubleshooting of a problem finally ended with a bug found in GetAdaptersInfo/GetAdaptersAddresses API. It may unexpectedly fail under the following conditions: 32-bit application 64-bit operating system or /3GB feature enabled on 32-bit operating system hosting process is linked with /LARGEADDRESSAWARE flag or has otherwise set it in binary header over…

Read the full article

UDP message sent off wrong network interface

This is a funny one and I wonder what is exactly causing such misbehavior. An UDP broadcasting socket is being bound to IP address 192.168.0.2: __E(m_Socket.Create(SOCK_DGRAM, IPPROTO_UDP) != INVALID_SOCKET); static const DWORD g_nBroadcastValue = 1; __E(m_Socket.SetOption(SOL_SOCKET, SO_BROADCAST, &g_nBroadcastValue, sizeof g_nBroadcastValue)); ZeroMemory(&m_LocalAddress, sizeof m_LocalAddress); m_LocalAddress.sin_family = AF_INET; m_LocalAddress.sin_port = htons(nPort); // 7365 m_LocalAddress.sin_addr.S_un.S_addr = htonl(nLocalIpAddress); //…

Read the full article