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

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