本文整理汇总了C++中rtnl_link_unregister函数的典型用法代码示例。如果您正苦于以下问题:C++ rtnl_link_unregister函数的具体用法?C++ rtnl_link_unregister怎么用?C++ rtnl_link_unregister使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rtnl_link_unregister函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: vti_fini
static void __exit vti_fini(void)
{
rtnl_link_unregister(&vti_link_ops);
xfrm4_protocol_deregister(&vti_ipcomp4_protocol, IPPROTO_COMP);
xfrm4_protocol_deregister(&vti_ah4_protocol, IPPROTO_AH);
xfrm4_protocol_deregister(&vti_esp4_protocol, IPPROTO_ESP);
unregister_pernet_device(&vti_net_ops);
}
开发者ID:383530895,项目名称:linux,代码行数:8,代码来源:ip_vti.c
示例2: ipip_fini
static void __exit ipip_fini(void)
{
rtnl_link_unregister(&ipip_link_ops);
if (xfrm4_tunnel_deregister(&ipip_handler, AF_INET))
pr_info("%s: can't deregister tunnel\n", __func__);
unregister_pernet_device(&ipip_net_ops);
}
开发者ID:PKUCloud,项目名称:samsara-linux-3.11,代码行数:8,代码来源:ipip.c
示例3: ipip_fini
static void __exit ipip_fini(void)
{
rtnl_link_unregister(&ipip_link_ops);
if (xfrm4_tunnel_deregister(&ipip_handler, AF_INET))
pr_info("%s: can't deregister tunnel\n", __func__);
#if IS_ENABLED(CONFIG_MPLS)
if (xfrm4_tunnel_deregister(&mplsip_handler, AF_MPLS))
pr_info("%s: can't deregister tunnel\n", __func__);
#endif
unregister_pernet_device(&ipip_net_ops);
}
开发者ID:markus-oberhumer,项目名称:linux,代码行数:11,代码来源:ipip.c
示例4: vhost_netlink_exit
static void
vhost_netlink_exit(void)
{
if (vhost_drv_inited) {
rtnl_link_unregister(&vhost_link_ops);
}
vhost_drv_inited = false;
return;
}
开发者ID:haripk,项目名称:contrail-vrouter,代码行数:11,代码来源:vhost_dev.c
示例5: vti_fini
static void __exit vti_fini(void)
{
rtnl_link_unregister(&vti_link_ops);
if (xfrm4_protocol_deregister(&vti_ipcomp4_protocol, IPPROTO_COMP))
pr_info("vti close: can't deregister tunnel\n");
if (xfrm4_protocol_deregister(&vti_ah4_protocol, IPPROTO_AH))
pr_info("vti close: can't deregister tunnel\n");
if (xfrm4_protocol_deregister(&vti_esp4_protocol, IPPROTO_ESP))
pr_info("vti close: can't deregister tunnel\n");
unregister_pernet_device(&vti_net_ops);
}
开发者ID:7799,项目名称:linux,代码行数:13,代码来源:ip_vti.c
示例6: deth_exit
static __exit void deth_exit(void)
{
struct net* net;
struct deth_net* dn;
for_each_net(net)
{
dn = net_generic(net, deth_net_id);
netlink_kernel_release(dn->nl_sk);
}
unregister_pernet_subsys(&deth_net_ops);
rtnl_link_unregister(&deth_link_ops);
}
开发者ID:carriercomm,项目名称:dropgit,代码行数:14,代码来源:deth.c
示例7: ovs_internal_dev_rtnl_link_register
int ovs_internal_dev_rtnl_link_register(void)
{
int err;
err = rtnl_link_register(&internal_dev_link_ops);
if (err < 0)
return err;
err = ovs_vport_ops_register(&ovs_internal_vport_ops);
if (err < 0)
rtnl_link_unregister(&internal_dev_link_ops);
return err;
}
开发者ID:020gzh,项目名称:linux,代码行数:14,代码来源:vport-internal_dev.c
示例8: micveth_exit_int
static void
micveth_exit_int(void)
{
mic_ctx_t *mic_ctx = kmalloc(sizeof(mic_ctx_t), GFP_KERNEL);
micveth_info_t *veth_info;
ring_packet_t *packet;
int bd;
int idx;
rtnl_link_unregister(&micveth_link_ops);
for (bd = 0; bd < micveth.lv_num_clients; bd++) {
veth_info = &micveth.lv_info[bd];
/* veth_info->mic_ctx == mic_data.dd_bi[bd] is freed in
remove so cannot be used in exit */
mic_ctx->bi_vethinfo = veth_info;
micveth_stop(mic_ctx);
#if WA_UNMAP_AT_RMMOD
mic_ctx_unmap_single(veth_to_ctx(veth_info), veth_info->vi_ring.phys,
sizeof(veth_ring_t));
#endif
for (idx = 0; idx < veth_info->vi_ring.ring.r_tx.rq_length; idx++) {
packet = &veth_info->vi_tx_desc[idx];
if (packet->pd_skb != NULL) {
#if WA_UNMAP_AT_RMMOD
mic_ctx_unmap_single(veth_to_ctx(veth_info), packet->pd_phys,
packet->pd_skb->len);
#endif
kfree_skb(packet->pd_skb);
}
}
for (idx = 0; idx < veth_info->vi_ring.ring.r_rx.rq_length; idx++) {
packet = &veth_info->vi_rx_desc[idx];
#if WA_UNMAP_AT_RMMOD
mic_ctx_unmap_single(veth_to_ctx(veth_info), packet->pd_phys, packet->pd_skb->len);
#endif
kfree_skb(packet->pd_skb);
}
}
kfree(mic_ctx);
kfree(micveth.lv_info);
}
开发者ID:rzlourenco,项目名称:mpss-modules,代码行数:47,代码来源:linvnet.c
示例9: hsr_netlink_init
int __init hsr_netlink_init(void)
{
int rc;
rc = rtnl_link_register(&hsr_link_ops);
if (rc)
goto fail_rtnl_link_register;
rc = genl_register_family_with_ops_groups(&hsr_genl_family, hsr_ops,
hsr_mcgrps);
if (rc)
goto fail_genl_register_family;
return 0;
fail_genl_register_family:
rtnl_link_unregister(&hsr_link_ops);
fail_rtnl_link_register:
return rc;
}
开发者ID:ParrotSec,项目名称:linux-psec,代码行数:21,代码来源:hsr_netlink.c
示例10: imq_init_module
static int __init imq_init_module(void)
{
int err;
#if defined(CONFIG_IMQ_NUM_DEVS)
BUILD_BUG_ON(CONFIG_IMQ_NUM_DEVS > 16);
BUILD_BUG_ON(CONFIG_IMQ_NUM_DEVS < 2);
BUILD_BUG_ON(CONFIG_IMQ_NUM_DEVS - 1 > IMQ_F_IFMASK);
#endif
err = imq_init_devs();
if (err) {
printk(KERN_ERR "IMQ: Error trying imq_init_devs(net)\n");
return err;
}
err = imq_init_hooks();
if (err) {
printk(KERN_ERR "IMQ: Error trying imq_init_hooks()\n");
rtnl_link_unregister(&imq_link_ops);
memset(imq_devs_cache, 0, sizeof(imq_devs_cache));
return err;
}
printk(KERN_INFO "IMQ driver loaded successfully. "
"(numdevs = %d, numqueues = %d)\n", numdevs, numqueues);
#if defined(CONFIG_IMQ_BEHAVIOR_BA) || defined(CONFIG_IMQ_BEHAVIOR_BB)
printk(KERN_INFO "\tHooking IMQ before NAT on PREROUTING.\n");
#else
printk(KERN_INFO "\tHooking IMQ after NAT on PREROUTING.\n");
#endif
#if defined(CONFIG_IMQ_BEHAVIOR_AB) || defined(CONFIG_IMQ_BEHAVIOR_BB)
printk(KERN_INFO "\tHooking IMQ before NAT on POSTROUTING.\n");
#else
printk(KERN_INFO "\tHooking IMQ after NAT on POSTROUTING.\n");
#endif
return 0;
}
开发者ID:schidler,项目名称:flyzjhz-rt-n56u,代码行数:40,代码来源:imq.c
示例11: ipgre_init
static int __init ipgre_init(void)
{
int err;
pr_info("GRE over IPv4 tunneling driver\n");
err = register_pernet_device(&ipgre_net_ops);
if (err < 0)
return err;
err = register_pernet_device(&ipgre_tap_net_ops);
if (err < 0)
goto pnet_tap_faied;
err = gre_cisco_register(&ipgre_protocol);
if (err < 0) {
pr_info("%s: can't add protocol\n", __func__);
goto add_proto_failed;
}
err = rtnl_link_register(&ipgre_link_ops);
if (err < 0)
goto rtnl_link_failed;
err = rtnl_link_register(&ipgre_tap_ops);
if (err < 0)
goto tap_ops_failed;
return 0;
tap_ops_failed:
rtnl_link_unregister(&ipgre_link_ops);
rtnl_link_failed:
gre_cisco_unregister(&ipgre_protocol);
add_proto_failed:
unregister_pernet_device(&ipgre_tap_net_ops);
pnet_tap_faied:
unregister_pernet_device(&ipgre_net_ops);
return err;
}
开发者ID:3null,项目名称:linux,代码行数:40,代码来源:ip_gre.c
示例12: br_netlink_init
int __init br_netlink_init(void)
{
int err;
err = rtnl_link_register(&br_link_ops);
if (err < 0)
goto err1;
err = __rtnl_register(PF_BRIDGE, RTM_GETLINK, NULL,
br_dump_ifinfo, NULL);
if (err)
goto err2;
err = __rtnl_register(PF_BRIDGE, RTM_SETLINK,
br_rtm_setlink, NULL, NULL);
if (err)
goto err3;
err = __rtnl_register(PF_BRIDGE, RTM_NEWNEIGH,
br_fdb_add, NULL, NULL);
if (err)
goto err3;
err = __rtnl_register(PF_BRIDGE, RTM_DELNEIGH,
br_fdb_delete, NULL, NULL);
if (err)
goto err3;
err = __rtnl_register(PF_BRIDGE, RTM_GETNEIGH,
NULL, br_fdb_dump, NULL);
if (err)
goto err3;
return 0;
err3:
rtnl_unregister_all(PF_BRIDGE);
err2:
rtnl_link_unregister(&br_link_ops);
err1:
return err;
}
开发者ID:develersrl,项目名称:winmate-kernel,代码行数:38,代码来源:br_netlink.c
示例13: ovs_internal_dev_rtnl_link_unregister
void ovs_internal_dev_rtnl_link_unregister(void)
{
ovs_vport_ops_unregister(&ovs_internal_vport_ops);
rtnl_link_unregister(&internal_dev_link_ops);
}
开发者ID:020gzh,项目名称:linux,代码行数:5,代码来源:vport-internal_dev.c
示例14: hsr_netlink_exit
void __exit hsr_netlink_exit(void)
{
genl_unregister_family(&hsr_genl_family);
rtnl_link_unregister(&hsr_link_ops);
}
开发者ID:ParrotSec,项目名称:linux-psec,代码行数:5,代码来源:hsr_netlink.c
示例15: br_netlink_fini
void __exit br_netlink_fini(void)
{
rtnl_link_unregister(&br_link_ops);
rtnl_unregister_all(PF_BRIDGE);
}
开发者ID:develersrl,项目名称:winmate-kernel,代码行数:5,代码来源:br_netlink.c
示例16: vcan_cleanup_module
static __exit void vcan_cleanup_module(void)
{
rtnl_link_unregister(&vcan_link_ops);
}
开发者ID:nos1609,项目名称:Chrono_Kernel-1,代码行数:4,代码来源:vcan.c
示例17: nsim_module_exit
static void __exit nsim_module_exit(void)
{
rtnl_link_unregister(&nsim_link_ops);
nsim_bus_exit();
nsim_dev_exit();
}
开发者ID:avagin,项目名称:linux,代码行数:6,代码来源:netdev.c
示例18: veth_exit
static __exit void veth_exit(void)
{
rtnl_link_unregister(&veth_link_ops);
unregister_netdevice_notifier(&veth_notifier_block);
}
开发者ID:E-LLP,项目名称:n900,代码行数:5,代码来源:veth.c
示例19: ipoib_netlink_fini
void __exit ipoib_netlink_fini(void)
{
rtnl_link_unregister(&ipoib_link_ops);
}
开发者ID:Tyler-D,项目名称:RXE,代码行数:4,代码来源:ipoib_netlink.c
示例20: vxcan_exit
static __exit void vxcan_exit(void)
{
rtnl_link_unregister(&vxcan_link_ops);
}
开发者ID:Lyude,项目名称:linux,代码行数:4,代码来源:vxcan.c
注:本文中的rtnl_link_unregister函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论