Re: Assigning user required Interface index to Network interfaces in Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 23 Jan 2007 06:55:17 +0530
"Anil Kumar" <anil123@xxxxxxxxx> wrote:

> Hi,
> 
>    I want to control the interface index assigned  to   network
> interfaces when they are created  in Linux Operating System.
>  I am using TUN/TAP driver to create virtual network interfaces in
> linux from user application. Normally by default Linux by itself
> assigns the interface index to the inetrfaces. I can get the inetrface
> information by reading the file /proc/net/igmp   or ioctl command.
>      My requirement is that i need to assign some fixed interfaces
> index to these interfaces
>    created in linux. For example:
>        Interface name              Interface Index
>        =============================
>        interface-0
>    10
>        interface-1                      11
>       etc.
> 
>    Using ioctl i am not finding information how to change the
> interface index. Please let me know  how can i assign the fixed
> interface index to network interfaces created in linux OR is there any
> way to control interface index assignment to network interfaces in
> Linux.
> 
> 
> Regards,
> Anil

I assume you mean the ifindex returned by SIOCGIFINDEX and in
/sys/class/net/XXX/ifindex. There is no API to set it, why do you
need it to be set? It is assigned as a unique value by the kernel
for each new device added.

-- 
Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux