svn commit: r339456 - head/usr.sbin/rtsold
Mark Johnston
markj at FreeBSD.org
Sat Oct 20 17:44:25 UTC 2018
Author: markj
Date: Sat Oct 20 17:44:23 2018
New Revision: 339456
URL: https://svnweb.freebsd.org/changeset/base/339456
Log:
Remove dead code.
No functional change intended.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Modified:
head/usr.sbin/rtsold/if.c
head/usr.sbin/rtsold/rtsock.c
head/usr.sbin/rtsold/rtsold.c
head/usr.sbin/rtsold/rtsold.h
Modified: head/usr.sbin/rtsold/if.c
==============================================================================
--- head/usr.sbin/rtsold/if.c Sat Oct 20 17:43:27 2018 (r339455)
+++ head/usr.sbin/rtsold/if.c Sat Oct 20 17:44:23 2018 (r339456)
@@ -332,37 +332,6 @@ if_nametosdl(char *name)
return (ret_sdl);
}
-int
-getinet6sysctl(int code)
-{
- int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, 0 };
- int value;
- size_t size;
-
- mib[3] = code;
- size = sizeof(value);
- if (sysctl(mib, nitems(mib), &value, &size, NULL, 0) < 0)
- return (-1);
- else
- return (value);
-}
-
-int
-setinet6sysctl(int code, int newval)
-{
- int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, 0 };
- int value;
- size_t size;
-
- mib[3] = code;
- size = sizeof(value);
- if (sysctl(mib, nitems(mib), &value, &size,
- &newval, sizeof(newval)) < 0)
- return (-1);
- else
- return (value);
-}
-
/*------------------------------------------------------------*/
/* get ia6_flags for link-local addr on if. returns -1 on error. */
Modified: head/usr.sbin/rtsold/rtsock.c
==============================================================================
--- head/usr.sbin/rtsold/rtsock.c Sat Oct 20 17:43:27 2018 (r339455)
+++ head/usr.sbin/rtsold/rtsock.c Sat Oct 20 17:44:23 2018 (r339456)
@@ -57,14 +57,6 @@
#include <syslog.h>
#include "rtsold.h"
-#define ROUNDUP(a, size) \
- (((a) & ((size)-1)) ? (1 + ((a) | ((size)-1))) : (a))
-
-#define NEXT_SA(ap) (ap) = (struct sockaddr *) \
- ((caddr_t)(ap) + \
- ((ap)->sa_len ? ROUNDUP((ap)->sa_len, sizeof(u_long)) \
- : sizeof(u_long)))
-
static int rtsock_input_ifannounce(int, struct rt_msghdr *, char *);
static struct {
Modified: head/usr.sbin/rtsold/rtsold.c
==============================================================================
--- head/usr.sbin/rtsold/rtsold.c Sat Oct 20 17:43:27 2018 (r339455)
+++ head/usr.sbin/rtsold/rtsold.c Sat Oct 20 17:44:23 2018 (r339456)
@@ -431,21 +431,6 @@ bad:
return (-1);
}
-void
-iflist_init(void)
-{
- struct ifinfo *ifi;
-
- while ((ifi = TAILQ_FIRST(&ifinfo_head)) != NULL) {
- TAILQ_REMOVE(&ifinfo_head, ifi, ifi_next);
- if (ifi->sdl != NULL)
- free(ifi->sdl);
- if (ifi->rs_data != NULL)
- free(ifi->rs_data);
- free(ifi);
- }
-}
-
struct rainfo *
find_rainfo(struct ifinfo *ifi, struct sockaddr_in6 *sin6)
{
@@ -726,9 +711,6 @@ rtsol_timer_update(struct ifinfo *ifi)
#undef MILLION
}
-
-/* timer related utility functions */
-#define MILLION 1000000
#ifndef SMALL
static void
Modified: head/usr.sbin/rtsold/rtsold.h
==============================================================================
--- head/usr.sbin/rtsold/rtsold.h Sat Oct 20 17:43:27 2018 (r339455)
+++ head/usr.sbin/rtsold/rtsold.h Sat Oct 20 17:44:23 2018 (r339456)
@@ -157,7 +157,6 @@ extern int Fflag;
extern int uflag;
extern const char *otherconf_script;
extern const char *resolvconf_script;
-extern void iflist_init(void);
struct ifinfo *find_ifinfo(int);
struct rainfo *find_rainfo(struct ifinfo *, struct sockaddr_in6 *);
void rtsol_timer_update(struct ifinfo *);
@@ -172,8 +171,6 @@ extern int interface_status(struct ifinfo *);
extern int lladdropt_length(struct sockaddr_dl *);
extern void lladdropt_fill(struct sockaddr_dl *, struct nd_opt_hdr *);
extern struct sockaddr_dl *if_nametosdl(char *);
-extern int getinet6sysctl(int);
-extern int setinet6sysctl(int, int);
/* rtsol.c */
extern int rssock;
More information about the svn-src-head
mailing list