]> code.citadel.org Git - citadel.git/blobdiff - citadel/techdoc/protocol.txt
* Variable names, comments, documentation, etc... removed the acronym 'BBS'
[citadel.git] / citadel / techdoc / protocol.txt
index 993b9bb1365cdedbf5a0e035832aac56ff4d5100..1f4dab3ca6f65cdf8159a9aef427402cacc19a04 100644 (file)
@@ -1,11 +1,11 @@
               APPLICATION LAYER PROTOCOL FOR THE CITADEL SYSTEM
-         (c) 1995-2004 by Art Cancro et. al.    All Rights Reserved
+         (c) 1995-2005 by Art Cancro et. al.    All Rights Reserved
 
 
  INTRODUCTION
  ------------
 
- This is an attempt to document the session layer protocol used by the
+ This is an attempt to document the application layer protocol used by the
 Citadel system, beginning with version 4.00, which is the first version
 to implement a client/server paradigm.  It is intended as a resource for
 programmers who intend to develop their own Citadel clients, but it may have
@@ -30,15 +30,15 @@ what you did, so that your new commands can be added to this document.
  CONNECTING TO A SERVER
  ----------------------
 
- The protocols used below the session layer are beyond the scope of this
+ The protocols used below the application layer are beyond the scope of this
 document, but we will briefly cover the methodology employed by Citadel.
 
- Citadel offers Citadel BBS service using TCP/IP.  It does so via a
+ Citadel offers its client protocol using TCP/IP.  It does so via a
 multithreaded server listening on a TCP port.  Local connections may also
 be made using the same protocol using Unix domain sockets.
 
  The port number officially assigned to Citadel by the IANA is 504/tcp.  Since
-our session layer assumes a clean, reliable, sequenced connection, the use
+our application layer assumes a clean, reliable, sequenced connection, the use
 of UDP would render the server unstable and unusable, so we stick with TCP.
 
 
@@ -49,7 +49,7 @@ of UDP would render the server unstable and unusable, so we stick with TCP.
 connection to a server process, and when a command is sent, the client must
 read the response, and then transfer data or change modes if necessary.
 
- The session layer is very much like other Internet protocols such as SMTP
+ The application layer is very much like other Internet protocols such as SMTP
 or NNTP.  A client program sends one-line commands to the server, and the
 server responds with a three-digit numeric result code followed by a message
 describing what happened.  This cycle continues until the end of the
@@ -279,7 +279,8 @@ room access controls:
                                         * if the user calls it up by name */
 #define UA_HASNEWMSGS           8      /* Unread messages exist in room */
 #define UA_ZAPPED              16      /* Zapped from known rooms list */
+  
+ The sixth field is the user's current view for the room. (See VIEW command)
  
  
  LKRO   (List Known Rooms with Old [no new] messages)
@@ -585,12 +586,12 @@ backward compatibility.  The current implementation defines the following
 parts of the listing:
 
  Line 1  - Your unique session ID on the server
- Line 2  - The node name of the server BBS
- Line 3  - Human-readable node name of the server BBS
+ Line 2  - The node name of the Citadel server
+ Line 3  - Human-readable node name of the Citadel server
  Line 4  - The fully-qualified domain name (FQDN) of the server
  Line 5  - The name of the server software, i.e. "Citadel 4.00"
  Line 6  - (The revision level of the server code) * 100
- Line 7  - The geographical location of the BBS (city and state if in the US)
+ Line 7  - The geographical location of the site (city and state if in the US)
  Line 8  - The name of the system administrator
  Line 9  - A number identifying the server type (see below)
  Line 10 - The text of the system's paginator prompt
@@ -609,7 +610,7 @@ parts of the listing:
 compatibility in a scenario in which developers have added proprietary
 features to their servers or clients.  We are attempting to avoid a future
 situation in which users need to keep different client software around for
-each BBS they use.  *Please*, if you are a developer and plan to add
+each Citadel they use.  *Please*, if you are a developer and plan to add
 proprietary features:
 
  -> Your client programs should still be able to utilize servers other than
@@ -644,7 +645,7 @@ contain three fields: a filename, the length of the file, and a description.
  The server message contained on the same line with LISTING_FOLLOWS will
 contain the name of the system and the name of the directory, such as:
 
