比如说注销的函数 哪位大侠能给解释一下
void
inet_unregister_protosw(struct inet_protosw *p)
{
if (INET_PROTOSW_PERMANENT & p->flags) {
printk(KERN_ERR
"Attempt to unregister permanent protocol %d.\n",
p->protocol);
} else {
br_write_lock_bh(BR_NETPROTO_LOCK);
list_del(&p->list); //这一句的含义是什么?
br_write_unlock_bh(BR_NETPROTO_LOCK);
}
}
函数参数中的结构体如下
struct inet_protosw {
struct list_head list;
/* These two fields form the lookup key. */
unsigned short type; /* This is the 2nd argument to socket(2). */
int protocol; /* This is the L4 protocol number. */
struct proto *prot;
struct proto_ops *ops;
int capability; /* Which (if any) capability do
* we need to use this socket
* interface?
*/
char no_check; /* checksum on rcv/xmit/none? */
unsigned char flags; /* See INET_PROTOSW_* below. */
};