Example #1
0
        public Port(MAC mac, Port destinationPort, int time)
        {
            this.mac = mac;
            this.destinationPort = destinationPort;
            if (destinationPort != null) {
                this.Time = time;
            } else {
                this.Time = int.MaxValue;
            }

            bpdus = new Queue<BPDU>();
        }
Example #2
0
        public Port(MAC mac, Port destinationPort, int time)
        {
            this.mac = mac;
            this.state = State.Designated;
            this.destinationPort = destinationPort;
            if (destinationPort != null) {
                this.time = time;
                destinationPort.destinationPort = this;
                destinationPort.time = time;
                isEnabled = false;
            } else {
                this.time = int.MaxValue;
                isEnabled = false;
            }

            bpdus = new Queue<BPDU>();
        }