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

    Messages:
    6
    Thanks Received:
    4
    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
     
  2. netrom

    netrom New Member

    Messages:
    9
    Thanks Received:
    0
    Hello jmathon,

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

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


    It is kind of a guess, really.