Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Not able to change MAC of network interface using ioctl calls in QNX 6.6: Page 1 of 2 (2 Items)
   
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);