summaryrefslogtreecommitdiff
path: root/zebra/rt_socket.c
diff options
context:
space:
mode:
authorpaul <paul>2005-11-23 13:02:08 +0000
committerpaul <paul>2005-11-23 13:02:08 +0000
commit6621ca868c935a82468e07ea2e5a165f40750658 (patch)
tree01db8cd66509c8afd2057558b048fc134c1371b8 /zebra/rt_socket.c
parent5906476bea21153f5d757e364b8e4c604b72cef1 (diff)
[zebra] fix some small compile errors, mark several functions static
2005-11-23 Paul Jakma <paul.jakma@sun.com> * (general) fix some small compile errors, and mark several functions as static. * kernel_socket.c: (ifan_read) should be static. fix missing brackets. (ifm_read,ifam_read,rtm_read_mesg,kernel_read) Make static (ifam_read_mesg) make static. fix incorrect variable name. (rtm_read) make static. Fix call to rib_delete_ipv4 which should be rib_delete_ipv6. (routing_socket,kernel_init) should be static. Void argument should be specified as such, not left incomplete. * rt_netlink.c: rt.h should be included, contains prototypes of exported functions. (kernel_delete_ipv6_old) fix sign of index argument. * rt_socket.c: Exact same as previous. Also, make various functions static. * rtread_getmsg.c: Include zserv.h, which prototypes route_read. Make static. * rtread_sysctl.c: zserv.h and rt.h should be included. fix definition of route_read.
Diffstat (limited to 'zebra/rt_socket.c')
-rw-r--r--zebra/rt_socket.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index fa2f172c..67d29538 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -31,21 +31,18 @@
#include "zebra/debug.h"
#include "zebra/rib.h"
+#include "zebra/rt.h"
extern struct zebra_privs_t zserv_privs;
-int
-rtm_write (int message,
- union sockunion *dest,
- union sockunion *mask,
- union sockunion *gate,
- unsigned int index,
- int zebra_flags,
- int metric);
+/* kernel socket export */
+extern int rtm_write (int message, union sockunion *dest,
+ union sockunion *mask, union sockunion *gate,
+ unsigned int index, int zebra_flags, int metric);
/* Adjust netmask socket length. Return value is a adjusted sin_len
value. */
-int
+static int
sin_masklen (struct in_addr mask)
{
char *p, *lim;
@@ -67,7 +64,7 @@ sin_masklen (struct in_addr mask)
}
/* Interface between zebra message and rtm message. */
-int
+static int
kernel_rtm_ipv4 (int cmd, struct prefix *p, struct rib *rib, int family)
{
@@ -218,7 +215,7 @@ kernel_delete_ipv4 (struct prefix *p, struct rib *rib)
#ifdef HAVE_IPV6
/* Calculate sin6_len value for netmask socket value. */
-int
+static int
sin6_masklen (struct in6_addr mask)
{
struct sockaddr_in6 sin6;
@@ -246,7 +243,7 @@ sin6_masklen (struct in6_addr mask)
}
/* Interface between zebra message and rtm message. */
-int
+static int
kernel_rtm_ipv6 (int message, struct prefix_ipv6 *dest,
struct in6_addr *gate, int index, int flags)
{
@@ -307,7 +304,7 @@ kernel_rtm_ipv6 (int message, struct prefix_ipv6 *dest,
}
/* Interface between zebra message and rtm message. */
-int
+static int
kernel_rtm_ipv6_multipath (int cmd, struct prefix *p, struct rib *rib,
int family)
{
@@ -468,7 +465,7 @@ kernel_delete_ipv6 (struct prefix *p, struct rib *rib)
/* Delete IPv6 route from the kernel. */
int
kernel_delete_ipv6_old (struct prefix_ipv6 *dest, struct in6_addr *gate,
- int index, int flags, int table)
+ unsigned int index, int flags, int table)
{
int route;