本文整理汇总了C++中proto_unregister函数的典型用法代码示例。如果您正苦于以下问题:C++ proto_unregister函数的具体用法?C++ proto_unregister怎么用?C++ proto_unregister使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了proto_unregister函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: mptp_init
static int __init mptp_init(void)
{
int rc;
rc = proto_register(&mptp_prot, 1);
if (unlikely(rc)) {
log_error("Error registering mptp protocol\n");
goto out;
}
rc = inet_add_protocol(&mptp_protocol, IPPROTO_MPTP);
if (unlikely(rc)) {
log_error("Error adding mptp protocol\n");
goto out_unregister;
}
inet_register_protosw(&mptp_protosw);
log_debug("MPTP entered\n");
return 0;
out_unregister:
proto_unregister(&mptp_prot);
out:
return rc;
}
开发者ID:paulvlase,项目名称:mptp,代码行数:27,代码来源:mptp.c
示例2: dccp_v4_init
static int __init dccp_v4_init(void)
{
int err = proto_register(&dccp_v4_prot, 1);
if (err != 0)
goto out;
err = inet_add_protocol(&dccp_v4_protocol, IPPROTO_DCCP);
if (err != 0)
goto out_proto_unregister;
inet_register_protosw(&dccp_v4_protosw);
err = register_pernet_subsys(&dccp_v4_ops);
if (err)
goto out_destroy_ctl_sock;
out:
return err;
out_destroy_ctl_sock:
inet_unregister_protosw(&dccp_v4_protosw);
inet_del_protocol(&dccp_v4_protocol, IPPROTO_DCCP);
out_proto_unregister:
proto_unregister(&dccp_v4_prot);
goto out;
}
开发者ID:SamuelMarks,项目名称:linux,代码行数:25,代码来源:ipv4.c
示例3: __vsock_core_init
static int __vsock_core_init(void)
{
int err;
vsock_init_tables();
err = misc_register(&vsock_device);
if (err) {
pr_err("Failed to register misc device\n");
return -ENOENT;
}
err = proto_register(&vsock_proto, 1); /* we want our slab */
if (err) {
pr_err("Cannot register vsock protocol\n");
goto err_misc_deregister;
}
err = sock_register(&vsock_family_ops);
if (err) {
pr_err("could not register af_vsock (%d) address family: %d\n",
AF_VSOCK, err);
goto err_unregister_proto;
}
return 0;
err_unregister_proto:
proto_unregister(&vsock_proto);
err_misc_deregister:
misc_deregister(&vsock_device);
return err;
}
开发者ID:CedricArchambault,项目名称:linux,代码行数:33,代码来源:af_vsock.c
示例4: bnep_sock_init
int __init bnep_sock_init(void)
{
int err;
err = proto_register(&bnep_proto, 0);
if (err < 0)
return err;
err = bt_sock_register(BTPROTO_BNEP, &bnep_sock_family_ops);
if (err < 0) {
BT_ERR("Can't register BNEP socket");
goto error;
}
err = bt_procfs_init(&init_net, "bnep", &bnep_sk_list, NULL);
if (err < 0) {
BT_ERR("Failed to create BNEP proc file");
bt_sock_unregister(BTPROTO_BNEP);
goto error;
}
BT_INFO("BNEP socket layer initialized");
return 0;
error:
proto_unregister(&bnep_proto);
return err;
}
开发者ID:Agontuk,项目名称:android_kernel_sony_u8500,代码行数:29,代码来源:sock.c
示例5: hidp_init_sockets
int __init hidp_init_sockets(void)
{
int err;
err = proto_register(&hidp_proto, 0);
if (err < 0)
return err;
err = bt_sock_register(BTPROTO_HIDP, &hidp_sock_family_ops);
if (err < 0) {
BT_ERR("Can't register HIDP socket");
goto error;
}
err = bt_procfs_init(&init_net, "hidp", &hidp_sk_list, NULL);
if (err < 0) {
BT_ERR("Failed to create HIDP proc file");
bt_sock_unregister(BTPROTO_HIDP);
goto error;
}
BT_INFO("HIDP socket layer initialized");
return 0;
error:
proto_unregister(&hidp_proto);
return err;
}
开发者ID:Nomad280279,项目名称:vendor_intel_hardware_wlan_iwlwifi,代码行数:29,代码来源:sock.c
示例6: cmtp_cleanup_sockets
void cmtp_cleanup_sockets(void)
{
if (bt_sock_unregister(BTPROTO_CMTP) < 0)
BT_ERR("Can't unregister CMTP socket");
proto_unregister(&cmtp_proto);
}
开发者ID:acassis,项目名称:emlinux-ssd1935,代码行数:7,代码来源:sock.c
示例7: cmtp_init_sockets
int cmtp_init_sockets(void)
{
int err;
err = proto_register(&cmtp_proto, 0);
if (err < 0)
return err;
err = bt_sock_register(BTPROTO_CMTP, &cmtp_sock_family_ops);
if (err < 0) {
BT_ERR("Can't register CMTP socket");
goto error;
}
err = bt_procfs_init(THIS_MODULE, &init_net, "cmtp", &cmtp_sk_list, NULL);
if (err < 0) {
BT_ERR("Failed to create CMTP proc file");
bt_sock_unregister(BTPROTO_HIDP);
goto error;
}
BT_INFO("CMTP socket layer initialized");
return 0;
error:
proto_unregister(&cmtp_proto);
return err;
}
开发者ID:Eijk,项目名称:tlwn722n-linux-install,代码行数:29,代码来源:sock.c
示例8: bnep_sock_cleanup
void __exit bnep_sock_cleanup(void)
{
if (bt_sock_unregister(BTPROTO_BNEP) < 0)
BT_ERR("Can't unregister BNEP socket");
proto_unregister(&bnep_proto);
}
开发者ID:3null,项目名称:fastsocket,代码行数:7,代码来源:sock.c
示例9: l2cap_cleanup_sockets
void l2cap_cleanup_sockets(void)
{
if (bt_sock_unregister(BTPROTO_L2CAP) < 0)
BT_ERR("L2CAP socket unregistration failed");
proto_unregister(&l2cap_proto);
}
开发者ID:Krabappel2548,项目名称:apq8064_Revolution-_kernel,代码行数:7,代码来源:l2cap_sock.c
示例10: dccp_v4_exit
static void __exit dccp_v4_exit(void)
{
unregister_pernet_subsys(&dccp_v4_ops);
inet_unregister_protosw(&dccp_v4_protosw);
inet_del_protocol(&dccp_v4_protocol, IPPROTO_DCCP);
proto_unregister(&dccp_v4_prot);
}
开发者ID:SamuelMarks,项目名称:linux,代码行数:7,代码来源:ipv4.c
示例11: phonet_proto_unregister
void phonet_proto_unregister(int protocol, struct phonet_protocol *pp)
{
spin_lock(&proto_tab_lock);
BUG_ON(proto_tab[protocol] != pp);
proto_tab[protocol] = NULL;
spin_unlock(&proto_tab_lock);
proto_unregister(pp->prot);
}
开发者ID:jiacc0110,项目名称:Android-Froyo-Kernel-Source-v2.6.32.9,代码行数:8,代码来源:af_phonet.c
示例12: nfc_proto_unregister
void nfc_proto_unregister(const struct nfc_protocol *nfc_proto)
{
write_lock(&proto_tab_lock);
proto_tab[nfc_proto->id] = NULL;
write_unlock(&proto_tab_lock);
proto_unregister(nfc_proto->proto);
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:8,代码来源:af_nfc.c
示例13: cmtp_cleanup_sockets
void cmtp_cleanup_sockets(void)
{
bt_procfs_cleanup(&init_net, "cmtp");
if (bt_sock_unregister(BTPROTO_CMTP) < 0)
BT_ERR("Can't unregister CMTP socket");
proto_unregister(&cmtp_proto);
}
开发者ID:Eijk,项目名称:tlwn722n-linux-install,代码行数:8,代码来源:sock.c
示例14: bnep_sock_cleanup
void __exit bnep_sock_cleanup(void)
{
bt_procfs_cleanup(&init_net, "bnep");
if (bt_sock_unregister(BTPROTO_BNEP) < 0)
BT_ERR("Can't unregister BNEP socket");
proto_unregister(&bnep_proto);
}
开发者ID:AdrianHuang,项目名称:linux-3.8.13,代码行数:8,代码来源:sock.c
示例15: llc2_exit
static void __exit llc2_exit(void)
{
llc_station_exit();
llc_remove_pack(LLC_DEST_SAP);
llc_remove_pack(LLC_DEST_CONN);
sock_unregister(PF_LLC);
llc_proc_exit();
proto_unregister(&llc_proto);
}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:9,代码来源:af_llc.c
示例16: tipc_socket_stop
void tipc_socket_stop(void)
{
if (!sockets_enabled)
return;
sockets_enabled = 0;
sock_unregister(tipc_family_ops.family);
proto_unregister(&tipc_proto);
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:9,代码来源:socket.c
示例17: phonet_proto_unregister
void phonet_proto_unregister(int protocol, struct phonet_protocol *pp)
{
mutex_lock(&proto_tab_lock);
BUG_ON(proto_tab[protocol] != pp);
rcu_assign_pointer(proto_tab[protocol], NULL);
mutex_unlock(&proto_tab_lock);
synchronize_rcu();
proto_unregister(pp->prot);
}
开发者ID:Jb2005,项目名称:SamSung-Galaxy-Tab-10.1-Model-GT-P7510,代码行数:9,代码来源:af_phonet.c
示例18: phonet_proto_unregister
void phonet_proto_unregister(unsigned int protocol, struct phonet_protocol *pp)
{
mutex_lock(&proto_tab_lock);
BUG_ON(proto_tab[protocol] != pp);
RCU_INIT_POINTER(proto_tab[protocol], NULL);
mutex_unlock(&proto_tab_lock);
synchronize_rcu();
proto_unregister(pp->prot);
}
开发者ID:3null,项目名称:linux,代码行数:9,代码来源:af_phonet.c
示例19: mptp_exit
static void __exit mptp_exit(void)
{
inet_unregister_protosw(&mptp_protosw);
inet_del_protocol(&mptp_protocol, IPPROTO_MPTP);
proto_unregister(&mptp_prot);
log_debug("MPTP exited\n");
}
开发者ID:paulvlase,项目名称:mptp,代码行数:10,代码来源:mptp.c
示例20: vrr_exit
static void __exit vrr_exit(void)
{
sock_unregister(AF_VRR);
dev_remove_pack(&vrr_packet_type);
del_timer(&vrr_timer);
/* Cleanup routing/sysfs stuff here */
kobject_put(vrr_obj);
proto_unregister(&vrr_proto);
}
开发者ID:carriercomm,项目名称:Alpaca-VRR,代码行数:10,代码来源:vrr_mod.c
注:本文中的proto_unregister函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论