EasyManua.ls Logo

Cisco 11503 - CSS Content Services Switch

Cisco 11503 - CSS Content Services Switch
392 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8-59
Cisco Content Services Switch Administration Guide
OL-5647-02
Chapter 8 Using the CSS Scripting Language
Script Keepalive Examples
! Send the GET request for the web page, along with the authorization
! This builds a header block like so:
!
! GET /index.html HTTP/1.0\r\n
! Authorization: Basic bGFiOmxhYnRlc3Qx\r\n\r\n
set EXIT_MSG “Send: Failed”
socket send ${SOCKET} “GET ${WebPage} HTTP/1.0\n”
socket send ${SOCKET} “Authorization: Basic “
socket send ${SOCKET} “${UserPass}” base64
socket send ${SOCKET} “\n\n”
! Wait for a good status code
set EXIT_MSG “Waitfor: Failed”
socket waitfor ${SOCKET} “200 OK”
no set EXIT_MSG
socket disconnect ${SOCKET}
exit script 0
DNS Keepalive
!no echo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Filename: ap-kal-dns
! Parameters: Server DomainName
!
! Description:
! This script will resolve a domain name from a specific DNS
! server. This builds a UDP packet based on RFC-1035
!
! Failure Upon:
! 1. Not resolving the hosts's IP from the domain name
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if ${ARGS}[#] “NEQ” “1”
echo “Usage: ap-kal-finger \'Hostname\'”
exit script 1
endbranch
set HostName “${ARGS}[1]
! Connect to the remote host
set EXIT_MSG “Connection failed”
socket connect host ${HostName} port 53 udp

Table of Contents

Other manuals for Cisco 11503 - CSS Content Services Switch

Related product manuals