Lines Matching refs:ripng
49 protocol. If ripng couldn't active or ripng doesn't configured,
50 ripng->fd must be negative value. */
51 struct ripng *ripng = NULL;
91 /* Allocate new ripng information. */
101 /* Free ripng information. */
120 /* Create ripng socket. */
131 zlog (NULL, LOG_ERR, "Can't make ripng socket");
161 zlog (NULL, LOG_ERR, "Can't bind ripng socket: %s.", strerror (errno));
225 ret = sendmsg (ripng->sock, &msg, 0);
458 ripng->garbage_time);
480 RIPNG_TIMER_ON (rinfo->t_timeout, ripng_timeout, ripng->timeout_time);
564 rp = route_node_get (ripng->table, (struct prefix *) &p);
674 ripng_garbage_collect, ripng->garbage_time);
719 rp = route_node_get (ripng->table, (struct prefix *) p);
757 rp = route_node_lookup (ripng->table, (struct prefix *) p);
790 for (rp = route_top (ripng->table); rp; rp = route_next (rp))
992 rp = route_node_lookup (ripng->table, (struct prefix *) &p);
1021 /* Check ripng is active and alive. */
1022 assert (ripng != NULL);
1023 assert (ripng->sock >= 0);
1026 managing. `sock' sould be same as ripng->sock. */
1028 ripng->t_read = NULL;
1034 len = ripng_recv_packet (sock, STREAM_DATA (ripng->ibuf),
1035 STREAM_SIZE (ripng->ibuf), &from, &ifindex,
1052 packet = (struct ripng_packet *) STREAM_DATA (ripng->ibuf);
1073 if (packet->version != ripng->version)
1076 packet->version, ripng->version);
1103 for (rp = route_top (ripng->table); rp; rp = route_next (rp))
1119 ripng->t_update = NULL;
1158 if (ripng->t_triggered_interval)
1160 thread_cancel (ripng->t_triggered_interval);
1161 ripng->t_triggered_interval = NULL;
1163 ripng->trigger = 0;
1175 ripng->t_triggered_interval = NULL;
1177 if (ripng->trigger)
1179 ripng->trigger = 0;
1194 ripng->t_triggered_update = NULL;
1197 if (ripng->t_triggered_interval)
1199 thread_cancel (ripng->t_triggered_interval);
1200 ripng->t_triggered_interval = NULL;
1202 ripng->trigger = 0;
1240 ripng->t_triggered_interval =
1290 /* Output stream get from ripng structre. XXX this should be
1292 s = ripng->obuf;
1316 for (rp = route_top (ripng->table); rp; rp = route_next (rp))
1389 if (ripng->route_map[rinfo->type].name)
1397 ret = route_map_apply (ripng->route_map[rinfo->type].map,
1417 if (ripng->route_map[rinfo->type].metric_config
1420 metric = ripng->route_map[rinfo->type].metric;
1429 metric = ripng->default_metric;
1542 /* ripng should be NULL. */
1543 assert (ripng == NULL);
1546 ripng = XMALLOC (0, sizeof (struct ripng));
1547 memset (ripng, 0, sizeof (struct ripng));
1550 ripng->version = RIPNG_V1;
1551 ripng->update_time = RIPNG_UPDATE_TIMER_DEFAULT;
1552 ripng->timeout_time = RIPNG_TIMEOUT_TIMER_DEFAULT;
1553 ripng->garbage_time = RIPNG_GARBAGE_TIMER_DEFAULT;
1554 ripng->default_metric = RIPNG_DEFAULT_METRIC_DEFAULT;
1557 ripng->ibuf = stream_new (RIPNG_MAX_PACKET_SIZE * 5);
1558 ripng->obuf = stream_new (RIPNG_MAX_PACKET_SIZE);
1561 ripng->table = route_table_init ();
1562 ripng->route = route_table_init ();
1563 ripng->aggregate = route_table_init ();
1566 ripng->sock = ripng_make_socket ();
1567 if (ripng->sock < 0)
1568 return ripng->sock;
1571 ripng_event (RIPNG_READ, ripng->sock);
1604 for (rp = route_top (ripng->table); rp; rp = route_next (rp))
1630 if (!ripng->t_read)
1631 ripng->t_read = thread_add_read (master, ripng_read, NULL, sock);
1634 if (ripng->t_update)
1636 thread_cancel (ripng->t_update);
1637 ripng->t_update = NULL;
1640 jitter = ripng_update_jitter (ripng->update_time);
1642 ripng->t_update =
1644 sock ? 2 : ripng->update_time + jitter);
1647 if (ripng->t_triggered_interval)
1648 ripng->trigger = 1;
1649 else if (! ripng->t_triggered_update)
1650 ripng->t_triggered_update =
1673 { ZEBRA_ROUTE_RIPNG, "R", "ripng", 50},
1718 "show ipv6 ripng",
1735 for (rp = route_top (ripng->table); rp; rp = route_next (rp))
1801 "router ripng",
1809 if (!ripng)
1842 rp = route_node_get (ripng->route, (struct prefix *) &p);
1875 rp = route_node_lookup (ripng->route, (struct prefix *) &p);
1909 node = route_node_get (ripng->aggregate, &p);
1941 rn = route_node_lookup (ripng->aggregate, &p);
1962 if (ripng)
1964 ripng->default_metric = atoi (argv[0]);
1976 if (ripng)
1978 ripng->default_metric = RIPNG_DEFAULT_METRIC_DEFAULT;
2008 ripng->update_time = update;
2021 ripng->update_time = RIPNG_UPDATE_TIMER_DEFAULT;
2043 ripng->timeout_time = timeout;
2055 ripng->timeout_time = RIPNG_TIMEOUT_TIMER_DEFAULT;
2076 ripng->garbage_time = garbage;
2088 ripng->garbage_time = RIPNG_GARBAGE_TIMER_DEFAULT;
2129 ripng->update_time = update;
2130 ripng->timeout_time = timeout;
2131 ripng->garbage_time = garbage;
2147 ripng->update_time = RIPNG_UPDATE_TIMER_DEFAULT;
2148 ripng->timeout_time = RIPNG_TIMEOUT_TIMER_DEFAULT;
2149 ripng->garbage_time = RIPNG_GARBAGE_TIMER_DEFAULT;
2164 if (! ripng)
2167 vty_out (vty, "Routing Protocol is \"ripng\"%s", VTY_NEWLINE);
2170 ripng->update_time, 0,
2174 ripng->timeout_time,
2175 ripng->garbage_time,
2193 ripng->default_information = 1;
2210 ripng->default_information = 0;
2227 if (ripng)
2231 vty_out (vty, "router ripng%s", VTY_NEWLINE);
2233 if (ripng->default_information)
2239 if (ripng->default_metric != RIPNG_DEFAULT_METRIC_DEFAULT)
2241 ripng->default_metric, VTY_NEWLINE);
2246 for (rp = route_top (ripng->aggregate); rp; rp = route_next (rp))
2255 for (rp = route_top (ripng->route); rp; rp = route_next (rp))
2262 if (ripng->update_time != RIPNG_UPDATE_TIMER_DEFAULT ||
2263 ripng->timeout_time != RIPNG_TIMEOUT_TIMER_DEFAULT ||
2264 ripng->garbage_time != RIPNG_GARBAGE_TIMER_DEFAULT)
2267 ripng->update_time,
2268 ripng->timeout_time,
2269 ripng->garbage_time,
2273 if (ripng->update_time != RIPNG_UPDATE_TIMER_DEFAULT)
2274 vty_out (vty, " update-timer %d%s", ripng->update_time,
2276 if (ripng->timeout_time != RIPNG_TIMEOUT_TIMER_DEFAULT)
2277 vty_out (vty, " timeout-timer %d%s", ripng->timeout_time,
2279 if (ripng->garbage_time != RIPNG_GARBAGE_TIMER_DEFAULT)
2280 vty_out (vty, " garbage-timer %d%s", ripng->garbage_time,
2437 if (ripng)
2441 if (ripng->route_map[i].name)
2442 ripng->route_map[i].map =
2443 route_map_lookup_by_name (ripng->route_map[i].name);
2463 /* Initialize ripng structure and set commands. */
2473 /* Install ripng commands. */