Re: [PATCH] netdevice.7: Update documentation for SIOCGIFADDR SIOCSIFADDR SIOCDIFADDR

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

 



On Saturday 02 January 2021 19:10:54 Pali Rohár wrote:
> Hello!
> 
> On Saturday 02 January 2021 19:04:06 Alejandro Colomar (man-pages) wrote:
> > I've seen there's ifr_ifindex too (see SIOCGIFNAME).
> > Can it be used in the same way as ifr6_ifindex?
> 
> Sorry, I do not know too. In all applications I saw that they are using
> ifr_name for IPv4 stuff.
> 
> This needs to be tested if ifr_ifindex instead of ifr_name works for
> specifying IPv4 address.

Now I can answer, no, it cannot be used. ifr_ifindex is part of union
structure where is also ifr_addr. So you can specify either ifr_ifindex
or ifr_addr, but not both fields at the same time.

Therefore network interface for IPv4 address can be specified only via
ifr_name.



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux