int radvd_init(char *ifname, struct config *c);
void radvd_process();
+void radvd_reset_adverts(void);
#ifndef SF_SRC
serial_source ser_src;
struct generic_header *g_hdr;
if (log_getlevel() > LOGLVL_DEBUG) return;
- printf(" nxthdr: 0x%x hlim: 0x%x\n", msg->hdr.nxt_hdr, msg->hdr.hlim);
+ printf(" nxthdr: 0x%x hlim: 0x%x plen: %i\n", msg->hdr.nxt_hdr, msg->hdr.hlim, ntohs(msg->hdr.plen));
printf(" src: ");
for (i = 0; i < 16; i++) printf("0x%x ", msg->hdr.ip6_src.s6_addr[i]);
printf("\n");
VTY_printf(" links : print link detail\r\n");
VTY_printf(" routes : print routes\r\n");
VTY_printf(" newroutes : recalculate routes\r\n");
+ VTY_printf(" rebuild : initiate a DAG recomputation\r\n");
VTY_printf(" controller <n> : add a new controller\r\n");
#ifdef CENTRALIZED_ROUTING
VTY_printf(" install <HOP | SRC> <n1> <n2> [reverse]: install a route between n1 and n2\r\n");
VTY_flush();
}
+void sh_incr_seqno(int fd, int argc, char **argv) {
+ VTY_HEAD;
+ VTY_printf("DAG seqno now %i\r\n", routing_incr_seqno());
+ radvd_reset_adverts();
+
+ VTY_flush();
+}
+
struct vty_cmd vty_cmd_list[] = {{"help", print_help},
{"stats", print_stats},
{"links", nw_print_links},
{"log", sh_loglevel},
{"dot", sh_dotfile},
{"chan", sh_chan},
+ {"rebuild", sh_incr_seqno},
#ifdef CENTRALIZED_ROUTING
{"install", sh_install},
{"uninstall", sh_uninstall},
}
usecs_remain -= (KEEPALIVE_TIMEOUT - tv.tv_usec);
if (usecs_remain <= 0) {
- if (keepalive_needed) {
+ if (keepalive_needed && !opt_listenonly) {
configure_setparms(&driver_config, CONFIG_KEEPALIVE);
} else keepalive_needed = 1;
break;
case 'l':
opt_listenonly = 1;
+ info("Listen Only: will not attach to interface device\n");
break;
case 't':
info("TrackFlows: will insert flow id on outgoing packets\n");
}
}
- if (argc - optind != 2) {
+ if (argc - optind != 2 && !opt_listenonly) {
#ifndef SF_SRC
- fatal("usage: %s [-c config] [-n] <device> <rate>\n", argv[0]);
+ fatal("usage: %s [-c config] [-l] <device> <rate>\n", argv[0]);
#else
fatal("usage: %s [-c config] <host> <port>\n", argv[0]);
#endif