我希望获得我自己的 IP 地址,以便将该信息发布到对等网络中。在 POSIX/C 中,我们有getaddrinfo(NULL, ...),但这似乎总是返回INADDR_ANYor INADDR_LOOPBACK,这对我来说没用。
getaddrinfo(NULL, ...)
INADDR_ANY
INADDR_LOOPBACK
有什么建议?
c networking posix ip-address
c ×1
ip-address ×1
networking ×1
posix ×1