libpcap<br><br><div class="gmail_quote">On Wed, Nov 17, 2010 at 4:57 AM, MRAB <span dir="ltr"><<a href="mailto:python@mrabarnett.plus.com" target="_blank">python@mrabarnett.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div><div></div><div>On 16/11/2010 20:38, Hans wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
Maybe it's a very simple question. I'm trying to write a dhcpclient<br>
code with python. The dhcpclient does not have ip address at the very<br>
beginning, it sends out dhcpdiscover and then server sends back<br>
dhcpoffer. the dhcpoffer will use assigned ip as destination ip, but<br>
that ip is not client's local ip yet. How can I make my socket to<br>
receive that packet?<br>
<br>
I tried socket bind to 0.0.0.0, but it only binds to any local ip, not<br>
any ip which may not be local. therefore the socket cannot get that<br>
dhcp offer packet even I can use wireshark to see that packet did come<br>
to this pc.<br>
<br>
How to solve it? Thanks in advance.<br>
<br>
</blockquote></div></div>
Have you read this:<br>
<br>
    <a href="http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol" target="_blank">http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol</a><div><div></div><div><br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>