[Pythonmac-SIG] ip masq possible?

Jack Jansen jack@oratrix.nl
Wed, 02 Aug 2000 10:16:31 +0200


> howdy.
> i'm not sure if what i'm asking is doable or already done, but would it be
> possible to do ip masquerading/aliasing in python for macOS?  I'm still too much
> of a novice and haven't put too much thought into it, but i think that if
> possible it'd be a fantastic thing...and free. 

I think it's difficult in Python. Actually, it's difficult in any "user space" 
process, because you'll have to open a raw IP socket and do all filtering 
yourself. And you'll get all the IP packets that pass through your machine.

And this is the sort of stuff that Python isn't at its best at, because speed 
is of the essence: you want to packet to go out again with the new IP 
address/port as soon as possible, and with consuming as little resources as 
possible. That is really the type of code you want to write as some sort of a 
device driver or so in C or C++.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm