Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

igmp.c File Reference

#include <linux/config.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/socket.h>
#include <linux/sockios.h>
#include <linux/in.h>
#include <linux/inet.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/inetdevice.h>
#include <linux/igmp.h>
#include <linux/if_arp.h>
#include <linux/rtnetlink.h>
#include <net/ip.h>
#include <net/protocol.h>
#include <net/route.h>
#include <net/sock.h>
#include <net/checksum.h>

Include dependency graph for igmp.c:

Go to the source code of this file.

Defines

#define IP_MAX_MEMBERSHIPS   20

Functions

static void ip_mc_filter_add (struct in_device *in_dev, u32 addr)
static void ip_mc_filter_del (struct in_device *in_dev, u32 addr)
static void igmp_group_dropped (struct ip_mc_list *im)
static void igmp_group_added (struct ip_mc_list *im)
void ip_mc_inc_group (struct in_device *in_dev, u32 addr)
int ip_mc_dec_group (struct in_device *in_dev, u32 addr)
void ip_mc_down (struct in_device *in_dev)
void ip_mc_up (struct in_device *in_dev)
void ip_mc_destroy_dev (struct in_device *in_dev)
static struct in_device * ip_mc_find_dev (struct ip_mreqn *imr)
int ip_mc_join_group (struct sock *sk, struct ip_mreqn *imr)
int ip_mc_leave_group (struct sock *sk, struct ip_mreqn *imr)
void ip_mc_drop_socket (struct sock *sk)

Variables

int sysctl_igmp_max_memberships = IP_MAX_MEMBERSHIPS


Define Documentation

#define IP_MAX_MEMBERSHIPS   20
 

Definition at line 100 of file igmp.c.


Function Documentation

static void igmp_group_added struct ip_mc_list *  im  )  [static]
 

Definition at line 392 of file igmp.c.

References end_bh_atomic(), IGMP_ALL_HOSTS, ip_mc_filter_add(), and start_bh_atomic().

Referenced by ip_mc_inc_group(), and ip_mc_up().

Here is the call graph for this function:

static void igmp_group_dropped struct ip_mc_list *  im  )  [static]
 

Definition at line 372 of file igmp.c.

References end_bh_atomic(), IGMP_ALL_HOSTS, IGMP_HOST_LEAVE_MESSAGE, ip_mc_filter_del(), and start_bh_atomic().

Referenced by ip_mc_dec_group(), ip_mc_destroy_dev(), and ip_mc_down().

Here is the call graph for this function:

int ip_mc_dec_group struct in_device *  in_dev,
u32  addr
 

Definition at line 459 of file igmp.c.

References ESRCH, i, IFF_UP, igmp_group_dropped(), ip, ip_rt_multicast_event(), kfree_s(), NULL, and synchronize_bh.

Referenced by ip_mc_down(), ip_mc_drop_socket(), and ip_mc_leave_group().

Here is the call graph for this function:

void ip_mc_destroy_dev struct in_device *  in_dev  ) 
 

Definition at line 508 of file igmp.c.

References i, igmp_group_dropped(), kfree_s(), and NULL.

Referenced by inetdev_destroy().

Here is the call graph for this function:

void ip_mc_down struct in_device *  in_dev  ) 
 

Definition at line 482 of file igmp.c.

References i, IGMP_ALL_HOSTS, igmp_group_dropped(), and ip_mc_dec_group().

Referenced by inetdev_event().

Here is the call graph for this function:

void ip_mc_drop_socket struct sock sk  ) 
 

Definition at line 634 of file igmp.c.

References inetdev_by_index(), ip_mc_dec_group(), sock::ip_mc_list, NULL, and sock_kfree_s().

Referenced by inet_release().

Here is the call graph for this function:

static void ip_mc_filter_add struct in_device *  in_dev,
u32  addr
[static]
 

Definition at line 343 of file igmp.c.

References arp_mc_map(), buf, dev_mc_add(), device, and MAX_ADDR_LEN.

Referenced by igmp_group_added().

Here is the call graph for this function:

static void ip_mc_filter_del struct in_device *  in_dev,
u32  addr
[static]
 

Definition at line 363 of file igmp.c.

References arp_mc_map(), buf, dev_mc_delete(), device, and MAX_ADDR_LEN.

Referenced by igmp_group_dropped().

Here is the call graph for this function:

static struct in_device* ip_mc_find_dev struct ip_mreqn imr  )  [static]
 

Definition at line 519 of file igmp.c.

References device, ip_mreqn::imr_address, ip_mreqn::imr_ifindex, ip_mreqn::imr_multiaddr, ip_dev_find(), ip_route_output(), ip_rt_put(), NULL, in_addr::s_addr, and rtable::u.

Referenced by ip_mc_join_group().

Here is the call graph for this function:

void ip_mc_inc_group struct in_device *  in_dev,
u32  addr
 

Definition at line 419 of file igmp.c.

References i, IFF_UP, igmp_group_added(), init_timer(), ip_rt_multicast_event(), kfree(), kmalloc(), and long.

Referenced by ip_mc_join_group(), and ip_mc_up().

Here is the call graph for this function:

int ip_mc_join_group struct sock sk,
struct ip_mreqn imr
 

Definition at line 546 of file igmp.c.

References addr, count, done, EADDRINUSE, EINVAL, ENOBUFS, ENODEV, i, ip_mreqn::imr_ifindex, ip_mreqn::imr_multiaddr, inetdev_by_index(), ip_mc_find_dev(), ip_mc_inc_group(), memcmp, memcpy, NULL, in_addr::s_addr, sock_kfree_s(), sock_kmalloc(), and u32.

Referenced by ip_setsockopt().

Here is the call graph for this function:

int ip_mc_leave_group struct sock sk,
struct ip_mreqn imr
 

Definition at line 605 of file igmp.c.

References EADDRNOTAVAIL, ip_mreqn::imr_address, ip_mreqn::imr_ifindex, ip_mreqn::imr_multiaddr, inetdev_by_index(), ip_mc_dec_group(), sock::ip_mc_list, NULL, in_addr::s_addr, sock_kfree_s(), and synchronize_bh.

Referenced by ip_setsockopt().

Here is the call graph for this function:

void ip_mc_up struct in_device *  in_dev  ) 
 

Definition at line 494 of file igmp.c.

References i, IGMP_ALL_HOSTS, igmp_group_added(), and ip_mc_inc_group().

Referenced by inetdev_event(), and inetdev_init().

Here is the call graph for this function:


Variable Documentation

int sysctl_igmp_max_memberships = IP_MAX_MEMBERSHIPS
 

Definition at line 544 of file igmp.c.