ixStopPortCollisions

ixStopPortCollisions - stop collisions on an individual port

SYNOPSIS

ixStopPortCollisions chassisID cardID portID

DESCRIPTION

The ixStopPortCollisions command stops collisions on a single port.

ARGUMENTS
chassisID

(By value) The ID number of the chassis.

cardID

(By value) The ID number of the card.

portID

(By value) The ID number of the port.

RETURNS
0

No error; the command was successfully delivered to the IxServer.

1

Error; the command was delivered to the IxServer but it could not process the message.

EXAMPLES

package require IxTclHal

set host galaxy

set username user

# Check if we're running on UNIX - connect to the TCL Server

# which must be running on the chassis

if [isUNIX] {

if [ixConnectToTclServer $host] {

ixPuts "Could not connect to $host"

return 1

}

}

# Now connect to the chassis

if [ixConnectToChassis $host] {

ixPuts $::ixErrorInfo

return 1

}

# Get the chassis ID to use in port lists

set chas [ixGetChassisID $host]

set cardA 1

set portA 1

set cardB 1

set portB 2

set portList [list [list $chas $cardA $portA] [list $chas $cardB $portB]]

# Login before taking ownership

if [ixLogin $username] {

ixPuts $::ixErrorInfo

return 1

}

# Take ownership of the ports we'll use

if [ixTakeOwnership $portList] {

ixPuts $::ixErrorInfo

return 1

}

# Set up mapping

map new -type one2one

map config -type one2one

map add $chas $cardA $portA $chas $cardB $portB

map add $chas $cardB $portB $chas $cardA $portA

# Set up ports to 10Mbps and half duplex

port setDefault

port config -autonegotiate false

port config -duplex half

port config -speed 10

port set $chas $cardA $portA

port set $chas $cardB $portB

# Configure forced collisions

forcedCollisions setDefault

forcedCollisions config -enable 1

forcedCollisions config -consecutiveNonCollidingPackets 9

forcedCollisions set $chas $cardA $portA

forcedCollisions set $chas $cardB $portB

# Configure the streams to transmit at 50%

stream setDefault

stream config -percentPacketRate 50

stream config -rateMode usePercentRate

stream set $chas $cardA $portA 1

stream set $chas $cardB $portB 1

# Write config to hardware, check the link state and clear statistics

# Error checking omitted for brevity

ixWritePortsToHardware one2oneArray

after 1000

ixCheckLinkState one2oneArray

ixClearStats one2oneArray

ixStartStaggeredTransmit one2oneArray

after 1000

ixStartCollisions ::one2oneArray

after 1000

if {[ixStopPortCollisions $chas $cardA $portA] != 0} {

ixPuts "Could not stop collisions on $chas:$cardA:$portA"

}

if {[ixStopPortCollisions $chas $cardB $portB] != 0} {

ixPuts "Could not stop collisions on $chas:$cardB:$portB"

}

# Let go of the ports that we reserved

ixClearOwnership $portList

# Disconnect from the chassis we're using

ixDisconnectFromChassis $host

# If we're running on UNIX, disconnect from the TCL Server

if [isUNIX] {

ixDisconnectTclServer $host

}

SEE ALSO

ixStartCollisions, ixStopCollisions, ixStartPortCollisions