Steve Holden wrote:
Unknown wrote:
On 2009-02-03, Gabriel <dun...@dreams.sk> wrote:

I need to write a software router [yes, software equivalent to
hardware box that is routing packets .)]. It's a school work..
Question is: is possible write this kind of application in
python?
Hmm.  It's going to be rather difficult, but you might be able
to.

and if it's, what module should i use? I tried search for some
libpcap equivalent in python and found pylibpcap, but can't
find documentation and tutorial.
You can use pylibpcap to capture packets, and then use a raw
socket to send them out again on whatever interface you want.
You'll have to make sure that the host's OS's network stack
isn't going to process the packets at all.  I'm not sure how
you go about that.

The documentation for pylibpcap is built into the module. See
doc.i in the tarball.


And note that this won't work on Vista, where the raw socket interface
is no longer available to standard applications.

regards
 Steve



Thanks guys

I don't care about Vista. What i will (i hope only) need is a linux
system with two net devices running router,
XP hosts connected (not only two.. hubs, switches) and these hosts have
to ping via router.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to