258
User Guide Integrated Lights-Out
Net::SSLeay::connect($ssl) and
die_if_ssl_error("ERROR: ssl connect");
print STDERR 'SSL Connected ';
print 'Using Cipher: ' .
Net::SSLeay::get_cipher($ssl) if $debug;
print STDERR "\n\n";
# usage: sendscript(host, script)
sub sendscript($$)
{
$ssl = openSSLconnection($host);
# write header
$n = Net::SSLeay::ssl_write_all($ssl, $script);
$reply = "";
return $ssl;
}
Sending the XML Header and Script Body
After the connection is established, the first line of script sent must be an XML
document header, which tells the device's HTTPS Web server that the following
content is an XML script. The header must match the header used in the example
exactly. After the header has been completely sent, the remainder of the script
can be sent. In this example, the script is sent all at once. For example:
# sends the xmlscript script to host, returns reply
my $host = shift;
my $script = shift;
my ($ssl, $reply, $lastreply, $res, $n);
$n = Net::SSLeay::ssl_write_all($ssl, '<?xml
version="1.0"?>'."\r\n");
rint "Wrote $n\n" if $debug;
# write script
READLOOP:
print "Wrote $n\n$script\n" if $debug;
$lastreply = "";
while(1)
{
Summary of Contents for HP Integrated Lights-Out
Page 1: ...HP Integrated Lights Out User Guide July 2004 Sixth Edition Part Number 238882 006 ...
Page 20: ......
Page 134: ......
Page 142: ......
Page 192: ......
Page 222: ......
Page 232: ...232 User Guide Integrated Lights Out ...
Page 240: ......
Page 268: ......
Page 362: ......
Page 406: ......