X-Git-Url: http://git.etherboot.org/people/asdlkf/gpxe.git/blobdiff_plain/9c8a69b673149c209746732a0dc6c001083dba49..6a3f5d6db7d00a0ce3bd228188d478700f4a0c31:/src/proto/igmp.c diff --git a/src/proto/igmp.c b/src/proto/igmp.c index aad530f7..d711421a 100644 --- a/src/proto/igmp.c +++ b/src/proto/igmp.c @@ -3,11 +3,10 @@ * */ -#include "ip.h" -#include "igmp.h" -#include "background.h" -#include "nic.h" -#include "etherboot.h" +#if 0 + +#include +#include static unsigned long last_igmpv1 = 0; static struct igmptable_t igmptable[MAX_IGMP]; @@ -50,8 +49,7 @@ static void send_igmp_reports ( unsigned long now ) { igmp.igmp.chksum = ipchksum ( &igmp.igmp, sizeof ( igmp.igmp ) ); ip_transmit ( sizeof ( igmp ), &igmp ); - DBG ( "IGMP sent report to %@\n", - igmp.igmp.group.s_addr ); + DBG ( "IGMP sent report to %s\n", inet_ntoa ( igmp.igmp.group ) ); /* Don't send another igmp report until asked */ igmptable[i].time = 0; } @@ -84,7 +82,7 @@ static void process_igmp ( unsigned long now, unsigned short ptype __unused, interval = ( igmp->response_time * TICKS_PER_SEC ) /10; } - DBG ( "IGMP received query for %@\n", igmp->group.s_addr ); + DBG ( "IGMP received query for %s\n", inet_ntoa ( igmp->group ) ); for ( i = 0 ; i < MAX_IGMP ; i++ ) { uint32_t group = igmptable[i].group.s_addr; if ( ( group == 0 ) || @@ -101,7 +99,8 @@ static void process_igmp ( unsigned long now, unsigned short ptype __unused, if ( ( ( igmp->type == IGMPv1_REPORT ) || ( igmp->type == IGMPv2_REPORT ) ) && ( ip->dest.s_addr == igmp->group.s_addr ) ) { - DBG ( "IGMP received report for %@\n", igmp->group.s_addr); + DBG ( "IGMP received report for %s\n", + inet_ntoa ( igmp->group ) ); for ( i = 0 ; i < MAX_IGMP ; i++ ) { if ( ( igmptable[i].group.s_addr == igmp->group.s_addr ) && @@ -112,7 +111,7 @@ static void process_igmp ( unsigned long now, unsigned short ptype __unused, } } -static struct background igmp_background __background = { +struct background igmp_background __background = { .send = send_igmp_reports, .process = process_igmp, }; @@ -142,7 +141,7 @@ void leave_group ( int slot ) { igmp.igmp.group.s_addr = igmptable[slot].group.s_addr; igmp.igmp.chksum = ipchksum ( &igmp.igmp, sizeof ( igmp ) ); ip_transmit ( sizeof ( igmp ), &igmp ); - DBG ( "IGMP left group %@\n", igmp.igmp.group.s_addr ); + DBG ( "IGMP left group %s\n", inet_ntoa ( igmp.igmp.group ) ); } memset ( &igmptable[slot], 0, sizeof ( igmptable[0] ) ); } @@ -164,3 +163,5 @@ void join_group ( int slot, unsigned long group ) { igmptable[slot].time = currticks(); } } + +#endif