summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2006-12-11 23:46:40 +0000
committerthompsa <thompsa@FreeBSD.org>2006-12-11 23:46:40 +0000
commita68b5db0667c09becd1a6c1980cb9eabf075be97 (patch)
treef64c9494a36368f4740ab3fbefea5606db6a1f61 /sys/net
parenta3a728eabb31b5ce3771f41c9b9b0bab5dbde992 (diff)
downloadFreeBSD-src-a68b5db0667c09becd1a6c1980cb9eabf075be97.zip
FreeBSD-src-a68b5db0667c09becd1a6c1980cb9eabf075be97.tar.gz
These days P2P means peer-2-peer (also well known from serveral filesharing
protocols) while PointToPoint has been PtP links. Change the variables accordingly while the code is still fresh and undocumented. Requested by: bz
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bridgestp.c20
-rw-r--r--sys/net/bridgestp.h8
-rw-r--r--sys/net/if_bridge.c12
-rw-r--r--sys/net/if_bridgevar.h10
4 files changed, 25 insertions, 25 deletions
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c
index dfc59b5..87b9574 100644
--- a/sys/net/bridgestp.c
+++ b/sys/net/bridgestp.c
@@ -661,7 +661,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
@@ -1036,7 +1036,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);
@@ -1663,27 +1663,27 @@ bstp_set_autoedge(struct bstp_port *bp, int set)
}
int
-bstp_set_p2p(struct bstp_port *bp, int set)
+bstp_set_ptp(struct bstp_port *bp, int set)
{
struct bstp_state *bs = bp->bp_bs;
BSTP_LOCK(bs);
- bp->bp_p2p_link = set;
+ bp->bp_ptp_link = set;
BSTP_UNLOCK(bs);
return (0);
}
int
-bstp_set_autop2p(struct bstp_port *bp, int set)
+bstp_set_autoptp(struct bstp_port *bp, int set)
{
struct bstp_state *bs = bp->bp_bs;
BSTP_LOCK(bs);
if (set) {
- bp->bp_flags |= BSTP_PORT_AUTOP2P;
+ bp->bp_flags |= BSTP_PORT_AUTOPTP;
bstp_ifupdstatus(bs, bp);
} else
- bp->bp_flags &= ~BSTP_PORT_AUTOP2P;
+ bp->bp_flags &= ~BSTP_PORT_AUTOPTP;
BSTP_UNLOCK(bs);
return (0);
}
@@ -1804,8 +1804,8 @@ bstp_ifupdstatus(struct bstp_state *bs, struct bstp_port *bp)
if ((error == 0) && (ifp->if_flags & IFF_UP)) {
if (ifmr.ifm_status & IFM_ACTIVE) {
/* A full-duplex link is assumed to be point to point */
- if (bp->bp_flags & BSTP_PORT_AUTOP2P) {
- bp->bp_p2p_link =
+ if (bp->bp_flags & BSTP_PORT_AUTOPTP) {
+ bp->bp_ptp_link =
ifmr.ifm_active & IFM_FDX ? 1 : 0;
}
@@ -2163,7 +2163,7 @@ bstp_create(struct bstp_state *bs, struct bstp_port *bp, 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);
diff --git a/sys/net/bridgestp.h b/sys/net/bridgestp.h
index 025b8f4..8bd7319 100644
--- a/sys/net/bridgestp.h
+++ b/sys/net/bridgestp.h
@@ -108,7 +108,7 @@
#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
#define BSTP_PORT_ADMEDGE 0x0040
/* BPDU priority */
@@ -305,7 +305,7 @@ struct bstp_port {
uint8_t bp_tc_prop;
uint8_t bp_fdbflush;
uint8_t bp_priority;
- uint8_t bp_p2p_link;
+ uint8_t bp_ptp_link;
uint8_t bp_agree;
uint8_t bp_agreed;
uint8_t bp_sync;
@@ -384,8 +384,8 @@ int bstp_set_port_priority(struct bstp_port *, int);
int bstp_set_path_cost(struct bstp_port *, uint32_t);
int bstp_set_edge(struct bstp_port *, int);
int bstp_set_autoedge(struct bstp_port *, int);
-int bstp_set_p2p(struct bstp_port *, int);
-int bstp_set_autop2p(struct bstp_port *, int);
+int bstp_set_ptp(struct bstp_port *, int);
+int bstp_set_autoptp(struct bstp_port *, int);
struct mbuf *bstp_input(struct bstp_port *, struct ifnet *, struct mbuf *);
#endif /* _KERNEL */
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 28d4561..359d7dd 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1020,10 +1020,10 @@ bridge_ioctl_gifflags(struct bridge_softc *sc, void *arg)
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;
if (bp->bp_flags & BSTP_PORT_ADMEDGE)
req->ifbr_ifsflags |= IFBIF_BSTP_ADMEDGE;
if (bp->bp_flags & BSTP_PORT_ADMCOST)
@@ -1062,8 +1062,8 @@ bridge_ioctl_sifflags(struct bridge_softc *sc, void *arg)
/* Pass on STP flags */
bstp_set_edge(bp, req->ifbr_ifsflags & IFBIF_BSTP_EDGE ? 1 : 0);
bstp_set_autoedge(bp, req->ifbr_ifsflags & IFBIF_BSTP_AUTOEDGE ? 1 : 0);
- bstp_set_p2p(bp, req->ifbr_ifsflags & IFBIF_BSTP_P2P ? 1 : 0);
- bstp_set_autop2p(bp, req->ifbr_ifsflags & IFBIF_BSTP_AUTOP2P ? 1 : 0);
+ bstp_set_ptp(bp, req->ifbr_ifsflags & IFBIF_BSTP_PTP ? 1 : 0);
+ bstp_set_autoptp(bp, req->ifbr_ifsflags & IFBIF_BSTP_AUTOPTP ? 1 : 0);
/* Save the bits relating to the bridge */
bif->bif_flags = req->ifbr_ifsflags & IFBIFMASK;
diff --git a/sys/net/if_bridgevar.h b/sys/net/if_bridgevar.h
index 2096eaa..ae33688 100644
--- a/sys/net/if_bridgevar.h
+++ b/sys/net/if_bridgevar.h
@@ -138,15 +138,15 @@ struct ifbreq {
#define IFBIF_STICKY 0x0010 /* if learned addresses stick */
#define IFBIF_BSTP_EDGE 0x0020 /* member stp edge port */
#define IFBIF_BSTP_AUTOEDGE 0x0040 /* member stp autoedge enabled */
-#define IFBIF_BSTP_P2P 0x0080 /* member stp p2p */
-#define IFBIF_BSTP_AUTOP2P 0x0100 /* member stp autop2p enabled */
+#define IFBIF_BSTP_PTP 0x0080 /* member stp point to point */
+#define IFBIF_BSTP_AUTOPTP 0x0100 /* member stp autoptp enabled */
#define IFBIF_BSTP_ADMEDGE 0x0200 /* member stp admin edge enabled */
#define IFBIF_BSTP_ADMCOST 0x0400 /* member stp admin path cost */
#define IFBIFBITS "\020\001LEARNING\002DISCOVER\003STP\004SPAN" \
- "\005STICKY\006EDGE\007AUTOEDGE\010P2P\011AUTOP2P"
-#define IFBIFMASK ~(IFBIF_BSTP_EDGE|IFBIF_BSTP_AUTOEDGE|IFBIF_BSTP_P2P| \
- IFBIF_BSTP_AUTOP2P|IFBIF_BSTP_ADMEDGE| \
+ "\005STICKY\006EDGE\007AUTOEDGE\010PTP\011AUTOPTP"
+#define IFBIFMASK ~(IFBIF_BSTP_EDGE|IFBIF_BSTP_AUTOEDGE|IFBIF_BSTP_PTP| \
+ IFBIF_BSTP_AUTOPTP|IFBIF_BSTP_ADMEDGE| \
IFBIF_BSTP_ADMCOST) /* not saved */
/* BRDGFLUSH */
OpenPOWER on IntegriCloud