unable to set ipv6 interface name using ioctl
i am trying to create a virtual ip on eth0. but the new interface created is with same name as eth0, instead of eth0:1.
i tried something like this
socv6=socket(AF_INET6, SOCK_DGRAM, 0);
strcpy(ifr.ifr_name,"eth0:1");
ioctl(socv6, SIOGIFINDEX, &ifr);
ifr6.ifr6_ifindex = ifr.ifr_ifindex;
ifr6.ifr6_prefixlen = 64;
ipv6add= (struct in6_addr *)&ifr.ifr_addr;
inet_pton(AF_INET6, "fe80::19", &ifr6.ifr6_addr);
ioctl(socv6,SIOCSIFADDR,&ifr6);
|