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 /*
  22  *      Header in on cable format
  23  */
  24  
  25 struct igmphdr
  26 {
  27         unsigned char type;
  28         unsigned char unused;
  29         unsigned short csum;
  30         unsigned long group;
  31 };
  32 
  33 /*
  34  *      Header in host convenient format
  35  */
  36 
  37 struct igmp_header
  38 {
  39         unsigned char type;
  40         unsigned char unused;
  41         unsigned short csum;
  42         unsigned long group;
  43 };
  44 
  45 
  46 #define IGMP_HOST_MEMBERSHIP_QUERY      0x11    /* From RFC1112 */
  47 #define IGMP_HOST_MEMBERSHIP_REPORT     0x12    /* Ditto */
  48 #define IGMP_HOST_LEAVE_MESSAGE         0x17    /* An extra BSD seems to send */
  49 
  50                                 /* 224.0.0.1 */
  51 #define IGMP_ALL_HOSTS          htonl(0xE0000001L)
  52 
  53 /*
  54  * struct for keeping the multicast list in
  55  */
  56 
  57 #ifdef __KERNEL__
  58 struct ip_mc_socklist
  59 {
  60         unsigned long multiaddr[IP_MAX_MEMBERSHIPS];    /* This is a speed trade off */
  61         struct device *multidev[IP_MAX_MEMBERSHIPS];
  62 };
  63 
  64 struct ip_mc_list 
  65 {
  66         struct device *interface;
  67         unsigned long multiaddr;
  68         struct ip_mc_list *next;
  69         struct timer_list timer;
  70         int tm_running;
  71         int users;
  72 };
  73  
  74 extern struct ip_mc_list *ip_mc_head;
  75 
  76 
  77 extern int igmp_rcv(struct sk_buff *, struct device *, struct options *, unsigned long, unsigned short,
  78         unsigned long, int , struct inet_protocol *);
  79 extern void ip_mc_drop_device(struct device *dev); 
  80 extern int ip_mc_join_group(struct sock *sk, struct device *dev, unsigned long addr);
  81 extern int ip_mc_leave_group(struct sock *sk, struct device *dev,unsigned long addr);
  82 extern void ip_mc_drop_socket(struct sock *sk);
  83 #endif
  84 #endif

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