how to trace tcp protocol stack ?
Valdis.Kletnieks at vt.edu
Valdis.Kletnieks at vt.edu
Sun Mar 3 11:26:49 EST 2013
On Sun, 03 Mar 2013 12:13:51 +0800, ishare said:
> Is there mothod to look up the call stack of tcp protocol solution?
ftrace and related functionality.
Note that there is a difference between "look up the call stack"
and "trace the flow of execution". Consider the following code:
int a ( print("a") } ;
int b { print("b") } ;
int c ( a(); b(); };
int d { c(); b() };
If you print the call stack in a(), you'll get "a" "c" "d".
If you trace the flow, you get d c a b b (plus some returns scattered
in between.
The difference is subtle, but often important. If you're trying to
figure out how it works, you probably want to trace the flow. If you're
trying to figure out how the code *got* to function foobar(), you're
looking at a stack trace.
Also, being familiar with the RFCs that define TCP is helpful. In
particular, the Linux TCP stack will make close to zero sense unless
you're familiar with the state machine defined in RFC793.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130303/fdf5f610/attachment.bin
More information about the Kernelnewbies
mailing list