how to use socket to get packet which destination ip is not local?
mdw at distorted.org.uk
Wed Nov 17 17:08:04 CET 2010
Hans <hansyin at gmail.com> writes:
> I tried socket bind to 0.0.0.0, but it only binds to any local ip, not
> any ip which may not be local. therefore the socket cannot get that
> dhcp offer packet even I can use wireshark to see that packet did come
> to this pc.
You must use a raw socket for this. Raw sockets are fiddly, not very
portable, and require privilege. Sorry.
More information about the Python-list