summaryrefslogtreecommitdiffstats
path: root/lib/routemap.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/routemap.h')
-rw-r--r--lib/routemap.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/lib/routemap.h b/lib/routemap.h
index 1402f5c8..ac6cb999 100644
--- a/lib/routemap.h
+++ b/lib/routemap.h
@@ -16,12 +16,14 @@
* You should have received a copy of the GNU General Public License
* along with GNU Zebra; see the file COPYING. If not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * 02111-1307, USA.
*/
#ifndef _ZEBRA_ROUTEMAP_H
#define _ZEBRA_ROUTEMAP_H
+#include <stdint.h>
+
/* Route map's type. */
enum route_map_type
{
@@ -30,7 +32,9 @@ enum route_map_type
RMAP_ANY
};
-typedef enum
+typedef enum route_map_type route_map_type_t ;
+
+typedef enum
{
RMAP_MATCH,
RMAP_DENYMATCH,
@@ -78,7 +82,7 @@ struct route_map_rule_cmd
const char *str;
/* Function for value set or match. */
- route_map_result_t (*func_apply)(void *, struct prefix *,
+ route_map_result_t (*func_apply)(void *, struct prefix *,
route_map_object_t, void *);
/* Compile argument and return result as void *. */
@@ -105,25 +109,28 @@ struct route_map_rule_list
struct route_map_rule *tail;
};
-/* Route map index structure. */
+/* Route map sequence number */
+typedef uint32_t route_map_seq_t ;
+
+/* Route map index structure. */
struct route_map_index
{
struct route_map *map;
char *description;
/* Preference of this route map rule. */
- int pref;
+ route_map_seq_t seq;
/* Route map type permit or deny. */
- enum route_map_type type;
+ enum route_map_type type;
/* Do we follow old rules, or hop forward? */
- route_map_end_t exitpolicy;
+ route_map_end_t exitpolicy;
/* If we're using "GOTO", to where do we go? */
- int nextpref;
+ route_map_seq_t goto_seq;
- /* If we're using "CALL", to which route-map do ew go? */
+ /* If we're using "CALL", to which route-map do we go? */
char *nextrm;
/* Matching rule list. */
@@ -166,7 +173,7 @@ extern int route_map_delete_match (struct route_map_index *index,
const char *match_arg);
/* Add route-map set statement to the route map. */
-extern int route_map_add_set (struct route_map_index *index,
+extern int route_map_add_set (struct route_map_index *index,
const char *set_name,
const char *set_arg);