Hugh Brown
|
Re: Problem with the only documentation around
|
Hugh Brown
01/13/2014 8:10 AM
post107892
|
Re: Problem with the only documentation around
No, the behaviour hasn¹t changed. Your init routine should be called every
time you run an ifconfig or dhcp.client.
On 2014/1/12, 10:20 PM, "Mitchell Schoenbrun" <community-noreply@qnx.com>
wrote:
>From the document:
>
>Remember , the ifp->if_init function can and will be called
>over and over again by the stack. This is very different
>from an io-net driver, who's initialization executes only
>once.
>
>For example, if someone does this:
>
> ifconfig sam0 mtu 8100
>
>The ifp->if_init function in the driver will be called again
>by the stack. So, it is up to the driver to initialize the
>harware as specified.
>
>My question, is this still true.
>I have an otherwise working driver. I've implemented the IOCTL to
>update the mtu.
>I have a printf that shows when if_init() is called.
>It displays on startup.
>
>I run "ifconfig xxx mtu 8100" and I see the ioctl call run successfully,
>but no if_init.
>I then run "ifconfig xxx nnn.nnn.nnn.nnn" and again, nothing?
>
>Has the behavior changed?
>
>Thanks,
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post107889
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com
|
|
|
Sean Boudreau(deleted)
|
Re: Problem with the only documentation around
|
Sean Boudreau(deleted)
01/13/2014 10:30 AM
post107895
|
Re: Problem with the only documentation around
On Sun, Jan 12, 2014 at 10:20:57PM -0500, Mitchell Schoenbrun wrote:
> From the document:
>
> Remember , the ifp->if_init function can and will be called
> over and over again by the stack. This is very different
> from an io-net driver, who's initialization executes only
> once.
>
> For example, if someone does this:
>
> ifconfig sam0 mtu 8100
>
> The ifp->if_init function in the driver will be called again
> by the stack. So, it is up to the driver to initialize the
> harware as specified.
>
> My question, is this still true.
> I have an otherwise working driver. I've implemented the IOCTL to update the mtu.
> I have a printf that shows when if_init() is called.
> It displays on startup.
>
> I run "ifconfig xxx mtu 8100" and I see the ioctl call run successfully, but no if_init.
> I then run "ifconfig xxx nnn.nnn.nnn.nnn" and again, nothing?
>
> Has the behavior changed?
>
No. If you 'ifconfig foo0 down up' it will be called.
|
|
|