<u></u>
<div text="#000000" bgcolor="#ffffff">
Hi,<br>
<br>
I have been trying to implement interface L2 attachment/detachment
detect using dhclient. This way, I change the dhclient in order to
react to the proper events. <br>
<br>
So, when it receives a link up it adds the interface to the
interface list and init the interface using a code similar to the
"dhclient_interface_startup_hook" function. However, it doesn't send
any packet. I assume that this behavior is because the "dispatch"
method is blocked waiting some kind of events.<br>
What do you think that is happening?<br>
<br>
When it receives a L2 detachment it calls the "do_release" function,
in order to reset the state machine of that interface.<br>
<br>
Other approach that I have done was for each L2 attachment it launch
the state machine for that interface and call the dispatch function.
Each one is done in a different thread. However, it creates problems
with concurrency.<br>
<br>
Have you any idea how to implement this?<br>
<br>
Best regards,<br>
Carlos Guimarães<br>
<br>
On 05/30/2011 05:34 PM, Michael Richardson wrote:
<blockquote type="cite">
<pre></pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre>"Carlos" == Carlos Guimarães <a href="mailto:asc2.cemg@gmail.com" target="_blank"><asc2.cemg@gmail.com></a> writes:
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre> Carlos> My doubt is if dhclient is able to detect L2 attachment and
Carlos> to start for its
Carlos> own DHCP Discover mechanisms.
ISC dhclient does not have this ability (I think this should be fixed)
If you are using Linux, look at ifplugd or networkmanager.
</pre>
</blockquote>
<br>
</div>