1164640Sflz/* $NetBSD: if_bridgevar.h,v 1.4 2003/07/08 07:13:50 itojun Exp $ */ 298186Sgordon 378344Sobrien/*- 4157473Sflz * SPDX-License-Identifier: BSD-4-Clause 578344Sobrien * 678344Sobrien * Copyright 2001 Wasabi Systems, Inc. 778344Sobrien * All rights reserved. 878344Sobrien * 978344Sobrien * Written by Jason R. Thorpe for Wasabi Systems, Inc. 1078344Sobrien * 1178344Sobrien * Redistribution and use in source and binary forms, with or without 1278344Sobrien * modification, are permitted provided that the following conditions 1378344Sobrien * are met: 1478344Sobrien * 1. Redistributions of source code must retain the above copyright 1578344Sobrien * notice, this list of conditions and the following disclaimer. 1678344Sobrien * 2. Redistributions in binary form must reproduce the above copyright 1778344Sobrien * notice, this list of conditions and the following disclaimer in the 1878344Sobrien * documentation and/or other materials provided with the distribution. 1978344Sobrien * 3. All advertising materials mentioning features or use of this software 2078344Sobrien * must display the following acknowledgement: 2178344Sobrien * This product includes software developed for the NetBSD Project by 2278344Sobrien * Wasabi Systems, Inc. 2378344Sobrien * 4. The name of Wasabi Systems, Inc. may not be used to endorse 2478344Sobrien * or promote products derived from this software without specific prior 2578344Sobrien * written permission. 2678344Sobrien * 2778344Sobrien * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 2878344Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2978344Sobrien * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 3078344Sobrien * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 3178344Sobrien * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 3278344Sobrien * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 3378344Sobrien * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 3478344Sobrien * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 3578344Sobrien * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 3678344Sobrien * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3778344Sobrien * POSSIBILITY OF SUCH DAMAGE. 3878344Sobrien */ 3978344Sobrien 4078344Sobrien/*- 4178344Sobrien * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) 42157473Sflz * All rights reserved. 43169668Smtm * 44157473Sflz * Redistribution and use in source and binary forms, with or without 4578344Sobrien * modification, are permitted provided that the following conditions 4698186Sgordon * are met: 4798186Sgordon * 1. Redistributions of source code must retain the above copyright 4898186Sgordon * notice, this list of conditions and the following disclaimer. 49131550Scperciva * 2. Redistributions in binary form must reproduce the above copyright 50131550Scperciva * notice, this list of conditions and the following disclaimer in the 51131550Scperciva * documentation and/or other materials provided with the distribution. 52131550Scperciva * 3. All advertising materials mentioning features or use of this software 5398186Sgordon * must display the following acknowledgement: 5498186Sgordon * This product includes software developed by Jason L. Wright 5598186Sgordon * 4. The name of the author may not be used to endorse or promote products 56103018Sgordon * derived from this software without specific prior written permission. 57124832Smtm * 58124832Smtm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 59161435Syar * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 60161435Syar * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 6198186Sgordon * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 62103018Sgordon * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 6398186Sgordon * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 6498186Sgordon * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 6598186Sgordon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 6698186Sgordon * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 6798186Sgordon * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 6898186Sgordon * POSSIBILITY OF SUCH DAMAGE. 6998186Sgordon * 7098186Sgordon * OpenBSD: if_bridge.h,v 1.14 2001/03/22 03:48:29 jason Exp 7198186Sgordon */ 7278344Sobrien 7378344Sobrien/* 7478344Sobrien * Data structure and control definitions for STP interfaces. 75197144Shrs */ 7678344Sobrien 77197144Shrs#include <sys/callout.h> 78197144Shrs#include <sys/queue.h> 7998186Sgordon 80197144Shrs/* STP port states */ 81197144Shrs#define BSTP_IFSTATE_DISABLED 0 82197144Shrs#define BSTP_IFSTATE_LISTENING 1 83197144Shrs#define BSTP_IFSTATE_LEARNING 2 84197144Shrs#define BSTP_IFSTATE_FORWARDING 3 85197144Shrs#define BSTP_IFSTATE_BLOCKING 4 86197144Shrs#define BSTP_IFSTATE_DISCARDING 5 87197144Shrs 88197144Shrs#define BSTP_TCSTATE_ACTIVE 1 8998186Sgordon#define BSTP_TCSTATE_DETECTED 2 9098186Sgordon#define BSTP_TCSTATE_INACTIVE 3 91197144Shrs#define BSTP_TCSTATE_LEARNING 4 92197144Shrs#define BSTP_TCSTATE_PROPAG 5 93197144Shrs#define BSTP_TCSTATE_ACK 6 9498186Sgordon#define BSTP_TCSTATE_TC 7 95197144Shrs#define BSTP_TCSTATE_TCN 8 96197144Shrs 9798186Sgordon#define BSTP_ROLE_DISABLED 0 9898186Sgordon#define BSTP_ROLE_ROOT 1 99197144Shrs#define BSTP_ROLE_DESIGNATED 2 100197144Shrs#define BSTP_ROLE_ALTERNATE 3 101197144Shrs#define BSTP_ROLE_BACKUP 4 102197144Shrs 103197144Shrs#ifdef _KERNEL 104197144Shrs 105197144Shrs/* STP port flags */ 106197144Shrs#define BSTP_PORT_CANMIGRATE 0x0001 107197144Shrs#define BSTP_PORT_NEWINFO 0x0002 108197144Shrs#define BSTP_PORT_DISPUTED 0x0004 109197144Shrs#define BSTP_PORT_ADMCOST 0x0008 110197144Shrs#define BSTP_PORT_AUTOEDGE 0x0010 111197144Shrs#define BSTP_PORT_AUTOPTP 0x0020 11298186Sgordon#define BSTP_PORT_ADMEDGE 0x0040 11398186Sgordon#define BSTP_PORT_PNDCOST 0x0080 11498186Sgordon 11598186Sgordon/* BPDU priority */ 116197144Shrs#define BSTP_PDU_SUPERIOR 1 117197144Shrs#define BSTP_PDU_REPEATED 2 118197144Shrs#define BSTP_PDU_INFERIOR 3 11998186Sgordon#define BSTP_PDU_INFERIORALT 4 120197144Shrs#define BSTP_PDU_OTHER 5 121197144Shrs 122197144Shrs/* BPDU flags */ 123197144Shrs#define BSTP_PDU_PRMASK 0x0c /* Port Role */ 124197144Shrs#define BSTP_PDU_PRSHIFT 2 /* Port Role offset */ 125197144Shrs#define BSTP_PDU_F_UNKN 0x00 /* Unknown port (00) */ 126197144Shrs#define BSTP_PDU_F_ALT 0x01 /* Alt/Backup port (01) */ 127197144Shrs#define BSTP_PDU_F_ROOT 0x02 /* Root port (10) */ 128197144Shrs#define BSTP_PDU_F_DESG 0x03 /* Designated port (11) */ 129197144Shrs 130197144Shrs#define BSTP_PDU_STPMASK 0x81 /* strip unused STP flags */ 131197144Shrs#define BSTP_PDU_RSTPMASK 0x7f /* strip unused RSTP flags */ 132197144Shrs#define BSTP_PDU_F_TC 0x01 /* Topology change */ 13398186Sgordon#define BSTP_PDU_F_P 0x02 /* Proposal flag */ 13498186Sgordon#define BSTP_PDU_F_L 0x10 /* Learning flag */ 13598186Sgordon#define BSTP_PDU_F_F 0x20 /* Forwarding flag */ 13698186Sgordon#define BSTP_PDU_F_A 0x40 /* Agreement flag */ 13798186Sgordon#define BSTP_PDU_F_TCA 0x80 /* Topology change ack */ 13898186Sgordon 13998186Sgordon/* 14098186Sgordon * Spanning tree defaults. 14198186Sgordon */ 14298186Sgordon#define BSTP_DEFAULT_MAX_AGE (20 * 256) 14398186Sgordon#define BSTP_DEFAULT_HELLO_TIME (2 * 256) 144146490Sschweikh#define BSTP_DEFAULT_FORWARD_DELAY (15 * 256) 14598186Sgordon#define BSTP_DEFAULT_HOLD_TIME (1 * 256) 14698186Sgordon#define BSTP_DEFAULT_MIGRATE_DELAY (3 * 256) 14798186Sgordon#define BSTP_DEFAULT_HOLD_COUNT 6 14898186Sgordon#define BSTP_DEFAULT_BRIDGE_PRIORITY 0x8000 14998186Sgordon#define BSTP_DEFAULT_PORT_PRIORITY 0x80 15098186Sgordon#define BSTP_DEFAULT_PATH_COST 55 15198186Sgordon#define BSTP_MIN_HELLO_TIME (1 * 256) 15278344Sobrien#define BSTP_MIN_MAX_AGE (6 * 256) 15378344Sobrien#define BSTP_MIN_FORWARD_DELAY (4 * 256) 15478344Sobrien#define BSTP_MIN_HOLD_COUNT 1 15578344Sobrien#define BSTP_MAX_HELLO_TIME (2 * 256) 15678344Sobrien#define BSTP_MAX_MAX_AGE (40 * 256) 15778344Sobrien#define BSTP_MAX_FORWARD_DELAY (30 * 256) 15878344Sobrien#define BSTP_MAX_HOLD_COUNT 10 15998186Sgordon#define BSTP_MAX_PRIORITY 61440 16078344Sobrien#define BSTP_MAX_PORT_PRIORITY 240 16178344Sobrien#define BSTP_MAX_PATH_COST 200000000 16278344Sobrien 16378344Sobrien/* BPDU message types */ 16478344Sobrien#define BSTP_MSGTYPE_CFG 0x00 /* Configuration */ 16578344Sobrien#define BSTP_MSGTYPE_RSTP 0x02 /* Rapid STP */ 16678344Sobrien#define BSTP_MSGTYPE_TCN 0x80 /* Topology chg notification */ 16778344Sobrien 16878344Sobrien/* Protocol versions */ 16978344Sobrien#define BSTP_PROTO_ID 0x00 17078344Sobrien#define BSTP_PROTO_STP 0x00 17178344Sobrien#define BSTP_PROTO_RSTP 0x02 172157473Sflz#define BSTP_PROTO_MAX BSTP_PROTO_RSTP 17378344Sobrien 17478344Sobrien#define BSTP_INFO_RECEIVED 1 17578344Sobrien#define BSTP_INFO_MINE 2 17678344Sobrien#define BSTP_INFO_AGED 3 17778344Sobrien#define BSTP_INFO_DISABLED 4 178157473Sflz 17998186Sgordon#define BSTP_MESSAGE_AGE_INCR (1 * 256) /* in 256ths of a second */ 18098186Sgordon#define BSTP_TICK_VAL (1 * 256) /* in 256ths of a second */ 18178344Sobrien#define BSTP_LINK_TIMER (BSTP_TICK_VAL * 15) 18298186Sgordon 18398186Sgordon/* 18498186Sgordon * Driver callbacks for STP state changes 185126286Smtm */ 18698186Sgordontypedef void (*bstp_state_cb_t)(struct ifnet *, int); 18798186Sgordontypedef void (*bstp_rtage_cb_t)(struct ifnet *, int); 18898186Sgordonstruct bstp_cb_ops { 18998186Sgordon bstp_state_cb_t bcb_state; 19098186Sgordon bstp_rtage_cb_t bcb_rtage; 191169668Smtm}; 192169668Smtm 193169668Smtm/* 194169668Smtm * Because BPDU's do not make nicely aligned structures, two different 19578344Sobrien * declarations are used: bstp_?bpdu (wire representation, packed) and 196169668Smtm * bstp_*_unit (internal, nicely aligned version). 197169668Smtm */ 198169668Smtm 199169668Smtm/* configuration bridge protocol data unit */ 200178776Smaximstruct bstp_cbpdu { 201178776Smaxim uint8_t cbu_dsap; /* LLC: destination sap */ 202178770Smtm uint8_t cbu_ssap; /* LLC: source sap */ 203169668Smtm uint8_t cbu_ctl; /* LLC: control */ 204178770Smtm uint16_t cbu_protoid; /* protocol id */ 205178770Smtm uint8_t cbu_protover; /* protocol version */ 206169668Smtm uint8_t cbu_bpdutype; /* message type */ 207178770Smtm uint8_t cbu_flags; /* flags (below) */ 208178775Smaxim 209169668Smtm /* root id */ 210169668Smtm uint16_t cbu_rootpri; /* root priority */ 211169668Smtm uint8_t cbu_rootaddr[6]; /* root address */ 212169668Smtm 213169668Smtm uint32_t cbu_rootpathcost; /* root path cost */ 214169668Smtm 215169668Smtm /* bridge id */ 216169668Smtm uint16_t cbu_bridgepri; /* bridge priority */ 21798186Sgordon uint8_t cbu_bridgeaddr[6]; /* bridge address */ 21898186Sgordon 21998186Sgordon uint16_t cbu_portid; /* port id */ 22098186Sgordon uint16_t cbu_messageage; /* current message age */ 22198186Sgordon uint16_t cbu_maxage; /* maximum age */ 22278344Sobrien uint16_t cbu_hellotime; /* hello time */ 22378344Sobrien uint16_t cbu_forwarddelay; /* forwarding delay */ 22498186Sgordon uint8_t cbu_versionlen; /* version 1 length */ 22578344Sobrien} __packed; 22678344Sobrien#define BSTP_BPDU_STP_LEN (3 + 35) /* LLC + STP pdu */ 227126285Smtm#define BSTP_BPDU_RSTP_LEN (3 + 36) /* LLC + RSTP pdu */ 22878344Sobrien 22978344Sobrien/* topology change notification bridge protocol data unit */ 230126285Smtmstruct bstp_tbpdu { 23178344Sobrien uint8_t tbu_dsap; /* LLC: destination sap */ 23278344Sobrien uint8_t tbu_ssap; /* LLC: source sap */ 233126285Smtm uint8_t tbu_ctl; /* LLC: control */ 234126285Smtm uint16_t tbu_protoid; /* protocol id */ 235126285Smtm uint8_t tbu_protover; /* protocol version */ 23678344Sobrien uint8_t tbu_bpdutype; /* message type */ 23778344Sobrien} __packed; 23898186Sgordon 23978344Sobrien/* 24078344Sobrien * Timekeeping structure used in spanning tree code. 24178344Sobrien */ 24278344Sobrienstruct bstp_timer { 24398186Sgordon int active; 24498186Sgordon int latched; 24578344Sobrien int value; 24698186Sgordon}; 24798186Sgordon 24878344Sobrienstruct bstp_pri_vector { 24978344Sobrien uint64_t pv_root_id; 25078344Sobrien uint32_t pv_cost; 25178344Sobrien uint64_t pv_dbridge_id; 25278344Sobrien uint16_t pv_dport_id; 25398186Sgordon uint16_t pv_port_id; 25478344Sobrien}; 25598186Sgordon 25678344Sobrienstruct bstp_config_unit { 25778344Sobrien struct bstp_pri_vector cu_pv; 258131061Smtm uint16_t cu_message_age; 25978344Sobrien uint16_t cu_max_age; 26078344Sobrien uint16_t cu_forward_delay; 26178344Sobrien uint16_t cu_hello_time; 26278344Sobrien uint8_t cu_message_type; 263139949Skeramida uint8_t cu_topology_change_ack; 26478344Sobrien uint8_t cu_topology_change; 26578344Sobrien uint8_t cu_proposal; 26698186Sgordon uint8_t cu_agree; 26778344Sobrien uint8_t cu_learning; 26878344Sobrien uint8_t cu_forwarding; 26978344Sobrien uint8_t cu_role; 27098186Sgordon}; 27178344Sobrien 27298186Sgordonstruct bstp_tcn_unit { 27398186Sgordon uint8_t tu_message_type; 27478344Sobrien}; 27578344Sobrien 27678344Sobrienstruct bstp_port { 27778344Sobrien LIST_ENTRY(bstp_port) bp_next; 27898186Sgordon struct ifnet *bp_ifp; /* parent if */ 27978344Sobrien struct bstp_state *bp_bs; 28098186Sgordon uint8_t bp_active; 28178344Sobrien uint8_t bp_protover; 28298186Sgordon uint32_t bp_flags; 28398186Sgordon uint32_t bp_path_cost; 28498186Sgordon uint16_t bp_port_msg_age; 28598186Sgordon uint16_t bp_port_max_age; 28698186Sgordon uint16_t bp_port_fdelay; 28798186Sgordon uint16_t bp_port_htime; 28898186Sgordon uint16_t bp_desg_msg_age; 28998186Sgordon uint16_t bp_desg_max_age; 29098186Sgordon uint16_t bp_desg_fdelay; 29198186Sgordon uint16_t bp_desg_htime; 29298186Sgordon struct bstp_timer bp_edge_delay_timer; 29398186Sgordon struct bstp_timer bp_forward_delay_timer; 29498186Sgordon struct bstp_timer bp_hello_timer; 29598186Sgordon struct bstp_timer bp_message_age_timer; 296155719Sceri struct bstp_timer bp_migrate_delay_timer; 29798186Sgordon struct bstp_timer bp_recent_backup_timer; 29898186Sgordon struct bstp_timer bp_recent_root_timer; 29998186Sgordon struct bstp_timer bp_tc_timer; 30098186Sgordon struct bstp_config_unit bp_msg_cu; 301157841Sflz struct bstp_pri_vector bp_desg_pv; 302157841Sflz struct bstp_pri_vector bp_port_pv; 303157841Sflz uint16_t bp_port_id; 30498186Sgordon uint8_t bp_state; 30598186Sgordon uint8_t bp_tcstate; 30698186Sgordon uint8_t bp_role; 30798186Sgordon uint8_t bp_infois; 30898186Sgordon uint8_t bp_tc_ack; 30998186Sgordon uint8_t bp_tc_prop; 31098186Sgordon uint8_t bp_fdbflush; 31198186Sgordon uint8_t bp_priority; 31298186Sgordon uint8_t bp_ptp_link; 31398186Sgordon uint8_t bp_agree; 31478344Sobrien uint8_t bp_agreed; 31598186Sgordon uint8_t bp_sync; 316170282Syar uint8_t bp_synced; 317170282Syar uint8_t bp_proposing; 318170282Syar uint8_t bp_proposed; 319170282Syar uint8_t bp_operedge; 320170282Syar uint8_t bp_reroot; 321170282Syar uint8_t bp_rcvdtc; 322170282Syar uint8_t bp_rcvdtca; 323170282Syar uint8_t bp_rcvdtcn; 324170282Syar uint32_t bp_forward_transitions; 325170282Syar uint8_t bp_txcount; 326170282Syar struct task bp_statetask; 327170282Syar struct task bp_rtagetask; 328170282Syar struct task bp_mediatask; 329170282Syar}; 330170282Syar 331170282Syar/* 332170282Syar * Software state for each bridge STP. 333170282Syar */ 334170282Syarstruct bstp_state { 335170282Syar LIST_ENTRY(bstp_state) bs_list; 336170282Syar uint8_t bs_running; 337170282Syar struct mtx bs_mtx; 338170282Syar struct bstp_pri_vector bs_bridge_pv; 339170282Syar struct bstp_pri_vector bs_root_pv; 34078344Sobrien struct bstp_port *bs_root_port; 34198186Sgordon uint8_t bs_protover; 342157841Sflz uint16_t bs_migration_delay; 34398186Sgordon uint16_t bs_edge_delay; 34498186Sgordon uint16_t bs_bridge_max_age; 345157841Sflz uint16_t bs_bridge_fdelay; 34698186Sgordon uint16_t bs_bridge_htime; 34798186Sgordon uint16_t bs_root_msg_age; 34898186Sgordon uint16_t bs_root_max_age; 34998186Sgordon uint16_t bs_root_fdelay; 350151426Sjhb uint16_t bs_root_htime; 35198186Sgordon uint16_t bs_hold_time; 35298186Sgordon uint16_t bs_bridge_priority; 353161435Syar uint8_t bs_txholdcount; 354161436Syar uint8_t bs_allsynced; 355157657Sflz struct callout bs_bstpcallout; /* STP callout */ 356161436Syar struct bstp_timer bs_link_timer; 357157657Sflz struct timeval bs_last_tc_time; 358157657Sflz LIST_HEAD(, bstp_port) bs_bplist; 359157657Sflz bstp_state_cb_t bs_state_cb; 360157657Sflz bstp_rtage_cb_t bs_rtage_cb; 36198186Sgordon struct vnet *bs_vnet; 36298186Sgordon}; 36398186Sgordon 36498186Sgordon#define BSTP_LOCK_INIT(_bs) mtx_init(&(_bs)->bs_mtx, "bstp", NULL, MTX_DEF) 365114272Smtm#define BSTP_LOCK_DESTROY(_bs) mtx_destroy(&(_bs)->bs_mtx) 36698186Sgordon#define BSTP_LOCK(_bs) mtx_lock(&(_bs)->bs_mtx) 36798186Sgordon#define BSTP_UNLOCK(_bs) mtx_unlock(&(_bs)->bs_mtx) 36898186Sgordon#define BSTP_LOCK_ASSERT(_bs) mtx_assert(&(_bs)->bs_mtx, MA_OWNED) 36998186Sgordon 37098186Sgordonextern const uint8_t bstp_etheraddr[]; 37198186Sgordon 37298186Sgordonvoid bstp_attach(struct bstp_state *, struct bstp_cb_ops *); 37398186Sgordonvoid bstp_detach(struct bstp_state *); 37498186Sgordonvoid bstp_init(struct bstp_state *); 375126286Smtmvoid bstp_stop(struct bstp_state *); 37698186Sgordonint bstp_create(struct bstp_state *, struct bstp_port *, struct ifnet *); 37798186Sgordonint bstp_enable(struct bstp_port *); 37898186Sgordonvoid bstp_disable(struct bstp_port *); 37998186Sgordonvoid bstp_destroy(struct bstp_port *); 38098186Sgordonvoid bstp_linkstate(struct bstp_port *); 38198186Sgordonint bstp_set_htime(struct bstp_state *, int); 38298186Sgordonint bstp_set_fdelay(struct bstp_state *, int); 38398186Sgordonint bstp_set_maxage(struct bstp_state *, int); 38498186Sgordonint bstp_set_holdcount(struct bstp_state *, int); 38598186Sgordonint bstp_set_protocol(struct bstp_state *, int); 38698186Sgordonint bstp_set_priority(struct bstp_state *, int); 38798186Sgordonint bstp_set_port_priority(struct bstp_port *, int); 38898186Sgordonint bstp_set_path_cost(struct bstp_port *, uint32_t); 38978344Sobrienint bstp_set_edge(struct bstp_port *, int); 39098186Sgordonint bstp_set_autoedge(struct bstp_port *, int); 39198186Sgordonint bstp_set_ptp(struct bstp_port *, int); 39298186Sgordonint bstp_set_autoptp(struct bstp_port *, int); 39398186Sgordonvoid bstp_input(struct bstp_port *, struct ifnet *, struct mbuf *); 39478344Sobrien 39598186Sgordon#endif /* _KERNEL */ 39698186Sgordon