} 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"},
{0, NULL}
};
-const char *nexthop_types_desc[] =
+static const char *nexthop_types_desc[] =
{
"none",
"Directly connected",
"Null0 nexthop",
};
-
extern struct zebra_t zebrad;
extern struct zebra_privs_t zserv_privs;
return ret;
}
-int
+static int
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 */
/* 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;
}
/* Lookup interface IPv4/IPv6 address. */
-int
+static int
netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
int len;
}
/* Looking up routing table by netlink interface. */
-int
+static int
netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
int len;
};
/* Routing information change from the kernel. */
-int
+static int
netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
int len;
return 0;
}
-int
+static int
netlink_link_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
int len;
return 0;
}
-int
+static int
netlink_information_fetch (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
switch (h->nlmsg_type)
/* 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;
return 0;
}
-int
+static int
rta_addattr_l (struct rtattr *rta, int maxlen, int type, void *data, int alen)
{
int len;
/* 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;
}
/* sendmsg() to netlink socket then recvmsg(). */
-int
+static int
netlink_talk (struct nlmsghdr *n, struct nlsock *nl)
{
int status;
}
/* 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)
{
}
/* Routing table change via netlink interface. */
-int
+static int
netlink_route_multipath (int cmd, struct prefix *p, struct rib *rib,
int family)
{
#endif /* HAVE_IPV6 */
\f
/* Interface address modification. */
-int
+static int
netlink_address (int cmd, int family, struct interface *ifp,
struct connected *ifc)
{
extern struct thread_master *master;
/* Kernel route reflection. */
-int
+static int
kernel_read (struct thread *thread)
{
int ret;