2
* lib/setroute.c This file contains a small interface function to
3
* use the AF specific input routine for the routing
6
* NET-LIB A collection of functions used from the base set of the
7
* NET-3 Networking Distribution for the LINUX operating
8
* system. (net-tools, net-drivers)
10
* Version: $Id: setroute.c,v 1.4 2000/05/20 13:38:10 pb Exp $
12
* Author: Bernd 'eckes' Eckenfels <net-tools@lina.inka.de>
13
* Copyright 1999 Bernd Eckenfels, Germany
17
*960221 {0.01} Bernd Eckenfels: generated from getroute.c
18
*960413 {0.02} Bernd Eckenfels: new RTACTION support
19
*960809 Frank Strauss: INET6
21
* This program is free software; you can redistribute it
22
* and/or modify it under the terms of the GNU General
23
* Public License as published by the Free Software
24
* Foundation; either version 2 of the License, or (at
25
* your option) any later version.
29
#include "net-support.h"
30
#include "pathnames.h"
35
extern struct aftype unspec_aftype;
36
extern struct aftype unix_aftype;
37
extern struct aftype inet_aftype;
38
extern struct aftype inet6_aftype;
39
extern struct aftype ax25_aftype;
40
extern struct aftype netrom_aftype;
41
extern struct aftype ipx_aftype;
42
extern struct aftype ddp_aftype;
43
extern struct aftype x25_aftype;
45
void setroute_init(void)
48
inet_aftype.rinput = INET_rinput;
51
inet6_aftype.rinput = INET6_rinput;
54
netrom_aftype.rinput = NETROM_rinput;
57
ipx_aftype.rinput = IPX_rinput;
60
x25_aftype.rinput = X25_rinput;
64
ax25_aftype.rinput = AX25_rinput;
67
ddp_aftype.rinput = DDP_rinput;
73
int route_edit(int action, const char *afname, int options, char **argv)
77
ap = get_aftype(afname);
80
fprintf(stderr, _("Address family `%s' not supported.\n"), afname);
84
fprintf(stderr, _("No routing for address family `%s'.\n"), ap->name);
87
return (ap->rinput(action, options, argv));