route.c (c3506372277779fccbffee2475400fcd689d5738) route.c (3617d9496cd92dcca4d0893191d95554590d8d9f)
1/*
2 * Linux INET6 implementation
3 * FIB front-end.
4 *
5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt>
7 *
8 * This program is free software; you can redistribute it and/or

--- 4862 unchanged lines hidden (view full) ---

4871 atomic_read(&net->ipv6.rt6_stats->fib_rt_alloc),
4872 net->ipv6.rt6_stats->fib_rt_entries,
4873 net->ipv6.rt6_stats->fib_rt_cache,
4874 dst_entries_get_slow(&net->ipv6.ip6_dst_ops),
4875 net->ipv6.rt6_stats->fib_discarded_routes);
4876
4877 return 0;
4878}
1/*
2 * Linux INET6 implementation
3 * FIB front-end.
4 *
5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt>
7 *
8 * This program is free software; you can redistribute it and/or

--- 4862 unchanged lines hidden (view full) ---

4871 atomic_read(&net->ipv6.rt6_stats->fib_rt_alloc),
4872 net->ipv6.rt6_stats->fib_rt_entries,
4873 net->ipv6.rt6_stats->fib_rt_cache,
4874 dst_entries_get_slow(&net->ipv6.ip6_dst_ops),
4875 net->ipv6.rt6_stats->fib_discarded_routes);
4876
4877 return 0;
4878}
4879
4880static int rt6_stats_seq_open(struct inode *inode, struct file *file)
4881{
4882 return single_open_net(inode, file, rt6_stats_seq_show);
4883}
4884
4885static const struct file_operations rt6_stats_seq_fops = {
4886 .open = rt6_stats_seq_open,
4887 .read = seq_read,
4888 .llseek = seq_lseek,
4889 .release = single_release_net,
4890};
4891#endif /* CONFIG_PROC_FS */
4892
4893#ifdef CONFIG_SYSCTL
4894
4895static
4896int ipv6_sysctl_rtcache_flush(struct ctl_table *ctl, int write,
4897 void __user *buffer, size_t *lenp, loff_t *ppos)
4898{

--- 190 unchanged lines hidden (view full) ---

5089 dst_entries_destroy(&net->ipv6.ip6_dst_ops);
5090}
5091
5092static int __net_init ip6_route_net_init_late(struct net *net)
5093{
5094#ifdef CONFIG_PROC_FS
5095 proc_create_net("ipv6_route", 0, net->proc_net, &ipv6_route_seq_ops,
5096 sizeof(struct ipv6_route_iter));
4879#endif /* CONFIG_PROC_FS */
4880
4881#ifdef CONFIG_SYSCTL
4882
4883static
4884int ipv6_sysctl_rtcache_flush(struct ctl_table *ctl, int write,
4885 void __user *buffer, size_t *lenp, loff_t *ppos)
4886{

--- 190 unchanged lines hidden (view full) ---

5077 dst_entries_destroy(&net->ipv6.ip6_dst_ops);
5078}
5079
5080static int __net_init ip6_route_net_init_late(struct net *net)
5081{
5082#ifdef CONFIG_PROC_FS
5083 proc_create_net("ipv6_route", 0, net->proc_net, &ipv6_route_seq_ops,
5084 sizeof(struct ipv6_route_iter));
5097 proc_create("rt6_stats", 0444, net->proc_net, &rt6_stats_seq_fops);
5085 proc_create_net_single("rt6_stats", 0444, net->proc_net,
5086 rt6_stats_seq_show, NULL);
5098#endif
5099 return 0;
5100}
5101
5102static void __net_exit ip6_route_net_exit_late(struct net *net)
5103{
5104#ifdef CONFIG_PROC_FS
5105 remove_proc_entry("ipv6_route", net->proc_net);

--- 163 unchanged lines hidden ---
5087#endif
5088 return 0;
5089}
5090
5091static void __net_exit ip6_route_net_exit_late(struct net *net)
5092{
5093#ifdef CONFIG_PROC_FS
5094 remove_proc_entry("ipv6_route", net->proc_net);

--- 163 unchanged lines hidden ---