6 bool do_igmp_set (int nb, const char **com, struct ngadmin *nga) {
13 printf("Usage: igmp set <enable> <vlan> <validate> <block>\n");
17 if ( ngadmin_getCurrentSwitch(nga)==NULL ) {
18 printf("must be logged\n");
22 ic.enable=strtol(com[0], NULL, 0);
23 ic.vlan=strtol(com[1], NULL, 0);
24 ic.validate=strtol(com[2], NULL, 0);
25 ic.block=strtol(com[3], NULL, 0);
27 i=ngadmin_setIGMPConf(nga, &ic);
37 bool do_igmp_show (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga) {
40 const struct swi_attr *sa;
45 if ( (sa=ngadmin_getCurrentSwitch(nga))==NULL ) {
46 printf("must be logged\n");
51 i=ngadmin_getIGMPConf(nga, &ic);
59 printf("IGMP snooping enabled: %s\n", ic.enable ? "yes" : "no" );
60 printf("IGMP snooping vlan: %u\n", ic.vlan);
61 printf("Validate IGMPv3 headers: %s\n", ic.validate ? "yes" : "no" );
62 printf("Block unknown multicast addresses: %s\n", ic.block ? "yes" : "no" );