Hi! I am figuring out the mechanism in the roscpp package, and I found there's codes in the function determineHost() in network.cpp:
There's a comment : fall back on interface search, which will yield an IP address
But I don't know what does it mean~
Can someone give me a brief explanation?
Thanks in advance, Ricky.
The HAVE_IFADDRS_H symbol is defined by the ros build system if your system has the ifaddrs.h header; you should never have to define it yourself.
It looks like that particular chunk of code is trying to find an outward-facing IP address to use to identify the computer it's running on.
If you want more information about it, I suggest reading the man page for getifaddrs.
Asked: 2012-01-01 05:37:28 -0500
Seen: 104 times
Last updated: Jan 01 '12