5 bool do_igmp_set (int nb, const char **com, struct ngadmin *nga)
12 printf("Usage: igmp set <enable> <vlan> <validate> <block>\n");
16 if (ngadmin_getCurrentSwitch(nga) == NULL) {
17 printf("must be logged\n");
21 ic.enable = strtol(com[0], NULL, 0);
22 ic.vlan = strtol(com[1], NULL, 0);
23 ic.validate = strtol(com[2], NULL, 0);
24 ic.block = strtol(com[3], NULL, 0);
26 i = ngadmin_setIGMPConf(nga, &ic);
34 bool do_igmp_show (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga)
37 const struct swi_attr *sa;
42 sa=ngadmin_getCurrentSwitch(nga);
44 printf("must be logged\n");
49 i = ngadmin_getIGMPConf(nga, &ic);
56 printf("IGMP snooping enabled: %s\n", ic.enable ? "yes" : "no" );
57 printf("IGMP snooping vlan: %u\n", ic.vlan);
58 printf("Validate IGMPv3 headers: %s\n", ic.validate ? "yes" : "no" );
59 printf("Block unknown multicast addresses: %s\n", ic.block ? "yes" : "no" );