• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/quagga/lib/

Lines Matching refs:index

118   struct route_map_index *index;
121 while ((index = map->head) != NULL)
122 route_map_index_delete (index, 0);
205 struct route_map_index *index;
213 for (index = map->head; index; index = index->next)
216 map->name, route_map_type_str (index->type),
217 index->pref, VTY_NEWLINE);
220 if (index->description)
222 index->description, VTY_NEWLINE);
226 for (rule = index->match_list.head; rule; rule = rule->next)
231 for (rule = index->set_list.head; rule; rule = rule->next)
237 if (index->nextrm)
238 vty_out (vty, " Call %s%s", index->nextrm, VTY_NEWLINE);
242 if (index->exitpolicy == RMAP_GOTO)
243 vty_out (vty, " Goto %d%s", index->nextpref, VTY_NEWLINE);
244 else if (index->exitpolicy == RMAP_NEXT)
246 else if (index->exitpolicy == RMAP_EXIT)
292 /* Free route map index. */
294 route_map_index_delete (struct route_map_index *index, int notify)
299 while ((rule = index->match_list.head) != NULL)
300 route_map_rule_delete (&index->match_list, rule);
303 while ((rule = index->set_list.head) != NULL)
304 route_map_rule_delete (&index->set_list, rule);
306 /* Remove index from route map list. */
307 if (index->next)
308 index->next->prev = index->prev;
310 index->map->tail = index->prev;
312 if (index->prev)
313 index->prev->next = index->next;
315 index->map->head = index->next;
318 if (index->nextrm)
319 XFREE (MTYPE_ROUTE_MAP_NAME, index->nextrm);
324 index->map->name);
326 XFREE (MTYPE_ROUTE_MAP_INDEX, index);
329 /* Lookup index from route map. */
334 struct route_map_index *index;
336 for (index = map->head; index; index = index->next)
337 if ((index->type == type || type == RMAP_ANY)
338 && index->pref == pref)
339 return index;
343 /* Add new index to route map. */
348 struct route_map_index *index;
352 index = route_map_index_new ();
353 index->map = map;
354 index->type = type;
355 index->pref = pref;
364 map->head = map->tail = index;
368 index->prev = map->tail;
369 map->tail->next = index;
370 map->tail = index;
374 index->next = map->head;
375 map->head->prev = index;
376 map->head = index;
380 index->next = point;
381 index->prev = point->prev;
383 point->prev->next = index;
384 point->prev = index;
392 return index;
395 /* Get route map index. */
400 struct route_map_index *index;
402 index = route_map_index_lookup (map, RMAP_ANY, pref);
403 if (index && index->type != type)
405 /* Delete index from route map. */
406 route_map_index_delete (index, 1);
407 index = NULL;
409 if (index == NULL)
410 index = route_map_index_add (map, type, pref);
411 return index;
526 route_map_add_match (struct route_map_index *index, const char *match_name,
551 for (rule = index->match_list.head; rule; rule = next)
556 route_map_rule_delete (&index->match_list, rule);
571 route_map_rule_add (&index->match_list, rule);
578 index->map->name);
585 route_map_delete_match (struct route_map_index *index, const char *match_name,
595 for (rule = index->match_list.head; rule; rule = rule->next)
599 route_map_rule_delete (&index->match_list, rule);
603 index->map->name);
612 route_map_add_set (struct route_map_index *index, const char *set_name,
638 for (rule = index->set_list.head; rule; rule = next)
643 route_map_rule_delete (&index->set_list, rule);
658 route_map_rule_add (&index->set_list, rule);
665 index->map->name);
671 route_map_delete_set (struct route_map_index *index, const char *set_name,
681 for (rule = index->set_list.head; rule; rule = rule->next)
685 route_map_rule_delete (&index->set_list, rule);
689 index->map->name);
696 /* Apply route map's each index to the object.
721 -Goto Next index
779 struct route_map_index *index;
794 for (index = map->head; index; index = index->next)
796 /* Apply this index. */
797 ret = route_map_apply_match (&index->match_list, prefix, type, object);
805 if (index->type == RMAP_PERMIT)
809 for (set = index->set_list.head; set; set = set->next)
814 if (index->nextrm)
817 route_map_lookup_by_name (index->nextrm);
831 switch (index->exitpolicy)
840 struct route_map_index *next = index->next;
841 int nextpref = index->nextpref;
845 index = next;
856 else if (index->type == RMAP_DENY)
915 struct route_map_index *index;
945 index = route_map_index_get (map, permit, pref);
947 vty->index = index;
987 struct route_map_index *index;
1024 /* Lookup route map index. */
1025 index = route_map_index_lookup (map, permit, pref);
1026 if (index == NULL)
1033 /* Delete index from route map. */
1034 route_map_index_delete (index, 1);
1049 struct route_map_index *index;
1051 index = vty->index;
1053 if (index)
1054 index->exitpolicy = RMAP_NEXT;
1066 struct route_map_index *index;
1068 index = vty->index;
1070 if (index)
1071 index->exitpolicy = RMAP_EXIT;
1083 struct route_map_index *index = vty->index;
1086 if (index)
1089 VTY_GET_INTEGER_RANGE("route-map index", d, argv[0], 1, 65536);
1091 d = index->pref + 1;
1093 if (d <= index->pref)
1102 index->exitpolicy = RMAP_GOTO;
1103 index->nextpref = d;
1116 struct route_map_index *index;
1118 index = vty->index;
1120 if (index)
1121 index->exitpolicy = RMAP_EXIT;
1177 struct route_map_index *index;
1179 index = vty->index;
1180 if (index)
1182 if (index->nextrm)
1183 XFREE (MTYPE_ROUTE_MAP_NAME, index->nextrm);
1184 index->nextrm = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[0]);
1195 struct route_map_index *index;
1197 index = vty->index;
1199 if (index->nextrm)
1201 XFREE (MTYPE_ROUTE_MAP_NAME, index->nextrm);
1202 index->nextrm = NULL;
1214 struct route_map_index *index;
1216 index = vty->index;
1217 if (index)
1219 if (index->description)
1220 XFREE (MTYPE_TMP, index->description);
1221 index->description = argv_concat (argv, argc, 0);
1232 struct route_map_index *index;
1234 index = vty->index;
1235 if (index)
1237 if (index->description)
1238 XFREE (MTYPE_TMP, index->description);
1239 index->description = NULL;
1249 struct route_map_index *index;
1255 for (index = map->head; index; index = index->next)
1264 route_map_type_str (index->type),
1265 index->pref, VTY_NEWLINE);
1267 if (index->description)
1268 vty_out (vty, " description %s%s", index->description, VTY_NEWLINE);
1270 for (rule = index->match_list.head; rule; rule = rule->next)
1275 for (rule = index->set_list.head; rule; rule = rule->next)
1279 if (index->nextrm)
1280 vty_out (vty, " call %s%s", index->nextrm, VTY_NEWLINE);
1281 if (index->exitpolicy == RMAP_GOTO)
1282 vty_out (vty, " on-match goto %d%s", index->nextpref, VTY_NEWLINE);
1283 if (index->exitpolicy == RMAP_NEXT)