Re: [Programming] kernel level grab packet

From: Tauno Voipio (tauno.voipio_at_iki.fi.NOSPAM.invalid)
Date: 01/31/04


Date: Sat, 31 Jan 2004 16:35:49 GMT

Shin wrote:

>>>Anyone knows good documents/toturial/material for me?
>>
>>www.netfilter.org is the official netfilter/iptables site.
>>www.tldp.org is the main Linux documentation repository.
>>
> Well, I might misuse the word 'guard' before.
> I am trying to make it clear here.
>
> What I want is to implement a program underlying the existing
> internet services/applications such as ftp, www, or even higher
> level software. Before going to the higher level, packets will
> be caught by the program, named P here, and then go where they
> should go. Likewise, before going to the physical level, packets
> will be caught by P. Then go to the internet.
>
> P may do some things on packets, like hashing the contents,
> delaying (not dropping) for a while, and etc. Besides, the
> one funtionality I need in P is that P can change packet's
> destination without higher level application's notice.
>
> For example, suppose there are two (or more) any kind of servers,
> and one client application C. C only knows one of them, but P
> knows all. Under some circumstances, I may hope C's packets go to
> the server which C doesn't know. Now, it's time P to work.
> I may even add some condtions in P so that P can pick up a server to
> connect to automatically.
> Combining all the functionalities I mentioned above, I guess kernel
> level can meet my need without losing flexibility, since I may
> add more functions on P in future.

Would you please read the previous response and check the Linux
packet filtering documentation? It' exactly doing what you're
trying to describe, and much more.

Some good tutorial texts about basic TCP/IP networking may
also be in order.

There is no idea in trying to re-invent a wheel.

There are many other programming tasks, even in the kernel area.

Tauno Voipio
tauno voipio @ iki fi



Relevant Pages

  • Re: Diagnose co-location networking problem
    ... it was from the client. ... Actually there's significant indication of lost packets and clues that ... 540 retransmit timeouts ... are you using any packetfiltering on the server? ...
    (freebsd-net)
  • Re: Improving FreeBSD NFS performance (esp. directory updates)
    ... >> I don't think the network is at fault, nor is the server really going ... 155645171 data packets ... discarded for bad header offset fields ... 790 connections established ...
    (freebsd-questions)
  • Re: IP Spoofing
    ... That would be enough if the purpose of the request was e.g. to delete a database by SQL injection. ... You would not need to keep it in 7 packets, merely to send in a TCP window - pretty large these days, BUT you would also need to cut in on an existing ESTABLISHED session. ... it is quite possible to send packets to the server without anything. ...
    (comp.lang.php)
  • Re: Problem with writing fast UDP server
    ... UDP packets per second. ... socket and threads. ... I wrote a simple case test: client and server. ... The maximum theoretical limit is 14,880 frames per ...
    (comp.lang.python)
  • Re: WORM? ... server generating NBT-NS (port 137) traffic on WAN interface
    ... server generating NBT-NS traffic on WAN ... I did run NETMON on the SBS2003 box, it did find the extraneous packets ... connected to the Internet (If the SBS server is the 2 NICs scenario). ... I would also like to suggest that you call Microsoft ...
    (microsoft.public.windows.server.sbs)