#include <zebra.h>
+#include "if.h"
#include "prefix.h"
#include "table.h"
#include "memory.h"
#include "str.h"
#include "command.h"
-#include "if.h"
#include "log.h"
#include "sockunion.h"
#include "linklist.h"
struct nexthop *
-rib_nexthop_ifindex_add (struct rib *rib, unsigned int ifindex)
+rib_nexthop_ifindex_add (struct rib *rib, ifindex_t ifindex)
{
struct nexthop *nexthop;
struct nexthop *
rib_nexthop_ipv4_ifindex_add (struct rib *rib, struct in_addr *ipv4,
- struct in_addr *src, unsigned int ifindex)
+ struct in_addr *src, ifindex_t ifindex)
{
struct nexthop *nexthop;
struct interface *ifp;
struct nexthop *
rib_nexthop_ipv6_ifindex_add (struct rib *rib, struct in6_addr *ipv6,
- unsigned int ifindex)
+ ifindex_t ifindex)
{
struct nexthop *nexthop;
{
struct nexthop *nexthop;
union g_addr prev_src;
- unsigned int prev_active, prev_index, new_active, old_num_nh;
-
+ unsigned int prev_active, new_active, old_num_nh;
+ ifindex_t prev_index;
old_num_nh = rib->nexthop_active_num;
rib->nexthop_active_num = 0;
int
rib_add_ipv4 (int type, u_short instance, int flags, struct prefix_ipv4 *p,
struct in_addr *gate, struct in_addr *src,
- unsigned int ifindex, vrf_id_t vrf_id, u_int32_t table_id,
+ ifindex_t ifindex, vrf_id_t vrf_id, u_int32_t table_id,
u_int32_t metric, u_char distance, safi_t safi)
{
struct rib *rib;
/* XXX factor with rib_delete_ipv6 */
int
rib_delete_ipv4 (int type, u_short instance, int flags, struct prefix_ipv4 *p,
- struct in_addr *gate, unsigned int ifindex, vrf_id_t vrf_id,
+ struct in_addr *gate, ifindex_t ifindex, vrf_id_t vrf_id,
u_int32_t table_id, safi_t safi)
{
struct route_table *table;
}
int
-static_add_ipv4 (safi_t safi, struct prefix *p, struct in_addr *gate, unsigned int ifindex,
+static_add_ipv4 (safi_t safi, struct prefix *p, struct in_addr *gate, ifindex_t ifindex,
const char *ifname, u_char flags, u_short tag,
u_char distance, struct zebra_vrf *zvrf)
{
}
int
-static_delete_ipv4 (safi_t safi, struct prefix *p, struct in_addr *gate, unsigned int ifindex,
+static_delete_ipv4 (safi_t safi, struct prefix *p, struct in_addr *gate, ifindex_t ifindex,
u_short tag, u_char distance, struct zebra_vrf *zvrf)
{
u_char type = 0;
int
rib_add_ipv6 (int type, u_short instance, int flags, struct prefix_ipv6 *p,
- struct in6_addr *gate, unsigned int ifindex, vrf_id_t vrf_id,
+ struct in6_addr *gate, ifindex_t ifindex, vrf_id_t vrf_id,
u_int32_t table_id, u_int32_t metric, u_char distance, safi_t safi)
{
struct rib *rib;
int
rib_add_ipv6_multipath (struct prefix *p, struct rib *rib, safi_t safi,
- unsigned long ifindex)
+ ifindex_t ifindex)
{
struct route_table *table;
struct route_node *rn;
int
rib_delete_ipv6 (int type, u_short instance, int flags, struct prefix_ipv6 *p,
- struct in6_addr *gate, unsigned int ifindex, vrf_id_t vrf_id,
+ struct in6_addr *gate, ifindex_t ifindex, vrf_id_t vrf_id,
u_int32_t table_id, safi_t safi)
{
struct route_table *table;
/* Add static route into static route configuration. */
int
static_add_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
- unsigned int ifindex, const char *ifname, u_char flags,
+ ifindex_t ifindex, const char *ifname, u_char flags,
u_short tag, u_char distance, struct zebra_vrf *zvrf)
{
struct route_node *rn;
/* Delete static route from static route configuration. */
int
static_delete_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
- unsigned int ifindex, u_short tag, u_char distance,
+ ifindex_t ifindex, u_short tag, u_char distance,
struct zebra_vrf *zvrf)
{
struct route_node *rn;