Re: understanding TCP-IP interface in linux kernel



will_u_tellmemore wrote:
Hi all,
I am planning to write a kernel module which will sit below tcp and
intercept every incoming and outgoing packet(shud i say segment ?? ).
In order to do that i was taking a look at net/ipv4/tcp* files but the
code does hell lot of things and makes it hard for me to find my way
through it.
C
an somebody point me to correct place from where i should start ??
I havent learnt yet about tcp implementation in linux kernel. by TCP-IP
i mean those 2 protocols and not the complete suite.
Is thr good online documentation explaining this implementation.??

Also what am curios about is :
TCP-IP interface .. so how does TCP layer sends "segment" to IP and
receives sengment from IP. ??

Any help in this regard will be greatly appreciated ...


The module you're intending to write may be already written.

Would you please tell what you're going to do with the intercepted
packets (if it's IP it's a packet, if it's TCP it's a segment).

The iptables module collection is pretty good in intercepting
and mangling the packets. If you nee link-level handling
(e.g. Ethernet), ebtables is the thing.

--

Tauno Voipio
tauno voipio (at) iki fi

.



Relevant Pages

  • understanding TCP-IP interface in linux kernel
    ... I am planning to write a kernel module which will sit below tcp and ... intercept every incoming and outgoing packet(shud i say segment ?? ... I havent learnt yet about tcp implementation in linux kernel. ... TCP-IP interface .. ...
    (comp.os.linux.networking)
  • Linux TCP - unexpected retransmissions
    ... small messages using TCP. ... This latency occurs randomly ... time (segment 5 and 6 below), for unknown reasons, the second TCP does ... three instances of a retransmission. ...
    (comp.os.linux.networking)
  • Re: How long does read(2) wait before an EAGAIN is thrown?
    ... The 'Default Ethernet MTU' for wired devices is 1500 octets. ... as to whether or where the TCP frame is fragmented being broken, ... segment size it can deal with as part of connection initiation. ... sending large segments with the DF-('don't fragment') flag set in the ...
    (comp.unix.programmer)
  • Re: TCP SACK issue, hung connection, tcpdump included
    ... because the segment which never gets correctly ACKed is also the ... SACK block is DSACK information telling explicitly the address ... if this ACK doesn't reach the ... SERVER TCP, RTO is triggered and the first not yet cumulatively ACKed ...
    (Linux-Kernel)
  • Re: How long does read(2) wait before an EAGAIN is thrown?
    ... Which, for all practical purposes, means that the ethernet MTU is 1500 ... But if TCP ... A router which would have needed to fragment the datagram ... then supposed to retry with a smaller segment ... ...
    (comp.unix.programmer)