summaryrefslogtreecommitdiff
path: root/ripd/rip_offset.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripd/rip_offset.c')
-rw-r--r--ripd/rip_offset.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/ripd/rip_offset.c b/ripd/rip_offset.c
index 61f13760..e7d71f6c 100644
--- a/ripd/rip_offset.c
+++ b/ripd/rip_offset.c
@@ -28,6 +28,8 @@
#include "linklist.h"
#include "memory.h"
+#include "ripd/ripd.h"
+
#define RIP_OFFSET_LIST_IN 0
#define RIP_OFFSET_LIST_OUT 1
#define RIP_OFFSET_LIST_MAX 2
@@ -46,7 +48,7 @@ struct rip_offset_list
static struct list *rip_offset_list_master;
-int
+static int
strcmp_safe (const char *s1, const char *s2)
{
if (s1 == NULL && s2 == NULL)
@@ -58,8 +60,8 @@ strcmp_safe (const char *s1, const char *s2)
return strcmp (s1, s2);
}
-struct rip_offset_list *
-rip_offset_list_new ()
+static struct rip_offset_list *
+rip_offset_list_new (void)
{
struct rip_offset_list *new;
@@ -68,13 +70,13 @@ rip_offset_list_new ()
return new;
}
-void
+static void
rip_offset_list_free (struct rip_offset_list *offset)
{
XFREE (MTYPE_RIP_OFFSET_LIST, offset);
}
-struct rip_offset_list *
+static struct rip_offset_list *
rip_offset_list_lookup (const char *ifname)
{
struct rip_offset_list *offset;
@@ -88,7 +90,7 @@ rip_offset_list_lookup (const char *ifname)
return NULL;
}
-struct rip_offset_list *
+static struct rip_offset_list *
rip_offset_list_get (const char *ifname)
{
struct rip_offset_list *offset;
@@ -105,7 +107,7 @@ rip_offset_list_get (const char *ifname)
return offset;
}
-int
+static int
rip_offset_list_set (struct vty *vty, const char *alist, const char *direct_str,
const char *metric_str, const char *ifname)
{
@@ -143,7 +145,7 @@ rip_offset_list_set (struct vty *vty, const char *alist, const char *direct_str,
return CMD_SUCCESS;
}
-int
+static int
rip_offset_list_unset (struct vty *vty, const char *alist,
const char *direct_str, const char *metric_str,
const char *ifname)
@@ -334,13 +336,13 @@ DEFUN (no_rip_offset_list_ifname,
return rip_offset_list_unset (vty, argv[0], argv[1], argv[2], argv[3]);
}
-int
+static int
offset_list_cmp (struct rip_offset_list *o1, struct rip_offset_list *o2)
{
return strcmp_safe (o1->ifname, o2->ifname);
}
-void
+static void
offset_list_del (struct rip_offset_list *offset)
{
if (OFFSET_LIST_IN_NAME (offset))