diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/etherboot.h | 13 | ||||
| -rw-r--r-- | src/include/igmp.h | 33 |
2 files changed, 26 insertions, 20 deletions
diff --git a/src/include/etherboot.h b/src/include/etherboot.h index 669ee8b24..7bc523119 100644 --- a/src/include/etherboot.h +++ b/src/include/etherboot.h @@ -130,16 +130,11 @@ enum { MAX_ARP }; -#define IGMP_SERVER 0 -#define MAX_IGMP IGMP_SERVER+1 - #define RARP_REQUEST 3 #define RARP_REPLY 4 #include "in.h" -#define MULTICAST_MASK 0xF0000000 -#define MULTICAST_NETWORK 0xE0000000 /* Helper macros used to identify when DHCP options are valid/invalid in/outside of encapsulation */ #define NON_ENCAP_OPT in_encapsulated_options == 0 && @@ -164,11 +159,6 @@ struct arptable_t { uint8_t node[6]; } PACKED; -struct igmptable_t { - in_addr group; - unsigned long time; -} PACKED; - #define KERNEL_BUF (BOOTP_DATA_ADDR->bootp_reply.bp_file) #define FLOPPY_BOOT_LOCATION 0x7c00 @@ -214,14 +204,11 @@ int tcp_reset(struct iphdr *ip); typedef int (*reply_t)(int ival, void *ptr, unsigned short ptype, struct iphdr *ip, struct udphdr *udp, struct tcphdr *tcp); extern int await_reply P((reply_t reply, int ival, void *ptr, long timeout)); extern int decode_rfc1533 P((unsigned char *, unsigned int, unsigned int, int)); -extern void join_group(int slot, unsigned long group); -extern void leave_group(int slot); #define RAND_MAX 2147483647L extern uint16_t ipchksum P((const void *ip, unsigned long len)); extern uint16_t add_ipchksums P((unsigned long offset, uint16_t sum, uint16_t new)); extern int32_t random P((void)); extern long rfc2131_sleep_interval P((long base, int exp)); -extern long rfc1112_sleep_interval P((long base, int exp)); extern void cleanup P((void)); /* osloader.c */ diff --git a/src/include/igmp.h b/src/include/igmp.h index 2235d6c66..48753eab5 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 */ |
