I'm trying to implement a transport level protocol. I've been reading code for a few days now, and I think I'm starting to get it, but I could use some more explanation if anyone can provide it... Under what circumstances are close, destroy, shutdown, and disconnect called. I notice that when init fails, unhash, destroy, and close are called. But if init succeeds and close is called from userspace, only close is called. For a TCP-like protocol, what should each of these do? I also believe that hash and unhash are used to add and remove connections, respectively, from the hash table. And get_port is used by the upper layer to allocate a port for a connection. In udp.c UDP_HTABLE_SIZE is 128. The number of connections isn't limited to 128 is it? How does this table work? In TCP, I notice that sometimes destroy is called by TCP which calls tcp_put_port. This looks to remove an entry from the hash table. But sometimes this isn't done and there's a comment to the effect that this is left to "protocol close". What is going on here? Sorry for all of the questions. I thought I'd get as many of them out as I could. :) Thanks in advance, John -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ IRC Channel: irc.openprojects.net / #kernelnewbies Web Page: http://www.kernelnewbies.org/