Re: how to trace tcp protocol stack ?

2013-03-03 Thread Valdis . Kletnieks
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.


pgp_r03CrIkmH.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to trace tcp protocol stack ?

2013-03-03 Thread richard -rw- weinberger
On Sun, Mar 3, 2013 at 5:13 AM, ishare  wrote:
> hi:)
>
>Is there mothod to look up the call stack of tcp protocol solution?

You can use ftrace.

-- 
Thanks,
//richard

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


how to trace tcp protocol stack ?

2013-03-03 Thread ishare
hi:)

   Is there mothod to look up the call stack of tcp protocol solution?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies