IGMP protocol now uses the generic background protocol mechanism.

This commit is contained in:
Michael Brown
2005-06-01 22:22:14 +00:00
parent 85a380530d
commit be7897523d
4 changed files with 37 additions and 178 deletions

View File

@@ -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 */