Jan 132018
 
RbSb uses the XMODEM and YMODEM error correcting protocols to receive files over a serial port from a variety of programs running under PC-DOS, CP/M, *nix, and other operating systems.
File V_RB_SB.ZIP from The Programmer’s Corner in
Category C Source Code
RbSb uses the XMODEM and YMODEM error correcting protocols to receive files over a serial port from a variety of programs running under PC-DOS, CP/M, *nix, and other operating systems.
File Name File Size Zip Size Zip Type
VMODEM.H 926 465 deflated
VRBSB.DOC 11491 3858 deflated
VVMODEM.C 6418 2154 deflated
VVRB.C 16315 5921 deflated
VVSB.C 11826 4432 deflated

Download File V_RB_SB.ZIP Here

Contents of the VRBSB.DOC file





RRRRBBBB((((1111)))) XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmmVVVV ((((OO



NNNNAAAAMMMMEEEE
rb - X/YMODEMbatch file receive

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
rrbb [ --11bbqquuvv ]

rrbb [ --11bbccqquuvv ] _f_i_l_e

[[--]][[vv]]rrbbCCOOMMMMAANNDD

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
RRbb uses the XMODEM and YMODEMerror correcting protocols to
receive filesover a serial port froma variety of programs
running underPC-DOS,CP/M, *nix, andother operating
systems.

The first form of rrbb (ReceiveBatch) receivesfiles with
YMODEM batch protocol. Rb accepts either standard 128 byte
sectors or 1024 byte sectors (YAM kk option).The user
should determine experimentally the conditions under which
use of 1k blocks actually improves throughputwithout
causing problems.

Normally, thefile contents are converted to Unix
conventions by stripping carriage returns andall characters
beginning with Control Z (CP/M end offile).If the raw
pathname endsin ".A", ".ARC", ".CCC", ".CL",".CMD",
".COM", ".CRL", ".DAT", ".DIR", ".EXE", ".O",".OBJ",
".OVL", ".PAG", ".REL", ".SAV", ".SUB", ".SWP", ".SYS",
".TAR", ".UTL", ".a",".o", ".tar", or if thefirst packet
contains datathat suggest a binary file (parity bitsor
characters inthe range 000 to 006 before thefirst ^Z), or
if the file mode is transmitted and the 0100000 (most
significant) bit is set, thatfile will be received in
binary mode anyway. Otherwise, if the raw pathname ends in
.MSG,or .TXT, an existing file will be appended to rather
than replaced.

If extended file information (file length, etc.) is
received, thefile length controls the numberof bytes
written to the outputdataset, and the modifytime and file
mode (iff nonzero) are set accordingly.

If noextended file information is received, slashes in the
pathname are changed to underscore, and any trailing period
in the pathname is eliminated. Normally, each file name is
converted to lower case unless it contains one or more lower
case letters.

If rbis invoked withstdout and stderr to different
datasets, Verbose is set to 2, causing frame by frame
progress reports to stderr. This maybe disabled with the qq



Page 1 (printed 1/27/86)






RRRRBBBB((((1111)))) XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmmVVVV ((((OO



option.

The second form of rrbbreceives a single _f_i_l_e with XMODEM
protocol. The user must supply the file nameto both
sending and receivingprograms.

In the third form, rrbbis invoked as rrbbCCOOMMMMAANNDD(with an
optional leading - asgenerated by login(1)). For each
received file, rb will pipe the file to ``COMMAND filename''
wherefilename is thename ofthe transmittedfile with the
file contentsas standard input.

The file transfer is completed when COMMAND exits with 0
status. A non zero exit status terminates the transfer.

A typical usefor this form is _r_b_r_m_a_i_l which calls rmail(1)
to post mail to the user specified bythe transmittedfile
name. For example, sending the file "caf" from a PC-DOS
system to _r_b_r_m_a_i_l on a Unix system would result in the
contents of the DOS file "caf" being mailed to user "caf".

On some Unix systems,the login directory must contain a
link to COMMAND as login setsSHELL=rsh whichdisallows
absolute pathnames. If invoked with a leading ``v'' rb will
report progress to LOGFILE. The following entry works for
Unix 3.0:
rbrmail::5:1::/bin:/usr/local/rbrmail
If the SHELL environment variable includes _r_s_h or _r_k_s_h

(restricted shell), rb will not accept absolute pathnames or
references toa parent directory, will not modify an
existing file, and removes any files receivedin error.


The meanings of the availableoptionsare:

11 Use filedescriptor 1 for ioctlsand reads (Unixonly).
By default, filedescriptor 0 isused. This option
allows rrbb to be used with the _c_u~$ command.
bb Transferall files in binary (tell it like it is) mode.
This option disables file append.
cc Request 16 bit CRC (single file transfers default to 8
bit checksum).
qq Quiet suppressesverbosity.
vv _V_e_r_b_o_s_e causes alist offile names to be appended to
/tmp/rblog . More v's generate more output.
uu Retain upper case letters in file names
unconditionally.

EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS






Page 2 (printed 1/27/86)






RRRRBBBB((((1111)))) XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmmVVVV ((((OO



( Unix command)
$ _r_b
rb: ready C
(Pro-YAM command)
<_A_L_T-_2>
YAM Command: _s_b *._h *._c

SSSSEEEEEEEE AAAALLLLSSSSOOOO
YMODEM.DOC, IMP(CP/M), cu(1),Professional-YAM manual,
sb(omen), usq(omen), undos(omen)

Compile time options requiredfor various operating systems
are describedin the rbsb.c source file.

BBBBUUUUGGGGSSSS
Pathnames arerestricted to 127 characters. In XMODEM
single file mode, thepathname given on the command line is
stillprocessed as described above. The CR/LF to NL
translation merely deletes CR's; undos(omen) performsa more
intelligent translation.

VVVVMMMMSSSS VVVVEEEERRRRSSSSIIIIOOOONNNN
Some of the #includeswith file namesenclosed with angle
brackets <> may need to have the angle brackets changed to
"", or vice versa.

The VMS version does not set binary mode according tothe
incoming filetype. Non binary file processing consists of
stripping allcharacters beginning with CPMEOF (^Z).

The VMS version does not set the filetime.

VMS sometimesloses incoming characters, resulting in
retries and degradation of throughput.

The VMS C standard i/o package and RMS sometimes interact to
modify file contents unexpectedly.

The VMS version does not support invocation as rrbbCCOOMMMMAANNDD ..
















Page 3 (printed 1/27/86)






SSSSBBBB((((1111)))) XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmmVVVV ((((OO



NNNNAAAAMMMMEEEE
sb - X/YMODEMBatch file Send

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ssbb [ --11ddffkkqquuvv] _f_i_l_e ...
ssbb --XX[ --11kkqquuvv ] _f_i_l_e

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
SSbb uses the XMODEM and YMODEMerror correcting protocols to
send files over a serial portto a variety ofprograms
running underPC-DOS,CP/M, *nix, andother operating
systems.

The first form of ssbb sends one or more files with YMODEM
batchprotocol. Normally, only the file namepart ofthe
pathname is transmitted. On Unix systems, additional
information about thefile istransmitted. If the receiving
program uses this information, the transmitted file length
controls the exact number of bytes written tothe output
dataset, and the modify time and filemode are set
accordingly.

The second form of ssbbuses the --XX flag to send a single _f_i_l_e
with XMODEM protocol. The user must supply the file name to
both sending and receiving programs.

If sbis invoked withstdout and stderr to different
datasets, Verbose is set to 2, causing frame by frame
progress reports to stderr. This maybe disabled with the qq
option.

Iff sb is invoked with $SHELLset andiff that variable
contains the string _r_s_h or _r_k_s_h (restricted shell), sb
operates in restricted mode.Restricted moderestricts
pathnames to the current directory and PUBDIR
(conventionally, /usr/spool/uucppublic) and/or
subdirectories thereof.

Unix ssbb supports YMODEM-g with "cbreak" tty mode, XON/XOFF
flow control,and theinterrupt character setto CAN.
YMODEM-g (Pro-YAM gg option) increasesthroughput overerror
free channels(directconnection, X.PC, etc.)by not
acknowledgingeach transmitted sector.

The meanings of the availableoptionsare:

11 Use filedescriptor 1 for ioctlsand reads (Unixonly).
By default, filedescriptor 0 isused. This option
allows ssbb to be used with the _c_u^$ command.
XX (XMODEM protocol) Send asingle file without the
filenamepacket.
dd Change all instances of "." to "/" in the transmitted



Page 1 (printed 1/27/86)






SSSSBBBB((((1111)))) XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmmVVVV ((((OO



pathname. Thus,C.omenB0000 (which is unacceptable to
MSDOS orCP/M) is transmitted asC/omenB0000. If the
resultant filename has more than8 characters inthe
stem, a "." in inserted to allowa totalof eleven.
ff Send Full pathnname. Normally directoryprefices are
strippedfrom the transmitted filename.
kk Send files using1024 byte blocks ratherthan the
default 128 byteblocks. 1024 byte packets speed file
transfers at high bit rates.
qq Quiet suppressesverbosity.
uu Unlink the file after successfultransmission.
vv _V_e_r_b_o_s_e causes alist offile names to be appended to
/tmp/sblog . More v's generate more output.

EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
(Unixcommand)
$ _s_b -_k *._c
(Pro-YAM command)
<_F_3>
(8-bit YAM Commands)
^_E
>>>c: _r_t

SSSSEEEEEEEE AAAALLLLSSSSOOOO
rb(omen), YMODEM.DOC,Professional-YAM manual, IMP(CP/M),
cu(1), sq(omen), todos(omen),tocpm(omen), tomac(omen)

Compile time options requiredfor various operating systems
are describedin the rbsb.c source file.

BBBBUUUUGGGGSSSS
On VMS, some of the #includeswith file namesenclosed with
anglebrackets <> mayneed tohave the angle brackets
removed, or vice versa.

The VMS version does not transmit thefile date.

The VMS version does not recognize YMODEM-g.

The VMS version calculates the file length byreadingthe
file and counting thebytes.

When VMS is lightly loaded, the response timemay be too
quickfor MODEM7 unless the MODEM7 qq modifieris used.

The VMS C standard i/o package and RMS sometimes interact to
modify file contents unexpectedly.








Page 2 (printed 1/27/86)





 January 13, 2018  Add comments

Leave a Reply