Giji G(deleted)
|
Not able to change MAC of network interface using ioctl calls in QNX 6.6
|
Giji G(deleted)
12/29/2017 7:17 AM
post118297
|
Not able to change MAC of network interface using ioctl calls in QNX 6.6
I am trying to change the MAC address of a network interface using ioctl() api in my program, but it always returns
error 103 (Operation not supported).
I am able to change it through the shell using command "ifconfig eth1 link 00:50:56:2e:88:1a active".
I want to do the same using system APIs, but it gives error. Below is the code snippet, please suggest any other way to
do the same
struct ifaliasreq addreq;
memset(&addreq, 0, sizeof(addreq));
strcpy(addreq.ifra_name, "eth1");
addreq.ifra_addr.sa_family = AF_LINK;
bcopy(mac, addreq.ifra_addr.sa_data, 6);
ioctl(s, SIOCAIFADDR, &addreq);
|
|
|