summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsnmpd
diff options
context:
space:
mode:
authorsyrinx <syrinx@FreeBSD.org>2006-12-20 22:02:45 +0000
committersyrinx <syrinx@FreeBSD.org>2006-12-20 22:02:45 +0000
commit6825c54d1fbef51f6f6474684ee49a0361bb9d88 (patch)
treebc2734f43efa31655e4fd43087525ed9ec390436 /usr.sbin/bsnmpd
parentce61d899be2e1e223e9a35c93b62cf6a5f605cda (diff)
downloadFreeBSD-src-6825c54d1fbef51f6f6474684ee49a0361bb9d88.zip
FreeBSD-src-6825c54d1fbef51f6f6474684ee49a0361bb9d88.tar.gz
Keep in sync with the if_bridge(4) module (rev. 1.20 if_bridgevar.h,
1.12 bridgestp.h) and rename all PointToPoint related variables from P2P to PTP (s/P2P/PTP/g s/p2p/ptp/g). Approved by: bz (mentor)
Diffstat (limited to 'usr.sbin/bsnmpd')
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c24
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h8
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c40
3 files changed, 36 insertions, 36 deletions
diff --git a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
index 62f8731..dd07c40 100644
--- a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
+++ b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
@@ -282,8 +282,8 @@ bridge_new_port(struct mibif *mif, struct bridge_if *bif)
bp->proto_migr = TruthValue_false;
bp->admin_edge = TruthValue_false;
bp->oper_edge = TruthValue_false;
- bp->oper_p2p = TruthValue_false;
- bp->admin_p2p = StpPortAdminPointToPointType_auto;
+ bp->oper_ptp = TruthValue_false;
+ bp->admin_ptp = StpPortAdminPointToPointType_auto;
bridge_port_memif_insert(&bridge_ports, bp, &(bif->f_bp));
@@ -630,8 +630,8 @@ op_dot1d_stp_ext_port(struct snmp_context *ctx, struct snmp_value *val,
StpPortAdminPointToPointType_auto)
return (SNMP_ERR_WRONG_VALUE);
- ctx->scratch->int1 = bp->admin_p2p;
- if (bridge_port_set_admin_p2p(bif->bif_name, bp,
+ ctx->scratch->int1 = bp->admin_ptp;
+ if (bridge_port_set_admin_ptp(bif->bif_name, bp,
val->v.integer) < 0)
return (SNMP_ERR_GENERR);
return (SNMP_ERR_NOERROR);
@@ -665,7 +665,7 @@ op_dot1d_stp_ext_port(struct snmp_context *ctx, struct snmp_value *val,
ctx->scratch->int1);
break;
case LEAF_dot1dStpPortAdminPointToPoint:
- bridge_port_set_admin_p2p(bif->bif_name, bp,
+ bridge_port_set_admin_ptp(bif->bif_name, bp,
ctx->scratch->int1);
break;
case LEAF_dot1dStpPortAdminPathCost:
@@ -695,11 +695,11 @@ get:
return (SNMP_ERR_NOERROR);
case LEAF_dot1dStpPortAdminPointToPoint:
- val->v.integer = bp->admin_p2p;
+ val->v.integer = bp->admin_ptp;
return (SNMP_ERR_NOERROR);
case LEAF_dot1dStpPortOperPointToPoint:
- val->v.integer = bp->oper_p2p;
+ val->v.integer = bp->oper_ptp;
return (SNMP_ERR_NOERROR);
case LEAF_dot1dStpPortAdminPathCost:
@@ -1353,8 +1353,8 @@ op_begemot_stp_ext_port(struct snmp_context *ctx, struct snmp_value *val,
StpPortAdminPointToPointType_auto)
return (SNMP_ERR_WRONG_VALUE);
- ctx->scratch->int1 = bp->admin_p2p;
- if (bridge_port_set_admin_p2p(b_name, bp,
+ ctx->scratch->int1 = bp->admin_ptp;
+ if (bridge_port_set_admin_ptp(b_name, bp,
val->v.integer) < 0)
return (SNMP_ERR_GENERR);
return (SNMP_ERR_NOERROR);
@@ -1388,7 +1388,7 @@ op_begemot_stp_ext_port(struct snmp_context *ctx, struct snmp_value *val,
ctx->scratch->int1);
break;
case LEAF_begemotBridgeStpPortAdminPointToPoint:
- bridge_port_set_admin_p2p(b_name, bp,
+ bridge_port_set_admin_ptp(b_name, bp,
ctx->scratch->int1);
break;
case LEAF_begemotBridgeStpPortAdminPathCost:
@@ -1418,11 +1418,11 @@ get:
return (SNMP_ERR_NOERROR);
case LEAF_begemotBridgeStpPortAdminPointToPoint:
- val->v.integer = bp->admin_p2p;
+ val->v.integer = bp->admin_ptp;
return (SNMP_ERR_NOERROR);
case LEAF_begemotBridgeStpPortOperPointToPoint:
- val->v.integer = bp->oper_p2p;
+ val->v.integer = bp->oper_ptp;
return (SNMP_ERR_NOERROR);
case LEAF_begemotBridgeStpPortAdminPathCost:
diff --git a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
index 6d77420..2a8b294 100644
--- a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
+++ b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
@@ -124,8 +124,8 @@ struct bridge_port {
enum TruthValue proto_migr;
enum TruthValue admin_edge;
enum TruthValue oper_edge;
- enum TruthValue oper_p2p;
- enum StpPortAdminPointToPointType admin_p2p;
+ enum TruthValue oper_ptp;
+ enum StpPortAdminPointToPointType admin_ptp;
/* dot1dTp subtree objects. */
int32_t max_info;
@@ -330,8 +330,8 @@ int bridge_port_set_path_cost(const char *bif_name, struct bridge_port *bp,
int32_t path_cost);
/* Set admin point-to-point link. */
-int bridge_port_set_admin_p2p(const char *bif_name, struct bridge_port *bp,
- uint32_t admin_p2p);
+int bridge_port_set_admin_ptp(const char *bif_name, struct bridge_port *bp,
+ uint32_t admin_ptp);
/* Set admin edge. */
int bridge_port_set_admin_edge(const char *bif_name, struct bridge_port *bp,
diff --git a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
index 30924b5..a5d090d 100644
--- a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
+++ b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
@@ -693,18 +693,18 @@ bridge_port_getinfo_conf(struct ifbreq *k_info, struct bridge_port *bp)
else
bp->oper_edge = TruthValue_false;
- if (k_info->ifbr_ifsflags & IFBIF_BSTP_AUTOP2P) {
- bp->admin_p2p = StpPortAdminPointToPointType_auto;
- if (k_info->ifbr_ifsflags & IFBIF_BSTP_P2P)
- bp->oper_p2p = TruthValue_true;
+ if (k_info->ifbr_ifsflags & IFBIF_BSTP_AUTOPTP) {
+ bp->admin_ptp = StpPortAdminPointToPointType_auto;
+ if (k_info->ifbr_ifsflags & IFBIF_BSTP_PTP)
+ bp->oper_ptp = TruthValue_true;
else
- bp->oper_p2p = TruthValue_false;
- } else if (k_info->ifbr_ifsflags & IFBIF_BSTP_P2P) {
- bp->admin_p2p = StpPortAdminPointToPointType_forceTrue;
- bp->oper_p2p = TruthValue_true;
+ bp->oper_ptp = TruthValue_false;
+ } else if (k_info->ifbr_ifsflags & IFBIF_BSTP_PTP) {
+ bp->admin_ptp = StpPortAdminPointToPointType_forceTrue;
+ bp->oper_ptp = TruthValue_true;
} else {
- bp->admin_p2p = StpPortAdminPointToPointType_forceFalse;
- bp->oper_p2p = TruthValue_false;
+ bp->admin_ptp = StpPortAdminPointToPointType_forceFalse;
+ bp->oper_ptp = TruthValue_false;
}
#endif
}
@@ -855,14 +855,14 @@ bridge_port_set_path_cost(const char *bif_name, struct bridge_port *bp,
* Set the PonitToPoint status of the link administratively.
*/
int
-bridge_port_set_admin_p2p(const char *bif_name __unused,
- struct bridge_port *bp __unused, uint32_t admin_p2p __unused)
+bridge_port_set_admin_ptp(const char *bif_name __unused,
+ struct bridge_port *bp __unused, uint32_t admin_ptp __unused)
{
#if __FreeBSD_version > 700024
struct ifdrv ifd;
struct ifbreq b_req;
- if (bp->admin_p2p == admin_p2p)
+ if (bp->admin_ptp == admin_ptp)
return (0);
bzero(&b_req, sizeof(b_req));
@@ -878,17 +878,17 @@ bridge_port_set_admin_p2p(const char *bif_name __unused,
return (-1);
}
- switch (admin_p2p) {
+ switch (admin_ptp) {
case StpPortAdminPointToPointType_forceTrue:
- b_req.ifbr_ifsflags &= ~IFBIF_BSTP_AUTOP2P;
- b_req.ifbr_ifsflags |= IFBIF_BSTP_P2P;
+ b_req.ifbr_ifsflags &= ~IFBIF_BSTP_AUTOPTP;
+ b_req.ifbr_ifsflags |= IFBIF_BSTP_PTP;
break;
case StpPortAdminPointToPointType_forceFalse:
- b_req.ifbr_ifsflags &= ~IFBIF_BSTP_AUTOP2P;
- b_req.ifbr_ifsflags &= ~IFBIF_BSTP_P2P;
+ b_req.ifbr_ifsflags &= ~IFBIF_BSTP_AUTOPTP;
+ b_req.ifbr_ifsflags &= ~IFBIF_BSTP_PTP;
break;
case StpPortAdminPointToPointType_auto:
- b_req.ifbr_ifsflags |= IFBIF_BSTP_AUTOP2P;
+ b_req.ifbr_ifsflags |= IFBIF_BSTP_AUTOPTP;
break;
}
@@ -899,7 +899,7 @@ bridge_port_set_admin_p2p(const char *bif_name __unused,
return (-1);
}
- bp->admin_p2p = admin_p2p;
+ bp->admin_ptp = admin_ptp;
return (0);
#else
return (-1);
OpenPOWER on IntegriCloud