Find IP Address without Java

Morgan's icon

I'm interested in getting the IP address of the current machine on the local network, but I cannot use any Java (i.e. [mxj net.local]). One possible solution would be to use the [shell] object or similar to run 'ifconfig' and parse the output, but last time I used the [shell] object, it was buggy.

Can you think of any alternatives? I've never written an external – do you think it would be simple to acquire this information from C?

Needs to run on OSX only.

gwsounddsg's icon

This would be super helpful for me as well. Let me know if you find a solution!!

GW

Ad.'s icon

there's no issue with shell, parse output with regexp- works just fine- post the patch if you want debbug.
though if you want to rewrite maxmsp go ahead ;)

dhjdhjdhj's icon

Hmmm, I have had sufficient problems with shell in the past that I wrote my own last week. (Attached is screenshot with example using ifconfig).
I'm happy to make it available if anyone wants it.

4519.screenshot1224.png
png
dhjdhjdhj's icon

Per a few requests, I've posted my external shell object at http://max4eigenharp.com/?p=83