Advertisement

New Protocol (like ICS)

Started by March 05, 2005 03:06 PM
4 comments, last by qazlop 19 years, 11 months ago
I'm attempting to make a new winsock prococol (like Internet Connection Sharing...) but being that this issue is not a high topic... I'm having problems finding resources on how to develop this type of application. To give a better example on what I want to do: (Internet Connection) --> PC (with my new ICS Protocol) |---> (multiple LAN pools) The PC in the middle will need to read the TCP data, and analize it inorder to redirect it to the proper LAN. The key piece is the analization... becuase sometimes it will not need to route the packet... it will auto-reply to the data as it needs to. So I just need a push in the general direction of what I can look for in Google... Keywords to search for (like: Gateway development... tunneling development)... so that I can get onto developing this application. If there is another solution to something like what I have described above, please tell me so I do not have to go through all of this.
Is this on Linux or Windows? If it's on Windows, you should go take a class in low-level network driver/stack programming from OSR. They're worth every penny.

If it's Linux, then you can look into the way that iptables is implemented, and especially the way that the "nat" chain is implemented, doing IP masquerading; that source will provide an excellent starting point for what you want to do.

Note: what you want to do is not something you can do at user-level alone; you typically have to get into the kernel level to get access to the raw physical frames and routing-level access to the packets, although there may exist some "insertion" device drivers that allow you to run in user space, with significantly reduced performance.
enum Bool { True, False, FileNotFound };
Advertisement
very good info.

I will start by creating this for Windows... seeing that it is the most widely used OS... But I will wish to make a port to Linux later.

One thing I noticed... seeing that OSR is a siminar learning enviorment... it may not be a viable solution to me (but its online resource looks promising). I am on a budget of 'zero'... so I am looking into books/online docs solutions Is there any other places?

Thanks again]

Edit: Also.. would driver development be the key idea here? Or are we missing the point? I thought it was more protocal development... not driver development...
Quote:
I am on a budget of 'zero'.


Honestly, it doesn't sound to me as if you're ready to take on a task like this on your own.

My recommendation for you if you want to go through with it is to get a spawre machine, install linux on it, and take apart the iptables/nat part of it, until you can do what you want on Linux, which will teach you the "network routing" and "kernel/driver development" part of it. If you're still determined to build it for real after that, you're much better equipped to go learn about how to do it on Windows (which is unfortunately isn't well documented, and doesn't come with source).

If you want to dive in over your head and be discouraged immediately, you can start by ordering the Windows DDK.
enum Bool { True, False, FileNotFound };
Ahh well.. budget of 'zero' does not mean I will not spend money if needed... I will most likely go, but looking for a solution for right now.

You are probably right... I might want to consider working on it in a linux enviorment before going to a windows... the development there may have a better community.

Thanks again
Its not so much that windows would have a better community per se. Its that linux is more open so you can see what goes on behind the scenes. There are fully open source apps that do network address translation, act as a gateway, and firewall. You can look through the code, play with it, and mess around as much as you want. Plus all development costs is free since most linux dev tools are gpl thus open source as well. Plus linux people love trying to find free ways of doing things using a myraid of tools already, even if its complicated and would be simpler to make a specific app to do it. This pf course is a benefit for you, because its likly that you can find a set of free apps that when configured probably will do what you want.

What exactly are you trying to do? It sounds like what you want to do can be done using snort (an ids). It can examine packets and decide weather to block them or not. You can modify the software (its open source) to do what you want with the packets. Thugh you would have to release the source if you release any software.

I am almost positive (ie i have not actually tried using snort for such things, but I dont see much reason why it would not work) that snort combined with iptables on linux can do almost anything you want regarding redirection of packets based on content. Also snort is availible on windows, but I am unsure if it would be as flexible as using snort on linux. You can try it, it may do the trick.

This topic is closed to new replies.

Advertisement