-  uncensored.citadel.org|/usr/bbs/files/my_room_directory
+  uncensored.citadel.org|/usr/local/citadel/files/my_room_directory
 
 
  SLRP   (Set Last-message-Read Pointer)
@@ -791,6 +792,10 @@ typically be 0; see the MSG0 command above).
 the message.
   5  -  Post name.  When postflag is 2, this is the name you are posting as.
 This is an Aide only command.
+  6  -  Do Confirmation.  NOTE: this changes the protocol semantics!  When
+you set this to nonzero, ENT0 will reply with a confirmation message after
+you submit the message text.  The reply code for the ENT0 command will be
+START_CHAT_MODE instead of SEND_LISTING.
 
  Possible result codes:
   OK  -  The request is valid.  (Client did not set the "post" flag, so the
@@ -802,11 +807,26 @@ correct upper and lower case characters.  In addition, if the recipient is
 having his/her mail forwarded, the forwarding address will be returned.
   SEND_LISTING  -  The request is valid.  The client should now transmit
 the text of the message (ending with a 000 on a line by itself, as usual).
+  START_CHAT_MODE  -  The request is valid.  The client should now transmit
+the text of the message, ending with a 000 on a line by itself.  After
+transmitting the 000 terminator, the client MUST read in the confirmation
+from the server, which will also end with 000 on a line by itself.  The format
+of the confirmation appears below.
   ERROR + NOT_LOGGED_IN  -  Not logged in.
   ERROR + HIGHER_ACCESS_REQUIRED  -  Higher access is required.  An
 explanation follows, worded in a form that can be displayed to the user.
   ERROR + NO_SUCH_USER  -  The specified recipient does not exist.
 
+The format of the confirmation message, if requested, is as follows:
+Line 1: The new message number on the server for the message.  It will be
+        positive for a real message number, or negative to denote
+        that an error occurred.  If an error occurred, the message was
+        not saved.
+Line 2: A human-readable confirmation or error message.
+Line 3: The resulting Exclusive UID of the message, if present.
+(More may be added to this in the future, so do not assume that there will
+only be these lines output.  Keep reading until 000 is received.)
+
 
  RINF   (read Room INFormation file)
 
@@ -1272,7 +1292,7 @@ images which are likely to exist on most servers:
  NETP   (authenticate as network session with connection NET Password)
 
  This command is used by client software to identify itself as a transport
-session for IGnet/Open BBS to BBS networking.  It should be called with
+session for Citadel site-to-site networking.  It should be called with
 two arguments: the node name of the calling system, and the "shared secret"
 password for that connection.  If the authentication succeeds, NETP will
 return OK, otherwise, it returns ERROR.
@@ -1299,7 +1319,7 @@ posting them twice.
 identified itself as a network session using the NETP command.  If the command
 returns OK, the client may begin transmitting IGnet/Open spool data using
 a series of WRIT commands.  When a UCLS command is issued, the spooled data
-is entered into the BBS if the argument to UCLS is 1 or discarded if the
+is entered into the server if the argument to UCLS is 1 or discarded if the
 argument to UCLS is 0.  If the client has not authenticated itself with a
 NETP command, ERROR+HIGHER_ACCESS_REQUIRED will be returned.
 
@@ -1439,7 +1459,7 @@ will be a regular server command.
  The Citadel server understands the following commands:
  /quit   -   Exit from chat mode (causes the server to do an 000 end)
  /who    -   List users currently in chat
- /whobbs -   List users currently in chat and on the bbs
+ /whobbs -   List users currently in chat and elsewhere
  /me     -   Do an irc-style action.
  /join   -   Join a new "room" in which all messages are only heard by
              people in that room.
@@ -1797,6 +1817,10 @@ fails for any reason, ERROR is returned.
  36. LDAP Bind DN
  37. Password for LDAP Bind DN
  38. Server IP address to listen on (or "0.0.0.0" for all addresses)
+ 39. Port number for SMTP MSA service
+ 40. Port number for IMAPS (SSL-encrypted IMAP)
+ 41. Port number for POP3S (SSL-encrypted POP3)
+ 42. Port number for SMTPS (SSL-encrypted SMTP)
 
  CONF also accepts two additional commands: GETSYS and PUTSYS followed by an
 arbitrary MIME type (such as application/x-citadel-internet-config) which