Anyone helped you out yet?
One method is to scan the interfaces, looking for one that is 'up' and
is not the loopback interface. For an example, see attached file.
On 4/27/06, @work <[EMAIL PROTECTED]> wrote:
> Hi,
> Can somebody teach me how to acquire the IP Address of the device...
> Thank you.
>
> --
> For information on using the PalmSource Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>
--
yisdersomenimororsisasisdenderisorsis?
Jeff Loucks
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
static UInt32 PrvNetLibScanIF(void)
{
UInt32 ipAddr,ifCreator;
UInt16 ifIndex,ifInstance,size;
UInt8 ifUp;
ipAddr = 0;
for (ifIndex=0; ;ifIndex++)
{
if (NetLibIFGet(NetLibRefnum,ifIndex,&ifCreator,&ifInstance))
break;
size = sizeof(ifUp);
if
(NetLibIFSettingGet(NetLibRefnum,ifCreator,ifInstance,netIFSettingUp,&ifUp,&size))
continue;
size = sizeof(ipAddr);
if
(NetLibIFSettingGet(NetLibRefnum,ifCreator,ifInstance,netIFSettingActualIPAddr,&ipAddr,&size))
continue;
if (ifUp && ifCreator != netIFCreatorLoop)
break;
}
return ipAddr;
}