diff options
author | Marty Connor | 2010-01-17 03:47:39 +0100 |
---|---|---|
committer | Marty Connor | 2010-01-17 03:47:39 +0100 |
commit | 330abebddf67ab27998f64070f27d5874cbc7b06 (patch) | |
tree | 08f5954725930ee9c38b0afab4cb9a30c71ce7e3 /contrib/p910nd-0.8/client.pl | |
parent | [sanboot] Prevent leaking a stack reference for "keep-san" AoE (diff) | |
download | ipxe-330abebddf67ab27998f64070f27d5874cbc7b06.tar.gz ipxe-330abebddf67ab27998f64070f27d5874cbc7b06.tar.xz ipxe-330abebddf67ab27998f64070f27d5874cbc7b06.zip |
[contrib] Move most contrib content to a separate repository
Most of the content that was previously in this directory has been
moved to a separate git repository:
http://git.etherboot.org/?p=contrib.git;a=summary
or the Etherboot Project wiki:
http://etherboot.org/
Diffstat (limited to 'contrib/p910nd-0.8/client.pl')
-rwxr-xr-x | contrib/p910nd-0.8/client.pl | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/contrib/p910nd-0.8/client.pl b/contrib/p910nd-0.8/client.pl deleted file mode 100755 index 0b0e4c36..00000000 --- a/contrib/p910nd-0.8/client.pl +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/perl - -# edit this to the printer hostname -$them = 'ken'; -$port = 9101; - -open(STDIN, "$ARGV[0]") if $#ARGV >= 0; - -use Socket; -#use Sys::Hostname; - -#$hostname = hostname; - -($name, $aliases, $proto) = getprotobyname('tcp'); -($name, $aliases, $port) = getservbyname($port, 'tcp') - unless $port =~ /^\d+$/; - -#$thisaddr = inet_aton($hostname); -#defined($thisaddr) or &errexit("inet_aton: cannot resolve $hostname\n"); - -$thataddr = inet_aton($them); -defined($thataddr) or &errexit("inet_aton: cannot resolve $them\n"); - -socket(S, PF_INET, SOCK_STREAM, $proto) or &errexit("socket: $!\n"); - -#$this = sockaddr_in(0, $thisaddr); -#bind(S, $this) || &errexit("bind: $!\n"); - -$that = sockaddr_in($port, $thataddr); -connect(S, $that) || &errexit("connect: $!\n"); - -select(S); $| = 1; select(STDOUT); - -$buffer = ''; -while (1) -{ - $rin = ''; - vec($rin, fileno(S), 1) = 1; - $nfound = select($rout=$rin, $wout=$rin, undef, undef); - if (vec($rout, fileno(S), 1)) { - print STDERR "$buffer\n" if - defined($nread = sysread(S, $buffer, 8192)); - } - if (vec($wout, fileno(S), 1)) { - $nread = read(STDIN, $buffer, 8192); - last if $nread == 0; - &errexit("write: $!\n") unless - defined($written = syswrite(S,$buffer,$nread)); - } -} -close(S); -exit 0; - -sub errexit -{ - print STDERR @_; - exit 2; -} |