tech-net archive

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

Re: SIOCSIFADDR for AF_INET



On Wed, Mar 24, 2010 at 05:55:27PM +0100, Manuel Bouyer wrote:
> Hi,
> while testing agr(4) with a cisco switch, I discovered that agr
> relies on SIOCSIFADDR for AF_INET doing something usefull:

I think that it relies on SIOCINITIFADDR for AF_LINK to do something
useful?

> ifconfig agr0 agrport epic0 agrport wm0  works, while
> ifconfig agr0 agrport wm0  agrport epic0 doens't.

As Thor says, Darran hacked wm0 especially to deal with this.
> What is the correct way of doing this ? ifconfig(4) uses SIOCALIFADDR
> for this, but this works on a socket not a ifp; can it easily be used from
> a kernel interface driver ?

agr(4) should create an AF_LINK socket and use it in a call to
ifioctl(..., SIOCALIFADDR, ...). It needs to call that in a thread
context, btw.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index