root/include/linux/igmp.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  *      Linux NET3:     Internet Gateway Management Protocol  [IGMP]
   3  *
   4  *      Authors:
   5  *              Alan Cox <Alan.Cox@linux.org>   
   6  *
   7  *
   8  *      This program is free software; you can redistribute it and/or
   9  *      modify it under the terms of the GNU General Public License
  10  *      as published by the Free Software Foundation; either version
  11  *      2 of the License, or (at your option) any later version.
  12  */
  13 
  14 #ifndef _LINUX_IGMP_H
  15 #define _LINUX_IGMP_H
  16 
  17 /*
  18  *      IGMP protocol structures
  19  */
  20 
  21 struct igmphdr
  22 {
  23         unsigned char type;
  24         unsigned char unused;
  25         unsigned short csum;
  26         unsigned long group;
  27 };
  28 
  29 #define IGMP_HOST_MEMBERSHIP_QUERY      0x11    /* From RFC1112 */
  30 #define IGMP_HOST_MEMBERSHIP_REPORT     0x12    /* Ditto */
  31 #define IGMP_HOST_LEAVE_MESSAGE         0x17    /* An extra BSD seems to send */
  32 
  33                                 /* 224.0.0.1 */
  34 #define IGMP_ALL_HOSTS          htonl(0xE0000001L)
  35 
  36 /*
  37  * struct for keeping the multicast list in
  38  */
  39 
  40 #ifdef __KERNEL__
  41 struct ip_mc_socklist
  42 {
  43         unsigned long multiaddr[IP_MAX_MEMBERSHIPS];    /* This is a speed trade off */
  44         struct device *multidev[IP_MAX_MEMBERSHIPS];
  45 };
  46 
  47 struct ip_mc_list 
  48 {
  49         struct device *interface;
  50         unsigned long multiaddr;
  51         struct ip_mc_list *next;
  52         struct timer_list timer;
  53         int tm_running;
  54         int users;
  55 };
  56  
  57 extern struct ip_mc_list *ip_mc_head;
  58 
  59 
  60 extern int igmp_rcv(struct sk_buff *, struct device *, struct options *, unsigned long, unsigned short,
  61         unsigned long, int , struct inet_protocol *);
  62 extern void ip_mc_drop_device(struct device *dev); 
  63 extern int ip_mc_join_group(struct sock *sk, struct device *dev, unsigned long addr);
  64 extern int ip_mc_leave_group(struct sock *sk, struct device *dev,unsigned long addr);
  65 extern void ip_mc_drop_socket(struct sock *sk);
  66 #endif
  67 #endif

/* [previous][next][first][last][top][bottom][index][help] */