devctls to io-net

Have the devctls to io-net changed in 630:

I have some code that runs on 621.
I use devctls to get/set info from network interfaces, address and
wifi settings.

When I build and run the code on a 630 system the basic devctls fail.

For example:
int is_wireless_if(const char *ifname)
{
int fd, r;
Nic_t nic;
fd = open_ionet_if(ifname);
if (fd < 0)
{
return -errno;
}

memset(&nic, 0, sizeof(nic)); /* structure members can be
unfilled */

r = devctl(fd, DCMD_IO_NET_NICINFO, &nic, sizeof(nic), NULL);
close(fd);

if (r != EOK)
{
printf(“Devctl failed to info error = %s\n”, strerror(errno));
return -r;
}

if (nic.media == NIC_MEDIA_802_11)
{
return 1;
}

return 0;
}

This devctl fails with the error " No such file or directory"

Thanks
Brendan

Hi Brendan,

Yes this devctl has been replaced by two devctls in 6.3:
DCMD_IO_NET_GET_STATS
DCMD_IO_NET_GET_CONFIG

See the DDK docs for details.
http://www.qnx.com/developers/docs/6.3.0SP1/ddk_en/network/io_net_registrant_funcs_t.html#devctl

Thanks,
Barry

“bren-uk” <brendan@ces-software.co-dot-uk.no-spam.invalid> wrote in message
news:dr7vs4$2v2$1@inn.qnx.com

Have the devctls to io-net changed in 630:

I have some code that runs on 621.
I use devctls to get/set info from network interfaces, address and
wifi settings.

When I build and run the code on a 630 system the basic devctls fail.

For example:
int is_wireless_if(const char *ifname)
{
int fd, r;
Nic_t nic;
fd = open_ionet_if(ifname);
if (fd < 0)
{
return -errno;
}

memset(&nic, 0, sizeof(nic)); /* structure members can be
unfilled */

r = devctl(fd, DCMD_IO_NET_NICINFO, &nic, sizeof(nic), NULL);
close(fd);

if (r != EOK)
{
printf(“Devctl failed to info error = %s\n”, strerror(errno));
return -r;
}

if (nic.media == NIC_MEDIA_802_11)
{
return 1;
}

return 0;
}

This devctl fails with the error " No such file or directory"

Thanks
Brendan