INTERNET-DRAFT M. Hunter
QSSL
Catagory: Informational 25 Jan 1998
Expires in six months
talk: a historical protocol for interactive communication
<draft-hunter-talk-00.txt>
Status of this Memo
This document is an Internet-Draft. Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its
areas, and its working groups. Note that other groups may also
distribute working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six
months and may be updated, replaced, or obsoleted by other
documents at any time. It is inappropriate to use Internet-
Drafts as reference material or to cite them other than as
"work in progress."
To view the entire list of current Internet-Drafts, please check
the "1id-abstracts.txt" listing contained in the Internet-Drafts
Shadow Directories on ftp.is.co.za (Africa), ftp.nordu.net
(Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East
Coast), or ftp.isi.edu (US West Coast).
This memo provides information for the Internet community. This memo
does not specify an Internet standard of any kind. Distribution of
this memo is unlimited.
Copyright (C) The Internet Society (date). All Rights Reserved.
Overview and Rational
The BSD talk utility is used for interactive communication between
two users. This memo outlines the protocol used.
Data Format
All data is in network format as noted in Figure 11 of [RFC791]. All
protocol entries called "pad" should be 0 filled.
A structure passed over the control connection is a BSD 4.2 sockaddr
structure. This is different from the sockaddr structure used in
following BSD implementations as the first 16 bits are divided into a
size and a family field in recent implementations. In the following
text the BSD 4.2 sockaddr structure is called osockaddr. Its format
follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| family | port |
+-------------------------------+-------------------------------+
| IP address |
+---------------------------------------------------------------+
| pad |
+---------------------------------------------------------------+
| pad |
+---------------------------------------------------------------+
osockaddr
Figure 1.
M Hunter Informational [Page 1]
INTERNET-DRAFT Talk Protocol expires 25 July 1998
The family is 2. This specifies an IP address.
The port and IP address make up a socket as described in section 1.5
of [RFC793]. This idea is extended to also support UDP as described
by [RFC768].
Connection Setup
Control messages are sent to UDP service ntalk which is nominally 518
per [RFC1700]. Typically this is a service independent of the par-
ties involved. The request message format is:
M Hunter Informational [Page 2]
INTERNET-DRAFT Talk Protocol expires 25 July 1998
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| vers | type | pad |
+---------------+---------------+-------------------------------+
| id_num |
+---------------------------------------------------------------+
| |
| |
| address (osockaddr) |
| |
| |
| |
+---------------------------------------------------------------+
| |
| |
| control_addr (osockaddr) |
| |
| |
| |
+---------------------------------------------------------------+
| pid |
+---------------------------------------------------------------+
| |
| caller's name (12 bytes) |
| |
| |
+---------------------------------------------------------------+
| |
| callee's name (12 bytes) |
| |
| |
+---------------------------------------------------------------+
| |
| |
| callee's TTY (16 bytes) |
| |
| |
| |
+---------------------------------------------------------------+
Request Message
Figure 2
The value of vers is 1. This is the current version of the protocol.
The value of type is as follows:
M Hunter Informational [Page 3]
INTERNET-DRAFT Talk Protocol expires 25 July 1998
+------+--------------+---------------------------------------+
|value | Mnemonic | description |
+------+--------------+---------------------------------------+
| 0 | LEAVE_INVITE | Leave the invitation with the server. |
+------+--------------+---------------------------------------+
| 1 | LOOK_UP | Check for invitation by the callee. |
+------+--------------+---------------------------------------+
| 2 | DELETE | Delete invitation by caller. |
+------+--------------+---------------------------------------+
| 3 | ANNOUNCE | Announce invitation by caller. |
+------+--------------+---------------------------------------+
Values of type
Figure 3
The value id_num is used to identify duplicates by the server and to
re associate responses at the client.
The value of address is the TCP socket that caller wants to be con-
tacted at by callee.
The address for the senders UDP socket that control is done over is
sent in control_addr.
The pid is the caller's process id. This is used by the server to
further disambiguate requests. The daemon examined by the author
doesn't use this value as a pid. Its is only used to differentiate
between clients. Given the richness of other context information the
author believes this value could be chosen randomly.
The caller's and callee's names should be sufficient to identify the
entities (people typically) that want to talk to each other. These
are 0 terminated strings.
The tty is used in systems where users might be logged in via multi-
ple sessions to specify which session the requester wants to ring.
This is a 0 terminated string.
The response message format is:
M Hunter Informational [Page 4]
INTERNET-DRAFT Talk Protocol expires 25 July 1998
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| vers | type | answer | pad |
+---------------+---------------+---------------+---------------+
| id_num |
+---------------------------------------------------------------+
| |
| |
| data_addr (osockaddr) |
| |
| |
| |
+---------------------------------------------------------------+
Response Message
Figure 4
The value of vers, type, and id_num will be as they were in the
request. These are used to demultiplex requests.
answer is used to determined the status of the transaction.
+------+------------------------------------------+
|value | description |
+------+------------------------------------------+
| 0 | success |
+------+------------------------------------------+
| 1 | callee not logged in |
+------+------------------------------------------+
| 2 | operation failed for inexplicable reason |
+------+------------------------------------------+
| 3 | caller's machine name unknown |
+------+------------------------------------------+
| 4 | callee's tty doesn't permit announce |
+------+------------------------------------------+
| 5 | request has invalid type value |
+------+------------------------------------------+
| 6 | request has invalid protocol version |
+------+------------------------------------------+
| 7 | request has invalid addr value |
+------+------------------------------------------+
| 8 | request has invalid ctl_addr value |
+------+------------------------------------------+
answer values
Figure 5
M Hunter Informational [Page 5]
INTERNET-DRAFT Talk Protocol expires 25 July 1998
data_addr is the address to connect a TCP socket to in order to com-
municate with the requested party. This is only valid if answer was
0.
Data Transfer
After the call is setup data is transferred directly between the
callee and the caller via a TCP connection setup between the sockets
passed in the connection message.
Call Life cycle
The call life cycle is built around the 4 transaction types. The
client does as follows:
Send LOOK_UP. If there is an invitation waiting then connect to
that waiting client, communicate, and quit.
Since there isn't anybody waiting send ANNOUNCE. If that doesn't
succeed then quit.
Send LEAVE_INVITE to server.
Accept block on the socket that was offered. If the need for the
request passes (the user gets bored) then send a DELETE to the
server and quit.
When the connection succeeds send your data on the socket and read
data sent by the other end. How this data is displayed is appli-
cation dependent.
Implementation Issues
There is a race condition in which two caller's can progress to the
ANNOUNCE step at roughly the same time. Typically ANNOUNCE produces
some form of notification to the user that there is a caller waiting.
This provides a way to get out of the race condition.
This talk protocol changed between BSD 4.2 and BSD 4.3. The protocol
described here is the one use in BSD 4.3 and BSD 4.4.
Related Protocols
The IRC protocol [RFC1459] is appropriate for communication between
two or more users and provides a rich set of features.
Security Considerations
M Hunter Informational [Page 6]
INTERNET-DRAFT Talk Protocol expires 25 July 1998
This protocol does no attempt to provide any form of secure communi-
cation.
References
[RFC768], Postal, J., "User Datagram Protocol", RFC 768, 28 August
1998.
[RFC791], Postal, J., "INTERNET PROTOCOL", RFC 791, September 1981.
[RFC793], Postal, J., "TRANSMISSION CONTROL PROTOCOL", RFC 793,
September 1981.
[RFC1459], Oikarinen, J., D. Reed, "Internet Relay Chat", RFC 1459,
May 1993.
[RFC1700], Reynolds, J., J. Postal, "ASSIGNED NUMBERS", RFC 1700,
October 1994.
Author's Address
Michael Hunter
QSSL
175 Terence Matthews Crescent
Kanata, Ontario, Canada K2M 1W8
Phone: (613) 591-0931
EMail: mphunter@qnx.com
M Hunter Informational [Page 7]
INTERNET-DRAFT Talk Protocol expires 25 July 1998
Full Copyright Statement
Copyright (C) The Internet Society (date). All Rights Reserved.
This document and translations of it may be copied and furnished
to others, and derivative works that comment on or otherwise
explain it or assist in its implmentation may be prepared, copied,
published and distributed, in whole or in part, without
restriction of any kind, provided that the above copyright notice
and this paragraph are included on all such copies and derivative
works. However, this document itself may not be modified in any
way, such as by removing the copyright notice or references to the
Internet Society or other Internet organizations, except as needed
for the purpose of developing Internet standards in which case the
procedures for copyrights defined in the Internet Standards
process must be followed, or as required to translate it into
languages other than English.
The limited permissions granted above are perpetual and will not
be revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
M Hunter Informational [Page 8]