title: What does tcp_disconnect function in the Linux kernel do, and under what circumstances is it invoked?
body: <p>I am trying to implement a ULP in a Linux kernel module, and have been looking at the function pointers in the global variable <code>struct proto tcp_prot</code>, so that I can get a feel of which function pointer fields to copy into my own <code>struct proto</code> and which fields to override with my own implementation. One of the fields of <code>struct proto</code> is <code>disconnect</code>, which is set to the kernel function <code>tcp_disconnect</code>. However, I can't seem to find a user-space analogue of this function, and Google is not yielding anything useful. So what's the purpose of <code>tcp_disconnect</code>? What does it do and when is it invoked?</p>