On one of them (where I have pb 5.31 and xcode installed), ExamineIPAddresses() works and allows me to list the available (ipv4) IP addresses. On the other, ExamineIPAddresses() returns 0, which tells me it didn't work, but gives no indication as to why it didn't work. (And, yes, I've called InitNetwork() first).
Both machines have wired connections to the same switch and have IP addresses (as reported via ifconfig) on the same subnet.
Some code that reproduces the problem (on one mac but not the other):
Code: Select all
OpenConsole()
InitNetwork()
result=ExamineIPAddresses()
If result
Repeat
ip=NextIPAddress()
if ip
PrintN("IP: "+IPString(ip))
endif
Until ip=0
Else
PrintN("ExamineIPAddresses returned 0")
EndIfAnyone any ideas as to what could cause that? Or how to get more diagnostic info?
As a fallback, I've tried using RunProgram("ifconfig", "en0") and parsing the output, and I can read the IP successfully that way, but that's a horrible hack...
