-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
Hi,Why the api named initRouteTable() but the api mainly deal with joining the default groups.Is it necessary make the line (routing_table = NULL) in the api? It makes me confused.
void initRouteTable(void) {
unsigned Ix;
struct IfDesc *Dp;
// Clear routing table...
routing_table = NULL;
// Join the all routers group on downstream vifs...
for ( Ix = 0; (Dp = getIfByIx(Ix)); Ix++ ) {
// If this is a downstream vif, we should join the All routers group...
if( Dp->InAdr.s_addr && ! (Dp->Flags & IFF_LOOPBACK) && Dp->state == IF_STATE_DOWNSTREAM) {
my_log(LOG_DEBUG, 0, "Joining all-routers group %s on vif %s",
inetFmt(allrouters_group,s1),inetFmt(Dp->InAdr.s_addr,s2));
k_join(Dp, allrouters_group);
my_log(LOG_DEBUG, 0, "Joining all igmpv3 multicast routers group %s on vif %s",
inetFmt(alligmp3_group,s1),inetFmt(Dp->InAdr.s_addr,s2));
k_join(Dp, alligmp3_group);
}
}
}
Metadata
Metadata
Assignees
Labels
No labels