summaryrefslogtreecommitdiffstats
path: root/src/proto/igmp.c
diff options
context:
space:
mode:
authorMichael Brown2005-06-02 00:22:14 +0200
committerMichael Brown2005-06-02 00:22:14 +0200
commitbe7897523d42915910bb5f1828cbe5cb1d6ed8cd (patch)
tree52518721815fe6110729764a2e3c06a86ab63597 /src/proto/igmp.c
parentAdd generic mechanism for background protocols (e.g. ARP, IGMP) (diff)
downloadipxe-be7897523d42915910bb5f1828cbe5cb1d6ed8cd.tar.gz
ipxe-be7897523d42915910bb5f1828cbe5cb1d6ed8cd.tar.xz
ipxe-be7897523d42915910bb5f1828cbe5cb1d6ed8cd.zip
IGMP protocol now uses the generic background protocol mechanism.
Diffstat (limited to 'src/proto/igmp.c')
-rw-r--r--src/proto/igmp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/proto/igmp.c b/src/proto/igmp.c
index 17dae336..aad530f7 100644
--- a/src/proto/igmp.c
+++ b/src/proto/igmp.c
@@ -5,6 +5,7 @@
#include "ip.h"
#include "igmp.h"
+#include "background.h"
#include "nic.h"
#include "etherboot.h"
@@ -56,7 +57,8 @@ static void send_igmp_reports ( unsigned long now ) {
}
}
-static void process_igmp ( struct iphdr *ip, unsigned long now ) {
+static void process_igmp ( unsigned long now, unsigned short ptype __unused,
+ struct iphdr *ip ) {
struct igmp *igmp;
int i;
unsigned iplen;
@@ -110,6 +112,11 @@ static void process_igmp ( struct iphdr *ip, unsigned long now ) {
}
}
+static struct background igmp_background __background = {
+ .send = send_igmp_reports,
+ .process = process_igmp,
+};
+
void leave_group ( int slot ) {
/* Be very stupid and always send a leave group message if
* I have subscribed. Imperfect but it is standards
@@ -157,4 +164,3 @@ void join_group ( int slot, unsigned long group ) {
igmptable[slot].time = currticks();
}
}
-