Originally posted by fromthecloud:
It's the <netinet/in.h> header, but does that contain any ICMP objects or functions? It provides basic connectivity, but I'm looking for ping/traceroute, etc.
Also, how do you call the CLI from C++? I've never done that before.
I've only done it from C, not C++ but that was awhile ago. I know I used some library, maybe try typing "man 3 intro" on a command line (without the quotes) to dig into the libraries included with OS X?
[Addendum]
I knew there were libraries to do this!

Check out the information located here: -->
http://www.cs.cf.ac.uk/Dave/C/node22...00000000000000
Check out the execl() and system() calls and see if these will do what you need. Of course you may need to set up some kind of stream (I think?) if you want to get the called program's output (in your case, the 'ping' command).
Check out this section as well: -->
http://www.cs.cf.ac.uk/Dave/C/node23...00000000000000
This uses popen() and this may be what you need. There's some sample code here.
This is the main page for this site: -->
http://www.cs.cf.ac.uk/Dave/C/CE.html <-- Very good starting C stuff.
Let me know if this helps.