HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!
some help me how to correctly place the ip of my pc.
ip 192.168.1.100
I do not know where to place my ip I get lost easily.
ip 192.168.1.100
I do not know where to place my ip I get lost easily.
char * netip = inet_ntoa(sai->sin_addr);
if (!strncmp(netip, "999.999", 7)) // ignore if address is starting with 192
{
strlcpy(g_szInternalIP, netip, sizeof(g_szInternalIP));
#ifndef __WIN32__
fprintf(stderr, "INTERNAL_IP: %s interface %s\n", netip, ifap->ifa_name);
#else
fprintf(stderr, "INTERNAL_IP: %s\n", netip);
#endif
}
else if (!strncmp(netip, "99.", 3))
{
strlcpy(g_szInternalIP, netip, sizeof(g_szInternalIP));
#ifndef __WIN32__
fprintf(stderr, "INTERNAL_IP: %s interface %s\n", netip, ifap->ifa_name);
#else
fprintf(stderr, "INTERNAL_IP: %s\n", netip);
#endif
}
else if (g_szPublicIP[0] == '0')
{
strlcpy(g_szPublicIP, netip, sizeof(g_szPublicIP));
#ifndef __WIN32__
fprintf(stderr, "PUBLIC_IP: %s interface %s\n", netip, ifap->ifa_name);
#else
fprintf(stderr, "PUBLIC_IP: %s\n", netip);
#endif
}
}
#ifndef __WIN32__
freeifaddrs( ifaddrp );
#else
WSACleanup();
#endif
if (g_szPublicIP[0] != '0')
return true;
else
return false;
}
