tech-net archive

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

Re: Patch to implement SIOCGIFINDEX

On Apr 2, 2013, at 2:14 PM, Ty Sarna <> wrote:

> On Apr 2, 2013, at 4:55 PM, Lloyd Parkes 
> <> wrote:
>> On 3/04/2013, at 5:52 AM, Ty Sarna <> wrote:
>>> Still, what I've done now is to add an "ifname" field as well. By default 
>>> it's
>>> ignored and so the interface is backwards compatible, but I allow setting 
>>> the
>>> index to -1, in which case the name is used instead.
>> I'm pretty sure that ifname isn't especially useful.
> It's really the most useful thing for this use (sockaddr_can), because it's
> stable across the attachment life of an interface, and it's the only 
> identifier
> a user knows for an interface anyway -- so it makes the most sense to use it
> directly rather than indirecting through index numbers, which only add 
> fragility
> anyway, as we've seen.

ifindex is also consistent for the lifetime of an interface.

Home | Main Index | Thread Index | Old Index