8-65
Cisco Content Services Switch Administration Guide
OL-5647-02
Chapter 8 Using the CSS Scripting Language
Script Keepalive Examples
! Connect to the remote host (use default timeout)
socket connect host ${HostName} port 389 tcp 2000
set EXIT_MSG “Send: Failure”
! Send a Bind Request to the remote host. This is simply a standard !
“capture” of a bind request in hex. This should work for all standard
! version 3 LDAP servers. socket send ${SOCKET}
“300c020102600702010204008000” raw
set EXIT_MSG “Receive: Failure”
! Expect to receive a standard response from the host. This should !
be equal to a SUCCESS response code: socket waitfor ${SOCKET} “0a0100”
2000 raw
set EXIT_MSG “Send: Failure”
! Send an exit “Unbind Request” to the remote host so that they ! are
not left hanging. socket send ${SOCKET} “30050201034200” raw
no set EXIT_MSG
socket disconnect ${SOCKET}
exit script 0