Example Programs
The following programs are examples of remote control and file
transfer from within a program on a UNIX system using the
socket interface.
The first demonstrates using the Berkeley socket interface and
remotely controlling Diskus over Ethernet.
There can only be one connection (to Diskus rlogin) open at a
time, so if the connect call times out there must be another
connection open.
The program makes no attempt to interpret or dispose of any
output from Diskus: this is just being buffered up. This should
not prove to be a problem, since there is no echo, unless the rlogin
was opened with the string
\0simon\0simon\0sun/9600\0
.
rlogin turns off echo if the terminal speed parameter is omitted.
The second program demonstrates transferring a YUV image
directly into Diskus from a program, simulating the operation of
the rcp command. The program contains code for copying
multiple images over same socket. This saves the overhead of
establishing the connection each time. In this case we talk to the
‘login’ port on Diskus, because the shell port closes the connection
at the end of each transfer.
Note that this program will not copy to a UNIX host: it bypasses
the normal access permissions required by UNIX, and relies on
the fact that Diskus does not require a reserved originating socket
number below 1024. The program normally has to be running as
root to bind to a privileged socket.
File Formats
Diskus Technical Guide
12-16
Appendix
9100-0217-02 - SEP 95
Summary of Contents for Diskus
Page 1: ...Diskus Digital Disk Recorder Manual ...
Page 477: ...NOTES Diskus Operations Index 9100 0217 02 SEP 95 Index xvii ...
Page 478: ...NOTES Index Diskus Operations xviii Index 9100 0217 02 SEP 95 ...
Page 479: ...NOTES Diskus Operations Index 9100 0217 02 SEP 95 Index xix ...
Page 480: ...NOTES Index Diskus Operations xx Index 9100 0217 02 SEP 95 ...