summaryrefslogtreecommitdiffstats
path: root/sbin/routed/rdisc.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2009-04-05 16:01:56 +0000
committerphk <phk@FreeBSD.org>2009-04-05 16:01:56 +0000
commitd7fb1c4ef8d673cc1bf356fe5c0839710478bb6b (patch)
tree4c8275987bf66353f2d9c22a35560006425d9f6f /sbin/routed/rdisc.c
parent0aa4473504e30b8c42fde93c3e832d615620f0c0 (diff)
downloadFreeBSD-src-d7fb1c4ef8d673cc1bf356fe5c0839710478bb6b.zip
FreeBSD-src-d7fb1c4ef8d673cc1bf356fe5c0839710478bb6b.tar.gz
Some constifications
Diffstat (limited to 'sbin/routed/rdisc.c')
-rw-r--r--sbin/routed/rdisc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/routed/rdisc.c b/sbin/routed/rdisc.c
index be160a8..262b251 100644
--- a/sbin/routed/rdisc.c
+++ b/sbin/routed/rdisc.c
@@ -73,21 +73,23 @@ union ad_u {
int rdisc_sock = -1; /* router-discovery raw socket */
-static struct interface *rdisc_sock_mcast; /* current multicast interface */
+static const struct interface *rdisc_sock_mcast; /* current multicast interface */
struct timeval rdisc_timer;
int rdisc_ok; /* using solicited route */
#define MAX_ADS 16 /* at least one per interface */
-static struct dr { /* accumulated advertisements */
+struct dr { /* accumulated advertisements */
struct interface *dr_ifp;
naddr dr_gate; /* gateway */
time_t dr_ts; /* when received */
time_t dr_life; /* lifetime in host byte order */
n_long dr_recv_pref; /* received but biased preference */
n_long dr_pref; /* preference adjusted by metric */
-} *cur_drp, drs[MAX_ADS];
+};
+static const struct dr *cur_drp;
+static struct dr drs[MAX_ADS];
/* convert between signed, balanced around zero,
* and unsigned zero-based preferences */
OpenPOWER on IntegriCloud