PDA

View Full Version : tcbinfo.listhead and tcp_input() placing


jmathon
November 19th, 2008, 21:31
Hi everyone,

I would like to know if tcp_input() is executed before modifying tcbinfo.listhead ?

In fact, I'm hooking tcp_input() and want to interogate tcbinfo.lishead to know if the tcp connection is already known.
And, the problem is, if the struct is modified before tcp_input(), I'll find the connection everytime ;)

Or is there any other way to check if connection is already known (instead of saving every connection in a local struct)

Thanks !
Jerem

netrom
November 19th, 2008, 21:39
Hello jmathon,

I'm not totally sure but you might want to have a look at one of the following (in tcp_var.h):

void tcp_twstart(struct tcpcb *);
void tcp_init(void);
void tcp_ctlinput(int, struct sockaddr *, void *);

It is kind of a guess, really.