]> granicus.if.org Git - postgresql/blob - doc/src/sgml/protocol.sgml
updates for new startup sequence, some reformatting
[postgresql] / doc / src / sgml / protocol.sgml
1 <!-- $Header: /cvsroot/pgsql/doc/src/sgml/protocol.sgml,v 1.18 2001/06/22 23:27:48 petere Exp $ -->
2
3 <chapter id="protocol">
4  <title>Frontend/Backend Protocol</title>
5
6  <note>
7   <para>
8    Written by Phil Thompson (<email>phil@river-bank.demon.co.uk</email>).
9    Updates for protocol 2.0 by Tom Lane (<email>tgl@sss.pgh.pa.us</email>).
10   </para>
11  </note>
12
13  <para>
14   <application>PostgreSQL</application> uses a message-based protocol
15   for communication between frontends and backends.  The protocol is
16   implemented over <acronym>TCP/IP</acronym> and also on Unix domain
17   sockets.  <productname>PostgreSQL</productname> 6.3 introduced
18   version numbers into the protocol.  This was done in such a way as
19   to still allow connections from earlier versions of frontends, but
20   this document does not cover the protocol used by those earlier
21   versions.
22  </para>
23
24  <para>
25   This document describes version 2.0 of the protocol, implemented in
26   <application>PostgreSQL</application> 6.4 and later.
27  </para>
28
29  <para>
30   Higher level features built on this protocol (for example, how
31   <application>libpq</application> passes certain environment
32   variables after the connection is established) are covered
33   elsewhere.
34  </para>
35
36  <sect1 id="protocol-overview">
37   <title>Overview</title>
38
39   <para>
40    A frontend opens a connection to the server and sends a start-up
41    packet.  This includes the names of the user and the database the
42    user wants to connect to.  The server then uses this, and the
43    information in the <filename>pg_hba.conf</filename> file to
44    determine what further authentication information it requires the
45    frontend to send (if any) and responds to the frontend accordingly.
46   </para>
47
48   <para>
49    The frontend then sends any required authentication information.
50    Once the server validates this it responds to the frontend that it
51    is authenticated and sends a message indicating successful start-up
52    (normal case) or failure (for example, an invalid database name).
53   </para>
54
55   <para>
56    In order to serve multiple clients efficiently, the server would
57    normally create a new child process to handle each incoming
58    connection.  However, this is not required.  In the current
59    implementation, a new child process is created immediately after an
60    incoming connection is detected.  In earlier versions of PostgreSQL
61    (7.1 and earlier), the child process was created after sending the
62    authentication confirmation message.
63   </para>
64
65   <para>
66    When the frontend wishes to disconnect it sends an appropriate packet and
67    closes the connection without waiting for a response for the backend.
68   </para>
69
70   <para>
71    Packets are sent as a data stream.  The first byte determines what
72    should be expected in the rest of the packet.  The exceptions are
73    packets sent as part of the startup and authentication exchange,
74    which comprise a packet length followed by the packet itself.  The
75    difference is historical.
76   </para>
77  </sect1>
78
79  <sect1 id="protocol-protocol">
80   <title>Protocol</title>
81
82   <para>
83    This section describes the message flow.  There are four different
84    types of flows depending on the state of the connection: start-up,
85    query, function call, and termination.  There are also special
86    provisions for notification responses and command cancellation,
87    which can occur at any time after the start-up phase.
88   </para>
89
90   <sect2>
91    <title>Start-up</Title>
92
93    <para>
94     Initially, the frontend sends a StartupPacket.  The server uses
95     this info and the contents of the <filename>pg_hba.conf</filename>
96     file to determine what authentication method the frontend must
97     use.  The server then responds with one of the following messages:
98
99     <variablelist>
100      <varlistentry>
101       <term>ErrorResponse</term>
102       <listitem>
103        <para>
104         The server then immediately closes the connection.
105        </para>
106       </listitem>
107      </varlistentry>
108
109      <varlistentry>
110       <term>AuthenticationOk</term>
111       <listitem>
112        <para>
113         The authentication exchange is completed.
114        </para>
115       </listitem>
116      </varlistentry>
117
118      <varlistentry>
119       <term>AuthenticationKerberosV4</Term>
120       <listitem>
121        <para>
122         The frontend must then take part in a Kerberos V4
123         authentication dialog (not described here, part of the
124         Kerberos specification) with the server.  If this is
125         successful, the server responds with an AuthenticationOk,
126         otherwise it responds with an ErrorResponse.
127        </para>
128       </listitem>
129      </varlistentry>
130
131      <varlistentry>
132       <Term>AuthenticationKerberosV5</Term>
133       <ListItem>
134        <Para>
135         The frontend must then take part in a Kerberos V5
136         authentication dialog (not described here, part of the
137         Kerberos specification) with the server.  If this is
138         successful, the server responds with an AuthenticationOk,
139         otherwise it responds with an ErrorResponse.
140        </Para>
141       </ListItem>
142      </VarListEntry>
143
144      <VarListEntry>
145       <Term>AuthenticationUnencryptedPassword</Term>
146       <ListItem>
147        <Para>
148         The frontend must then send an UnencryptedPasswordPacket.  If
149         this is the correct password, the server responds with an
150         AuthenticationOk, otherwise it responds with an ErrorResponse.
151        </Para>
152       </ListItem>
153      </VarListEntry>
154
155      <VarListEntry>
156       <Term>AuthenticationEncryptedPassword</Term>
157       <ListItem>
158        <Para>
159         The frontend must then send an EncryptedPasswordPacket.  If
160         this is the correct password, the server responds with an
161         AuthenticationOk, otherwise it responds with an ErrorResponse.
162        </Para>
163       </ListItem>
164      </VarListEntry>
165
166     </VariableList>
167    </Para>
168
169    <para>
170     If the frontend does not support the authentication method
171     requested by the server, then it should immediately close the
172     connection.
173    </para>
174
175    <para>
176     After having received AuthenticationOk, the frontend should wait
177     for further messages from the server.  The possible messages from
178     the backend in this phase are:
179
180     <VariableList>
181      <VarListEntry>
182       <Term>BackendKeyData</Term>
183       <ListItem>
184        <Para>
185         This message provides secret-key data that the frontend must
186         save if it wants to be able to issue cancel requests later.
187         The frontend should not respond to this message, but should
188         continue listening for a ReadyForQuery message.
189        </Para>
190       </ListItem>
191      </VarListEntry>
192
193      <VarListEntry>
194       <Term>ReadyForQuery</Term>
195       <ListItem>
196        <Para>
197         Start-up is completed.  The frontend may now issue query or
198         function call messages.
199        </Para>
200       </ListItem>
201      </VarListEntry>
202
203      <VarListEntry>
204       <Term>ErrorResponse</Term>
205       <ListItem>
206        <Para>
207         Start-up failed.  The connection is closed after sending this
208         message.
209        </Para>
210       </ListItem>
211      </VarListEntry>
212
213      <VarListEntry>
214       <Term>NoticeResponse</Term>
215       <ListItem>
216        <Para>
217         A warning message has been issued.  The frontend should
218         display the message but continue listening for ReadyForQuery
219         or ErrorResponse.
220        </Para>
221       </ListItem>
222      </VarListEntry>
223     </VariableList>
224    </Para>
225
226    <para>
227     The ReadyForQuery message is the same one that the backend will
228     issue after each query cycle.  Depending on the coding needs of
229     the frontend, it is reasonable to consider ReadyForQuery as
230     starting a query cycle (and then BackendKeyData indicates
231     successful conclusion of the start-up phase), or to consider
232     ReadyForQuery as ending the start-up phase and each subsequent
233     query cycle.
234    </para>
235   </sect2>
236
237   <Sect2>
238    <Title>Query</Title>
239
240    <Para>
241     A Query cycle is initiated by the frontend sending a Query message
242     to the backend.  The backend then sends one or more response
243     messages depending on the contents of the query command string,
244     and finally a ReadyForQuery response message.  ReadyForQuery
245     informs the frontend that it may safely send a new query or
246     function call.
247    </para>
248
249    <Para>
250     The possible response messages from the backend are:
251
252     <VariableList>
253      <VarListEntry>
254       <Term>CompletedResponse</Term>
255       <ListItem>
256        <Para>
257         An SQL command completed normally.
258        </Para>
259       </ListItem>
260      </VarListEntry>
261
262      <VarListEntry>
263       <Term>CopyInResponse</Term>
264       <ListItem>
265        <Para>
266         The backend is ready to copy data from the frontend to a
267         table.  The frontend should then send a CopyDataRows message.
268         The backend will then respond with a CompletedResponse message
269         with a tag of <literal>COPY</literal>.
270        </Para>
271       </ListItem>
272      </VarListEntry>
273
274      <VarListEntry>
275       <Term>CopyOutResponse</Term>
276       <ListItem>
277        <Para>
278         The backend is ready to copy data from a table to the
279         frontend.  It then sends a CopyDataRows message, and then a
280         CompletedResponse message with a tag of <literal>COPY</literal>.
281        </Para>
282       </ListItem>
283      </VarListEntry>
284
285      <VarListEntry>
286       <Term>CursorResponse</Term>
287       <ListItem>
288        <Para>
289         The query was either an <literal>INSERT</literal>,
290         <literal>UPDATE</literal>, <literal>DELETE</literal>,
291         <literal>FETCH</literal>, or a <literal>SELECT</literal>
292         command.  If the transaction has been aborted then the backend
293         sends a CompletedResponse message with a tag of <literal>*ABORT
294         STATE*</literal>.  Otherwise the following responses are sent.
295        </Para>
296
297        <Para>
298         For an <literal>INSERT</literal> command, the backend then
299         sends a CompletedResponse message with a tag of
300         <literal>INSERT <replaceable>oid</replaceable>
301         <replaceable>rows</replaceable></literal>, where
302         <replaceable>rows</replaceable> is the number of rows
303         inserted, and <replaceable>oid</replaceable> is the object ID
304         of the inserted row if <Replaceable>rows</Replaceable> is 1,
305         otherwise <Replaceable>oid</Replaceable> is 0.
306        </Para>
307
308        <Para>
309         For a <literal>DELETE</literal> command, the backend then
310         sends a CompletedResponse message with a tag of <literal>DELETE
311         <Replaceable>rows</Replaceable></literal> where
312         <Replaceable>rows</Replaceable> is the number of rows deleted.
313        </Para>
314
315        <Para>
316         For an <literal>UPDATE</literal> command, the backend then
317         sends a CompletedResponse message with a tag of <literal>UPDATE
318         <Replaceable>rows</Replaceable></literal> where
319         <Replaceable>rows</Replaceable> is the number of rows affected
320         by the update.
321        </Para>
322
323        <Para>
324         For a <literal>FETCH</literal> or <literal>SELECT</literal>
325         command, the backend sends a RowDescription message.  This is
326         then followed by an AsciiRow or BinaryRow message (depending
327         on whether a binary cursor was specified) for each row being
328         returned to the frontend.  Finally, the backend sends a
329         CompletedResponse message with a tag of <literal>SELECT</literal>.
330        </Para>
331       </ListItem>
332      </VarListEntry>
333
334      <VarListEntry>
335       <Term>EmptyQueryResponse</Term>
336       <ListItem>
337        <Para>
338         An empty query string was recognized.  (The need to specially
339         distinguish this case is historical.)
340        </Para>
341       </ListItem>
342      </VarListEntry>
343
344      <VarListEntry>
345       <Term>ErrorResponse</Term>
346       <ListItem>
347        <Para>
348         An error has occurred.
349        </Para>
350       </ListItem>
351      </VarListEntry>
352
353      <VarListEntry>
354       <Term>ReadyForQuery</Term>
355       <ListItem>
356        <Para>
357         Processing of the query string is complete.  A separate
358         message is sent to indicate this because the query string may
359         contain multiple SQL commands.  (CompletedResponse marks the
360         end of processing one SQL command, not the whole string.)
361         ReadyForQuery will always be sent, whether processing
362         terminates successfully or with an error.
363        </Para>
364       </ListItem>
365      </VarListEntry>
366
367      <VarListEntry>
368       <Term>NoticeResponse</Term>
369       <ListItem>
370        <Para>
371         A warning message has been issued in relation to the query.
372         Notices are in addition to other responses, i.e., the backend
373         will continue processing the command.
374        </Para>
375       </ListItem>
376      </VarListEntry>
377
378     </VariableList>
379    </Para>
380
381    <para>
382     A frontend must be prepared to accept ErrorResponse and
383     NoticeResponse messages whenever it is expecting any other type of
384     message.
385    </para>
386
387    <Para>
388     Actually, it is possible for NoticeResponse to arrive even when
389     the frontend is not expecting any kind of message, that is, the
390     backend is nominally idle.  (In particular, the backend can be
391     commanded to terminate by its parent process.  In that case it will
392     send a NoticeResponse before closing the connection.)  It is
393     recommended that the frontend check for such asynchronous notices
394     just before issuing any new command.
395    </para>
396
397    <Para>
398     Also, if the frontend issues any <literal>LISTEN</literal>
399     commands then it must be prepared to accept NotificationResponse
400     messages at any time; see below.
401    </para>
402   </sect2>
403
404   <Sect2>
405    <Title>Function Call</Title>
406
407    <Para>
408     A Function Call cycle is initiated by the frontend sending a
409     FunctionCall message to the backend.  The backend then sends one
410     or more response messages depending on the results of the function
411     call, and finally a ReadyForQuery response message.  ReadyForQuery
412     informs the frontend that it may safely send a new query or
413     function call.
414    </para>
415
416    <Para>
417     The possible response messages from the backend are:
418
419     <VariableList>
420      <VarListEntry>
421       <Term>ErrorResponse</Term>
422       <ListItem>
423        <Para>
424         An error has occurred.
425        </Para>
426       </ListItem>
427      </VarListEntry>
428
429      <VarListEntry>
430       <Term>FunctionResultResponse</Term>
431       <ListItem>
432        <Para>
433         The function call was executed and returned a result.
434        </Para>
435       </ListItem>
436      </VarListEntry>
437
438      <VarListEntry>
439       <Term>FunctionVoidResponse</Term>
440       <ListItem>
441        <Para>
442         The function call was executed and returned no result.
443        </Para>
444       </ListItem>
445      </VarListEntry>
446
447      <VarListEntry>
448       <Term>ReadyForQuery</Term>
449       <ListItem>
450        <Para>
451         Processing of the function call is complete.  ReadyForQuery
452         will always be sent, whether processing terminates
453         successfully or with an error.
454        </Para>
455       </ListItem>
456      </VarListEntry>
457
458      <VarListEntry>
459       <Term>NoticeResponse</Term>
460       <ListItem>
461        <Para>
462         A warning message has been issued in relation to the function
463         call.  Notices are in addition to other responses, i.e., the
464         backend will continue processing the command.
465        </Para>
466       </ListItem>
467      </VarListEntry>
468     </VariableList>
469    </Para>
470
471    <para>
472     A frontend must be prepared to accept ErrorResponse and
473     NoticeResponse messages whenever it is expecting any other type of
474     message.  Also, if it issues any <literal>LISTEN</literal>
475     commands then it must be prepared to accept NotificationResponse
476     messages at any time; see below.
477    </para>
478   </sect2>
479
480   <sect2>
481    <title>Notification Responses</title>
482
483    <Para>
484     If a frontend issues a <literal>LISTEN</literal> command, then the
485     backend will send a NotificationResponse message (not to be
486     confused with NoticeResponse!)  whenever a
487     <literal>NOTIFY</literal> command is executed for the same
488     notification name.
489    </para>
490
491    <para>
492     Notification responses are permitted at any point in the protocol
493     (after start-up), except within another backend message.  Thus,
494     the frontend must be prepared to recognize a NotificationResponse
495     message whenever it is expecting any message.  Indeed, it should
496     be able to handle NotificationResponse messages even when it is
497     not engaged in a query.
498
499     <VariableList>
500      <VarListEntry>
501       <Term>NotificationResponse</Term>
502       <ListItem>
503        <Para>
504         A <literal>NOTIFY</literal> command has been executed for a
505         name for which a previous <literal>LISTEN</literal> command
506         was executed.  Notifications may be sent at any time.
507        </Para>
508       </ListItem>
509      </VarListEntry>
510     </VariableList>
511    </Para>
512
513    <para>
514     It may be worth pointing out that the names used in listen and
515     notify commands need not have anything to do with names of
516     relations (tables) in the SQL database.  Notification names are
517     simply arbitrarily chosen condition names.
518    </para>
519   </sect2>
520
521   <Sect2>
522    <Title>Cancelling Requests in Progress</Title>
523
524    <Para>
525     During the processing of a query, the frontend may request
526     cancellation of the query.  The cancel request is not sent
527     directly on the open connection to the backend for reasons of
528     implementation efficiency: we don't want to have the backend
529     constantly checking for new input from the frontend during query
530     processing.  Cancel requests should be relatively infrequent, so
531     we make them slightly cumbersome in order to avoid a penalty in
532     the normal case.
533    </para>
534
535    <Para>
536     To issue a cancel request, the frontend opens a new connection to
537     the server and sends a CancelRequest message, rather than the
538     StartupPacket message that would ordinarily be sent across a new
539     connection.  The server will process this request and then close
540     the connection.  For security reasons, no direct reply is made to
541     the cancel request message.
542    </para>
543
544    <Para>
545     A CancelRequest message will be ignored unless it contains the
546     same key data (PID and secret key) passed to the frontend during
547     connection start-up.  If the request matches the PID and secret
548     key for a currently executing backend, the processing of the
549     current query is aborted.  (In the existing implemenation, this is
550     done by sending a special signal to the backend process that is
551     processing the query.)
552    </para>
553
554    <Para>
555     The cancellation signal may or may not have any effect --- for
556     example, if it arrives after the backend has finished processing
557     the query, then it will have no effect.  If the cancellation is
558     effective, it results in the current command being terminated
559     early with an error message.
560    </para>
561
562    <Para>
563     The upshot of all this is that for reasons of both security and
564     efficiency, the frontend has no direct way to tell whether a
565     cancel request has succeeded.  It must continue to wait for the
566     backend to respond to the query.  Issuing a cancel simply improves
567     the odds that the current query will finish soon, and improves the
568     odds that it will fail with an error message instead of
569     succeeding.
570    </para>
571
572    <Para>
573     Since the cancel request is sent across a new connection to the
574     server and not across the regular frontend/backend communication
575     link, it is possible for the cancel request to be issued by any
576     process, not just the frontend whose query is to be canceled.
577     This may have some benefits of flexibility in building
578     multiple-process applications.  It also introduces a security
579     risk, in that unauthorized persons might try to cancel queries.
580     The security risk is addressed by requiring a dynamically
581     generated secret key to be supplied in cancel requests.
582    </para>
583   </sect2>
584
585   <Sect2>
586    <Title>Termination</Title>
587
588    <Para>
589     The normal, graceful termination procedure is that the frontend
590     sends a Terminate message and immediately closes the connection.
591     On receipt of the message, the backend immediately closes the
592     connection and terminates.
593    </para>
594
595    <Para>
596     An ungraceful termination may occur due to software failure (i.e.,
597     core dump) at either end.  If either frontend or backend sees an
598     unexpected closure of the connection, it should clean up and
599     terminate.  The frontend has the option of launching a new backend
600     by recontacting the server if it doesn't want to terminate
601     itself.
602    </para>
603   </sect2>
604  </sect1>
605
606 <Sect1 id="protocol-message-types">
607 <Title>Message Data Types</Title>
608
609 <Para>
610 This section describes the base data types used in messages.
611
612 <VariableList>
613 <VarListEntry>
614 <Term>
615         Int<Replaceable>n</Replaceable>(<Replaceable>i</Replaceable>)
616 </Term>
617 <ListItem>
618 <Para>
619                 An <Replaceable>n</Replaceable> bit integer in network byte order.
620                 If <Replaceable>i</Replaceable> is specified it
621                 is the literal value.  Eg. Int16, Int32(42).
622 </Para>
623 </ListItem>
624 </VarListEntry>
625 <VarListEntry>
626 <Term>
627         LimString<Replaceable>n</Replaceable>(<Replaceable>s</Replaceable>)
628 </Term>
629 <ListItem>
630 <Para>
631                 A character array of exactly <Replaceable>n</Replaceable> bytes interpreted as a '\0'
632                 terminated string.  The '\0' is omitted if there is
633                 insufficient room.  If <Replaceable>s</Replaceable> is specified it is the literal value.
634                 Eg. LimString32, LimString64("user").
635 </Para>
636 </ListItem>
637 </VarListEntry>
638 <VarListEntry>
639 <Term>
640         String(<Replaceable>s</Replaceable>)
641 </Term>
642 <ListItem>
643 <Para>
644                 A conventional C '\0' terminated string with no length
645                 limitation.
646                 If <Replaceable>s</Replaceable> is specified it is the literal value.
647                 Eg. String, String("user").
648 </Para>
649                 
650 <Note>
651 <Para>
652 <Emphasis>There is no predefined limit</Emphasis> on the length of a string
653 that can be returned by the backend.  Good coding strategy for a frontend
654 is to use an expandable buffer so that anything that fits in memory can be
655 accepted.  If that's not feasible, read the full string and discard trailing
656 characters that don't fit into your fixed-size buffer.
657 </Para>
658 </Note>
659 </ListItem>
660 </VarListEntry>
661 <VarListEntry>
662 <Term>
663         Byte<Replaceable>n</Replaceable>(<Replaceable>c</Replaceable>)
664 </Term>
665 <ListItem>
666 <Para>
667                 Exactly <Replaceable>n</Replaceable> bytes.  If <Replaceable>c</Replaceable> is specified it is the literal
668                 value.  Eg. Byte, Byte1('\n').
669 </Para>
670 </ListItem>
671 </VarListEntry>
672 </VariableList>
673 </Para>
674 </sect1>
675
676 <Sect1 id="protocol-message-formats">
677 <Title>Message Formats</Title>
678
679 <Para>
680 This section describes the detailed format of each message.  Each can be sent
681 by either a frontend (F), a backend (B), or both (F & B).
682 </para>
683
684 <VariableList>
685 <VarListEntry>
686 <Term>
687 AsciiRow (B)
688 </Term>
689 <ListItem>
690 <Para>
691 <VariableList>
692 <VarListEntry>
693 <Term>
694         Byte1('D')
695 </Term>
696 <ListItem>
697 <Para>
698                 Identifies the message as an <Acronym>ASCII</Acronym> data row.
699                 (A prior RowDescription message defines the number of
700                 fields in the row and their data types.)
701 </Para>
702 </ListItem>
703 </VarListEntry>
704 <VarListEntry>
705 <Term>
706         Byte<Replaceable>n</Replaceable>
707 </Term>
708 <ListItem>
709 <Para>
710                 A bit map with one bit for each field in the row.  The 1st
711                 field corresponds to bit 7 (MSB) of the 1st byte, the 2nd
712                 field corresponds to bit 6 of the 1st byte, the 8th field
713                 corresponds to bit 0 (LSB) of the 1st byte, the 9th field
714                 corresponds to bit 7 of the 2nd byte, and so on.  Each bit
715                 is set if the value of the corresponding field is not NULL.
716                 If the number of fields is not a multiple of 8, the remainder
717                 of the last byte in the bit map is wasted.
718 </Para>
719 <Para>
720         Then, for each field with a non-NULL value, there is the following:
721 <VariableList>
722 <VarListEntry>
723 <Term>
724                 Int32
725 </Term>
726 <ListItem>
727 <Para>
728                         Specifies the size of the value of the field, including
729                         this size.
730 </Para>
731 </ListItem>
732 </VarListEntry>
733 <VarListEntry>
734 <Term>
735                 Byte<Replaceable>n</Replaceable>
736 </Term>
737 <ListItem>
738 <Para>
739                         Specifies the value of the field itself in <Acronym>ASCII</Acronym>
740                         characters.  <Replaceable>n</Replaceable> is the above
741                         size minus 4.
742                         There is no trailing '\0' in the field data; the front
743                         end must add one if it wants one.
744 </Para>
745 </ListItem>
746 </VarListEntry>
747 </VariableList>
748
749 </Para>
750 </ListItem>
751 </VarListEntry>
752 </VariableList>
753
754 </Para>
755 </ListItem>
756 </VarListEntry>
757 <VarListEntry>
758 <Term>
759 AuthenticationOk (B)
760 </Term>
761 <ListItem>
762 <Para>
763
764 <VariableList>
765 <VarListEntry>
766 <Term>
767         Byte1('R')
768 </Term>
769 <ListItem>
770 <Para>
771                 Identifies the message as an authentication request.
772 </Para>
773 </ListItem>
774 </VarListEntry>
775 <VarListEntry>
776 <Term>
777         Int32(0)
778 </Term>
779 <ListItem>
780 <Para>
781                 Specifies that the authentication was successful.
782 </Para>
783 </ListItem>
784 </VarListEntry>
785 </VariableList>
786
787 </Para>
788 </ListItem>
789 </VarListEntry>
790 <VarListEntry>
791 <Term>
792 AuthenticationKerberosV4 (B)
793 </Term>
794 <ListItem>
795 <Para>
796
797 <VariableList>
798 <VarListEntry>
799 <Term>
800         Byte1('R')
801 </Term>
802 <ListItem>
803 <Para>
804                 Identifies the message as an authentication request.
805 </Para>
806 </ListItem>
807 </VarListEntry>
808 <VarListEntry>
809 <Term>
810         Int32(1)
811 </Term>
812 <ListItem>
813 <Para>
814                 Specifies that Kerberos V4 authentication is required.
815 </Para>
816 </ListItem>
817 </VarListEntry>
818 </VariableList>
819
820
821 </Para>
822 </ListItem>
823 </VarListEntry>
824 <VarListEntry>
825 <Term>
826 AuthenticationKerberosV5 (B)
827 </Term>
828 <ListItem>
829 <Para>
830
831 <VariableList>
832 <VarListEntry>
833 <Term>
834         Byte1('R')
835 </Term>
836 <ListItem>
837 <Para>
838                 Identifies the message as an authentication request.
839 </Para>
840 </ListItem>
841 </VarListEntry>
842 <VarListEntry>
843 <Term>
844         Int32(2)
845 </Term>
846 <ListItem>
847 <Para>
848                 Specifies that Kerberos V5 authentication is required.
849 </Para>
850 </ListItem>
851 </VarListEntry>
852 </VariableList>
853
854
855 </Para>
856 </ListItem>
857 </VarListEntry>
858 <VarListEntry>
859 <Term>
860 AuthenticationUnencryptedPassword (B)
861 </Term>
862 <ListItem>
863 <Para>
864
865 <VariableList>
866 <VarListEntry>
867 <Term>
868         Byte1('R')
869 </Term>
870 <ListItem>
871 <Para>
872                 Identifies the message as an authentication request.
873 </Para>
874 </ListItem>
875 </VarListEntry>
876 <VarListEntry>
877 <Term>
878         Int32(3)
879 </Term>
880 <ListItem>
881 <Para>
882                 Specifies that an unencrypted password is required.
883 </Para>
884 </ListItem>
885 </VarListEntry>
886 </VariableList>
887
888
889 </Para>
890 </ListItem>
891 </VarListEntry>
892 <VarListEntry>
893 <Term>
894 AuthenticationEncryptedPassword (B)
895 </Term>
896 <ListItem>
897 <Para>
898
899 <VariableList>
900 <VarListEntry>
901 <Term>
902         Byte1('R')
903 </Term>
904 <ListItem>
905 <Para>
906                 Identifies the message as an authentication request.
907 </Para>
908 </ListItem>
909 </VarListEntry>
910 <VarListEntry>
911 <Term>
912         Int32(4)
913 </Term>
914 <ListItem>
915 <Para>
916                 Specifies that an encrypted password is required.
917 </Para>
918 </ListItem>
919 </VarListEntry>
920 <VarListEntry>
921 <Term>
922         Byte2
923 </Term>
924 <ListItem>
925 <Para>
926                 The salt to use when encrypting the password.
927 </Para>
928 </ListItem>
929 </VarListEntry>
930 </VariableList>
931
932 </Para>
933 </ListItem>
934 </VarListEntry>
935 <VarListEntry>
936 <Term>
937 BackendKeyData (B)
938 </Term>
939 <ListItem>
940 <Para>
941
942 <VariableList>
943 <VarListEntry>
944 <Term>
945         Byte1('K')
946 </Term>
947 <ListItem>
948 <Para>
949                 Identifies the message as cancellation key data.
950                 The frontend must save these values if it wishes to be
951                 able to issue CancelRequest messages later.
952 </Para>
953 </ListItem>
954 </VarListEntry>
955 <VarListEntry>
956 <Term>
957         Int32
958 </Term>
959 <ListItem>
960 <Para>
961                 The process ID of this backend.
962 </Para>
963 </ListItem>
964 </VarListEntry>
965 <VarListEntry>
966 <Term>
967         Int32
968 </Term>
969 <ListItem>
970 <Para>
971                 The secret key of this backend.
972 </Para>
973 </ListItem>
974 </VarListEntry>
975 </VariableList>
976
977
978 </Para>
979 </ListItem>
980 </VarListEntry>
981 <VarListEntry>
982 <Term>
983 BinaryRow (B)
984 </Term>
985 <ListItem>
986 <Para>
987
988 <VariableList>
989 <VarListEntry>
990 <Term>
991         Byte1('B')
992 </Term>
993 <ListItem>
994 <Para>
995                 Identifies the message as a binary data row.
996                 (A prior RowDescription message defines the number of
997                 fields in the row and their data types.)
998 </Para>
999 </ListItem>
1000 </VarListEntry>
1001 <VarListEntry>
1002 <Term>
1003         Byte<Replaceable>n</Replaceable>
1004 </Term>
1005 <ListItem>
1006 <Para>
1007                 A bit map with one bit for each field in the row.  The 1st
1008                 field corresponds to bit 7 (MSB) of the 1st byte, the 2nd
1009                 field corresponds to bit 6 of the 1st byte, the 8th field
1010                 corresponds to bit 0 (LSB) of the 1st byte, the 9th field
1011                 corresponds to bit 7 of the 2nd byte, and so on.  Each bit
1012                 is set if the value of the corresponding field is not NULL.
1013                 If the number of fields is not a multiple of 8, the remainder
1014                 of the last byte in the bit map is wasted.
1015 </Para>
1016 <Para>
1017         Then, for each field with a non-NULL value, there is the following:
1018 <VariableList>
1019 <VarListEntry>
1020 <Term>
1021                 Int32
1022 </Term>
1023 <ListItem>
1024 <Para>
1025                         Specifies the size of the value of the field, excluding
1026                         this size.
1027 </Para>
1028 </ListItem>
1029 </VarListEntry>
1030 <VarListEntry>
1031 <Term>
1032                 Byte<Replaceable>n</Replaceable>
1033 </Term>
1034 <ListItem>
1035 <Para>
1036                         Specifies the value of the field itself in binary
1037                         format.  <Replaceable>n</Replaceable> is the above size.
1038 </Para>
1039 </ListItem>
1040 </VarListEntry>
1041 </VariableList>
1042
1043 </Para>
1044 </ListItem>
1045 </VarListEntry>
1046 </VariableList>
1047
1048 </Para>
1049 </ListItem>
1050 </VarListEntry>
1051 <VarListEntry>
1052 <Term>
1053 CancelRequest (F)
1054 </Term>
1055 <ListItem>
1056 <Para>
1057
1058 <VariableList>
1059 <VarListEntry>
1060 <Term>
1061         Int32(16)
1062 </Term>
1063 <ListItem>
1064 <Para>
1065                 The size of the packet in bytes.
1066 </Para>
1067 </ListItem>
1068 </VarListEntry>
1069 <VarListEntry>
1070 <Term>
1071         Int32(80877102)
1072 </Term>
1073 <ListItem>
1074 <Para>
1075                 The cancel request code.  The value is chosen to contain
1076                 "1234" in the most significant 16 bits, and "5678" in the
1077                 least 16 significant bits.  (To avoid confusion, this code
1078                 must not be the same as any protocol version number.)
1079 </Para>
1080 </ListItem>
1081 </VarListEntry>
1082 <VarListEntry>
1083 <Term>
1084         Int32
1085 </Term>
1086 <ListItem>
1087 <Para>
1088                 The process ID of the target backend.
1089 </Para>
1090 </ListItem>
1091 </VarListEntry>
1092 <VarListEntry>
1093 <Term>
1094         Int32
1095 </Term>
1096 <ListItem>
1097 <Para>
1098                 The secret key for the target backend.
1099 </Para>
1100 </ListItem>
1101 </VarListEntry>
1102 </VariableList>
1103
1104
1105 </Para>
1106 </ListItem>
1107 </VarListEntry>
1108 <VarListEntry>
1109 <Term>
1110 CompletedResponse (B)
1111 </Term>
1112 <ListItem>
1113 <Para>
1114
1115 <VariableList>
1116 <VarListEntry>
1117 <Term>
1118         Byte1('C')
1119 </Term>
1120 <ListItem>
1121 <Para>
1122                 Identifies the message as a completed response.
1123 </Para>
1124 </ListItem>
1125 </VarListEntry>
1126 <VarListEntry>
1127 <Term>
1128         String
1129 </Term>
1130 <ListItem>
1131 <Para>
1132                 The command tag.  This is usually (but not always) a single
1133                 word that identifies which SQL command was completed.
1134 </Para>
1135 </ListItem>
1136 </VarListEntry>
1137 </VariableList>
1138
1139
1140 </Para>
1141 </ListItem>
1142 </VarListEntry>
1143 <VarListEntry>
1144 <Term>
1145 CopyDataRows (B & F)
1146 </Term>
1147 <ListItem>
1148 <Para>
1149         This is a stream of rows where each row is terminated by a Byte1('\n').
1150         This is then followed by the sequence Byte1('\\'), Byte1('.'),
1151         Byte1('\n').
1152 </Para>
1153 </ListItem>
1154 </VarListEntry>
1155 <VarListEntry>
1156 <Term>
1157 CopyInResponse (B)
1158 </Term>
1159 <ListItem>
1160 <Para>
1161
1162 <VariableList>
1163 <VarListEntry>
1164 <Term>
1165         Byte1('G')
1166 </Term>
1167 <ListItem>
1168 <Para>
1169                 Identifies the message as a Start Copy In response.
1170                 The frontend must now send a CopyDataRows message.
1171 </Para>
1172 </ListItem>
1173 </VarListEntry>
1174 </VariableList>
1175
1176
1177 </Para>
1178 </ListItem>
1179 </VarListEntry>
1180 <VarListEntry>
1181 <Term>
1182 CopyOutResponse (B)
1183 </Term>
1184 <ListItem>
1185 <Para>
1186
1187 <VariableList>
1188 <VarListEntry>
1189 <Term>
1190         Byte1('H')
1191 </Term>
1192 <ListItem>
1193 <Para>
1194                 Identifies the message as a Start Copy Out response.
1195                 This message will be followed by a CopyDataRows message.
1196 </Para>
1197 </ListItem>
1198 </VarListEntry>
1199 </VariableList>
1200
1201
1202 </Para>
1203 </ListItem>
1204 </VarListEntry>
1205 <VarListEntry>
1206 <Term>
1207 CursorResponse (B)
1208 </Term>
1209 <ListItem>
1210 <Para>
1211
1212 <VariableList>
1213 <VarListEntry>
1214 <Term>
1215         Byte1('P')
1216 </Term>
1217 <ListItem>
1218 <Para>
1219                 Identifies the message as a cursor response.
1220 </Para>
1221 </ListItem>
1222 </VarListEntry>
1223 <VarListEntry>
1224 <Term>
1225         String
1226 </Term>
1227 <ListItem>
1228 <Para>
1229                 The name of the cursor.  This will be "blank" if the cursor is
1230                 implicit.
1231 </Para>
1232 </ListItem>
1233 </VarListEntry>
1234 </VariableList>
1235
1236
1237 </Para>
1238 </ListItem>
1239 </VarListEntry>
1240 <VarListEntry>
1241 <Term>
1242 EmptyQueryResponse (B)
1243 </Term>
1244 <ListItem>
1245 <Para>
1246
1247 <VariableList>
1248 <VarListEntry>
1249 <Term>
1250         Byte1('I')
1251 </Term>
1252 <ListItem>
1253 <Para>
1254                 Identifies the message as a response to an empty query string.
1255 </Para>
1256 </ListItem>
1257 </VarListEntry>
1258 <VarListEntry>
1259 <Term>
1260         String("")
1261 </Term>
1262 <ListItem>
1263 <Para>
1264                 Unused.
1265 </Para>
1266 </ListItem>
1267 </VarListEntry>
1268 </VariableList>
1269
1270
1271 </Para>
1272 </ListItem>
1273 </VarListEntry>
1274 <VarListEntry>
1275 <Term>
1276 EncryptedPasswordPacket (F)
1277 </Term>
1278 <ListItem>
1279 <Para>
1280
1281 <VariableList>
1282 <VarListEntry>
1283 <Term>
1284         Int32
1285 </Term>
1286 <ListItem>
1287 <Para>
1288                 The size of the packet in bytes.
1289 </Para>
1290 </ListItem>
1291 </VarListEntry>
1292 <VarListEntry>
1293 <Term>
1294         String
1295 </Term>
1296 <ListItem>
1297 <Para>
1298                 The encrypted (using crypt()) password.
1299 </Para>
1300 </ListItem>
1301 </VarListEntry>
1302 </VariableList>
1303
1304
1305 </Para>
1306 </ListItem>
1307 </VarListEntry>
1308 <VarListEntry>
1309 <Term>
1310 ErrorResponse (B)
1311 </Term>
1312 <ListItem>
1313 <Para>
1314
1315 <VariableList>
1316 <VarListEntry>
1317 <Term>
1318         Byte1('E')
1319 </Term>
1320 <ListItem>
1321 <Para>
1322                 Identifies the message as an error.
1323 </Para>
1324 </ListItem>
1325 </VarListEntry>
1326 <VarListEntry>
1327 <Term>
1328         String
1329 </Term>
1330 <ListItem>
1331 <Para>
1332                 The error message itself.
1333 </Para>
1334 </ListItem>
1335 </VarListEntry>
1336 </VariableList>
1337
1338
1339 </Para>
1340 </ListItem>
1341 </VarListEntry>
1342 <VarListEntry>
1343 <Term>
1344 FunctionCall (F)
1345 </Term>
1346 <ListItem>
1347 <Para>
1348
1349 <VariableList>
1350 <VarListEntry>
1351 <Term>
1352         Byte1('F')
1353 </Term>
1354 <ListItem>
1355 <Para>
1356                 Identifies the message as a function call.
1357 </Para>
1358 </ListItem>
1359 </VarListEntry>
1360 <VarListEntry>
1361 <Term>
1362         String("")
1363 </Term>
1364 <ListItem>
1365 <Para>
1366                 Unused.
1367 </Para>
1368 </ListItem>
1369 </VarListEntry>
1370 <VarListEntry>
1371 <Term>
1372         Int32
1373 </Term>
1374 <ListItem>
1375 <Para>
1376                 Specifies the object ID of the function to call.
1377 </Para>
1378 </ListItem>
1379 </VarListEntry>
1380 <VarListEntry>
1381 <Term>
1382         Int32
1383 </Term>
1384 <ListItem>
1385 <Para>
1386                 Specifies the number of arguments being supplied to the
1387                 function.
1388 </Para>
1389 <Para>
1390         Then, for each argument, there is the following:
1391 <VariableList>
1392 <VarListEntry>
1393 <Term>
1394                 Int32
1395 </Term>
1396 <ListItem>
1397 <Para>
1398                         Specifies the size of the value of the argument,
1399                         excluding this size.
1400 </Para>
1401 </ListItem>
1402 </VarListEntry>
1403 <VarListEntry>
1404 <Term>
1405                 Byte<Replaceable>n</Replaceable>
1406 </Term>
1407 <ListItem>
1408 <Para>
1409                         Specifies the value of the field itself in binary
1410                         format.  <Replaceable>n</Replaceable> is the above size.
1411 </Para>
1412 </ListItem>
1413 </VarListEntry>
1414 </VariableList>
1415
1416 </Para>
1417 </ListItem>
1418 </VarListEntry>
1419 </VariableList>
1420
1421 </Para>
1422
1423 </ListItem>
1424 </VarListEntry>
1425 <VarListEntry>
1426 <Term>
1427 FunctionResultResponse (B)
1428 </Term>
1429 <ListItem>
1430 <Para>
1431
1432 <VariableList>
1433 <VarListEntry>
1434 <Term>
1435         Byte1('V')
1436 </Term>
1437 <ListItem>
1438 <Para>
1439                 Identifies the message as a function call result.
1440 </Para>
1441 </ListItem>
1442 </VarListEntry>
1443 <VarListEntry>
1444 <Term>
1445         Byte1('G')
1446 </Term>
1447 <ListItem>
1448 <Para>
1449                 Specifies that a nonempty result was returned.
1450 </Para>
1451 </ListItem>
1452 </VarListEntry>
1453 <VarListEntry>
1454 <Term>
1455         Int32
1456 </Term>
1457 <ListItem>
1458 <Para>
1459                 Specifies the size of the value of the result, excluding this
1460                 size.
1461 </Para>
1462 </ListItem>
1463 </VarListEntry>
1464 <VarListEntry>
1465 <Term>
1466         Byte<Replaceable>n</Replaceable>
1467 </Term>
1468 <ListItem>
1469 <Para>
1470                 Specifies the value of the result itself in binary format.
1471                 <Replaceable>n</Replaceable> is the above size.
1472 </Para>
1473 </ListItem>
1474 </VarListEntry>
1475 <VarListEntry>
1476 <Term>
1477         Byte1('0')
1478 </Term>
1479 <ListItem>
1480 <Para>
1481                 Unused.  (Strictly speaking, FunctionResultResponse and
1482                 FunctionVoidResponse are the same thing but with some optional
1483                 parts to the message.)
1484 </Para>
1485 </ListItem>
1486 </VarListEntry>
1487 </VariableList>
1488
1489
1490 </Para>
1491 </ListItem>
1492 </VarListEntry>
1493 <VarListEntry>
1494 <Term>
1495 FunctionVoidResponse (B)
1496 </Term>
1497 <ListItem>
1498 <Para>
1499
1500 <VariableList>
1501 <VarListEntry>
1502 <Term>
1503         Byte1('V')
1504 </Term>
1505 <ListItem>
1506 <Para>
1507                 Identifies the message as a function call result.
1508 </Para>
1509 </ListItem>
1510 </VarListEntry>
1511 <VarListEntry>
1512 <Term>
1513         Byte1('0')
1514 </Term>
1515 <ListItem>
1516 <Para>
1517                 Specifies that an empty result was returned.
1518 </Para>
1519 </ListItem>
1520 </VarListEntry>
1521 </VariableList>
1522
1523
1524 </Para>
1525 </ListItem>
1526 </VarListEntry>
1527 <VarListEntry>
1528 <Term>
1529 NoticeResponse (B)
1530 </Term>
1531 <ListItem>
1532 <Para>
1533
1534 <VariableList>
1535 <VarListEntry>
1536 <Term>
1537         Byte1('N')
1538 </Term>
1539 <ListItem>
1540 <Para>
1541                 Identifies the message as a notice.
1542 </Para>
1543 </ListItem>
1544 </VarListEntry>
1545 <VarListEntry>
1546 <Term>
1547         String
1548 </Term>
1549 <ListItem>
1550 <Para>
1551                 The notice message itself.
1552 </Para>
1553 </ListItem>
1554 </VarListEntry>
1555 </VariableList>
1556
1557
1558 </Para>
1559 </ListItem>
1560 </VarListEntry>
1561 <VarListEntry>
1562 <Term>
1563 NotificationResponse (B)
1564 </Term>
1565 <ListItem>
1566 <Para>
1567
1568 <VariableList>
1569 <VarListEntry>
1570 <Term>
1571         Byte1('A')
1572 </Term>
1573 <ListItem>
1574 <Para>
1575                 Identifies the message as a notification response.
1576 </Para>
1577 </ListItem>
1578 </VarListEntry>
1579 <VarListEntry>
1580 <Term>
1581         Int32
1582 </Term>
1583 <ListItem>
1584 <Para>
1585                 The process ID of the notifying backend process.
1586 </Para>
1587 </ListItem>
1588 </VarListEntry>
1589 <VarListEntry>
1590 <Term>
1591         String
1592 </Term>
1593 <ListItem>
1594 <Para>
1595                 The name of the condition that the notify has been raised on.
1596 </Para>
1597 </ListItem>
1598 </VarListEntry>
1599 </VariableList>
1600
1601
1602 </Para>
1603 </ListItem>
1604 </VarListEntry>
1605 <VarListEntry>
1606 <Term>
1607 Query (F)
1608 </Term>
1609 <ListItem>
1610 <Para>
1611
1612 <VariableList>
1613 <VarListEntry>
1614 <Term>
1615         Byte1('Q')
1616 </Term>
1617 <ListItem>
1618 <Para>
1619                 Identifies the message as a query.
1620 </Para>
1621 </ListItem>
1622 </VarListEntry>
1623 <VarListEntry>
1624 <Term>
1625         String
1626 </Term>
1627 <ListItem>
1628 <Para>
1629                 The query string itself.
1630 </Para>
1631 </ListItem>
1632 </VarListEntry>
1633 </VariableList>
1634
1635
1636 </Para>
1637 </ListItem>
1638 </VarListEntry>
1639 <VarListEntry>
1640 <Term>
1641 ReadyForQuery (B)
1642 </Term>
1643 <ListItem>
1644 <Para>
1645
1646 <VariableList>
1647 <VarListEntry>
1648 <Term>
1649         Byte1('Z')
1650 </Term>
1651 <ListItem>
1652 <Para>
1653                 Identifies the message type.  ReadyForQuery is sent
1654                 whenever the backend is ready for a new query cycle.
1655 </Para>
1656 </ListItem>
1657 </VarListEntry>
1658 </VariableList>
1659
1660
1661 </Para>
1662 </ListItem>
1663 </VarListEntry>
1664 <VarListEntry>
1665 <Term>
1666 RowDescription (B)
1667 </Term>
1668 <ListItem>
1669 <Para>
1670
1671 <VariableList>
1672 <VarListEntry>
1673 <Term>
1674         Byte1('T')
1675 </Term>
1676 <ListItem>
1677 <Para>
1678                 Identifies the message as a row description.
1679 </Para>
1680 </ListItem>
1681 </VarListEntry>
1682 <VarListEntry>
1683 <Term>
1684         Int16
1685 </Term>
1686 <ListItem>
1687 <Para>
1688                 Specifies the number of fields in a row (may be zero).
1689 </Para>
1690 <Para>
1691         Then, for each field, there is the following:
1692 <VariableList>
1693 <VarListEntry>
1694 <Term>
1695                 String
1696 </Term>
1697 <ListItem>
1698 <Para>
1699                         Specifies the field name.
1700 </Para>
1701 </ListItem>
1702 </VarListEntry>
1703 <VarListEntry>
1704 <Term>
1705                 Int32
1706 </Term>
1707 <ListItem>
1708 <Para>
1709                         Specifies the object ID of the field type.
1710 </Para>
1711 </ListItem>
1712 </VarListEntry>
1713 <VarListEntry>
1714 <Term>
1715                 Int16
1716 </Term>
1717 <ListItem>
1718 <Para>
1719                         Specifies the type size.
1720 </Para>
1721 </ListItem>
1722 </VarListEntry>
1723 <VarListEntry>
1724 <Term>
1725                 Int32
1726 </Term>
1727 <ListItem>
1728 <Para>
1729                         Specifies the type modifier.
1730 </Para>
1731 </ListItem>
1732 </VarListEntry>
1733 </VariableList>
1734
1735 </Para>
1736 </ListItem>
1737 </VarListEntry>
1738 </VariableList>
1739
1740
1741 </Para>
1742 </ListItem>
1743 </VarListEntry>
1744 <VarListEntry>
1745 <Term>
1746 StartupPacket (F)
1747 </Term>
1748 <ListItem>
1749 <Para>
1750
1751 <VariableList>
1752 <VarListEntry>
1753 <Term>
1754         Int32(296)
1755 </Term>
1756 <ListItem>
1757 <Para>
1758                 The size of the packet in bytes.
1759 </Para>
1760 </ListItem>
1761 </VarListEntry>
1762 <VarListEntry>
1763 <Term>
1764         Int32
1765 </Term>
1766 <ListItem>
1767 <Para>
1768                 The protocol version number.  The most significant 16 bits are
1769                 the major version number.  The least 16 significant bits are
1770                 the minor version number.
1771 </Para>
1772 </ListItem>
1773 </VarListEntry>
1774 <VarListEntry>
1775 <Term>
1776         LimString64
1777 </Term>
1778 <ListItem>
1779 <Para>
1780                 The database name, defaults to the user name if empty.
1781 </Para>
1782 </ListItem>
1783 </VarListEntry>
1784 <VarListEntry>
1785 <Term>
1786         LimString32
1787 </Term>
1788 <ListItem>
1789 <Para>
1790                 The user name.
1791 </Para>
1792 </ListItem>
1793 </VarListEntry>
1794 <VarListEntry>
1795 <Term>
1796         LimString64
1797 </Term>
1798 <ListItem>
1799 <Para>
1800                 Any additional command line arguments to be passed to the
1801                 backend child process by the server.
1802 </Para>
1803 </ListItem>
1804 </VarListEntry>
1805 <VarListEntry>
1806 <Term>
1807         LimString64
1808 </Term>
1809 <ListItem>
1810 <Para>
1811                 Unused.
1812 </Para>
1813 </ListItem>
1814 </VarListEntry>
1815 <VarListEntry>
1816 <Term>
1817         LimString64
1818 </Term>
1819 <ListItem>
1820 <Para>
1821                 The optional tty the backend should use for debugging messages.
1822 </Para>
1823 </ListItem>
1824 </VarListEntry>
1825 </VariableList>
1826
1827
1828 </Para>
1829 </ListItem>
1830 </VarListEntry>
1831 <VarListEntry>
1832 <Term>
1833 Terminate (F)
1834 </Term>
1835 <ListItem>
1836 <Para>
1837
1838 <VariableList>
1839 <VarListEntry>
1840 <Term>
1841         Byte1('X')
1842 </Term>
1843 <ListItem>
1844 <Para>
1845                 Identifies the message as a termination.
1846 </Para>
1847 </ListItem>
1848 </VarListEntry>
1849 </VariableList>
1850
1851
1852 </Para>
1853 </ListItem>
1854 </VarListEntry>
1855 <VarListEntry>
1856 <Term>
1857 UnencryptedPasswordPacket (F)
1858 </Term>
1859 <ListItem>
1860 <Para>
1861
1862 <VariableList>
1863 <VarListEntry>
1864 <Term>
1865         Int32
1866 </Term>
1867 <ListItem>
1868 <Para>
1869                 The size of the packet in bytes.
1870 </Para>
1871 </ListItem>
1872 </VarListEntry>
1873 <VarListEntry>
1874 <Term>
1875         String
1876 </Term>
1877 <ListItem>
1878 <Para>
1879                 The unencrypted password.
1880 </Para>
1881 </ListItem>
1882 </VarListEntry>
1883 </VariableList>
1884
1885 </Para>
1886 </ListItem>
1887 </VarListEntry>
1888 </VariableList>
1889
1890 </sect1>
1891 </Chapter>