Remove some obsolete compatibility code.

No functional change intended.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mark Johnston 2018-10-20 17:40:30 +00:00
parent 662e7fa8d9
commit 1a97dd3cc3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339453
2 changed files with 1 additions and 49 deletions

View file

@ -65,19 +65,15 @@
((ap)->sa_len ? ROUNDUP((ap)->sa_len, sizeof(u_long)) \
: sizeof(u_long)))
#ifdef RTM_IFANNOUNCE /*NetBSD 1.5 or later*/
static int rtsock_input_ifannounce(int, struct rt_msghdr *, char *);
#endif
static struct {
u_char type;
size_t minlen;
int (*func)(int, struct rt_msghdr *, char *);
} rtsock_dispatch[] = {
#ifdef RTM_IFANNOUNCE /*NetBSD 1.5 or later*/
{ RTM_IFANNOUNCE, sizeof(struct if_announcemsghdr),
rtsock_input_ifannounce },
#endif
{ 0, 0, NULL },
};
@ -135,7 +131,6 @@ rtsock_input(int s)
return (ret);
}
#ifdef RTM_IFANNOUNCE /*NetBSD 1.5 or later*/
static int
rtsock_input_ifannounce(int s __unused, struct rt_msghdr *rtm, char *lim)
{
@ -174,4 +169,3 @@ rtsock_input_ifannounce(int s __unused, struct rt_msghdr *rtm, char *lim)
return (0);
}
#endif

View file

@ -33,10 +33,9 @@
* $FreeBSD$
*/
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/param.h>
#include <net/if.h>
#include <net/if_dl.h>
@ -98,10 +97,6 @@ static int do_dump;
static const char *dumpfilename = RTSOL_DUMPFILE;
#endif
#if 0
static int ifreconfig(char *);
#endif
static int make_packet(struct ifinfo *);
static struct timespec *rtsol_check_timer(void);
@ -217,16 +212,6 @@ main(int argc, char **argv)
pidfilename);
}
#if (__FreeBSD_version < 900000)
if (Fflag) {
setinet6sysctl(IPV6CTL_FORWARDING, 0);
} else {
/* warn if forwarding is up */
if (getinet6sysctl(IPV6CTL_FORWARDING))
warnx("kernel is configured as a router, not a host");
}
#endif
#ifndef SMALL
/* initialization to dump internal status to a file */
signal(SIGUSR1, rtsold_set_dump_file);
@ -459,33 +444,6 @@ iflist_init(void)
}
}
#if 0
static int
ifreconfig(char *ifname)
{
struct ifinfo *ifi, *prev;
int rv;
prev = NULL;
TAILQ_FOREACH(ifi, &ifinfo_head, ifi_next) {
if (strncmp(ifi->ifname, ifname, sizeof(ifi->ifname)) == 0)
break;
prev = ifi;
}
prev->next = ifi->next;
rv = ifconfig(ifname);
/* reclaim it after ifconfig() in case ifname is pointer inside ifi */
if (ifi->rs_data)
free(ifi->rs_data);
free(ifi->sdl);
free(ifi);
return (rv);
}
#endif
struct rainfo *
find_rainfo(struct ifinfo *ifi, struct sockaddr_in6 *sin6)
{