ripng_routemap.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. /* RIPng routemap.
  2. * Copyright (C) 1999 Kunihiro Ishiguro
  3. *
  4. * This file is part of GNU Zebra.
  5. *
  6. * GNU Zebra is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the
  8. * Free Software Foundation; either version 2, or (at your option) any
  9. * later version.
  10. *
  11. * GNU Zebra is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with GNU Zebra; see the file COPYING. If not, write to the Free
  18. * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  19. * 02111-1307, USA.
  20. */
  21. #include <zebra.h>
  22. #include "if.h"
  23. #include "memory.h"
  24. #include "prefix.h"
  25. #include "routemap.h"
  26. #include "command.h"
  27. #include "sockunion.h"
  28. #include "ripngd/ripngd.h"
  29. struct rip_metric_modifier
  30. {
  31. enum
  32. {
  33. metric_increment,
  34. metric_decrement,
  35. metric_absolute
  36. } type;
  37. u_char metric;
  38. };
  39. static int
  40. ripng_route_match_add (struct vty *vty, struct route_map_index *index,
  41. const char *command, const char *arg)
  42. {
  43. int ret;
  44. ret = route_map_add_match (index, command, arg);
  45. if (ret)
  46. {
  47. switch (ret)
  48. {
  49. case RMAP_RULE_MISSING:
  50. vty_out (vty, "Can't find rule.%s", VTY_NEWLINE);
  51. return CMD_WARNING;
  52. case RMAP_COMPILE_ERROR:
  53. vty_out (vty, "Argument is malformed.%s", VTY_NEWLINE);
  54. return CMD_WARNING;
  55. }
  56. }
  57. return CMD_SUCCESS;
  58. }
  59. static int
  60. ripng_route_match_delete (struct vty *vty, struct route_map_index *index,
  61. const char *command, const char *arg)
  62. {
  63. int ret;
  64. ret = route_map_delete_match (index, command, arg);
  65. if (ret)
  66. {
  67. switch (ret)
  68. {
  69. case RMAP_RULE_MISSING:
  70. vty_out (vty, "Can't find rule.%s", VTY_NEWLINE);
  71. return CMD_WARNING;
  72. case RMAP_COMPILE_ERROR:
  73. vty_out (vty, "Argument is malformed.%s", VTY_NEWLINE);
  74. return CMD_WARNING;
  75. }
  76. }
  77. return CMD_SUCCESS;
  78. }
  79. static int
  80. ripng_route_set_add (struct vty *vty, struct route_map_index *index,
  81. const char *command, const char *arg)
  82. {
  83. int ret;
  84. ret = route_map_add_set (index, command, arg);
  85. if (ret)
  86. {
  87. switch (ret)
  88. {
  89. case RMAP_RULE_MISSING:
  90. vty_out (vty, "Can't find rule.%s", VTY_NEWLINE);
  91. return CMD_WARNING;
  92. case RMAP_COMPILE_ERROR:
  93. vty_out (vty, "Argument is malformed.%s", VTY_NEWLINE);
  94. return CMD_WARNING;
  95. }
  96. }
  97. return CMD_SUCCESS;
  98. }
  99. static int
  100. ripng_route_set_delete (struct vty *vty, struct route_map_index *index,
  101. const char *command, const char *arg)
  102. {
  103. int ret;
  104. ret = route_map_delete_set (index, command, arg);
  105. if (ret)
  106. {
  107. switch (ret)
  108. {
  109. case RMAP_RULE_MISSING:
  110. vty_out (vty, "Can't find rule.%s", VTY_NEWLINE);
  111. return CMD_WARNING;
  112. case RMAP_COMPILE_ERROR:
  113. vty_out (vty, "Argument is malformed.%s", VTY_NEWLINE);
  114. return CMD_WARNING;
  115. }
  116. }
  117. return CMD_SUCCESS;
  118. }
  119. /* `match metric METRIC' */
  120. /* Match function return 1 if match is success else return zero. */
  121. static route_map_result_t
  122. route_match_metric (void *rule, struct prefix *prefix,
  123. route_map_object_t type, void *object)
  124. {
  125. u_int32_t *metric;
  126. struct ripng_info *rinfo;
  127. if (type == RMAP_RIPNG)
  128. {
  129. metric = rule;
  130. rinfo = object;
  131. if (rinfo->metric == *metric)
  132. return RMAP_MATCH;
  133. else
  134. return RMAP_NOMATCH;
  135. }
  136. return RMAP_NOMATCH;
  137. }
  138. /* Route map `match metric' match statement. `arg' is METRIC value */
  139. static void *
  140. route_match_metric_compile (const char *arg)
  141. {
  142. u_int32_t *metric;
  143. metric = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_int32_t));
  144. *metric = atoi (arg);
  145. if(*metric > 0)
  146. return metric;
  147. XFREE (MTYPE_ROUTE_MAP_COMPILED, metric);
  148. return NULL;
  149. }
  150. /* Free route map's compiled `match metric' value. */
  151. static void
  152. route_match_metric_free (void *rule)
  153. {
  154. XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
  155. }
  156. /* Route map commands for metric matching. */
  157. static struct route_map_rule_cmd route_match_metric_cmd =
  158. {
  159. "metric",
  160. route_match_metric,
  161. route_match_metric_compile,
  162. route_match_metric_free
  163. };
  164. /* `match interface IFNAME' */
  165. /* Match function return 1 if match is success else return zero. */
  166. static route_map_result_t
  167. route_match_interface (void *rule, struct prefix *prefix,
  168. route_map_object_t type, void *object)
  169. {
  170. struct ripng_info *rinfo;
  171. struct interface *ifp;
  172. char *ifname;
  173. if (type == RMAP_RIPNG)
  174. {
  175. ifname = rule;
  176. ifp = if_lookup_by_name(ifname);
  177. if (!ifp)
  178. return RMAP_NOMATCH;
  179. rinfo = object;
  180. if (rinfo->ifindex == ifp->ifindex)
  181. return RMAP_MATCH;
  182. else
  183. return RMAP_NOMATCH;
  184. }
  185. return RMAP_NOMATCH;
  186. }
  187. /* Route map `match interface' match statement. `arg' is IFNAME value */
  188. static void *
  189. route_match_interface_compile (const char *arg)
  190. {
  191. return XSTRDUP (MTYPE_ROUTE_MAP_COMPILED, arg);
  192. }
  193. static void
  194. route_match_interface_free (void *rule)
  195. {
  196. XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
  197. }
  198. static struct route_map_rule_cmd route_match_interface_cmd =
  199. {
  200. "interface",
  201. route_match_interface,
  202. route_match_interface_compile,
  203. route_match_interface_free
  204. };
  205. /* `match tag TAG' */
  206. /* Match function return 1 if match is success else return zero. */
  207. static route_map_result_t
  208. route_match_tag (void *rule, struct prefix *prefix,
  209. route_map_object_t type, void *object)
  210. {
  211. u_short *tag;
  212. struct ripng_info *rinfo;
  213. if (type == RMAP_RIPNG)
  214. {
  215. tag = rule;
  216. rinfo = object;
  217. /* The information stored by rinfo is host ordered. */
  218. if (rinfo->tag == *tag)
  219. return RMAP_MATCH;
  220. else
  221. return RMAP_NOMATCH;
  222. }
  223. return RMAP_NOMATCH;
  224. }
  225. /* Route map `match tag' match statement. `arg' is TAG value */
  226. static void *
  227. route_match_tag_compile (const char *arg)
  228. {
  229. u_short *tag;
  230. tag = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_short));
  231. *tag = atoi (arg);
  232. return tag;
  233. }
  234. /* Free route map's compiled `match tag' value. */
  235. static void
  236. route_match_tag_free (void *rule)
  237. {
  238. XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
  239. }
  240. /* Route map commands for tag matching. */
  241. static struct route_map_rule_cmd route_match_tag_cmd =
  242. {
  243. "tag",
  244. route_match_tag,
  245. route_match_tag_compile,
  246. route_match_tag_free
  247. };
  248. /* `set metric METRIC' */
  249. /* Set metric to attribute. */
  250. static route_map_result_t
  251. route_set_metric (void *rule, struct prefix *prefix,
  252. route_map_object_t type, void *object)
  253. {
  254. if (type == RMAP_RIPNG)
  255. {
  256. struct rip_metric_modifier *mod;
  257. struct ripng_info *rinfo;
  258. mod = rule;
  259. rinfo = object;
  260. if (mod->type == metric_increment)
  261. rinfo->metric_out += mod->metric;
  262. else if (mod->type == metric_decrement)
  263. rinfo->metric_out-= mod->metric;
  264. else if (mod->type == metric_absolute)
  265. rinfo->metric_out = mod->metric;
  266. if (rinfo->metric_out < 1)
  267. rinfo->metric_out = 1;
  268. if (rinfo->metric_out > RIPNG_METRIC_INFINITY)
  269. rinfo->metric_out = RIPNG_METRIC_INFINITY;
  270. rinfo->metric_set = 1;
  271. }
  272. return RMAP_OKAY;
  273. }
  274. /* set metric compilation. */
  275. static void *
  276. route_set_metric_compile (const char *arg)
  277. {
  278. int len;
  279. const char *pnt;
  280. int type;
  281. long metric;
  282. char *endptr = NULL;
  283. struct rip_metric_modifier *mod;
  284. len = strlen (arg);
  285. pnt = arg;
  286. if (len == 0)
  287. return NULL;
  288. /* Examine first character. */
  289. if (arg[0] == '+')
  290. {
  291. type = metric_increment;
  292. pnt++;
  293. }
  294. else if (arg[0] == '-')
  295. {
  296. type = metric_decrement;
  297. pnt++;
  298. }
  299. else
  300. type = metric_absolute;
  301. /* Check beginning with digit string. */
  302. if (*pnt < '0' || *pnt > '9')
  303. return NULL;
  304. /* Convert string to integer. */
  305. metric = strtol (pnt, &endptr, 10);
  306. if (metric == LONG_MAX || *endptr != '\0')
  307. return NULL;
  308. /* Commented out by Hasso Tepper, to avoid problems in vtysh. */
  309. /* if (metric < 0 || metric > RIPNG_METRIC_INFINITY) */
  310. if (metric < 0)
  311. return NULL;
  312. mod = XMALLOC (MTYPE_ROUTE_MAP_COMPILED,
  313. sizeof (struct rip_metric_modifier));
  314. mod->type = type;
  315. mod->metric = metric;
  316. return mod;
  317. }
  318. /* Free route map's compiled `set metric' value. */
  319. static void
  320. route_set_metric_free (void *rule)
  321. {
  322. XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
  323. }
  324. static struct route_map_rule_cmd route_set_metric_cmd =
  325. {
  326. "metric",
  327. route_set_metric,
  328. route_set_metric_compile,
  329. route_set_metric_free,
  330. };
  331. /* `set ipv6 next-hop local IP_ADDRESS' */
  332. /* Set nexthop to object. ojbect must be pointer to struct attr. */
  333. static route_map_result_t
  334. route_set_ipv6_nexthop_local (void *rule, struct prefix *prefix,
  335. route_map_object_t type, void *object)
  336. {
  337. struct in6_addr *address;
  338. struct ripng_info *rinfo;
  339. if(type == RMAP_RIPNG)
  340. {
  341. /* Fetch routemap's rule information. */
  342. address = rule;
  343. rinfo = object;
  344. /* Set next hop value. */
  345. rinfo->nexthop_out = *address;
  346. }
  347. return RMAP_OKAY;
  348. }
  349. /* Route map `ipv6 nexthop local' compile function. Given string is converted
  350. to struct in6_addr structure. */
  351. static void *
  352. route_set_ipv6_nexthop_local_compile (const char *arg)
  353. {
  354. int ret;
  355. struct in6_addr *address;
  356. address = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (struct in6_addr));
  357. ret = inet_pton (AF_INET6, arg, address);
  358. if (ret == 0)
  359. {
  360. XFREE (MTYPE_ROUTE_MAP_COMPILED, address);
  361. return NULL;
  362. }
  363. return address;
  364. }
  365. /* Free route map's compiled `ipv6 nexthop local' value. */
  366. static void
  367. route_set_ipv6_nexthop_local_free (void *rule)
  368. {
  369. XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
  370. }
  371. /* Route map commands for ipv6 nexthop local set. */
  372. static struct route_map_rule_cmd route_set_ipv6_nexthop_local_cmd =
  373. {
  374. "ipv6 next-hop local",
  375. route_set_ipv6_nexthop_local,
  376. route_set_ipv6_nexthop_local_compile,
  377. route_set_ipv6_nexthop_local_free
  378. };
  379. /* `set tag TAG' */
  380. /* Set tag to object. ojbect must be pointer to struct attr. */
  381. static route_map_result_t
  382. route_set_tag (void *rule, struct prefix *prefix,
  383. route_map_object_t type, void *object)
  384. {
  385. u_short *tag;
  386. struct ripng_info *rinfo;
  387. if(type == RMAP_RIPNG)
  388. {
  389. /* Fetch routemap's rule information. */
  390. tag = rule;
  391. rinfo = object;
  392. /* Set next hop value. */
  393. rinfo->tag_out = *tag;
  394. }
  395. return RMAP_OKAY;
  396. }
  397. /* Route map `tag' compile function. Given string is converted
  398. to u_short. */
  399. static void *
  400. route_set_tag_compile (const char *arg)
  401. {
  402. u_short *tag;
  403. tag = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_short));
  404. *tag = atoi (arg);
  405. return tag;
  406. }
  407. /* Free route map's compiled `ip nexthop' value. */
  408. static void
  409. route_set_tag_free (void *rule)
  410. {
  411. XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
  412. }
  413. /* Route map commands for tag set. */
  414. static struct route_map_rule_cmd route_set_tag_cmd =
  415. {
  416. "tag",
  417. route_set_tag,
  418. route_set_tag_compile,
  419. route_set_tag_free
  420. };
  421. #define MATCH_STR "Match values from routing table\n"
  422. #define SET_STR "Set values in destination routing protocol\n"
  423. DEFUN (match_metric,
  424. match_metric_cmd,
  425. "match metric <0-4294967295>",
  426. MATCH_STR
  427. "Match metric of route\n"
  428. "Metric value\n")
  429. {
  430. return ripng_route_match_add (vty, vty->index, "metric", argv[0]);
  431. }
  432. DEFUN (no_match_metric,
  433. no_match_metric_cmd,
  434. "no match metric",
  435. NO_STR
  436. MATCH_STR
  437. "Match metric of route\n")
  438. {
  439. if (argc == 0)
  440. return ripng_route_match_delete (vty, vty->index, "metric", NULL);
  441. return ripng_route_match_delete (vty, vty->index, "metric", argv[0]);
  442. }
  443. ALIAS (no_match_metric,
  444. no_match_metric_val_cmd,
  445. "no match metric <0-4294967295>",
  446. NO_STR
  447. MATCH_STR
  448. "Match metric of route\n"
  449. "Metric value\n")
  450. DEFUN (match_interface,
  451. match_interface_cmd,
  452. "match interface WORD",
  453. MATCH_STR
  454. "Match first hop interface of route\n"
  455. "Interface name\n")
  456. {
  457. return ripng_route_match_add (vty, vty->index, "interface", argv[0]);
  458. }
  459. DEFUN (no_match_interface,
  460. no_match_interface_cmd,
  461. "no match interface",
  462. NO_STR
  463. MATCH_STR
  464. "Match first hop interface of route\n")
  465. {
  466. if (argc == 0)
  467. return ripng_route_match_delete (vty, vty->index, "interface", NULL);
  468. return ripng_route_match_delete (vty, vty->index, "interface", argv[0]);
  469. }
  470. ALIAS (no_match_interface,
  471. no_match_interface_val_cmd,
  472. "no match interface WORD",
  473. NO_STR
  474. MATCH_STR
  475. "Match first hop interface of route\n"
  476. "Interface name\n")
  477. DEFUN (match_tag,
  478. match_tag_cmd,
  479. "match tag <0-65535>",
  480. MATCH_STR
  481. "Match tag of route\n"
  482. "Metric value\n")
  483. {
  484. return ripng_route_match_add (vty, vty->index, "tag", argv[0]);
  485. }
  486. DEFUN (no_match_tag,
  487. no_match_tag_cmd,
  488. "no match tag",
  489. NO_STR
  490. MATCH_STR
  491. "Match tag of route\n")
  492. {
  493. if (argc == 0)
  494. return ripng_route_match_delete (vty, vty->index, "tag", NULL);
  495. return ripng_route_match_delete (vty, vty->index, "tag", argv[0]);
  496. }
  497. ALIAS (no_match_tag,
  498. no_match_tag_val_cmd,
  499. "no match tag <0-65535>",
  500. NO_STR
  501. MATCH_STR
  502. "Match tag of route\n"
  503. "Metric value\n")
  504. /* set functions */
  505. DEFUN (set_metric,
  506. set_metric_cmd,
  507. "set metric <0-4294967295>",
  508. "Set value\n"
  509. "Metric value for destination routing protocol\n"
  510. "Metric value\n")
  511. {
  512. return ripng_route_set_add (vty, vty->index, "metric", argv[0]);
  513. }
  514. DEFUN (no_set_metric,
  515. no_set_metric_cmd,
  516. "no set metric",
  517. NO_STR
  518. SET_STR
  519. "Metric value for destination routing protocol\n")
  520. {
  521. if (argc == 0)
  522. return ripng_route_set_delete (vty, vty->index, "metric", NULL);
  523. return ripng_route_set_delete (vty, vty->index, "metric", argv[0]);
  524. }
  525. ALIAS (no_set_metric,
  526. no_set_metric_val_cmd,
  527. "no set metric <0-4294967295>",
  528. NO_STR
  529. SET_STR
  530. "Metric value for destination routing protocol\n"
  531. "Metric value\n")
  532. DEFUN (set_ipv6_nexthop_local,
  533. set_ipv6_nexthop_local_cmd,
  534. "set ipv6 next-hop local X:X::X:X",
  535. SET_STR
  536. IPV6_STR
  537. "IPv6 next-hop address\n"
  538. "IPv6 local address\n"
  539. "IPv6 address of next hop\n")
  540. {
  541. union sockunion su;
  542. int ret;
  543. ret = str2sockunion (argv[0], &su);
  544. if (ret < 0)
  545. {
  546. vty_out (vty, "%% Malformed next-hop local address%s", VTY_NEWLINE);
  547. return CMD_WARNING;
  548. }
  549. return ripng_route_set_add (vty, vty->index, "ipv6 next-hop local", argv[0]);
  550. }
  551. DEFUN (no_set_ipv6_nexthop_local,
  552. no_set_ipv6_nexthop_local_cmd,
  553. "no set ipv6 next-hop local",
  554. NO_STR
  555. SET_STR
  556. IPV6_STR
  557. "IPv6 next-hop address\n"
  558. "IPv6 local address\n")
  559. {
  560. if (argc == 0)
  561. return ripng_route_set_delete (vty, vty->index, "ipv6 next-hop local", NULL);
  562. return ripng_route_set_delete (vty, vty->index, "ipv6 next-hop local", argv[0]);
  563. }
  564. ALIAS (no_set_ipv6_nexthop_local,
  565. no_set_ipv6_nexthop_local_val_cmd,
  566. "no set ipv6 next-hop local X:X::X:X",
  567. NO_STR
  568. SET_STR
  569. IPV6_STR
  570. "IPv6 next-hop address\n"
  571. "IPv6 local address\n"
  572. "IPv6 address of next hop\n")
  573. DEFUN (set_tag,
  574. set_tag_cmd,
  575. "set tag <0-65535>",
  576. SET_STR
  577. "Tag value for routing protocol\n"
  578. "Tag value\n")
  579. {
  580. return ripng_route_set_add (vty, vty->index, "tag", argv[0]);
  581. }
  582. DEFUN (no_set_tag,
  583. no_set_tag_cmd,
  584. "no set tag",
  585. NO_STR
  586. SET_STR
  587. "Tag value for routing protocol\n")
  588. {
  589. if (argc == 0)
  590. return ripng_route_set_delete (vty, vty->index, "tag", NULL);
  591. return ripng_route_set_delete (vty, vty->index, "tag", argv[0]);
  592. }
  593. ALIAS (no_set_tag,
  594. no_set_tag_val_cmd,
  595. "no set tag <0-65535>",
  596. NO_STR
  597. SET_STR
  598. "Tag value for routing protocol\n"
  599. "Tag value\n")
  600. void
  601. ripng_route_map_reset ()
  602. {
  603. /* XXX ??? */
  604. ;
  605. }
  606. void
  607. ripng_route_map_init ()
  608. {
  609. route_map_init ();
  610. route_map_init_vty ();
  611. route_map_install_match (&route_match_metric_cmd);
  612. route_map_install_match (&route_match_interface_cmd);
  613. route_map_install_match (&route_match_tag_cmd);
  614. route_map_install_set (&route_set_metric_cmd);
  615. route_map_install_set (&route_set_ipv6_nexthop_local_cmd);
  616. route_map_install_set (&route_set_tag_cmd);
  617. install_element (RMAP_NODE, &match_metric_cmd);
  618. install_element (RMAP_NODE, &no_match_metric_cmd);
  619. install_element (RMAP_NODE, &no_match_metric_val_cmd);
  620. install_element (RMAP_NODE, &match_interface_cmd);
  621. install_element (RMAP_NODE, &no_match_interface_cmd);
  622. install_element (RMAP_NODE, &no_match_interface_val_cmd);
  623. install_element (RMAP_NODE, &match_tag_cmd);
  624. install_element (RMAP_NODE, &no_match_tag_cmd);
  625. install_element (RMAP_NODE, &no_match_tag_val_cmd);
  626. install_element (RMAP_NODE, &set_metric_cmd);
  627. install_element (RMAP_NODE, &no_set_metric_cmd);
  628. install_element (RMAP_NODE, &no_set_metric_val_cmd);
  629. install_element (RMAP_NODE, &set_ipv6_nexthop_local_cmd);
  630. install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_cmd);
  631. install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_val_cmd);
  632. install_element (RMAP_NODE, &set_tag_cmd);
  633. install_element (RMAP_NODE, &no_set_tag_cmd);
  634. install_element (RMAP_NODE, &no_set_tag_val_cmd);
  635. }