本文整理汇总了C++中sock_unregister函数的典型用法代码示例。如果您正苦于以下问题:C++ sock_unregister函数的具体用法?C++ sock_unregister怎么用?C++ sock_unregister使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sock_unregister函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: socket_notify_remove
_STATIC void socket_notify_remove(void)
{
#if defined(CONFIG_IPV6)
sock_unregister(hooked_inet6_family_ops.family);
reinstall_family("IPv6", &inet6_family_ops);
#endif
sock_unregister(hooked_inet_family_ops.family);
unregister_jprobe(&inet_sock_destruct_jprobe);
reinstall_family("IPv4", &inet_family_ops);
synchronize_net();
}
开发者ID:pmoody-,项目名称:Linux-Sensor,代码行数:11,代码来源:socket_notify.c
示例2: af_ieee802154_remove
static void __exit af_ieee802154_remove(void)
{
dev_remove_pack(&ieee802154_packet_type);
sock_unregister(PF_IEEE802154);
proto_unregister(&ieee802154_dgram_prot);
proto_unregister(&ieee802154_raw_prot);
}
开发者ID:3null,项目名称:fastsocket,代码行数:7,代码来源:af_ieee802154.c
示例3: cleanup_module
void cleanup_module(void)
{
/* First of all disallow new sockets creation. */
sock_unregister(PF_INET6);
#ifdef CONFIG_PROC_FS
proc_net_unregister(proc_net_raw6.low_ino);
proc_net_unregister(proc_net_tcp6.low_ino);
proc_net_unregister(proc_net_udp6.low_ino);
proc_net_unregister(proc_net_sockstat6.low_ino);
proc_net_unregister(proc_net_snmp6.low_ino);
#endif
/* Cleanup code parts. */
sit_cleanup();
ipv6_netdev_notif_cleanup();
ip6_flowlabel_cleanup();
addrconf_cleanup();
ip6_route_cleanup();
ipv6_packet_cleanup();
igmp6_cleanup();
ndisc_cleanup();
icmpv6_cleanup();
#ifdef CONFIG_SYSCTL
ipv6_sysctl_unregister();
#endif
}
开发者ID:diegonc,项目名称:console-xkb-support,代码行数:25,代码来源:af_inet6.c
示例4: phonet_init
/* Module registration */
static int __init phonet_init(void)
{
int err;
err = phonet_device_init();
if (err)
return err;
err = sock_register(&phonet_proto_family);
if (err) {
printk(KERN_ALERT
"phonet protocol family initialization failed\n");
goto err_sock;
}
dev_add_pack(&phonet_packet_type);
phonet_sysctl_init();
err = isi_register();
if (err)
goto err;
return 0;
err:
phonet_sysctl_exit();
sock_unregister(PF_PHONET);
dev_remove_pack(&phonet_packet_type);
err_sock:
phonet_device_exit();
return err;
}
开发者ID:jiacc0110,项目名称:Android-Froyo-Kernel-Source-v2.6.32.9,代码行数:32,代码来源:af_phonet.c
示例5: inet6_exit
static void inet6_exit(void)
{
/* First of all disallow new sockets creation. */
sock_unregister(PF_INET6);
#ifdef CONFIG_PROC_FS
proc_net_remove("raw6");
proc_net_remove("tcp6");
proc_net_remove("udp6");
proc_net_remove("sockstat6");
proc_net_remove("snmp6");
#endif
/* Cleanup code parts. */
sit_cleanup();
ipv6_netdev_notif_cleanup();
ip6_flowlabel_cleanup();
addrconf_cleanup();
ip6_route_cleanup();
ipv6_packet_cleanup();
igmp6_cleanup();
ndisc_cleanup();
icmpv6_cleanup();
#ifdef CONFIG_SYSCTL
ipv6_sysctl_unregister();
#endif
}
开发者ID:dmgerman,项目名称:original,代码行数:25,代码来源:af_inet6.c
示例6: 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();
}
开发者ID:FelipeFernandes1988,项目名称:Alice-1121-Modem,代码行数:8,代码来源:af_llc.c
示例7: phonet_exit
static void __exit phonet_exit(void)
{
isi_unregister();
phonet_sysctl_exit();
sock_unregister(PF_PHONET);
dev_remove_pack(&phonet_packet_type);
phonet_device_exit();
}
开发者ID:jiacc0110,项目名称:Android-Froyo-Kernel-Source-v2.6.32.9,代码行数:8,代码来源:af_phonet.c
示例8: 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
示例9: 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
示例10: bluez_cleanup
void bluez_cleanup(void)
{
/* Release socket */
hci_sock_cleanup();
/* Release core */
hci_core_cleanup();
sock_unregister(PF_BLUETOOTH);
remove_proc_entry("bluetooth", NULL);
}
开发者ID:nhanh0,项目名称:hah,代码行数:12,代码来源:af_bluetooth.c
示例11: socket_notify_init
_STATIC int __init socket_notify_init(void)
{
int err;
if ((err = install_hook("IPv4", &inet_family_ops, &hooked_inet_family_ops)))
return err;
if ((err = register_jprobe(&inet_sock_destruct_jprobe)) < 0) {
printk(KERN_ERR "error registering inet_sock_destruct_jprobe\n");
sock_unregister(hooked_inet_family_ops.family);
reinstall_family("IPv4", &inet_family_ops);
return err;
}
#if defined(CONFIG_IPV6)
if ((err = install_hook("IPv6", &inet6_family_ops, &hooked_inet6_family_ops))) {
unregister_jprobe(&inet_sock_destruct_jprobe);
sock_unregister(hooked_inet_family_ops.family);
reinstall_family("IPv4", &inet_family_ops);
return err;
}
#endif
return 0;
}
开发者ID:pmoody-,项目名称:Linux-Sensor,代码行数:22,代码来源:socket_notify.c
示例12: vsock_core_exit
void vsock_core_exit(void)
{
mutex_lock(&vsock_register_mutex);
misc_deregister(&vsock_device);
sock_unregister(AF_VSOCK);
proto_unregister(&vsock_proto);
/* We do not want the assignment below re-ordered. */
mb();
transport = NULL;
mutex_unlock(&vsock_register_mutex);
}
开发者ID:SantoshShilimkar,项目名称:linux,代码行数:14,代码来源:af_vsock.c
示例13: cleanup_module
void cleanup_module(void)
{
/*
* Added by MSEVILLA (12-9-2012)
* Cleanup my character device
*/
device_destroy(my_class, MKDEV(major_no, 0));
class_unregister(my_class);
class_destroy(my_class);
unregister_chrdev(major_no, DEVICE_NAME);
printk(KERN_INFO "removing mobile_host module\n");
proto_unregister(&udpmhost_prot);
sock_unregister(AF_MHOST);
dev_remove_pack(&mhost_ptype);
}
开发者ID:spencersevilla,项目名称:mnet,代码行数:16,代码来源:module_hooks.c
示例14: phonet_init
/* Module registration */
static int __init phonet_init(void)
{
int err;
#ifdef ACTIVATE_PHONET_DEBUG
err = sysfs_create_file(kernel_kobj, &phonet_attr.attr);
if (err)
printk(KERN_DEBUG "phonet sysfs_create_file failed: %d\n", err);
#endif
err = phonet_device_init();
if (err)
return err;
pn_sock_init();
err = sock_register(&phonet_proto_family);
if (err) {
printk(KERN_ALERT
"phonet protocol family initialization failed\n");
goto err_sock;
}
dev_add_pack(&phonet_packet_type);
phonet_sysctl_init();
err = isi_register();
if (err)
goto err;
return 0;
err:
phonet_sysctl_exit();
sock_unregister(PF_PHONET);
dev_remove_pack(&phonet_packet_type);
err_sock:
phonet_device_exit();
return err;
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:39,代码来源:af_phonet.c
示例15: install_hook
static int install_hook(const char *name,
const struct net_proto_family *family_ops,
const struct net_proto_family *hooked_ops)
{
int err;
if (family_ops->family != hooked_ops->family)
return -EINVAL;
if (try_module_get(family_ops->owner)) {
sock_unregister(family_ops->family);
if ((err = sock_register(hooked_ops))) {
printk(KERN_ERR "%s: %s hook registration failed (error %d)\n",
THIS_MODULE->name, name, err);
reinstall_family(name, family_ops);
return err;
}
} else {
printk(KERN_ERR "%s: failed to get reference to %s family ops\n",
THIS_MODULE->name, name);
return -ENOENT;
}
return 0;
}
开发者ID:pmoody-,项目名称:Linux-Sensor,代码行数:23,代码来源:socket_notify.c
示例16: af_rxrpc_exit
/*
* unregister the RxRPC protocol
*/
static void __exit af_rxrpc_exit(void)
{
_enter("");
rxrpc_sysctl_exit();
unregister_key_type(&key_type_rxrpc_s);
unregister_key_type(&key_type_rxrpc);
sock_unregister(PF_RXRPC);
proto_unregister(&rxrpc_proto);
unregister_pernet_subsys(&rxrpc_net_ops);
ASSERTCMP(atomic_read(&rxrpc_n_tx_skbs), ==, 0);
ASSERTCMP(atomic_read(&rxrpc_n_rx_skbs), ==, 0);
/* Make sure the local and peer records pinned by any dying connections
* are released.
*/
rcu_barrier();
rxrpc_destroy_client_conn_ids();
destroy_workqueue(rxrpc_workqueue);
rxrpc_exit_security();
kmem_cache_destroy(rxrpc_call_jar);
_leave("");
}
开发者ID:avagin,项目名称:linux,代码行数:26,代码来源:af_rxrpc.c
示例17: atmpvc_exit
void atmpvc_exit(void)
{
sock_unregister(PF_ATMPVC);
}
开发者ID:MiniBlu,项目名称:cm11_kernel_htc_msm8974a3ul,代码行数:4,代码来源:pvc.c
示例18: af_rxrpc_init
/*
* initialise and register the RxRPC protocol
*/
static int __init af_rxrpc_init(void)
{
int ret = -1;
unsigned int tmp;
BUILD_BUG_ON(sizeof(struct rxrpc_skb_priv) > FIELD_SIZEOF(struct sk_buff, cb));
get_random_bytes(&tmp, sizeof(tmp));
tmp &= 0x3fffffff;
if (tmp == 0)
tmp = 1;
idr_set_cursor(&rxrpc_client_conn_ids, tmp);
ret = -ENOMEM;
rxrpc_call_jar = kmem_cache_create(
"rxrpc_call_jar", sizeof(struct rxrpc_call), 0,
SLAB_HWCACHE_ALIGN, NULL);
if (!rxrpc_call_jar) {
pr_notice("Failed to allocate call jar\n");
goto error_call_jar;
}
rxrpc_workqueue = alloc_workqueue("krxrpcd", 0, 1);
if (!rxrpc_workqueue) {
pr_notice("Failed to allocate work queue\n");
goto error_work_queue;
}
ret = rxrpc_init_security();
if (ret < 0) {
pr_crit("Cannot initialise security\n");
goto error_security;
}
ret = register_pernet_subsys(&rxrpc_net_ops);
if (ret)
goto error_pernet;
ret = proto_register(&rxrpc_proto, 1);
if (ret < 0) {
pr_crit("Cannot register protocol\n");
goto error_proto;
}
ret = sock_register(&rxrpc_family_ops);
if (ret < 0) {
pr_crit("Cannot register socket family\n");
goto error_sock;
}
ret = register_key_type(&key_type_rxrpc);
if (ret < 0) {
pr_crit("Cannot register client key type\n");
goto error_key_type;
}
ret = register_key_type(&key_type_rxrpc_s);
if (ret < 0) {
pr_crit("Cannot register server key type\n");
goto error_key_type_s;
}
ret = rxrpc_sysctl_init();
if (ret < 0) {
pr_crit("Cannot register sysctls\n");
goto error_sysctls;
}
return 0;
error_sysctls:
unregister_key_type(&key_type_rxrpc_s);
error_key_type_s:
unregister_key_type(&key_type_rxrpc);
error_key_type:
sock_unregister(PF_RXRPC);
error_sock:
proto_unregister(&rxrpc_proto);
error_proto:
unregister_pernet_subsys(&rxrpc_net_ops);
error_pernet:
rxrpc_exit_security();
error_security:
destroy_workqueue(rxrpc_workqueue);
error_work_queue:
kmem_cache_destroy(rxrpc_call_jar);
error_call_jar:
return ret;
}
开发者ID:avagin,项目名称:linux,代码行数:92,代码来源:af_rxrpc.c
示例19: mpls_sock_exit
void __exit mpls_sock_exit(void)
{
sock_unregister(AF_MPLS);
proto_unregister(&mpls_proto);
}
开发者ID:areece,项目名称:linux-2.6.35-vpls,代码行数:5,代码来源:af_mpls.c
示例20: Mksck_Exit
void
Mksck_Exit(void)
{
sock_unregister(mksckFamilyOps.family);
proto_unregister(&mksckProto);
}
开发者ID:Alex-V2,项目名称:One_M8_4.4.3_kernel,代码行数:6,代码来源:mksck_kernel.c
注:本文中的sock_unregister函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论