From be7897523d42915910bb5f1828cbe5cb1d6ed8cd Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 1 Jun 2005 22:22:14 +0000 Subject: IGMP protocol now uses the generic background protocol mechanism. --- src/include/igmp.h | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'src/include/igmp.h') diff --git a/src/include/igmp.h b/src/include/igmp.h index 2235d6c6..48753eab 100644 --- a/src/include/igmp.h +++ b/src/include/igmp.h @@ -1,5 +1,8 @@ -#ifndef _IGMP_H -#define _IGMP_H +#ifndef IGMP_H +#define IGMP_H + +#include "stdint.h" +#include "in.h" #define IGMP_QUERY 0x11 #define IGMPv1_REPORT 0x12 @@ -7,11 +10,19 @@ #define IGMP_LEAVE 0x17 #define GROUP_ALL_HOSTS 0xe0000001 /* 224.0.0.1 Host byte order */ +#define MULTICAST_MASK 0xf0000000 +#define MULTICAST_NETWORK 0xe0000000 + +enum { + IGMP_SERVER, + MAX_IGMP +}; + struct igmp { - uint8_t type; - uint8_t response_time; - uint16_t chksum; - in_addr group; + uint8_t type; + uint8_t response_time; + uint16_t chksum; + struct in_addr group; } PACKED; struct igmp_ip_t { /* Format of an igmp ip packet */ @@ -20,4 +31,12 @@ struct igmp_ip_t { /* Format of an igmp ip packet */ struct igmp igmp; } PACKED; -#endif /* _IGMP_H */ +struct igmptable_t { + struct in_addr group; + unsigned long time; +} PACKED; + +extern void join_group ( int slot, unsigned long group ); +extern void leave_group ( int slot ); + +#endif /* IGMP_H */ -- cgit v1.2.3-55-g7522