1 /* Interface function header.
2 * Copyright (C) 1999 Kunihiro Ishiguro
4 * This file is part of GNU Zebra.
6 * GNU Zebra is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
11 * GNU Zebra is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GNU Zebra; see the file COPYING. If not, write to the Free
18 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 /* For interface multicast configuration. */
23 #define IF_ZEBRA_MULTICAST_UNSPEC 0
24 #define IF_ZEBRA_MULTICAST_ON 1
25 #define IF_ZEBRA_MULTICAST_OFF 2
27 /* For interface shutdown configuration. */
28 #define IF_ZEBRA_SHUTDOWN_UNSPEC 0
29 #define IF_ZEBRA_SHUTDOWN_ON 1
30 #define IF_ZEBRA_SHUTDOWN_OFF 2
32 /* Router advertisement feature. */
33 #if (defined(LINUX_IPV6) && (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1)) || defined(KAME)
38 /* Router advertisement parameter. From RFC2461. */
41 /* A flag indicating whether or not the router sends periodic Router
42 Advertisements and responds to Router Solicitations.
44 int AdvSendAdvertisements
;
46 /* The maximum time allowed between sending unsolicited multicast
47 Router Advertisements from the interface, in seconds. MUST be no
48 less than 4 seconds and no greater than 1800 seconds.
50 Default: 600 seconds */
51 int MaxRtrAdvInterval
;
52 #define RTADV_MAX_RTR_ADV_INTERVAL 600
54 /* The minimum time allowed between sending unsolicited multicast
55 Router Advertisements from the interface, in seconds. MUST be no
56 less than 3 seconds and no greater than .75 * MaxRtrAdvInterval.
58 Default: 0.33 * MaxRtrAdvInterval */
59 int MinRtrAdvInterval
;
60 #define RTADV_MIN_RTR_ADV_INTERVAL (0.33 * RTADV_MAX_RTR_ADV_INTERVAL)
62 /* Unsolicited Router Advertisements' interval timer. */
65 /* The TRUE/FALSE value to be placed in the "Managed address
66 configuration" flag field in the Router Advertisement. See
73 /* The TRUE/FALSE value to be placed in the "Other stateful
74 configuration" flag field in the Router Advertisement. See
78 int AdvOtherConfigFlag
;
80 /* The value to be placed in MTU options sent by the router. A
81 value of zero indicates that no MTU options are sent.
87 /* The value to be placed in the Reachable Time field in the Router
88 Advertisement messages sent by the router. The value zero means
89 unspecified (by this router). MUST be no greater than 3,600,000
90 milliseconds (1 hour).
93 u_int32_t AdvReachableTime
;
94 #define RTADV_MAX_REACHABLE_TIME 3600000
97 /* The value to be placed in the Retrans Timer field in the Router
98 Advertisement messages sent by the router. The value zero means
99 unspecified (by this router).
104 /* The default value to be placed in the Cur Hop Limit field in the
105 Router Advertisement messages sent by the router. The value
106 should be set to that current diameter of the Internet. The
107 value zero means unspecified (by this router).
109 Default: The value specified in the "Assigned Numbers" RFC
110 [ASSIGNED] that was in effect at the time of implementation. */
113 /* The value to be placed in the Router Lifetime field of Router
114 Advertisements sent from the interface, in seconds. MUST be
115 either zero or between MaxRtrAdvInterval and 9000 seconds. A
116 value of zero indicates that the router is not to be used as a
119 Default: 3 * MaxRtrAdvInterval */
120 int AdvDefaultLifetime
;
121 #define RTADV_ADV_DEFAULT_LIFETIME (3 * RTADV_MAX_RTR_ADV_INTERVAL)
124 /* A list of prefixes to be placed in Prefix Information options in
125 Router Advertisement messages sent from the interface.
127 Default: all prefixes that the router advertises via routing
128 protocols as being on-link for the interface from which the
129 advertisement is sent. The link-local prefix SHOULD NOT be
130 included in the list of advertised prefixes. */
136 /* `zebra' daemon local interface structure. */
139 /* Shutdown configuration. */
142 /* Multicast configuration. */
145 /* Router advertise configuration. */
148 /* Interface's address. */
152 struct rtadvconf rtadv
;
157 struct irdp_interface irdp
;
162 void if_delete_update (struct interface
*ifp
);
163 void if_add_update (struct interface
*ifp
);
164 void if_up (struct interface
*);
165 void if_down (struct interface
*);
166 void if_refresh (struct interface
*);
167 void zebra_interface_up_update (struct interface
*ifp
);
168 void zebra_interface_down_update (struct interface
*ifp
);
170 #ifdef HAVE_PROC_NET_DEV
171 int ifstat_update_proc ();
172 #endif /* HAVE_PROC_NET_DEV */
173 #ifdef HAVE_NET_RT_IFLIST
174 void ifstat_update_sysctl ();
176 #endif /* HAVE_NET_RT_IFLIST */
177 #ifdef HAVE_PROC_NET_DEV
178 int interface_list_proc ();
179 #endif /* HAVE_PROC_NET_DEV */
180 #ifdef HAVE_PROC_NET_IF_INET6
181 int ifaddr_proc_ipv6 ();
182 #endif /* HAVE_PROC_NET_IF_INET6 */
185 int if_kvm_get_mtu (struct interface
*);