1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

tcbinfo.listhead and tcp_input() placing

Discussion in 'FreeBSD Development' started by jmathon, Nov 19, 2008.

  1. jmathon

    jmathon New Member

    Thanks Received:
    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 !
  2. netrom

    netrom New Member

    Thanks Received:
    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.