mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 05:27:47 +00:00
[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>
This commit is contained in:
parent
ffe11cfb0a
commit
6072b24eb7
@ -52,7 +52,7 @@ struct nlsock
|
|||||||
} netlink = { -1, 0, {0}, "netlink-listen"}, /* kernel messages */
|
} netlink = { -1, 0, {0}, "netlink-listen"}, /* kernel messages */
|
||||||
netlink_cmd = { -1, 0, {0}, "netlink-cmd"}; /* command channel */
|
netlink_cmd = { -1, 0, {0}, "netlink-cmd"}; /* command channel */
|
||||||
|
|
||||||
struct message nlmsg_str[] = {
|
static struct message nlmsg_str[] = {
|
||||||
{RTM_NEWROUTE, "RTM_NEWROUTE"},
|
{RTM_NEWROUTE, "RTM_NEWROUTE"},
|
||||||
{RTM_DELROUTE, "RTM_DELROUTE"},
|
{RTM_DELROUTE, "RTM_DELROUTE"},
|
||||||
{RTM_GETROUTE, "RTM_GETROUTE"},
|
{RTM_GETROUTE, "RTM_GETROUTE"},
|
||||||
@ -65,7 +65,7 @@ struct message nlmsg_str[] = {
|
|||||||
{0, NULL}
|
{0, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *nexthop_types_desc[] =
|
static const char *nexthop_types_desc[] =
|
||||||
{
|
{
|
||||||
"none",
|
"none",
|
||||||
"Directly connected",
|
"Directly connected",
|
||||||
@ -79,7 +79,6 @@ const char *nexthop_types_desc[] =
|
|||||||
"Null0 nexthop",
|
"Null0 nexthop",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern struct zebra_t zebrad;
|
extern struct zebra_t zebrad;
|
||||||
|
|
||||||
extern struct zebra_privs_t zserv_privs;
|
extern struct zebra_privs_t zserv_privs;
|
||||||
@ -222,7 +221,7 @@ netlink_socket (struct nlsock *nl, unsigned long groups)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
set_netlink_blocking (struct nlsock *nl, int *flags)
|
set_netlink_blocking (struct nlsock *nl, int *flags)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -243,7 +242,7 @@ set_netlink_blocking (struct nlsock *nl, int *flags)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
set_netlink_nonblocking (struct nlsock *nl, int *flags)
|
set_netlink_nonblocking (struct nlsock *nl, int *flags)
|
||||||
{
|
{
|
||||||
/* Restore socket flags for nonblocking I/O */
|
/* 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
|
/* Called from interface_lookup_netlink(). This function is only used
|
||||||
during bootstrap. */
|
during bootstrap. */
|
||||||
int
|
static int
|
||||||
netlink_interface (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
netlink_interface (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
@ -570,7 +569,7 @@ netlink_interface (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Lookup interface IPv4/IPv6 address. */
|
/* Lookup interface IPv4/IPv6 address. */
|
||||||
int
|
static int
|
||||||
netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
@ -705,7 +704,7 @@ netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Looking up routing table by netlink interface. */
|
/* Looking up routing table by netlink interface. */
|
||||||
int
|
static int
|
||||||
netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
@ -822,7 +821,7 @@ struct message rtproto_str[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Routing information change from the kernel. */
|
/* Routing information change from the kernel. */
|
||||||
int
|
static int
|
||||||
netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
@ -963,7 +962,7 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
netlink_link_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
netlink_link_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
@ -1064,7 +1063,7 @@ netlink_link_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
netlink_information_fetch (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
netlink_information_fetch (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
||||||
{
|
{
|
||||||
switch (h->nlmsg_type)
|
switch (h->nlmsg_type)
|
||||||
@ -1189,7 +1188,7 @@ netlink_route_read (void)
|
|||||||
|
|
||||||
/* Utility function comes from iproute2.
|
/* Utility function comes from iproute2.
|
||||||
Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> */
|
Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> */
|
||||||
int
|
static int
|
||||||
addattr_l (struct nlmsghdr *n, int maxlen, int type, void *data, int alen)
|
addattr_l (struct nlmsghdr *n, int maxlen, int type, void *data, int alen)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
@ -1209,7 +1208,7 @@ addattr_l (struct nlmsghdr *n, int maxlen, int type, void *data, int alen)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
rta_addattr_l (struct rtattr *rta, int maxlen, int type, void *data, int alen)
|
rta_addattr_l (struct rtattr *rta, int maxlen, int type, void *data, int alen)
|
||||||
{
|
{
|
||||||
int len;
|
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.
|
/* Utility function comes from iproute2.
|
||||||
Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> */
|
Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> */
|
||||||
int
|
static int
|
||||||
addattr32 (struct nlmsghdr *n, int maxlen, int type, int data)
|
addattr32 (struct nlmsghdr *n, int maxlen, int type, int data)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
@ -1259,7 +1258,7 @@ netlink_talk_filter (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* sendmsg() to netlink socket then recvmsg(). */
|
/* sendmsg() to netlink socket then recvmsg(). */
|
||||||
int
|
static int
|
||||||
netlink_talk (struct nlmsghdr *n, struct nlsock *nl)
|
netlink_talk (struct nlmsghdr *n, struct nlsock *nl)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
@ -1322,7 +1321,7 @@ netlink_talk (struct nlmsghdr *n, struct nlsock *nl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Routing table change via netlink interface. */
|
/* Routing table change via netlink interface. */
|
||||||
int
|
static int
|
||||||
netlink_route (int cmd, int family, void *dest, int length, void *gate,
|
netlink_route (int cmd, int family, void *dest, int length, void *gate,
|
||||||
int index, int zebra_flags, int table)
|
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. */
|
/* Routing table change via netlink interface. */
|
||||||
int
|
static int
|
||||||
netlink_route_multipath (int cmd, struct prefix *p, struct rib *rib,
|
netlink_route_multipath (int cmd, struct prefix *p, struct rib *rib,
|
||||||
int family)
|
int family)
|
||||||
{
|
{
|
||||||
@ -1858,7 +1857,7 @@ kernel_delete_ipv6_old (struct prefix_ipv6 *dest, struct in6_addr *gate,
|
|||||||
#endif /* HAVE_IPV6 */
|
#endif /* HAVE_IPV6 */
|
||||||
|
|
||||||
/* Interface address modification. */
|
/* Interface address modification. */
|
||||||
int
|
static int
|
||||||
netlink_address (int cmd, int family, struct interface *ifp,
|
netlink_address (int cmd, int family, struct interface *ifp,
|
||||||
struct connected *ifc)
|
struct connected *ifc)
|
||||||
{
|
{
|
||||||
@ -1923,7 +1922,7 @@ kernel_address_delete_ipv4 (struct interface *ifp, struct connected *ifc)
|
|||||||
extern struct thread_master *master;
|
extern struct thread_master *master;
|
||||||
|
|
||||||
/* Kernel route reflection. */
|
/* Kernel route reflection. */
|
||||||
int
|
static int
|
||||||
kernel_read (struct thread *thread)
|
kernel_read (struct thread *thread)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user