fix compilation errors in ospfd w/ snmp flavour; from zebra's cvs repo; pt out by naddy@
This commit is contained in:
parent
81e67b1aa3
commit
37cd4c13fe
13
net/zebra/patches/patch-ospfd_ospf_abr_h
Normal file
13
net/zebra/patches/patch-ospfd_ospf_abr_h
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-ospfd_ospf_abr_h,v 1.1 2002/07/17 21:57:23 mickey Exp $
|
||||
--- ospfd/ospf_abr.h.orig Sat Jul 6 03:36:57 2002
|
||||
+++ ospfd/ospf_abr.h Wed Jul 17 17:50:35 2002
|
||||
@@ -72,7 +72,8 @@ int ospf_area_range_substitute_set (stru
|
||||
struct prefix_ipv4 *);
|
||||
int ospf_area_range_substitute_unset (struct ospf *, struct in_addr,
|
||||
struct prefix_ipv4 *);
|
||||
-
|
||||
+struct ospf_area_range *ospf_area_range_match_any (struct ospf *,
|
||||
+ struct prefix_ipv4 *);
|
||||
int ospf_area_range_active (struct ospf_area_range *);
|
||||
int ospf_act_bb_connection ();
|
||||
|
12
net/zebra/patches/patch-ospfd_ospf_interface_h
Normal file
12
net/zebra/patches/patch-ospfd_ospf_interface_h
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-ospfd_ospf_interface_h,v 1.1 2002/07/17 21:57:23 mickey Exp $
|
||||
--- ospfd/ospf_interface.h.orig Sat Jul 6 03:36:57 2002
|
||||
+++ ospfd/ospf_interface.h Wed Jul 17 17:50:35 2002
|
||||
@@ -200,6 +200,8 @@ void ospf_if_cleanup (struct ospf_interf
|
||||
void ospf_if_free (struct ospf_interface *);
|
||||
int ospf_if_up (struct ospf_interface *);
|
||||
int ospf_if_down (struct ospf_interface *);
|
||||
+
|
||||
+int ospf_if_is_up (struct ospf_interface *);
|
||||
struct ospf_interface *ospf_if_lookup_by_name (char *);
|
||||
struct ospf_interface *ospf_if_lookup_by_local_addr (struct interface *, struct in_addr);
|
||||
struct ospf_interface *ospf_if_lookup_by_prefix (struct prefix_ipv4 *);
|
108
net/zebra/patches/patch-ospfd_ospf_snmp_c
Normal file
108
net/zebra/patches/patch-ospfd_ospf_snmp_c
Normal file
@ -0,0 +1,108 @@
|
||||
$OpenBSD: patch-ospfd_ospf_snmp_c,v 1.1 2002/07/17 21:57:23 mickey Exp $
|
||||
--- ospfd/ospf_snmp.c.orig Sat Jul 6 03:36:57 2002
|
||||
+++ ospfd/ospf_snmp.c Wed Jul 17 17:50:35 2002
|
||||
@@ -1115,6 +1115,9 @@ ospfAreaRangeLookup (struct variable *v,
|
||||
int len;
|
||||
struct ospf_area *area;
|
||||
struct ospf_area_range *range;
|
||||
+ struct prefix_ipv4 p;
|
||||
+ p.family = AF_INET;
|
||||
+ p.prefixlen = IPV4_MAX_BITLEN;
|
||||
|
||||
if (exact)
|
||||
{
|
||||
@@ -1136,8 +1139,9 @@ ospfAreaRangeLookup (struct variable *v,
|
||||
|
||||
/* Lookup area range. */
|
||||
oid2in_addr (offset, IN_ADDR_SIZE, range_net);
|
||||
+ p.prefix = *range_net;
|
||||
|
||||
- return ospf_area_range_lookup (area, range_net);
|
||||
+ return ospf_area_range_lookup (area, &p);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1201,7 +1205,6 @@ ospfAreaRangeEntry (struct variable *v,
|
||||
{
|
||||
struct ospf_area_range *range;
|
||||
struct in_addr area_id;
|
||||
-
|
||||
struct in_addr range_net;
|
||||
struct in_addr mask;
|
||||
|
||||
@@ -1217,7 +1220,7 @@ ospfAreaRangeEntry (struct variable *v,
|
||||
return NULL;
|
||||
|
||||
/* Convert prefixlen to network mask format. */
|
||||
- masklen2ip (range->node->p.prefixlen, &mask);
|
||||
+ masklen2ip (range->subst_masklen, &mask);
|
||||
|
||||
/* Return the current value of the variable */
|
||||
switch (v->magic)
|
||||
@@ -1268,7 +1271,7 @@ ospfHostLookup (struct variable *v, oid
|
||||
|
||||
oid2in_addr (name + v->namelen, IN_ADDR_SIZE, addr);
|
||||
|
||||
- nbr_nbma = ospf_nbr_nbma_lookup_by_addr (*addr);
|
||||
+ nbr_nbma = ospf_nbr_nbma_lookup (ospf_top, *addr);
|
||||
|
||||
return nbr_nbma;
|
||||
}
|
||||
@@ -1653,7 +1656,7 @@ ospfIfEntry (struct variable *v, oid *na
|
||||
return SNMP_INTEGER (OSPF_POLL_INTERVAL_DEFAULT);
|
||||
break;
|
||||
case OSPFIFSTATE: /* 12 */
|
||||
- return SNMP_INTEGER (oi->status);
|
||||
+ return SNMP_INTEGER (oi->state);
|
||||
break;
|
||||
case OSPFIFDESIGNATEDROUTER: /* 13 */
|
||||
return SNMP_IPADDRESS (DR (oi));
|
||||
@@ -1662,7 +1665,7 @@ ospfIfEntry (struct variable *v, oid *na
|
||||
return SNMP_IPADDRESS (BDR (oi));
|
||||
break;
|
||||
case OSPFIFEVENTS: /* 15 */
|
||||
- return SNMP_INTEGER (oi->status_change);
|
||||
+ return SNMP_INTEGER (oi->state_change);
|
||||
break;
|
||||
case OSPFIFAUTHKEY: /* 16 */
|
||||
*var_len = 0;
|
||||
@@ -1993,10 +1996,10 @@ ospfVirtIfEntry (struct variable *v, oid
|
||||
return SNMP_INTEGER (OSPF_IF_PARAM (oi, v_wait));
|
||||
break;
|
||||
case OSPFVIRTIFSTATE:
|
||||
- return SNMP_INTEGER (oi->status);
|
||||
+ return SNMP_INTEGER (oi->state);
|
||||
break;
|
||||
case OSPFVIRTIFEVENTS:
|
||||
- return SNMP_INTEGER (oi->status_change);
|
||||
+ return SNMP_INTEGER (oi->state_change);
|
||||
break;
|
||||
case OSPFVIRTIFAUTHKEY:
|
||||
*var_len = 0;
|
||||
@@ -2031,7 +2034,7 @@ ospf_snmp_nbr_lookup (struct in_addr *nb
|
||||
for (rn = route_top (oi->nbrs); rn; rn = route_next (rn))
|
||||
if ((nbr = rn->info) != NULL
|
||||
&& nbr != oi->nbr_self
|
||||
- && nbr->status != NSM_Down
|
||||
+ && nbr->state != NSM_Down
|
||||
&& nbr->src.s_addr != 0)
|
||||
{
|
||||
if (IPV4_ADDR_SAME (&nbr->src, nbr_addr))
|
||||
@@ -2059,7 +2062,7 @@ ospf_snmp_nbr_lookup_next (struct in_add
|
||||
for (rn = route_top (oi->nbrs); rn; rn = route_next (rn))
|
||||
if ((nbr = rn->info) != NULL
|
||||
&& nbr != oi->nbr_self
|
||||
- && nbr->status != NSM_Down
|
||||
+ && nbr->state != NSM_Down
|
||||
&& nbr->src.s_addr != 0)
|
||||
{
|
||||
if (first)
|
||||
@@ -2173,7 +2176,7 @@ ospfNbrEntry (struct variable *v, oid *n
|
||||
return SNMP_INTEGER (nbr->priority);
|
||||
break;
|
||||
case OSPFNBRSTATE:
|
||||
- return SNMP_INTEGER (nbr->status);
|
||||
+ return SNMP_INTEGER (nbr->state);
|
||||
break;
|
||||
case OSPFNBREVENTS:
|
||||
return SNMP_INTEGER (nbr->state_change);
|
10
net/zebra/patches/patch-ospfd_ospfd_c
Normal file
10
net/zebra/patches/patch-ospfd_ospfd_c
Normal file
@ -0,0 +1,10 @@
|
||||
$OpenBSD: patch-ospfd_ospfd_c,v 1.1 2002/07/17 21:57:23 mickey Exp $
|
||||
--- ospfd/ospfd.c.orig Sat Jul 6 03:36:59 2002
|
||||
+++ ospfd/ospfd.c Wed Jul 17 17:50:35 2002
|
||||
@@ -1,5 +1,5 @@
|
||||
/* OSPF version 2 daemon program.
|
||||
- * Copyright (C) 1999, 2000 Toshiaki Takada
|
||||
+ Copyright (C) 1999, 2000 Toshiaki Takada
|
||||
|
||||
This file is part of GNU Zebra.
|
||||
|
Loading…
Reference in New Issue
Block a user