diff options
author | Michael Brown | 2005-06-02 00:22:14 +0200 |
---|---|---|
committer | Michael Brown | 2005-06-02 00:22:14 +0200 |
commit | be7897523d42915910bb5f1828cbe5cb1d6ed8cd (patch) | |
tree | 52518721815fe6110729764a2e3c06a86ab63597 /src/include/igmp.h | |
parent | Add generic mechanism for background protocols (e.g. ARP, IGMP) (diff) | |
download | ipxe-be7897523d42915910bb5f1828cbe5cb1d6ed8cd.tar.gz ipxe-be7897523d42915910bb5f1828cbe5cb1d6ed8cd.tar.xz ipxe-be7897523d42915910bb5f1828cbe5cb1d6ed8cd.zip |
IGMP protocol now uses the generic background protocol mechanism.
Diffstat (limited to 'src/include/igmp.h')
-rw-r--r-- | src/include/igmp.h | 33 |
1 files changed, 26 insertions, 7 deletions
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 */ |