summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-14 16:52:26 +0100
committerPaul Jakma <paul@quagga.net>2008-08-22 19:52:58 +0100
commit6072b24eb776e6486f076b1762d3650e803954c2 (patch)
treed6a305760bdd5b612be661ae53e32325990337aa
parentffe11cfb0a808ae514193438616dfabc512b4cf6 (diff)
[zebra] mark some rt_netlink functions static
2008-08-14 Stephen Hemminger <stephen.hemminger@vyatta.com> * zebra/rt_netlink.c: local functions should be static. Signed-off-by: Paul Jakma <paul@quagga.net>
-rw-r--r--zebra/rt_netlink.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 4234a445..0a6b8dde 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -52,7 +52,7 @@ struct nlsock
} netlink = { -1, 0, {0}, "netlink-listen"}, /* kernel messages */
netlink_cmd = { -1, 0, {0}, "netlink-cmd"}; /* command channel */
-struct message nlmsg_str[] = {
+static struct message nlmsg_str[] = {
{RTM_NEWROUTE, "RTM_NEWROUTE"},
{RTM_DELROUTE, "RTM_DELROUTE"},
{RTM_GETROUTE, "RTM_GETROUTE"},
@@ -65,7 +65,7 @@ struct message nlmsg_str[] = {
{0, NULL}
};
-const char *nexthop_types_desc[] =
+static const char *nexthop_types_desc[] =
{
"none",
"Directly connected",
@@ -79,7 +79,6 @@ const char *nexthop_types_desc[] =
"Null0 nexthop",
};
-
extern struct zebra_t zebrad;
extern struct zebra_privs_t zserv_privs;
@@ -222,7 +221,7 @@ netlink_socket (struct nlsock *nl, unsigned long groups)
return ret;
}
-int
+static int
set_netlink_blocking (struct nlsock *nl, int *flags)
{
@@ -243,7 +242,7 @@ set_netlink_blocking (struct nlsock *nl, int *flags)
return 0;
}
-int
+static int
set_netlink_nonblocking (struct nlsock *nl, int *flags)
{
/* Restore socket flags for nonblocking I/O */
@@ -493,7 +492,7 @@ netlink_parse_rtattr (struct rtattr **tb, int max, struct rtattr *rta,
/* Called from interface_lookup_netlink(). This function is only used
during bootstrap. */
-int
+static int
netlink_interface (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
int len;
@@ -570,7 +569,7 @@ netlink_interface (struct sockaddr_nl *snl, struct nlmsghdr *h)
}
/* Lookup interface IPv4/IPv6 address. */
-int
+static int
netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
int len;
@@ -705,7 +704,7 @@ netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
}
/* Looking up routing table by netlink interface. */
-int
+static int
netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
int len;
@@ -822,7 +821,7 @@ struct message rtproto_str[] = {
};
/* Routing information change from the kernel. */
-int
+static int
netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
int len;
@@ -963,7 +962,7 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
return 0;
}
-int
+static int
netlink_link_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
int len;
@@ -1064,7 +1063,7 @@ netlink_link_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
return 0;
}
-int
+static int
netlink_information_fetch (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
switch (h->nlmsg_type)
@@ -1189,7 +1188,7 @@ netlink_route_read (void)
/* Utility function comes from iproute2.
Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> */
-int
+static int
addattr_l (struct nlmsghdr *n, int maxlen, int type, void *data, int alen)
{
int len;
@@ -1209,7 +1208,7 @@ addattr_l (struct nlmsghdr *n, int maxlen, int type, void *data, int alen)
return 0;
}
-int
+static int
rta_addattr_l (struct rtattr *rta, int maxlen, int type, void *data, int alen)
{
int len;
@@ -1231,7 +1230,7 @@ rta_addattr_l (struct rtattr *rta, int maxlen, int type, void *data, int alen)
/* Utility function comes from iproute2.
Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> */
-int
+static int
addattr32 (struct nlmsghdr *n, int maxlen, int type, int data)
{
int len;
@@ -1259,7 +1258,7 @@ netlink_talk_filter (struct sockaddr_nl *snl, struct nlmsghdr *h)
}
/* sendmsg() to netlink socket then recvmsg(). */
-int
+static int
netlink_talk (struct nlmsghdr *n, struct nlsock *nl)
{
int status;
@@ -1322,7 +1321,7 @@ netlink_talk (struct nlmsghdr *n, struct nlsock *nl)
}
/* Routing table change via netlink interface. */
-int
+static int
netlink_route (int cmd, int family, void *dest, int length, void *gate,
int index, int zebra_flags, int table)
{
@@ -1396,7 +1395,7 @@ netlink_route (int cmd, int family, void *dest, int length, void *gate,
}
/* Routing table change via netlink interface. */
-int
+static int
netlink_route_multipath (int cmd, struct prefix *p, struct rib *rib,
int family)
{
@@ -1858,7 +1857,7 @@ kernel_delete_ipv6_old (struct prefix_ipv6 *dest, struct in6_addr *gate,
#endif /* HAVE_IPV6 */
/* Interface address modification. */
-int
+static int
netlink_address (int cmd, int family, struct interface *ifp,
struct connected *ifc)
{
@@ -1923,7 +1922,7 @@ kernel_address_delete_ipv4 (struct interface *ifp, struct connected *ifc)
extern struct thread_master *master;
/* Kernel route reflection. */
-int
+static int
kernel_read (struct thread *thread)
{
int ret;