bsdnet attach

Chris Johns cjohns at cybertec.com.au
Fri Jun 8 22:31:17 UTC 2001


Joel Sherrill wrote:
> 
> peter.o.mueller at gmx.de wrote:
> >
> > Hi,
> >
> > building some network code I found that the attach function required in
> > rtems_bsdnet_ifconfig has a 2nd parameter.  But in the rtems_bsdnet.h file
> > the prototype for rtems_bsdnet_attach does not have this 2nd parameter. I
> > think this function is not intended for use in the struct. More confusing is
> > that the attach function for the loopback does not have the 2nd parameter
> > too.
> >
> > void
> > rtems_bsdnet_loopattach(dummy)
> >         void *dummy;
> > {
> >
> > Can anybody bring some light into this?
> 
> The parameter was added and not everything was consistently updated.
> The
> send parameter is an attach/detach flag.
> 

It is only needed if the attach function supports attach/detach. If the
loopback device does not support attach/detach there is not need to
provide it, ie it does no harm. The change was made this way so we did
not have to change drivers or break existing code.

So why was the parameter added ?

It was added so people who need to detach a driver had support. A number
of buses today allow hotswap and you need a clean way to stop and detach
a driver. For example Compact PCI.

-- 
 Chris Johns, cjohns @ cybertec.com.au



More information about the users mailing list