10-4
Catalyst 6500 Series Content Switching Module Configuration Note
OL-4612-01
Chapter 10 Configuring CSM Scripts
Configuring TCL Scripts
UDP Commands
The UDP command set allows Scotty based TCL scripts to run on the CSM. Scotty is the name of a
software package that allows you to implement site-specific network management software using
high-level, string-based APIs.
Table 10-2 TCL Commands Not Supported by the CSM
Generic TCL Commands
cd fcopy file open
seek source tell filename
load package
Ta b l e 1 0 - 3
Command Definition
udp open [port] Opens a UDP datagram socket and returns a UDP handle. The
socket is bound to given port number or name. An unused port
number is used if the port argument is missing.
udp connect host port Opens a UDP datagram socket and connects it to a port on a
remote host. A connected UDP socket only allows sending
messages to a single destination. This usually allows shortening
the code because there is no need to specify the destination
address for each udp send command on a connected UDP
socket. The command returns a UDP handle.
udp send handle [host port] message Sends a datagram containing a message to the destination
specified by host and port. The host and port arguments may not
be used if the UDP handle is already connected to a transport
endpoint. If the UDP handle is not connected, you must use
these optional arguments to specify the destination of the
datagram.
udp receive handle Receives a datagram from the UDP socket associated with
handle. This command blocks until a datagram is ready to be
received. In most cases, it might be a good idea to check for
pending datagrams using the udp bind command.
udp close handle Closes the UDP socket associated with handle.
udp bind handle readable [script]
udp bind handle writable [script]
Allows binding scripts to a UDP handle. A script is evaluated
once the UDP handle becomes either readable or writable,
depending on the third argument of the udp bind command.
The script currently bound to a UDP handle can be retrieved by
calling the udp bind command without a script argument.
Bindings are removed by binding an empty string.
udp info [handle] Without the handle argument this command returns a list of all
existing UDP handles. Information about the state of a UDP
handle can be obtained by supplying a valid UDP handle. The
result is a list containing the source IP address, the source port,
the destination IP address and the destination port.