Obtaining Own External IP Address in POSIX C

前端 未结 6 1718
长发绾君心
长发绾君心 2021-01-06 19:48

I\'m looking to obtain my own IP address in order to publish that information in to a Peer-to-Peer network. In POSIX/C we have getaddrinfo(NULL, ...), but this

6条回答
  •  清歌不尽
    2021-01-06 20:35

    Did you check ai_next field of returned structure?

    getaddrinfo() returns linked list of addresses.

提交回复
热议问题