In funciton: static int tcp_v4_init_sock(struct sock *sk) { struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); ... } Why can struct sock convert to struct tcp_sock? Yes, static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority, int family) { struct sock *sk; sk = kmalloc(prot->obj_size, priority); ... } Although inn the function above, prot->obj_size equals to sizeof(struct tcp_sock), I still can not understand this type conversion. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