1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
|
Network Working Group R. Troth
Request for Comments: 1440 Rice University
July 1993
SIFT/UFT: Sender-Initiated/Unsolicited File Transfer
Status of this Memo
This memo defines an Experimental Protocol for the Internet
community. It does not specify an Internet standard. Discussion and
suggestions for improvement are requested. Please refer to the
current edition of the "IAB Official Protocol Standards" for the
standardization state and status of this protocol. Distribution of
this memo is unlimited.
1. Introduction
This document describes a Sender-Initiated File Transfer (SIFT)
protocol, also commonly called Unsolicited File Transfer (UFT)
protocol. The acronyms SIFT and UFT are synonymous throughout this
document. The term "unsolicited" does not imply that the file is
unwanted, but that the receiver did not initiate the transaction.
Sender-Initiated File Transfer contrasts with other file transfer
methods in that the sender need not have an account or any
registration on the target host system, and the receiving user may
have less steps to take to retrieve the file(s) sent. Unlike
traditional file transfer, UFT lends itself handily to background or
deferred operation, though it may be carried out immediately, even
interactively.
2. Rationale
In certain non-IP networks, notably NJE based networks such as
BITNET, it is possible to send a file to another user outside of the
realm of "mail". The effect is that the file sent is not perceived
as correspondence and not processed by a mail user agent. This
convenient service is missed in the standard TCP/IP suite. The
author maintains that traditional electronic mail is not suited to
non-correspondence file transfer. There should be a means of sending
non-mail, analogous to the sending of parcels rather than surface
mail. Several groups and individuals have shown an interest in this
type of service.
Troth [Page 1]
^L
RFC 1440 SIFT/UFT July 1993
3. Specification
We define sender-initiated file transfer for IP as a TCP service as
follows: a receiver program (the server or "daemon") listens on port
608 for inbound connections. Client programs connect to this port
and send a sequence of commands followed by a stream of data. The
entire job stream may be thought of as the concatenation of two
files, 1) a control file, and 2) a data file, where the control file
is plain text and the data file may be any of several formats, but is
stored and sent as binary. After each command, the receiver either
ACKs (signals positive acknowledgement) or NAKs (signals negative
acknowledgement). The target host may reject a file for various
reasons, most obvious being 1) that there is no local user matching
the intended user, or 2) that there is not enough space to hold the
incoming file.
Most UFT commands are parametric. That is, they don't necessarily
invoke an action as much as change parameters of the one action,
transfer of the file(s) being sent. This means that UFT is suitable
for encapsulation in some higher-level "envelope", such as mail.
However, the obvious prefered medium for UFT is TCP.
When files arrive at the destination host, they are kept in a public
area, say /usr/spool/uft, until accepted or rejected by the recipient
user or discarded for age by the system. This staging area is public
in the sense of shared space, not unrestricted access. Exactly how
long files may remain unprocessed and exactly how large these
transient files may be is a local administrative or implementation
decision.
But not all hosts have IP connectivity; not all hosts will want to
put up yet another server; not all hosts will be on the unrestricted
side of a "fire wall" that only passes mail. In such cases, UFT may
be transported via MIME (Multipurpose Internet Mail Extensions) as
Content-Type: application/octet-stream. UFT commands then become
parameters to the Content-Type field and the data file is carried as
the mail body. While the data file is carried in raw (binary) form
over TCP, it is encoded in BASE64 when carried by mail.
UFT supports several representation types. The receiving host should
accept any file type sent. If the representation type is not
meaningful to the target host system, then it should be treated as
"binary" (image). The data file (body) should be processed as little
as possible until the target user (recipient) acts to accept
(receive) it. The commands from the client may be stored in the form
of a plain-text file so that processing otherwise foreign to the
receiver may be off-loaded from the TCP listener. So there are
actually two files: the command sequence and the file body.
Troth [Page 2]
^L
RFC 1440 SIFT/UFT July 1993
Job Entry capability:
The target "user" may actually be no user at all, but may be the
name of some software service engine. An example of this is the
job entry queue available as a pseudo-user on many NJE networked
hosts.
4. Essential commands and Syntax:
FILE size sender [auth]
USER recipient
TYPE type [parm]
Representation Types:
TYPE A ASCII, CR/LF (0D/0A)
B binary (image; octet stream)
C ASCII, CC, CR/LF (ASA print)
U unformatted (binary; image)
V var-length records (16 bit)
W wide var-len records (32 bit)
X extra-wide var-length (64 bit)
I image (binary; octet stream)
E EBCDIC, NL (15)
F reclen fixed-length records (binary)
N NETDATA
M ASCII, mail
Additional Parameters:
NAME filename
DATE date time [time-zone]
CLASS class
FORM paper-form-code or print-stock-code
DEST destination
DIST | BIN | BOX distribution-code or mail-stop
FCB | CTAPE forms-control-buffer or carriage-tape
UCS | CHARSET | TRAIN print-train or character-set
LRECL logical-record-length
RECFM record-format
Troth [Page 3]
^L
RFC 1440 SIFT/UFT July 1993
BLKSIZE block-size
MODE file access permissions
File disposition commands:
DATA [burst-size]
EOF
ABORT
QUIT
5. Details:
Commands consist of command words, possibly followed by tokens
delimited by white space. Command lines are ASCII terminated by
CR/LF. White space may be composed of any mixture of blanks or tab
characters, but use of ordinary blank space (ASCII 0x20) is strongly
recommended.
One connection (one socket) is used for both commands and data.
While a data burst is being received, command interpretation is
suspended. Command lines are read until CR/LF; data bursts are read
until burst-size number of octets are received, at which point
command interpretation is resumed. After data transmission has
begun, the only commands valid are DATA, EOF, ABORT and QUIT. EOF
causes the server to close the file at the receiving end and return
to normal command processing. ABORT signals that the client wishes
to discard a file partially transmitted. QUIT closes any open file,
closes the connection, and can appear anywhere in the job.
For the daring, a "fast" mode is available. If the burst-size token
is omitted from the DATA command, processing switches to data mode
and the stream is read until the client closes the connection. In
this case there is no EOF or QUIT command sent. NOTE: with the
former mode of operation, the connection may remain open indefinitely
passing multiple files, while in this latter case the connection must
close to terminate the transaction.
Acknowledgement is by simple "NULL ACK". A server accepts a command
by sending a single packet back to the client that starts with a NULL
character, decimal 0. Anything else may be considered negative
acknowledgement, and the client should close the connection. Any
characters following the NULL may be ignored. An ACK response packet
may signal only one acknowledgement.
When a client first connects to a server, the server immediately
Troth [Page 4]
^L
RFC 1440 SIFT/UFT July 1993
sends a herald of the form:
xxx hostname UFT 1.0 server-version xxx
where "xxx" represents arbitrary data. The first "xxx" must be a
single blank delimited token. 1.0 is the protocol version. Hostname
is the IP name of the host where this server is running. Server-
version is the name and level of UFT server code on this host.
A US English server might send:
100 ricevm1.rice.edu UFT 1.0 VM/CMS-0.9.2 ready.
The purpose of this herald is partly for client/server
synchronization, but mainly for protocol agreement. There may be
future versions of UFT beyond 1.0 which support more features than
are outlined here. The herald indicates what level of UFT the server
will accept.
The FILE Command:
FILE size from [auth]
The size is in bytes and may be followed by an 'M', 'K', or 'G',
indicating Mega, Kilo, or Giga. Size may be an inexact value (the
data file will be read until one of the above end-of-file indications
is received). The size specified is used to answer the question, "is
there room for it?"
The from token is the login name of the user sending this file.
The auth token is an unimplemented authentication ticket.
Authentication is not ensured in the protocol as described. There
are several ways that it might be added to UFT over TCP, but this
author will wait for authentication developments by others to come to
fruition before implementing any. When UFT is piggy-backed on mail,
authentication is left to the mail transfer system.
The FILE command is required in any transaction.
The USER Command:
USER recipient
The recipient is a valid local user or service name.
The USER command is required in any transaction. Without it, the
destination of the file is unknown.
Troth [Page 5]
^L
RFC 1440 SIFT/UFT July 1993
The TYPE Command:
TYPE type [parm]
Some representation types need additional specification. As an
example, the type "F" (fixed length, record oriented) obviously needs
more qualification. How long are these fixed length records? A
record length in ASCII decimal should follow the "F" resulting in a
command like "TYPE F 80".
UFT types V, W, X use a tape model for file transfer. Files in
transit consist of blocks that vary in size based on the range of
sizes specifiable with 16, 32, or 64 bits, respectively. Whether the
blocking is significant to the recipient is the decision of the
recipient, but if the file originally had some kind of blocking, it
is preserved without additional processing. In the stream, the 16,
32, or 64-bit block length is prepended to each record in TCP/IP
network order.
Type N (NETDATA) is an IBM representation common on NJE networks.
The TYPE command is required in any transaction.
The NAME Command:
NAME filename
A name should typically be associated with the file being sent,
although this is not mandatory. This is a mixed case token
delimitted by white space. If the filename contains blanks or white
space, it must be quoted. Quotation is not valid within the
filename. ASCII control characters (hex 00 thru 1F and 80 thru 9F)
are not valid as part of the filename. Some characters may have
special meaning to the receiving operating system and their effect is
not guaranteed.
The NAME command is optional.
The DATE Command:
DATE date time [time-zone]
The time stamp on the file as it appears at the sending site may be
sent and applied to the copy at the receiving site. The form is US
mm/dd/yy and hh:mm:ss. A time zone is optional. If the time zone is
omitted, local time is assumed. If the DATE command is omitted, time
and date of arrival are assumed.
Troth [Page 6]
^L
RFC 1440 SIFT/UFT July 1993
The DATE command is optional.
The DATA Command:
DATA [burst-size]
If no data bursts have yet been received since the connection was
opened or since an EOF or ABORT was received, the server opens a new
file on the receiving end and writes this burst of data to it. The
file may have already been created by a prior DATA command. There
can be any number of DATA commands; most files will be sent using
many data bursts. If burst-size is supplied, then burst-size number
of octets are read and appended to the open file on the receiving end
and the server returns to the command state. If no burst-size
parameter is given, then the TCP stream is read until it is closed.
(this is the "fast" mode mentioned above)
The DATA command must come after FILE, USER, TYPE, and any other
parametric commands and must come before any EOF or ABORT command.
The file need not be complete before an ABORT can be received and
carried out, but the DATA command must have completed (burst-size
number of octets must have been read), thus ABORT is not possible in
"fast" mode.
The EOF Command:
EOF
This signals the server that the entire file has been sent. The
server then closes the file and ensures that it is disposed of
appropriately, usually just placing it where a user-level application
can retrieve it later.
The ABORT Command:
ABORT
This signals the server that the client is unable or unwilling to
finish the job. The file should be discarded and the server should
return to normal command processing.
The QUIT Command:
QUIT
This signals the server that all work is complete. Any open file
should be closed and delivered. The TCP stream will be closed.
Troth [Page 7]
^L
RFC 1440 SIFT/UFT July 1993
Other commands:
CLASS class
FORM paper-form-code or print-stock-code
DEST destination
DIST distribution-code or mail-stop
FCB forms-control-buffer or carriage-tape
CHARSET print-train or character-set
The above are relevant to print jobs sent to a print server.
LRECL logical-record-length
RECFM record-format
BLKSIZE block-size
MODE file access permissions
6. References
NJE -- Network Job Entry; IBM publication SC23-0070,
"Network Job Entry; Formats and Protocols"
NETDATA -- see IBM publication aann-nnnn (SC24-5461);
VM/ESA: CMS Application Development Reference
for Assembler
BITNET -- "Because It's Time"; academic network
based on NJE protocol
MIME -- RFC 1341; Multipurpose Internet Mail Extensions;
Borenstein & Freed
FTP -- File Transfer Protocol; STD 9, RFC 959;
Postel & Reynolds
SMTP -- STD 10, RFC 821; Simple Mail Transfer
Protocol; Postel
LPR -- UNIX Programmer's Manual, LPD(8);
4.2BSD Line Printer Spooler Manual
7. Security Considerations
Security issues are not discussed in this memo.
Troth [Page 8]
^L
RFC 1440 SIFT/UFT July 1993
8. Author's Address
Rick Troth
Rice University
Information Systems
Houston, Texas 77251
Phone: (713) 285-5148
Fax: (713) 527-6099
EMail: troth@rice.edu
Troth [Page 9]
^L
|