[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

dont loose packages

Oguz Yarimtepe

12/31/2007 5:08:00 PM


Hi,

I am trying to write a program that will work on a machine which is
between a client and a server. What i want is to simulate the bridging
process. So the program should take the packages and able to send them
to the other interface. I dont want to loose package and i want
efficiency. I tried to write a program in a multithreaded way but i
couldnt get an effciency. I used scapy and its sniff method to sniff
packages.

I am not sure the right way to solve the problem with Python. I will be
happy if you help me with your ideas?


--
OÄ?uz Yarımtepe
www.yarimtepe.com
1 Answer

Bjoern Schliessmann

1/1/2008 3:48:00 AM

0

Oguz Yarimtepe wrote:
> I am trying to write a program that will work on a machine which
> is between a client and a server. What i want is to simulate the
> bridging process. So the program should take the packages and able
> to send them to the other interface. I dont want to loose package
> and i want efficiency.

Okay, you just want to simulate? For efficiency, you'd best use
kernel packet filtering, e. g. netfilter (for GNU/Linux).

> I tried to write a program in a multithreaded way

Why? There isn't even any concurrency, just reading and writing
packets in a linear fashion.

> I am not sure the right way to solve the problem with Python. I
> will be happy if you help me with your ideas?

I think the most direct way would be using raw sockets. You could
need to have root/administrator privileges.

Regards,


Björn

--
BOFH excuse #126:

it has Intel Inside