All of lore.kernel.org
 help / color / mirror / Atom feed
* how to trace tcp protocol stack ?
@ 2013-03-03  4:13 ishare
  2013-03-03 16:16 ` richard -rw- weinberger
  2013-03-03 16:26 ` Valdis.Kletnieks at vt.edu
  0 siblings, 2 replies; 3+ messages in thread
From: ishare @ 2013-03-03  4:13 UTC (permalink / raw)
  To: kernelnewbies

hi:)

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

thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* how to trace tcp protocol stack ?
  2013-03-03  4:13 how to trace tcp protocol stack ? ishare
@ 2013-03-03 16:16 ` richard -rw- weinberger
  2013-03-03 16:26 ` Valdis.Kletnieks at vt.edu
  1 sibling, 0 replies; 3+ messages in thread
From: richard -rw- weinberger @ 2013-03-03 16:16 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Mar 3, 2013 at 5:13 AM, ishare <june.tune.sea@gmail.com> wrote:
> hi:)
>
>    Is there mothod to look up the call stack of tcp protocol solution?

You can use ftrace.

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* how to trace tcp protocol stack ?
  2013-03-03  4:13 how to trace tcp protocol stack ? ishare
  2013-03-03 16:16 ` richard -rw- weinberger
@ 2013-03-03 16:26 ` Valdis.Kletnieks at vt.edu
  1 sibling, 0 replies; 3+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-03-03 16:26 UTC (permalink / raw)
  To: kernelnewbies

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 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-03 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-03  4:13 how to trace tcp protocol stack ? ishare
2013-03-03 16:16 ` richard -rw- weinberger
2013-03-03 16:26 ` Valdis.Kletnieks at vt.edu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.