summaryrefslogtreecommitdiff
path: root/ripngd/ripng_offset.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripngd/ripng_offset.c')
-rw-r--r--ripngd/ripng_offset.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/ripngd/ripng_offset.c b/ripngd/ripng_offset.c
index 31d78ba8..5bc2568e 100644
--- a/ripngd/ripng_offset.c
+++ b/ripngd/ripng_offset.c
@@ -32,6 +32,8 @@
#include "linklist.h"
#include "memory.h"
+#include "ripngd/ripngd.h"
+
#define RIPNG_OFFSET_LIST_IN 0
#define RIPNG_OFFSET_LIST_OUT 1
#define RIPNG_OFFSET_LIST_MAX 2
@@ -50,7 +52,7 @@ struct ripng_offset_list
static struct list *ripng_offset_list_master;
-int
+static int
strcmp_safe (const char *s1, const char *s2)
{
if (s1 == NULL && s2 == NULL)
@@ -62,7 +64,7 @@ strcmp_safe (const char *s1, const char *s2)
return strcmp (s1, s2);
}
-struct ripng_offset_list *
+static struct ripng_offset_list *
ripng_offset_list_new ()
{
struct ripng_offset_list *new;
@@ -71,13 +73,13 @@ ripng_offset_list_new ()
return new;
}
-void
+static void
ripng_offset_list_free (struct ripng_offset_list *offset)
{
XFREE (MTYPE_RIPNG_OFFSET_LIST, offset);
}
-struct ripng_offset_list *
+static struct ripng_offset_list *
ripng_offset_list_lookup (const char *ifname)
{
struct ripng_offset_list *offset;
@@ -91,7 +93,7 @@ ripng_offset_list_lookup (const char *ifname)
return NULL;
}
-struct ripng_offset_list *
+static struct ripng_offset_list *
ripng_offset_list_get (const char *ifname)
{
struct ripng_offset_list *offset;
@@ -108,7 +110,7 @@ ripng_offset_list_get (const char *ifname)
return offset;
}
-int
+static int
ripng_offset_list_set (struct vty *vty, const char *alist,
const char *direct_str, const char *metric_str,
const char *ifname)
@@ -147,7 +149,7 @@ ripng_offset_list_set (struct vty *vty, const char *alist,
return CMD_SUCCESS;
}
-int
+static int
ripng_offset_list_unset (struct vty *vty, const char *alist,
const char *direct_str, const char *metric_str,
const char *ifname)
@@ -338,13 +340,13 @@ DEFUN (no_ripng_offset_list_ifname,
return ripng_offset_list_unset (vty, argv[0], argv[1], argv[2], argv[3]);
}
-int
+static int
offset_list_cmp (struct ripng_offset_list *o1, struct ripng_offset_list *o2)
{
return strcmp_safe (o1->ifname, o2->ifname);
}
-void
+static void
offset_list_del (struct ripng_offset_list *offset)
{
if (OFFSET_LIST_IN_NAME (offset))
@@ -357,7 +359,7 @@ offset_list_del (struct ripng_offset_list *offset)
}
void
-ripng_offset_init ()
+ripng_offset_init (void)
{
ripng_offset_list_master = list_new ();
ripng_offset_list_master->cmp = (int (*)(void *, void *)) offset_list_cmp;
@@ -370,7 +372,7 @@ ripng_offset_init ()
}
void
-ripng_offset_clean ()
+ripng_offset_clean (void)
{
list_delete (ripng_offset_list_master);