diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-12-11 22:11:49 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-12-11 22:11:49 +0000 |
commit | f080cb987a578cdd447c3abd1e3772eadb52355e (patch) | |
tree | 4cfeff4f33db4dce939b0eb85e065c61bc277dcb /sys | |
parent | 563d0cc19e8b0619743d67345e382167d55bc926 (diff) |
refer to the RSTP point to point option as "PTP" instead of "P2P".
P2P is commonly used in relation to peer to peer networks, PTP is used
in various protocols for layer 2 point to point links (ie., full
duplex ethernet links).
note that the newly added brconfig commands [-]p2p and [-]autop2p will
change to [-]ptp and [-]autoptp.
suggested by Andrew Thompson (thompsa@freebsd.org)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/bridgestp.c | 28 | ||||
-rw-r--r-- | sys/net/if_bridge.c | 18 | ||||
-rw-r--r-- | sys/net/if_bridge.h | 10 |
3 files changed, 28 insertions, 28 deletions
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index a43f5143adc..7436351ca05 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bridgestp.c,v 1.23 2006/12/03 13:41:19 reyk Exp $ */ +/* $OpenBSD: bridgestp.c,v 1.24 2006/12/11 22:11:48 reyk Exp $ */ /* * Copyright (c) 2000 Jason L. Wright (jason@thought.net) @@ -779,7 +779,7 @@ bstp_received_bpdu(struct bstp_state *bs, struct bstp_port *bp, * only point to point links are allowed fast * transitions to forwarding. */ - if (cu->cu_agree && bp->bp_p2p_link) { + if (cu->cu_agree && bp->bp_ptp_link) { bp->bp_agreed = 1; bp->bp_proposing = 0; } else @@ -1153,7 +1153,7 @@ bstp_update_roles(struct bstp_state *bs, struct bstp_port *bp) bp->bp_proposing = 1; bp->bp_flags |= BSTP_PORT_NEWINFO; bstp_timer_start(&bp->bp_edge_delay_timer, - (bp->bp_p2p_link ? BSTP_DEFAULT_MIGRATE_DELAY : + (bp->bp_ptp_link ? BSTP_DEFAULT_MIGRATE_DELAY : bp->bp_desg_max_age)); DPRINTF("%s -> DESIGNATED_PROPOSE\n", bp->bp_ifp->if_xname); @@ -1682,9 +1682,9 @@ bstp_ifupdstatus(struct bstp_state *bs, struct bstp_port *bp) if ((ifp->if_flags & IFF_UP) && ifp->if_link_state != LINK_STATE_DOWN) { - if (bp->bp_flags & BSTP_PORT_AUTOP2P) { - /* A full-duplex link is assumed to be p2p */ - bp->bp_p2p_link = ifp->if_link_state == + if (bp->bp_flags & BSTP_PORT_AUTOPTP) { + /* A full-duplex link is assumed to be ptp */ + bp->bp_ptp_link = ifp->if_link_state == LINK_STATE_FULL_DUPLEX ? 1 : 0; } @@ -2017,7 +2017,7 @@ bstp_add(struct bstp_state *bs, struct ifnet *ifp) /* Init state */ bp->bp_infois = BSTP_INFO_DISABLED; - bp->bp_flags = BSTP_PORT_AUTOEDGE | BSTP_PORT_AUTOP2P; + bp->bp_flags = BSTP_PORT_AUTOEDGE | BSTP_PORT_AUTOPTP; bstp_set_port_state(bp, BSTP_IFSTATE_DISCARDING); bstp_set_port_proto(bp, bs->bs_protover); bstp_set_port_role(bp, BSTP_ROLE_DISABLED); @@ -2112,19 +2112,19 @@ bstp_ifsflags(struct bstp_port *bp, u_int flags) /* * Set point to point status */ - if (flags & IFBIF_BSTP_AUTOP2P) { - if ((bp->bp_flags & BSTP_PORT_AUTOP2P) == 0) { - bp->bp_flags |= BSTP_PORT_AUTOP2P; + if (flags & IFBIF_BSTP_AUTOPTP) { + if ((bp->bp_flags & BSTP_PORT_AUTOPTP) == 0) { + bp->bp_flags |= BSTP_PORT_AUTOPTP; bstp_ifupdstatus(bs, bp); } } else - bp->bp_flags &= ~BSTP_PORT_AUTOP2P; + bp->bp_flags &= ~BSTP_PORT_AUTOPTP; - if (flags & IFBIF_BSTP_P2P) - bp->bp_p2p_link = 1; + if (flags & IFBIF_BSTP_PTP) + bp->bp_ptp_link = 1; else - bp->bp_p2p_link = 0; + bp->bp_ptp_link = 0; } int diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index b92d931210f..3fc842b8c5e 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.154 2006/12/03 13:41:19 reyk Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.155 2006/12/11 22:11:48 reyk Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -503,10 +503,10 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) req->ifbr_ifsflags |= IFBIF_BSTP_EDGE; if (bp->bp_flags & BSTP_PORT_AUTOEDGE) req->ifbr_ifsflags |= IFBIF_BSTP_AUTOEDGE; - if (bp->bp_p2p_link) - req->ifbr_ifsflags |= IFBIF_BSTP_P2P; - if (bp->bp_flags & BSTP_PORT_AUTOP2P) - req->ifbr_ifsflags |= IFBIF_BSTP_AUTOP2P; + if (bp->bp_ptp_link) + req->ifbr_ifsflags |= IFBIF_BSTP_PTP; + if (bp->bp_flags & BSTP_PORT_AUTOPTP) + req->ifbr_ifsflags |= IFBIF_BSTP_AUTOPTP; } break; case SIOCBRDGSIFFLGS: @@ -836,10 +836,10 @@ bridge_bifconf(struct bridge_softc *sc, struct ifbifconf *bifc) breq->ifbr_ifsflags |= IFBIF_BSTP_EDGE; if (bp->bp_flags & BSTP_PORT_AUTOEDGE) breq->ifbr_ifsflags |= IFBIF_BSTP_AUTOEDGE; - if (bp->bp_p2p_link) - breq->ifbr_ifsflags |= IFBIF_BSTP_P2P; - if (bp->bp_flags & BSTP_PORT_AUTOP2P) - breq->ifbr_ifsflags |= IFBIF_BSTP_AUTOP2P; + if (bp->bp_ptp_link) + breq->ifbr_ifsflags |= IFBIF_BSTP_PTP; + if (bp->bp_flags & BSTP_PORT_AUTOPTP) + breq->ifbr_ifsflags |= IFBIF_BSTP_AUTOPTP; } error = copyout((caddr_t)breq, (caddr_t)(bifc->ifbic_req + i), sizeof(*breq)); diff --git a/sys/net/if_bridge.h b/sys/net/if_bridge.h index 6401e8ec2f7..546fd346e3c 100644 --- a/sys/net/if_bridge.h +++ b/sys/net/if_bridge.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.h,v 1.30 2006/12/03 13:41:19 reyk Exp $ */ +/* $OpenBSD: if_bridge.h,v 1.31 2006/12/11 22:11:48 reyk Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -67,8 +67,8 @@ struct ifbreq { #define IFBIF_STP 0x0008 /* ifs participates in spanning tree */ #define IFBIF_BSTP_EDGE 0x0010 /* member stp edge port */ #define IFBIF_BSTP_AUTOEDGE 0x0020 /* member stp autoedge enabled */ -#define IFBIF_BSTP_P2P 0x0040 /* member stp p2p */ -#define IFBIF_BSTP_AUTOP2P 0x0080 /* member stp autop2p enabled */ +#define IFBIF_BSTP_PTP 0x0040 /* member stp ptp */ +#define IFBIF_BSTP_AUTOPTP 0x0080 /* member stp autoptp enabled */ #define IFBIF_SPAN 0x0100 /* ifs is a span port (ro) */ #define IFBIF_RO_MASK 0xff00 /* read only bits */ @@ -223,7 +223,7 @@ struct ifbrlconf { #define BSTP_PORT_DISPUTED 0x0004 #define BSTP_PORT_ADMCOST 0x0008 #define BSTP_PORT_AUTOEDGE 0x0010 -#define BSTP_PORT_AUTOP2P 0x0020 +#define BSTP_PORT_AUTOPTP 0x0020 /* BPDU priority */ #define BSTP_PDU_SUPERIOR 1 @@ -334,7 +334,7 @@ struct bstp_port { u_int8_t bp_tc_prop; u_int8_t bp_fdbflush; u_int8_t bp_priority; - u_int8_t bp_p2p_link; + u_int8_t bp_ptp_link; u_int8_t bp_agree; u_int8_t bp_agreed; u_int8_t bp_sync; |