igmp.c (163849ea9b4c5d50fbd324692461983d18faadad) igmp.c (2c8c1e7297e19bdef3c178c3ea41d898a7716e3e)
1/*
2 * Linux NET3: Internet Group Management Protocol [IGMP]
3 *
4 * This code implements the IGMP protocol as defined in RFC1112. There has
5 * been a further revision of this protocol since which is now supported.
6 *
7 * If you have trouble with this module be careful what gcc you have used,
8 * the older version didn't come out right using gcc 2.5.8, the newer one

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

2598static const struct file_operations igmp_mcf_seq_fops = {
2599 .owner = THIS_MODULE,
2600 .open = igmp_mcf_seq_open,
2601 .read = seq_read,
2602 .llseek = seq_lseek,
2603 .release = seq_release_net,
2604};
2605
1/*
2 * Linux NET3: Internet Group Management Protocol [IGMP]
3 *
4 * This code implements the IGMP protocol as defined in RFC1112. There has
5 * been a further revision of this protocol since which is now supported.
6 *
7 * If you have trouble with this module be careful what gcc you have used,
8 * the older version didn't come out right using gcc 2.5.8, the newer one

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

2598static const struct file_operations igmp_mcf_seq_fops = {
2599 .owner = THIS_MODULE,
2600 .open = igmp_mcf_seq_open,
2601 .read = seq_read,
2602 .llseek = seq_lseek,
2603 .release = seq_release_net,
2604};
2605
2606static int igmp_net_init(struct net *net)
2606static int __net_init igmp_net_init(struct net *net)
2607{
2608 struct proc_dir_entry *pde;
2609
2610 pde = proc_net_fops_create(net, "igmp", S_IRUGO, &igmp_mc_seq_fops);
2611 if (!pde)
2612 goto out_igmp;
2613 pde = proc_net_fops_create(net, "mcfilter", S_IRUGO, &igmp_mcf_seq_fops);
2614 if (!pde)
2615 goto out_mcfilter;
2616 return 0;
2617
2618out_mcfilter:
2619 proc_net_remove(net, "igmp");
2620out_igmp:
2621 return -ENOMEM;
2622}
2623
2607{
2608 struct proc_dir_entry *pde;
2609
2610 pde = proc_net_fops_create(net, "igmp", S_IRUGO, &igmp_mc_seq_fops);
2611 if (!pde)
2612 goto out_igmp;
2613 pde = proc_net_fops_create(net, "mcfilter", S_IRUGO, &igmp_mcf_seq_fops);
2614 if (!pde)
2615 goto out_mcfilter;
2616 return 0;
2617
2618out_mcfilter:
2619 proc_net_remove(net, "igmp");
2620out_igmp:
2621 return -ENOMEM;
2622}
2623
2624static void igmp_net_exit(struct net *net)
2624static void __net_exit igmp_net_exit(struct net *net)
2625{
2626 proc_net_remove(net, "mcfilter");
2627 proc_net_remove(net, "igmp");
2628}
2629
2630static struct pernet_operations igmp_net_ops = {
2631 .init = igmp_net_init,
2632 .exit = igmp_net_exit,

--- 12 unchanged lines hidden ---
2625{
2626 proc_net_remove(net, "mcfilter");
2627 proc_net_remove(net, "igmp");
2628}
2629
2630static struct pernet_operations igmp_net_ops = {
2631 .init = igmp_net_init,
2632 .exit = igmp_net_exit,

--- 12 unchanged lines hidden ---