summaryrefslogtreecommitdiffstats
path: root/lib/plist_int.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2015-04-13 10:21:34 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2015-05-05 15:06:22 +0200
commite66cbd10d52a79fd61acab9d615683eebdbf1df5 (patch)
treee81be2319e7b2c485354283f025e090bb56c8754 /lib/plist_int.h
parent4584c239201037648abf1a6615186f9cdeb86b23 (diff)
downloadquagga-e66cbd10d52a79fd61acab9d615683eebdbf1df5.tar.bz2
quagga-e66cbd10d52a79fd61acab9d615683eebdbf1df5.tar.xz
lib: hide internal prefix list structures
These are about to be touched and there's no point in other code touching into prefix list's internas. Add some isolation. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/plist_int.h')
-rw-r--r--lib/plist_int.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/lib/plist_int.h b/lib/plist_int.h
new file mode 100644
index 00000000..64595797
--- /dev/null
+++ b/lib/plist_int.h
@@ -0,0 +1,71 @@
+/*
+ * Prefix list internal definitions.
+ * Copyright (C) 1999 Kunihiro Ishiguro
+ *
+ * This file is part of GNU Zebra.
+ *
+ * GNU Zebra is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2, or (at your
+ * option) any later version.
+ *
+ * GNU Zebra is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * 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.
+ */
+
+#ifndef _QUAGGA_PLIST_INT_H
+#define _QUAGGA_PLIST_INT_H
+
+enum prefix_name_type
+{
+ PREFIX_TYPE_STRING,
+ PREFIX_TYPE_NUMBER
+};
+
+struct prefix_list
+{
+ char *name;
+ char *desc;
+
+ struct prefix_master *master;
+
+ enum prefix_name_type type;
+
+ int count;
+ int rangecount;
+
+ struct prefix_list_entry *head;
+ struct prefix_list_entry *tail;
+
+ struct prefix_list *next;
+ struct prefix_list *prev;
+};
+
+/* Each prefix-list's entry. */
+struct prefix_list_entry
+{
+ int seq;
+
+ int le;
+ int ge;
+
+ enum prefix_list_type type;
+
+ int any;
+ struct prefix prefix;
+
+ unsigned long refcnt;
+ unsigned long hitcnt;
+
+ struct prefix_list_entry *next;
+ struct prefix_list_entry *prev;
+};
+
+#endif /* _QUAGGA_PLIST_INT_H */