Results 1 to 3 of 3
I am writing a module for tcptrace. In that module I need to process payload. TCPTRACE _read function passes
struct ip *pip /* the packet */
as an argument.
how ...
- 09-20-2007 #1Just Joined!
- Join Date
- Feb 2007
- Posts
- 31
how to extract payload from struct ip *pip
I am writing a module for tcptrace. In that module I need to process payload. TCPTRACE _read function passes
struct ip *pip /* the packet */
as an argument.
how I can extract payload by using struct ip pointer.
- 09-21-2007 #2
ip datagram = ip header + data,
hence, u can do as following,
int iphlen = (pip->ip_hl) * 4;
const char *ippkt = (char *) pip;
const char *tcppkt = ippkt + iphlen;
struct tcphdr *thdr = (struct tcphdr *) tcppkt;........ and so on
- 09-21-2007 #3Just Joined!
- Join Date
- Feb 2007
- Posts
- 31
thanks ...it is really helpful


Reply With Quote