1<?xml version="1.0" encoding="UTF-8" ?> 2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 4<!-- 5 variable names used in equation markup in the authentication chapter 6 FIXME: Replace with mathml? 7 --> 8<!ENTITY variable.D "<emphasis role='italic'>D</emphasis>"> 9<!ENTITY variable.N "<emphasis role='italic'>N</emphasis>"> 10<!ENTITY variable.T "<emphasis role='italic'>T</emphasis>"> 11<!ENTITY variable.Delta "<emphasis role='italic'>Δ</emphasis>"> 12<!ENTITY variable.alpha "<emphasis role='italic'>α</emphasis>"> 13<!ENTITY variable.beta "<emphasis role='italic'>β</emphasis>"> 14<!ENTITY variable.kappa "<emphasis role='italic'>κ</emphasis>"> 15<!ENTITY variable.rho "<emphasis role='italic'>ρ</emphasis>"> 16<!ENTITY variable.sigma "<emphasis role='italic'>σ</emphasis>"> 17<!ENTITY variable.tau "<emphasis role='italic'>τ</emphasis>"> 18<!ENTITY % defs SYSTEM "defs.ent"> %defs; 19]> 20 21<book id="xdmcp"> 22 23<bookinfo> 24 <title>X Display Manager Control Protocol</title> 25 <subtitle>X.Org Standard</subtitle> 26 <releaseinfo>X Version 11</releaseinfo> 27 <releaseinfo>Version 1.1</releaseinfo> 28 <authorgroup> 29 <author> 30 <firstname>Keith</firstname><surname>Packard</surname> 31 <affiliation> 32 <orgname>Massachusetts Institute of Technology</orgname> 33 <orgdiv>Laboratory for Computer Science</orgdiv> 34 <orgdiv>X Consortium</orgdiv> 35 </affiliation> 36 </author> 37 </authorgroup> 38 39 <copyright><year>1989</year><year>2004</year> 40 <holder>The Open Group</holder></copyright> 41 42<legalnotice> 43 44 45 46<para> 47Permission is hereby granted, free of charge, to any person obtaining a copy 48of this software and associated documentation files (the "Software"), to deal 49in the Software without restriction, including without limitation the rights 50to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 51copies of the Software, and to permit persons to whom the Software is 52furnished to do so, subject to the following conditions: 53</para> 54<para> 55The above copyright notice and this permission notice shall be included in 56all copies or substantial portions of the Software. 57</para> 58<para> 59THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 60IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 61FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 62OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 63AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 64CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 65</para> 66<para> 67Except as contained in this notice, the name of The Open Group shall not be 68used in advertising or otherwise to promote the sale, use or other dealings 69in this Software without prior written authorization from The Open Group. 70</para> 71 72<para> 73<emphasis remap='I'>X Window System</emphasis> is a trademark of The Open Group. 74</para> 75</legalnotice> 76</bookinfo> 77 78<chapter id="Purpose_and_Goals"> 79<title>Purpose and Goals</title> 80<!-- .XS --> 81<!-- (SN Purpose and Goals --> 82<!-- .XE --> 83<para> 84<!-- .LP --> 85The purpose of the X Display Manager Control Protocol (XDMCP) 86is to provide a uniform mechanism for an autonomous 87display to request login service from a remote host. 88By autonomous, we mean 89the display consists of hardware and processes that are independent of any 90particular host where login service is desired. (For example, the server 91cannot simply be started by a 92<function>fork/exec</function> 93sequence on the host.) 94An X terminal (screen, keyboard, mouse, processor, network interface) 95is a prime example of an autonomous display. 96</para> 97 98<para> 99From the point of view of the end user, it is very important to make 100autonomous displays as easy to use as traditional hardwired character 101terminals. Specifically, you can typically just power on a hardwired 102terminal and be greeted with a login prompt. The same should be possible 103with autonomous displays. However, in a network environment with multiple 104hosts, the end user may want to choose which host(s) to connect to. In an 105environment with many displays and many hosts, a site administrator may want 106to associate particular collections of hosts with particular displays. We 107would like to support the following options: 108</para> 109 110<itemizedlist> 111 <listitem> 112 <para> 113The display has a single, fixed host to which it should connect. It should be 114possible to power on the display and receive a login prompt, without user 115intervention. 116 </para> 117 </listitem> 118 <listitem> 119 <para> 120Any one of several hosts on a network or subnetwork may be acceptable 121for accepting login from the display. 122(For example, the user's file systems can be mounted onto 123any such host, providing comparable environments.) It should be possible 124for the display to broadcast to find such hosts and to have the display 125either automatically choose a host or present the possible hosts to the 126user for selection. 127 </para> 128 </listitem> 129 <listitem> 130 <para> 131The display has a fixed set of hosts that it can connect to. It should be 132possible for the display to have that set stored in RAM, but it should also be 133possible for a site administrator to be able to maintain host sets for a 134large number of displays using a centralized facility, without having to 135interact (physically or electronically) with each individual display. 136Particular hosts should be allowed to refuse login service, based on 137whatever local criteria are desired. 138 </para> 139 </listitem> 140</itemizedlist> 141 142<para> 143The control protocol should be designed in such a way that it can be used over 144a reasonable variety of communication transport layers. In fact, it is quite 145desirable if every major network protocol family that supports the standard X 146protocol is also capable of supporting XDMCP, because the end result of XDMCP 147negotiation will be standard X protocol connections to the display. 148However, because the number of displays per host may be large, 149a connection-based protocol appears less desirable 150than a connection-less protocol. For this reason the protocol is designed 151to use datagram services with the display responsible for sequencing and 152retransmission. 153</para> 154<para> 155<!-- .LP --> 156To keep the burden on displays at a minimum (because display cost is not 157a factor that can be ignored), it is desirable that displays not be required 158to maintain permanent state (across power cycles) for the purposes 159of the control protocol, 160and it is desirable to keep required state at a minimum while the 161display is powered on. 162</para> 163<para> 164<!-- .LP --> 165Security is an important consideration and must be an integral part of the 166design. The important security goals in the context of XDMCP are: 167</para> 168<itemizedlist> 169 <listitem> 170 <para> 171It should be possible for the display to verify that it is communicating 172with a legitimate host login service. Because the user will present 173credentials (for example, password) to this service, 174it is important to avoid spoof attacks. 175 </para> 176 </listitem> 177 <listitem> 178 <para> 179It should be possible for the display and the login service to negotiate the 180authorization mechanism to be used for the standard X protocol. 181 </para> 182 </listitem> 183 <listitem> 184 <para> 185It should be possible to provide the same level of security in verifying the 186login service as is provided by the negotiated authorization mechanism. 187 </para> 188 </listitem> 189 <listitem> 190 <para> 191Because there are no firm standards yet in the area of security, 192XDMCP must be flexible enough to accommodate a variety of security mechanisms. 193 </para> 194 </listitem> 195</itemizedlist> 196</chapter> 197 198<chapter id="Overview_of_the_Protocol"> 199<title>Overview of the Protocol</title> 200<!-- .XS --> 201<!-- (SN Overview of the Protocol --> 202<!-- .XE --> 203<para> 204<!-- .LP --> 205XDMCP is designed to provide authenticated access to display management 206services for remote displays. A new network server, called a \fIDisplay 207Manager\fP, will use XDMCP to communicate with displays to negotiate the 208startup of X sessions. The protocol allows the display to authenticate the 209manager. It also allows most of the configuration information to be 210centralized with the manager and to ease the burden of system administration 211in a large network of displays. 212The essential goal is to provide plug-and-play 213services similar to those provided in the familiar mainframe/terminal world. 214</para> 215<para> 216<!-- .LP --> 217Displays may be turned off by the user at any time. Any existing session 218running on a display that has been turned off must be identifiable. This 219is made possible by requiring a three-way handshake to start a session. If 220the handshake succeeds, any existing session is terminated immediately and a 221new session started. There is the problem (at least with TCP) that 222connections may not be closed when the display is turned off. In most 223environments, the manager should reduce this problem by periodically XSync'ing 224on its own connection, perhaps every five to ten minutes, and terminating the 225session if its own connection ever closes. 226</para> 227<para> 228<!-- .LP --> 229Displays should not be required to retain permanent state for purposes of 230the control protocol. One solution to packets received out of sequence 231would be to use monotonically increasing message identifiers in each message 232to allow both sides to ignore messages that arrive out-of-sequence. For 233this to work, displays would at a minimum have to increment a stable crash 234count each time they are powered on and use that number as part of a 235larger sequence number. But if displays cannot retain permanent state this 236cannot work. Instead, the manager assumes the responsibility for permanent 237state by generating unique numbers that identify a particular session and 238the protocol simply ignores packets that correspond to an invalid session. 239</para> 240<para> 241<!-- .LP --> 242The Manager must not be responsible for packet reception. To prevent the 243Manager from becoming stuck because of a hostile display, no portion of the 244protocol requires the Manager to retransmit a packet. Part of this means 245that any valid packet that the Manager does receive must be 246acknowledged in some way to prevent the display from continuously resending 247packets. The display can keep the protocol running as it will always know 248when the Manager has received (at least one copy of) a packet. On the 249Manager side, this means that any packet may be received more than once (if 250the response was lost) and duplicates must be ignored. 251</para> 252</chapter> 253 254<chapter id="Data_Types"> 255<title>Data Types</title> 256<!-- .XS --> 257<!-- (SN Data Types --> 258<!-- .XE --> 259<para> 260<!-- .LP --> 261XDMCP packets contain several types of data. Integer values are always 262stored most significant byte first in the packet ("Big Endian" order). 263As XDMCP will not be used to transport large quantities of data, this 264restriction will not substantially hamper the efficiency of any 265implementation. Also, no padding of any sort will occur within the packets. 266</para> 267 268<informaltable frame="topbot"> 269 <?dbfo keep-together="always" ?> 270 <tgroup cols='3' align='left' colsep='0' rowsep='0'> 271 <colspec colname='c1' colwidth="1.0*"/> 272 <colspec colname='c2' colwidth="1.0*"/> 273 <colspec colname='c3' colwidth="2.0*"/> 274 <thead> 275 <row rowsep='1'> 276 <entry>Type Name</entry> 277 <entry>Length (Bytes)</entry> 278 <entry>Description</entry> 279 </row> 280 </thead> 281 <tbody> 282 <row> 283 <entry>CARD8</entry> 284 <entry>1</entry> 285 <entry>A single byte unsigned integer</entry> 286 </row> 287 <row> 288 <entry>CARD16</entry> 289 <entry>2</entry> 290 <entry>Two byte unsigned integer</entry> 291 </row> 292 <row> 293 <entry>CARD32</entry> 294 <entry>4</entry> 295 <entry>Four byte unsigned integer</entry> 296 </row> 297 <row> 298 <entry>ARRAY8</entry> 299 <entry>n+2</entry> 300 <entry> 301This is actually a CARD16 followed by 302a collection of CARD8. The value of the CARD16 303field (n) specifies the number of CARD8 values to follow 304 </entry> 305 </row> 306 <row> 307 <entry>ARRAY16</entry> 308 <entry>2*m+1</entry> 309 <entry> 310This is a CARD8 (m) which specifies the 311number of CARD16 values to follow 312 </entry> 313 </row> 314 <row> 315 <entry>ARRAY32</entry> 316 <entry>4*l+1</entry> 317 <entry> 318This is a CARD8 (l) which specifies the 319number of CARD32 values to follow 320 </entry> 321 </row> 322 <row> 323 <entry>ARRAYofARRAY8</entry> 324 <entry>?</entry> 325 <entry> 326This is a CARD8 which specifies the 327number of ARRAY8 values to follow. 328 </entry> 329 </row> 330 </tbody> 331 </tgroup> 332</informaltable> 333</chapter> 334 335<chapter id="Packet_Format"> 336<title>Packet Format</title> 337<!-- .XS --> 338<!-- (SN Packet Format --> 339<!-- .XE --> 340<para> 341All XDMCP packets have the following information: 342</para> 343 344<informaltable frame="topbot"> 345 <?dbfo keep-together="always" ?> 346 <tgroup cols='3' align='left' colsep='0' rowsep='0'> 347 <colspec colname='c1' colwidth="1.0*" /> 348 <colspec colname='c2' colwidth="1.0*" /> 349 <colspec colname='c3' colwidth="2.0*" /> 350 <thead> 351 <row rowsep='1'> 352 <entry>Length (Bytes)</entry> 353 <entry>Field Type</entry> 354 <entry>Description</entry> 355 </row> 356 </thead> 357 <tbody> 358 <row> 359 <entry>2</entry> 360 <entry>CARD16</entry> 361 <entry>version number</entry> 362 </row> 363 <row> 364 <entry>2</entry> 365 <entry>CARD16</entry> 366 <entry>opcode packet header</entry> 367 </row> 368 <row> 369 <entry>2</entry> 370 <entry>CARD16</entry> 371 <entry>n = length of remaining data in bytes</entry> 372 </row> 373 <row> 374 <entry>n</entry> 375 <entry>???</entry> 376 <entry>packet-specific data</entry> 377 </row> 378 </tbody> 379 </tgroup> 380</informaltable> 381 382<para> 383<!-- .LP --> 384The fields are as follows: 385</para> 386 387<variablelist> 388 <varlistentry> 389 <term>Version number</term> 390 <listitem> 391 <para> 392This specifies the version of XDMCP that generated this packet in 393case changes in this protocol are required. Displays and 394managers may choose to support older versions for compatibility. 395This field will initially be one (1). 396 </para> 397 </listitem> 398 </varlistentry> 399 <varlistentry> 400 <term>Opcode</term> 401 <listitem> 402 <para> 403This specifies what step of the protocol this packet represents and should 404contain one of the following values (encoding provided in section below): 405<emphasis role="bold">BroadcastQuery</emphasis>, 406<emphasis role="bold">Query</emphasis>, 407<emphasis role="bold">IndirectQuery</emphasis>, 408<emphasis role="bold">ForwardQuery</emphasis>, 409<emphasis role="bold">Willing</emphasis>, 410<emphasis role="bold">Unwilling</emphasis>, 411<emphasis role="bold">Request</emphasis>, 412<emphasis role="bold">Accept</emphasis>, 413<emphasis role="bold">Decline</emphasis>, 414<emphasis role="bold">Manage</emphasis>, 415<emphasis role="bold">Refuse</emphasis>, 416<emphasis role="bold">Failed</emphasis>, 417<emphasis role="bold">KeepAlive</emphasis> 418or 419<emphasis role="bold">Alive</emphasis>. 420 </para> 421 </listitem> 422 </varlistentry> 423 <varlistentry> 424 <term>Length of data in bytes</term> 425 <listitem> 426 <para> 427This specifies the length of the information following the first 6 bytes. 428Each packet-type has a different format and will need to be separately 429length-checked against this value. Because every data item has either an 430explicit or implicit length, this can be easily accomplished. 431Packets that have too little or too much data should be ignored. 432 </para> 433 </listitem> 434 </varlistentry> 435</variablelist> 436<para> 437Packets should be checked to make sure that they satisfy the following 438conditions: 439</para> 440 441<orderedlist> 442 <listitem> 443 <para> 444They must contain valid opcodes. 445 </para> 446 </listitem> 447 <listitem> 448 <para> 449The length of the remaining data should correspond to the sum of the 450lengths of the individual remaining data items. 451 </para> 452 </listitem> 453 <listitem> 454 <para> 455The opcode should be expected (a finite state diagram is given 456in a later section). 457 </para> 458 </listitem> 459 <listitem> 460 <para> 461If the packet is of type 462<emphasis role="bold">Manage</emphasis> or 463<emphasis role="bold">Refuse</emphasis>, 464the Session ID should match the value sent in the preceding 465<emphasis role="bold">Accept</emphasis> packet. 466 </para> 467 </listitem> 468</orderedlist> 469</chapter> 470 471<chapter id="Protocol"> 472<title>Protocol</title> 473<!-- .XS --> 474<!-- (SN Protocol --> 475<!-- .XE --> 476<para> 477Each of the opcodes is described below. Because a given packet type is only 478ever sent one way, each packet description below indicates the direction. 479Most of the packets have additional information included beyond the 480description above. The additional information is appended to the packet 481header in the order described without padding, and the length field is 482computed accordingly. 483</para> 484 485<informaltable frame="none" colsep='0' rowsep='0'> 486 <tgroup cols='10' align='left'> 487 <colspec colname='col1' colwidth="1.0*"/> 488 <colspec colname='col2' colwidth="1.0*"/> 489 <colspec colname='col3' colwidth="1.0*"/> 490 <colspec colname='col4' colwidth="1.0*"/> 491 <colspec colname='col5' colwidth="1.0*"/> 492 <colspec colname='col6' colwidth="1.0*"/> 493 <colspec colname='col7' colwidth="1.0*"/> 494 <colspec colname='col8' colwidth="1.0*"/> 495 <colspec colname='col9' colwidth="1.0*"/> 496 <colspec colname='col10' colwidth="1.0*"/> 497 <spanspec namest="col1" nameend="col10" spanname="col1_on" align="left"/> 498 <spanspec namest="col2" nameend="col10" spanname="col2_on" align="left"/> 499 <spanspec namest="col3" nameend="col10" spanname="col3_on" align="left"/> 500 <spanspec namest="col4" nameend="col10" spanname="col4_on" align="left"/> 501 <spanspec namest="col5" nameend="col10" spanname="col5_on" align="left"/> 502 <tbody> 503 <row> 504 <entry spanname="col1_on"><emphasis role="bold">Query</emphasis></entry> 505 </row> 506 <row> 507 <entry spanname="col1_on"><emphasis role="bold">BroadcastQuery</emphasis></entry> 508 </row> 509 <row> 510 <entry spanname="col1_on"><emphasis role="bold">IndirectQuery</emphasis></entry> 511 </row> 512 <row> 513 <entry></entry> 514 <entry spanname="col2_on">Display -> Manager</entry> 515 </row> 516 <row> 517 <entry></entry> 518 <entry spanname="col2_on">Additional Fields:</entry> 519 </row> 520 <row> 521 <entry></entry> 522 <entry></entry> 523 <entry spanname="col3_on"> 524<emphasis>Authentication Names</emphasis>: ARRAYofARRAY8 525 </entry> 526 </row> 527 <row> 528 <entry></entry> 529 <entry></entry> 530 <entry></entry> 531 <entry spanname="col4_on"> 532Specifies a list of authentication names that the display supports. The 533manager will choose one of these and return it in the 534<emphasis role="bold">Willing</emphasis> packet. 535 </entry> 536 </row> 537<!-- AAAAAAAAAAAAA --> 538 <row> 539 <entry></entry> 540 <entry></entry> 541 <entry spanname="col3_on">Semantics</entry> 542 </row> 543 <row> 544 <entry></entry> 545 <entry></entry> 546 <entry></entry> 547 <entry spanname="col4_on"> 548<para> 549A <function>Query</function> 550packet is sent from the display to a specific host to ask if 551that host is willing to provide management services to this display. The 552host should respond with 553<function>Willing</function> 554if it is willing to service the display or 555<function>Unwilling</function> 556if it is not. 557</para> 558 559<para> 560A 561<function>BroadcastQuery</function> 562packet is similar to the 563<function>Query</function> 564packet except that it is intended to be received by all hosts on the network 565(or subnetwork). However, unlike 566<function>Query</function> 567requests, hosts that are not willing to service the display 568should simply ignore 569<function>BroadcastQuery</function> 570requests. 571</para> 572 573<para> 574An 575<function>IndirectQuery</function> 576packet is sent to a well known manager that forwards 577the request to a larger collection of secondary managers using 578<function>ForwardQuery</function> 579packets. 580In this way, the collection of managers that respond can be grouped 581on other than network boundaries; the use of a central manager reduces 582system administrative overhead. 583The primary manager may also send a 584<function>Willing</function> 585packet in response to this packet. 586</para> 587 588<para> 589Each packet type has slightly different semantics: 590</para> 591 </entry> 592 </row> 593 <row> 594 <entry></entry> 595 <entry></entry> 596 <entry></entry> 597 <entry></entry> 598 <entry spanname="col5_on"> 599<para> 600The 601<function>Query</function> 602packet is destined only for a single host. 603If the display is instructed to 604<function>Query</function> 605multiple managers, it will send multiple 606<function>Query</function> 607packets. The 608<function>Query</function> 609packet also demands a response from the manager, either 610<function>Willing</function> 611or 612<function>Unwilling</function>. 613 </para> 614 <para> 615The 616<function>BroadcastQuery</function> 617packet is sent to many hosts. 618Each manager that receives this packet will not respond with an 619<function>Unwilling</function> 620packet. 621 </para> 622 <para> 623The 624<function>IndirectQuery</function> 625packet is sent to only one manager with the request 626that the request be forwarded to a larger list of managers using 627<function>ForwardQuery</function> 628packets. This list is expected to be maintained at one 629central site to reduce administrative overhead. 630The function of this packet type is similar to 631<function>BroadcastQuery except that</function> 632<function>BroadcastQuery</function> 633is not forwarded. 634 </para> 635 </entry> 636 </row> 637 <row> 638 <entry></entry> 639 <entry></entry> 640 <entry></entry> 641 <entry spanname="col4_on">Valid Responses:</entry> 642 </row> 643 <row> 644 <entry></entry> 645 <entry></entry> 646 <entry spanname="col3_on"> 647<function>Willing</function>, 648<function>Unwilling</function> 649 </entry> 650 </row> 651 <row> 652 <entry></entry> 653 <entry></entry> 654 <entry></entry> 655 <entry spanname="col4_on">Problems/Solutions:</entry> 656 </row> 657 <row> 658 <entry></entry> 659 <entry></entry> 660 <entry spanname="col3_on">Problem:</entry> 661 </row> 662 <row> 663 <entry></entry> 664 <entry></entry> 665 <entry></entry> 666 <entry spanname="col4_on"> 667<para>Not all managers receive the query packet.</para> 668<para>Indication:</para> 669 </entry> 670 </row> 671 <row> 672 <entry></entry> 673 <entry></entry> 674 <entry></entry> 675 <entry></entry> 676 <entry spanname="col5_on"> 677None if 678<function>BroadcastQuery</function> 679or 680<function>IndirectQuery</function> 681was sent, else failure to receive 682<function>Willing</function>. 683 </entry> 684 </row> 685 <row> 686 <entry></entry> 687 <entry></entry> 688 <entry></entry> 689 <entry spanname="col4_on">Solution:</entry> 690 </row> 691 <row> 692 <entry></entry> 693 <entry></entry> 694 <entry></entry> 695 <entry></entry> 696 <entry spanname="col5_on"> 697Repeatedly send the packet while waiting for user to choose a manager. 698 </entry> 699 </row> 700 <row> 701 <entry></entry> 702 <entry></entry> 703 <entry spanname="col3_on"> 704Timeout/Retransmission policy: 705 </entry> 706 </row> 707 <row> 708 <entry></entry> 709 <entry></entry> 710 <entry></entry> 711 <entry spanname="col4_on"> 712An exponential backoff algorithm should be used here to reduce network load 713for long-standing idle displays. Start at 2 seconds, back off by factors of 7142 to 32 seconds, and discontinue retransmit after 126 seconds. The display 715should reset the timeout when user-input is detected. In this way, the 716display will wakeup when touched by the user. 717 </entry> 718 </row> 719 <row> 720 <entry spanname="col1_on"> 721<function>ForwardQuery</function> 722 </entry> 723 </row> 724 <row> 725 <entry></entry> 726 <entry spanname="col2_on"> 727<para>Primary Manager -> Secondary Manager</para> 728<para>Additional Fields:</para> 729 </entry> 730 </row> 731 <row> 732 <entry></entry> 733 <entry></entry> 734 <entry spanname="col3_on"> 735<emphasis remap='I'>Client Address</emphasis>: ARRAY8 736 </entry> 737 </row> 738 <row> 739 <entry></entry> 740 <entry></entry> 741 <entry></entry> 742 <entry spanname="col4_on"> 743Specifies the network address of the client display. 744 </entry> 745 </row> 746 <row> 747 <entry></entry> 748 <entry></entry> 749 <entry spanname="col3_on"> 750<emphasis remap='I'>Client Port</emphasis>: ARRAY8 751 </entry> 752 </row> 753 <row> 754 <entry></entry> 755 <entry></entry> 756 <entry></entry> 757 <entry spanname="col4_on"> 758Specifies an identification of the client task on the client display. 759 </entry> 760 </row> 761 <row> 762 <entry></entry> 763 <entry></entry> 764 <entry spanname="col3_on"> 765<emphasis remap='I'>Authentication Names</emphasis>: ARRAYofARRAY8 766 </entry> 767 </row> 768 <row> 769 <entry></entry> 770 <entry></entry> 771 <entry></entry> 772 <entry spanname="col4_on"> 773Is a duplicate of Authentication Names array that was received 774in the 775<function>IndirectQuery</function> 776packet. 777 </entry> 778 </row> 779 <row> 780 <entry></entry> 781 <entry spanname="col2_on"> 782Semantics: 783 </entry> 784 </row> 785 <row> 786 <entry></entry> 787 <entry></entry> 788 <entry spanname="col3_on"> 789 <para> 790When primary manager receives a 791<function>IndirectQuery</function> 792packet, it is responsible for sending 793<function>ForwardQuery</function> 794packets to an appropriate list of 795managers that can provide service to the display using the same network 796type as the one the original 797<function>IndirectQuery</function> 798packet was received from. 799The Client Address and Client Port fields must contain an 800address that the secondary manager can use to reach the display also using 801this same network. Each secondary manager sends a 802<function>Willing</function> 803packet to the display if it is willing to provide service. 804 </para> 805 806 <para> 807<function>ForwardQuery</function> 808packets are similar to 809<function>BroadcastQuery</function> 810packets in that managers that are not willing to service 811particular displays should not send a 812<function>Unwilling</function> 813packet. 814 </para> 815 </entry> 816 </row> 817 <row> 818 <entry></entry> 819 <entry spanname="col2_on"> 820Valid Responses: 821 </entry> 822 </row> 823 824 <row> 825 <entry></entry> 826 <entry></entry> 827 <entry spanname="col3_on"> 828<function>Willing</function> 829 </entry> 830 </row> 831 <row> 832 <entry></entry> 833 <entry spanname="col2_on"> 834Problems/Solutions: 835 </entry> 836 </row> 837 <row> 838 <entry></entry> 839 <entry></entry> 840 <entry spanname="col3_on"> 841Identical to 842<function>BroadcastQuery</function> 843 </entry> 844 </row> 845 <row> 846 <entry></entry> 847 <entry spanname="col2_on"> 848Timeout/Retransmission policy: 849 </entry> 850 </row> 851 <row> 852 <entry></entry> 853 <entry></entry> 854 <entry spanname="col3_on"> 855Like all packets sent from a manager, this packet should never be 856retransmitted. 857 </entry> 858 </row> 859 860 <row> 861 <entry spanname="col1_on"> 862<function>Willing</function> 863 </entry> 864 </row> 865 866 <row> 867 <entry></entry> 868 <entry spanname="col2_on"> 869 <para> 870Manager -> Display 871 </para> 872 <para> 873Additional Fields: 874 </para> 875 </entry> 876 </row> 877 878 <row> 879 <entry></entry> 880 <entry></entry> 881 <entry spanname="col3_on"> 882<emphasis remap='I'>Authentication Name</emphasis>: ARRAY8 883 </entry> 884 </row> 885 886 <row> 887 <entry></entry> 888 <entry></entry> 889 <entry></entry> 890 <entry spanname="col4_on"> 891<para> 892Specifies the authentication method, selected from the list offered in the 893<function>Query ,</function> 894<function>BroadcastQuery ,</function> 895or 896<function>IndirectQuery</function> 897packet that the manager expects the display to use in the subsequent 898<function>Request</function> 899packet. 900This choice should remain as constant as feasible so that displays that 901send multiple 902<function>Query</function> 903packets can use the Authentication Name from any 904<function>Willing</function> 905packet that arrives. 906</para> 907<para> 908The display is free to ignore managers that request an insufficient level 909of authentication. 910</para> 911 </entry> 912 </row> 913 914 <row> 915 <entry></entry> 916 <entry></entry> 917 <entry spanname="col3_on"> 918<emphasis remap='I'>Hostname</emphasis>: ARRAY8 919 </entry> 920 </row> 921 922 <row> 923 <entry></entry> 924 <entry></entry> 925 <entry></entry> 926 <entry spanname="col4_on"> 927Is a human readable string describing the host from which the packet was sent. 928The protocol specifies no interpretation of the data in this field. 929 </entry> 930 </row> 931 932 <row> 933 <entry></entry> 934 <entry></entry> 935 <entry spanname="col3_on"> 936<emphasis remap='I'>Status</emphasis>: ARRAY8 937 </entry> 938 </row> 939 940 <row> 941 <entry></entry> 942 <entry></entry> 943 <entry></entry> 944 <entry spanname="col4_on"> 945Is a human readable string describing the status of the host. This could 946include load average/number of users connected or other information. The 947protocol specifies no interpretation of the data in this field. 948 </entry> 949 </row> 950 951 952 <row> 953 <entry></entry> 954 <entry spanname="col2_on"> 955Semantics: 956 </entry> 957 </row> 958 959 <row> 960 <entry></entry> 961 <entry></entry> 962 <entry spanname="col3_on"> 963A 964<function>Willing</function> 965packet is sent by managers that may service connections from 966this display. It is sent in response to either a 967<function>Query ,</function> 968<function>BroadcastQuery ,</function> 969or 970<function>ForwardQuery</function> 971but does not imply a commitment to provide service 972(for example, it may later decide that it has accepted enough 973connections already). 974 </entry> 975 </row> 976 977 <row> 978 <entry></entry> 979 <entry spanname="col2_on"> 980Problems/Solutions: 981 </entry> 982 </row> 983 984 <row> 985 <entry></entry> 986 <entry></entry> 987 <entry spanname="col3_on"> 988Problem: 989 </entry> 990 </row> 991 992 <row> 993 <entry></entry> 994 <entry></entry> 995 <entry></entry> 996 <entry spanname="col4_on"> 997<para> 998<function>Willing</function> 999not received by the display. 1000</para> 1001<para> 1002Indication: 1003</para> 1004 </entry> 1005 </row> 1006 1007 <row> 1008 <entry></entry> 1009 <entry></entry> 1010 <entry></entry> 1011 <entry></entry> 1012 <entry spanname="col5_on"> 1013None if 1014<function>BroadcastQuery</function> 1015or 1016<function>IndirectQuery</function> 1017was sent, else failure to receive 1018<function>Willing .</function> 1019 </entry> 1020 </row> 1021 1022 <row> 1023 <entry></entry> 1024 <entry></entry> 1025 <entry></entry> 1026 <entry spanname="col4_on"> 1027Solution: 1028 </entry> 1029 </row> 1030 1031 <row> 1032 <entry></entry> 1033 <entry></entry> 1034 <entry></entry> 1035 <entry></entry> 1036 <entry spanname="col5_on"> 1037The display should continue to send the query until a response is received. 1038 </entry> 1039 </row> 1040 1041 1042 1043 <row> 1044 <entry></entry> 1045 <entry spanname="col2_on"> 1046Timeout/Retransmission policy: 1047 </entry> 1048 </row> 1049 1050 <row> 1051 <entry></entry> 1052 <entry></entry> 1053 <entry spanname="col3_on"> 1054Like all packets sent from the manager to the display, this packet should 1055never be retransmitted. 1056 </entry> 1057 </row> 1058 1059 <row> 1060 <entry spanname="col1_on"> 1061<function>Unwilling</function> 1062 </entry> 1063 </row> 1064 1065 <row> 1066 <entry></entry> 1067 <entry spanname="col2_on"> 1068 <para> 1069Manager -> Display 1070 </para> 1071 <para> 1072Additional Fields: 1073 </para> 1074 </entry> 1075 </row> 1076 1077 <row> 1078 <entry></entry> 1079 <entry></entry> 1080 <entry spanname="col3_on"> 1081The Hostname and Status fields as in the 1082<function>Willing</function> 1083packet. 1084The Status field should indicate to the user a reason 1085for the refusal of service. 1086 </entry> 1087 </row> 1088 1089 <row> 1090 <entry></entry> 1091 <entry spanname="col2_on"> 1092Semantics: 1093 </entry> 1094 </row> 1095 1096 <row> 1097 <entry></entry> 1098 <entry></entry> 1099 <entry spanname="col3_on"> 1100An 1101<function>Unwilling</function> 1102packet is sent by managers in response to direct 1103<function>Query</function> 1104requests (as opposed to 1105<function>BroadcastQuery</function> 1106or 1107<function>IndirectQuery</function> 1108requests) if the manager will not accept requests for management. 1109This is typically sent by managers that wish to only service 1110particular displays or that handle a limited number of displays at once. 1111 </entry> 1112 </row> 1113 1114 <row> 1115 <entry></entry> 1116 <entry spanname="col2_on"> 1117Problems/Solutions: 1118 </entry> 1119 </row> 1120 1121 <row> 1122 <entry></entry> 1123 <entry></entry> 1124 <entry spanname="col3_on"> 1125Problem: 1126 </entry> 1127 </row> 1128 1129 <row> 1130 <entry></entry> 1131 <entry></entry> 1132 <entry></entry> 1133 <entry spanname="col4_on"> 1134<para> 1135<function>Unwilling</function> 1136not received by the display. 1137</para> 1138<para> 1139Indication: 1140</para> 1141 </entry> 1142 </row> 1143 1144 <row> 1145 <entry></entry> 1146 <entry></entry> 1147 <entry></entry> 1148 <entry></entry> 1149 <entry spanname="col5_on"> 1150Display fails to receive 1151<function>Unwilling .</function> 1152 </entry> 1153 </row> 1154 1155 <row> 1156 <entry></entry> 1157 <entry></entry> 1158 <entry></entry> 1159 <entry spanname="col4_on"> 1160Solution: 1161 </entry> 1162 </row> 1163 1164 <row> 1165 <entry></entry> 1166 <entry></entry> 1167 <entry></entry> 1168 <entry></entry> 1169 <entry spanname="col5_on"> 1170The display should continue to send 1171<function>Query</function> 1172messages until a response is received. 1173 </entry> 1174 </row> 1175 1176 <row> 1177 <entry></entry> 1178 <entry spanname="col2_on"> 1179Timeout/Retransmission policy: 1180 </entry> 1181 </row> 1182 1183 <row> 1184 <entry></entry> 1185 <entry></entry> 1186 <entry spanname="col3_on"> 1187Like all packets sent from the manager to the display, this packet should 1188never be retransmitted. 1189 </entry> 1190 </row> 1191 <row> 1192 <entry spanname="col1_on"> 1193<function>Request</function> 1194 </entry> 1195 </row> 1196 1197 <row> 1198 <entry></entry> 1199 <entry spanname="col2_on"> 1200 <para> 1201Display -> Manager 1202 </para> 1203 <para> 1204Additional Fields: 1205 </para> 1206 </entry> 1207 </row> 1208 1209 <row> 1210 <entry></entry> 1211 <entry></entry> 1212 <entry spanname="col3_on"> 1213<emphasis remap='I'>Display Number</emphasis>: CARD16 1214 </entry> 1215 </row> 1216 1217 <row> 1218 <entry></entry> 1219 <entry></entry> 1220 <entry></entry> 1221 <entry spanname="col4_on"> 1222Specifies the index of this particular server for the host 1223on which the display is resident. 1224This value will be zero for most autonomous displays. 1225 </entry> 1226 </row> 1227 1228 <row> 1229 <entry></entry> 1230 <entry></entry> 1231 <entry spanname="col3_on"> 1232<emphasis remap='I'>Connection Types</emphasis>: ARRAY16 1233 </entry> 1234 </row> 1235 1236 <row> 1237 <entry></entry> 1238 <entry></entry> 1239 <entry></entry> 1240 <entry spanname="col4_on"> 1241Specifies an array indicating the stream services accepted by the display. 1242If the high-order byte in a particular entry is zero, the low-order byte 1243corresponds to an X-protocol host family type. 1244 </entry> 1245 </row> 1246 1247 <row> 1248 <entry></entry> 1249 <entry></entry> 1250 <entry spanname="col3_on"> 1251<emphasis remap='I'>Connection Addresses</emphasis>: ARRAYofARRAY8 1252 </entry> 1253 </row> 1254 1255 <row> 1256 <entry></entry> 1257 <entry></entry> 1258 <entry></entry> 1259 <entry spanname="col4_on"> 1260For each connection type in the previous array, the corresponding entry in 1261this array indicates the network address of the display device. 1262 </entry> 1263 </row> 1264 1265 <row> 1266 <entry></entry> 1267 <entry></entry> 1268 <entry spanname="col3_on"> 1269 <para> 1270<emphasis remap='I'>Authentication Name</emphasis>: ARRAY8 1271 </para> 1272 <para> 1273<emphasis remap='I'>Authentication Data</emphasis>: ARRAY8 1274 </para> 1275 </entry> 1276 </row> 1277 1278 <row> 1279 <entry></entry> 1280 <entry></entry> 1281 <entry></entry> 1282 <entry spanname="col4_on"> 1283Specifies the authentication protocol that the display expects 1284the manager to validate itself with. The Authentication Data is 1285expected to contain data that the manager will interpret, modify 1286and use to authenticate itself. 1287 </entry> 1288 </row> 1289 1290 <row> 1291 <entry></entry> 1292 <entry></entry> 1293 <entry spanname="col3_on"> 1294<emphasis remap='I'>Authorization Names</emphasis>: ARRAYofARRAY8 1295 </entry> 1296 </row> 1297 1298 <row> 1299 <entry></entry> 1300 <entry></entry> 1301 <entry></entry> 1302 <entry spanname="col4_on"> 1303Specifies which types of authorization the display supports. The 1304manager may decide to reject displays with which it cannot perform 1305authorization. 1306 </entry> 1307 </row> 1308 1309 <row> 1310 <entry></entry> 1311 <entry></entry> 1312 <entry spanname="col3_on"> 1313<emphasis remap='I'>Manufacturer Display ID</emphasis>: ARRAY8 1314 </entry> 1315 </row> 1316 1317 <row> 1318 <entry></entry> 1319 <entry></entry> 1320 <entry></entry> 1321 <entry spanname="col4_on"> 1322Can be used by the manager to determine how to decrypt the 1323Authentication Data field in this packet. See the section below on 1324Manufacturer Display ID Format. 1325 </entry> 1326 </row> 1327 1328 <row> 1329 <entry></entry> 1330 <entry spanname="col2_on"> 1331Semantics: 1332 </entry> 1333 </row> 1334 1335 <row> 1336 <entry></entry> 1337 <entry></entry> 1338 <entry spanname="col3_on"> 1339A 1340<function>Request</function> 1341packet is sent by a display to a specific host to request a 1342session ID in preparation for a establishing a connection. If the manager 1343is willing to service a connection to this display, it should return an 1344<function>Accept</function> 1345packet with a valid session ID and should be ready for a subsequent 1346<function>Manage</function> 1347request. Otherwise, it should return a 1348<function>Decline</function> 1349packet. 1350 </entry> 1351 </row> 1352 1353 <row> 1354 <entry></entry> 1355 <entry spanname="col2_on"> 1356Valid Responses: 1357 </entry> 1358 </row> 1359 1360 <row> 1361 <entry></entry> 1362 <entry></entry> 1363 <entry spanname="col3_on"> 1364<function>Accept ,</function> 1365<function>Decline</function> 1366 </entry> 1367 </row> 1368 1369 <row> 1370 <entry></entry> 1371 <entry spanname="col2_on"> 1372Problems/Solutions: 1373 </entry> 1374 </row> 1375 1376 <row> 1377 <entry></entry> 1378 <entry></entry> 1379 <entry spanname="col3_on"> 1380Problem: 1381 </entry> 1382 </row> 1383 1384 <row> 1385 <entry></entry> 1386 <entry></entry> 1387 <entry></entry> 1388 <entry spanname="col4_on"> 1389Request not received by manager. 1390 </entry> 1391 </row> 1392 1393 <row> 1394 <entry></entry> 1395 <entry></entry> 1396 <entry></entry> 1397 <entry spanname="col4_on"> 1398Indication: 1399 </entry> 1400 </row> 1401 1402 <row> 1403 <entry></entry> 1404 <entry></entry> 1405 <entry></entry> 1406 <entry></entry> 1407 <entry spanname="col5_on"> 1408Display timeout waiting for response. 1409 </entry> 1410 </row> 1411 1412 <row> 1413 <entry></entry> 1414 <entry></entry> 1415 <entry></entry> 1416 <entry spanname="col4_on"> 1417Solution: 1418 </entry> 1419 </row> 1420 1421 <row> 1422 <entry></entry> 1423 <entry></entry> 1424 <entry></entry> 1425 <entry></entry> 1426 <entry spanname="col5_on"> 1427Display resends 1428<function>Request</function> 1429message. 1430 </entry> 1431 </row> 1432 1433 1434 <row> 1435 <entry></entry> 1436 <entry></entry> 1437 <entry></entry> 1438 <entry spanname="col4_on"> 1439Problem: 1440 </entry> 1441 </row> 1442 1443 <row> 1444 <entry></entry> 1445 <entry></entry> 1446 <entry></entry> 1447 <entry></entry> 1448 <entry spanname="col5_on"> 1449Message received out of order by manager. 1450 </entry> 1451 </row> 1452 1453 <row> 1454 <entry></entry> 1455 <entry></entry> 1456 <entry></entry> 1457 <entry spanname="col4_on"> 1458Indication: 1459 </entry> 1460 </row> 1461 1462 <row> 1463 <entry></entry> 1464 <entry></entry> 1465 <entry></entry> 1466 <entry></entry> 1467 <entry spanname="col5_on"> 1468None. 1469 </entry> 1470 </row> 1471 1472 <row> 1473 <entry></entry> 1474 <entry></entry> 1475 <entry></entry> 1476 <entry spanname="col4_on"> 1477Solution: 1478 </entry> 1479 </row> 1480 1481 <row> 1482 <entry></entry> 1483 <entry></entry> 1484 <entry></entry> 1485 <entry></entry> 1486 <entry spanname="col5_on"> 1487Each time a 1488<function>Request</function> 1489is sent, the manager sends the Session ID 1490associated with the next session in the 1491<function>Accept .</function> 1492If that next session is not yet started, 1493the manager will simply resend with the same Session ID. 1494If the session is in progress, the manager will reply 1495with a new Session ID; in which case, the 1496<function>Accept</function> 1497will be discarded by the display. 1498 </entry> 1499 </row> 1500 1501 <row> 1502 <entry></entry> 1503 <entry spanname="col2_on"> 1504Timeout/Retransmission policy: 1505 </entry> 1506 </row> 1507 1508 <row> 1509 <entry></entry> 1510 <entry></entry> 1511 <entry spanname="col3_on"> 1512Timeout after 2 seconds, exponential backoff to 32 seconds. 1513After no more than 126 seconds, give up and report an error to the user. 1514 </entry> 1515 </row> 1516 1517 <row> 1518 <entry spanname="col1_on"> 1519<function>Accept</function> 1520 </entry> 1521 </row> 1522 1523 <row> 1524 <entry></entry> 1525 <entry spanname="col2_on"> 1526 <para> 1527Manager -> Display 1528 </para> 1529 <para> 1530Additional Fields: 1531 </para> 1532 </entry> 1533 </row> 1534 1535 <row> 1536 <entry></entry> 1537 <entry></entry> 1538 <entry spanname="col3_on"> 1539<emphasis remap='I'>Session ID</emphasis>: CARD32 1540 </entry> 1541 </row> 1542 1543 <row> 1544 <entry></entry> 1545 <entry></entry> 1546 <entry></entry> 1547 <entry spanname="col4_on"> 1548Identifies the session that can be started by the manager. 1549 </entry> 1550 </row> 1551 1552 <row> 1553 <entry></entry> 1554 <entry></entry> 1555 <entry spanname="col3_on"> 1556 <para> 1557<emphasis remap='I'>Authentication Name</emphasis>: ARRAY8 1558 </para> 1559 <para> 1560<emphasis remap='I'>Authentication Data</emphasis>: ARRAY8 1561 </para> 1562 </entry> 1563 </row> 1564 1565 <row> 1566 <entry></entry> 1567 <entry></entry> 1568 <entry></entry> 1569 <entry spanname="col4_on"> 1570Is the data sent back to the display to authenticate the manager. 1571If the Authentication Data is not the value expected by the display, it 1572should terminate the protocol at this point and display an error to the user. 1573 </entry> 1574 </row> 1575 1576 <row> 1577 <entry></entry> 1578 <entry></entry> 1579 <entry spanname="col3_on"> 1580 <para> 1581<emphasis remap='I'>Authorization Name</emphasis>: ARRAY8 1582 </para> 1583 <para> 1584<emphasis remap='I'>Authorization Data</emphasis>: ARRAY8 1585 </para> 1586 </entry> 1587 </row> 1588 1589 <row> 1590 <entry></entry> 1591 <entry></entry> 1592 <entry></entry> 1593 <entry spanname="col4_on"> 1594Is the data sent to the display to indicate the type of authorization the 1595manager will be using in the first call to 1596<olink targetdoc='libX11' targetptr='XOpenDisplay'><function>XOpenDisplay</function></olink> 1597after the 1598<function>Manage</function> 1599packet is received. 1600 </entry> 1601 </row> 1602 1603 1604 <row> 1605 <entry></entry> 1606 <entry spanname="col2_on"> 1607Semantics: 1608 </entry> 1609 </row> 1610 1611 <row> 1612 <entry></entry> 1613 <entry></entry> 1614 <entry spanname="col3_on"> 1615<para> 1616An 1617<function>Accept</function> 1618packet is sent by a manager in response to a 1619<function>Request</function> 1620packet if the manager is willing to establish a connection for the display. 1621The Session ID is used to identify this connection from any preceding 1622ones and will be used by the display in its subsequent 1623<function>Manage</function> 1624packet. 1625The Session ID is a 32-bit number that is incremented each time an 1626<function>Accept</function> 1627packet is sent as it must be unique over a reasonably long period of time. 1628</para> 1629<para> 1630If the authentication information is invalid, a 1631<function>Decline</function> 1632packet will be returned with an appropriate 1633<function>Status</function> 1634message. 1635</para> 1636 </entry> 1637 </row> 1638 1639 <row> 1640 <entry></entry> 1641 <entry spanname="col2_on"> 1642Problems/Solutions: 1643 </entry> 1644 </row> 1645 1646 <row> 1647 <entry></entry> 1648 <entry></entry> 1649 <entry spanname="col3_on"> 1650Problem: 1651 </entry> 1652 </row> 1653 1654 <row> 1655 <entry></entry> 1656 <entry></entry> 1657 <entry></entry> 1658 <entry spanname="col4_on"> 1659<function>Accept</function> 1660or 1661<function>Decline</function> 1662not received by display. 1663 </entry> 1664 </row> 1665 1666 <row> 1667 <entry></entry> 1668 <entry></entry> 1669 <entry></entry> 1670 <entry spanname="col4_on"> 1671Indication: 1672 </entry> 1673 </row> 1674 1675 <row> 1676 <entry></entry> 1677 <entry></entry> 1678 <entry></entry> 1679 <entry></entry> 1680 <entry spanname="col5_on"> 1681Display timeout waiting for response to 1682<function>Request .</function> 1683 </entry> 1684 </row> 1685 1686 <row> 1687 <entry></entry> 1688 <entry></entry> 1689 <entry></entry> 1690 <entry spanname="col4_on"> 1691Solution: 1692 </entry> 1693 </row> 1694 1695 <row> 1696 <entry></entry> 1697 <entry></entry> 1698 <entry></entry> 1699 <entry></entry> 1700 <entry spanname="col5_on"> 1701Display resends 1702<function>Request</function> 1703message. 1704 </entry> 1705 </row> 1706 1707 <row> 1708 <entry></entry> 1709 <entry></entry> 1710 <entry spanname="col3_on"> 1711Problem: 1712 </entry> 1713 </row> 1714 1715 <row> 1716 <entry></entry> 1717 <entry></entry> 1718 <entry></entry> 1719 <entry spanname="col4_on"> 1720Message received out of order by display. 1721 </entry> 1722 </row> 1723 1724 <row> 1725 <entry></entry> 1726 <entry></entry> 1727 <entry></entry> 1728 <entry spanname="col4_on"> 1729Indication: 1730 </entry> 1731 </row> 1732 1733 <row> 1734 <entry></entry> 1735 <entry></entry> 1736 <entry></entry> 1737 <entry></entry> 1738 <entry spanname="col5_on"> 1739Display receives 1740<function>Accept</function> 1741after 1742<function>Manage</function> 1743has been sent. 1744 </entry> 1745 </row> 1746 1747 <row> 1748 <entry></entry> 1749 <entry></entry> 1750 <entry></entry> 1751 <entry spanname="col4_on"> 1752Solution: 1753 </entry> 1754 </row> 1755 1756 <row> 1757 <entry></entry> 1758 <entry></entry> 1759 <entry></entry> 1760 <entry></entry> 1761 <entry spanname="col5_on"> 1762Display discards 1763<function>Accept</function> 1764messages after it has sent a 1765<function>Manage</function> 1766message. 1767 </entry> 1768 </row> 1769 1770 <row> 1771 <entry></entry> 1772 <entry spanname="col2_on"> 1773Timeout/Retransmission policy: 1774 </entry> 1775 </row> 1776 1777 <row> 1778 <entry></entry> 1779 <entry></entry> 1780 <entry spanname="col3_on"> 1781Like all packets sent from the manager to the display, this packet should 1782never be retransmitted. 1783 </entry> 1784 </row> 1785 1786 <row> 1787 <entry spanname="col1_on"> 1788<function>Decline</function> 1789 </entry> 1790 </row> 1791 1792 <row> 1793 <entry></entry> 1794 <entry spanname="col2_on"> 1795 <para> 1796Manager -> Display 1797 </para> 1798 <para> 1799Additional Fields: 1800 </para> 1801 </entry> 1802 </row> 1803 1804 <row> 1805 <entry></entry> 1806 <entry></entry> 1807 <entry spanname="col3_on"> 1808<emphasis remap='I'>Status</emphasis>: ARRAY8 1809 </entry> 1810 </row> 1811 1812 <row> 1813 <entry></entry> 1814 <entry></entry> 1815 <entry></entry> 1816 <entry spanname="col4_on"> 1817Is a human readable string indicating the reason for refusal of 1818service. 1819 </entry> 1820 </row> 1821 1822 <row> 1823 <entry></entry> 1824 <entry></entry> 1825 <entry spanname="col3_on"> 1826 <para> 1827<emphasis remap='I'>Authentication Name</emphasis>: 1828ARRAY8 1829 </para> 1830 <para> 1831<emphasis remap='I'>Authentication Data</emphasis>: 1832ARRAY8 1833 </para> 1834 </entry> 1835 </row> 1836 1837 <row> 1838 <entry></entry> 1839 <entry></entry> 1840 <entry></entry> 1841 <entry spanname="col4_on"> 1842Is the data sent back to the display to authenticate the manager. If the 1843Authentication Data is not the value expected by the display, it 1844should terminate the protocol at this point and display an error to the user. 1845 </entry> 1846 </row> 1847 1848 <row> 1849 <entry></entry> 1850 <entry spanname="col2_on"> 1851Semantics: 1852 </entry> 1853 </row> 1854 1855 <row> 1856 <entry></entry> 1857 <entry></entry> 1858 <entry spanname="col3_on"> 1859A 1860<function>Decline</function> 1861packet is sent by a manager in response to a 1862<function>Request</function> 1863packet if the manager is unwilling to establish a connection for the 1864display. 1865This is allowed even if the manager had responded 1866<function>Willing</function> 1867to a previous query. 1868 </entry> 1869 </row> 1870 1871 <row> 1872 <entry></entry> 1873 <entry spanname="col2_on"> 1874Problems/Solutions: 1875 </entry> 1876 </row> 1877 1878 <row> 1879 <entry></entry> 1880 <entry></entry> 1881 <entry spanname="col3_on"> 1882Same as for 1883<function>Accept .</function> 1884 </entry> 1885 </row> 1886 1887 <row> 1888 <entry></entry> 1889 <entry spanname="col2_on"> 1890Timeout/Retransmission policy: 1891 </entry> 1892 </row> 1893 1894 <row> 1895 <entry></entry> 1896 <entry></entry> 1897 <entry spanname="col3_on"> 1898Like all packets sent from a manager to a display, this packet should never 1899be retransmitted. 1900 </entry> 1901 </row> 1902 1903 <row> 1904 <entry spanname="col1_on"> 1905<function>Manage</function> 1906 </entry> 1907 </row> 1908 1909 <row> 1910 <entry></entry> 1911 <entry spanname="col2_on"> 1912 <para> 1913Display -> Manager 1914 </para> 1915 <para> 1916Additional Fields: 1917 </para> 1918 </entry> 1919 </row> 1920 1921 <row> 1922 <entry></entry> 1923 <entry></entry> 1924 <entry spanname="col3_on"> 1925<emphasis remap='I'>Session ID</emphasis>: CARD32 1926 </entry> 1927 </row> 1928 1929 <row> 1930 <entry></entry> 1931 <entry></entry> 1932 <entry></entry> 1933 <entry spanname="col4_on"> 1934Should contain the nonzero session ID returned in the 1935<function>Accept</function> 1936packet. 1937 </entry> 1938 </row> 1939 1940 <row> 1941 <entry></entry> 1942 <entry></entry> 1943 <entry spanname="col3_on"> 1944<emphasis remap='I'>Display Number</emphasis>: CARD16 1945 </entry> 1946 </row> 1947 1948 <row> 1949 <entry></entry> 1950 <entry></entry> 1951 <entry></entry> 1952 <entry spanname="col4_on"> 1953Must match the value sent in the previous 1954<function>Request</function> 1955packet. 1956 </entry> 1957 </row> 1958 1959 <row> 1960 <entry></entry> 1961 <entry></entry> 1962 <entry spanname="col3_on"> 1963<emphasis remap='I'>Display Class</emphasis>: ARRAY8 1964 </entry> 1965 </row> 1966 1967 <row> 1968 <entry></entry> 1969 <entry></entry> 1970 <entry></entry> 1971 <entry spanname="col4_on"> 1972Specifies the class of the display. 1973See the Display Class Format section, 1974which discusses the format of this field. 1975 </entry> 1976 </row> 1977 1978 1979 <row> 1980 <entry></entry> 1981 <entry spanname="col2_on"> 1982Semantics: 1983 </entry> 1984 </row> 1985 1986 <row> 1987 <entry></entry> 1988 <entry></entry> 1989 <entry spanname="col3_on"> 1990A 1991<function>Manage</function> 1992packet is sent by a display to ask the manager to begin a 1993session on the display. If the Session ID is correct the manager 1994should open a connection; otherwise, it should respond with a 1995<function>Refuse</function> 1996or 1997<function>Failed</function> 1998packet, unless the Session ID matches a currently 1999running session or a session that has not yet successfully opened the 2000display but has not given up the attempt. In this latter case, the 2001<function>Manage</function> 2002packet should be ignored. 2003This will work as stream connections give positive success indication 2004to both halves of the stream, and positive failure indication 2005to the connection initiator (which will eventually generate a 2006<function>Failed</function> 2007packet). 2008 </entry> 2009 </row> 2010 2011 <row> 2012 <entry></entry> 2013 <entry spanname="col2_on"> 2014Valid Responses: 2015 </entry> 2016 </row> 2017 2018 <row> 2019 <entry></entry> 2020 <entry></entry> 2021 <entry spanname="col3_on"> 2022X connection with correct auth info, 2023<function>Refuse ,</function> 2024<function>Failed .</function> 2025 </entry> 2026 </row> 2027 2028 <row> 2029 <entry></entry> 2030 <entry spanname="col2_on"> 2031Problems/Solutions: 2032 </entry> 2033 </row> 2034 2035 <row> 2036 <entry></entry> 2037 <entry></entry> 2038 <entry spanname="col3_on"> 2039Problem: 2040 </entry> 2041 </row> 2042 2043 <row> 2044 <entry></entry> 2045 <entry></entry> 2046 <entry></entry> 2047 <entry spanname="col4_on"> 2048<function>Manage</function> 2049not received by manager. 2050 </entry> 2051 </row> 2052 2053 <row> 2054 <entry></entry> 2055 <entry></entry> 2056 <entry></entry> 2057 <entry spanname="col4_on"> 2058Indication: 2059 </entry> 2060 </row> 2061 2062 <row> 2063 <entry></entry> 2064 <entry></entry> 2065 <entry></entry> 2066 <entry></entry> 2067 <entry spanname="col5_on"> 2068Display timeout waiting for response. 2069 </entry> 2070 </row> 2071 2072 <row> 2073 <entry></entry> 2074 <entry></entry> 2075 <entry></entry> 2076 <entry spanname="col4_on"> 2077Solution: 2078 </entry> 2079 </row> 2080 2081 <row> 2082 <entry></entry> 2083 <entry></entry> 2084 <entry></entry> 2085 <entry></entry> 2086 <entry spanname="col5_on"> 2087Display resends 2088<function>Manage</function> 2089message. 2090 </entry> 2091 </row> 2092 2093 2094 <row> 2095 <entry></entry> 2096 <entry></entry> 2097 <entry spanname="col3_on"> 2098Problem: 2099 </entry> 2100 </row> 2101 2102 <row> 2103 <entry></entry> 2104 <entry></entry> 2105 <entry></entry> 2106 <entry spanname="col4_on"> 2107<function>Manage</function> 2108received out of order by manager. 2109 </entry> 2110 </row> 2111 2112 <row> 2113 <entry></entry> 2114 <entry></entry> 2115 <entry></entry> 2116 <entry spanname="col4_on"> 2117Indication: 2118 </entry> 2119 </row> 2120 2121 <row> 2122 <entry></entry> 2123 <entry></entry> 2124 <entry></entry> 2125 <entry></entry> 2126 <entry spanname="col5_on"> 2127Session already in progress with matching Session ID. 2128 </entry> 2129 </row> 2130 2131 <row> 2132 <entry></entry> 2133 <entry></entry> 2134 <entry></entry> 2135 <entry spanname="col4_on"> 2136Solution: 2137 </entry> 2138 </row> 2139 2140 <row> 2141 <entry></entry> 2142 <entry></entry> 2143 <entry></entry> 2144 <entry></entry> 2145 <entry spanname="col5_on"> 2146<function>Manage</function> 2147packet ignored. 2148 </entry> 2149 </row> 2150 2151 <row> 2152 <entry></entry> 2153 <entry></entry> 2154 <entry></entry> 2155 <entry spanname="col4_on"> 2156Indication: 2157 </entry> 2158 </row> 2159 2160 <row> 2161 <entry></entry> 2162 <entry></entry> 2163 <entry></entry> 2164 <entry></entry> 2165 <entry spanname="col5_on"> 2166Session ID does not match next Session ID. 2167 </entry> 2168 </row> 2169 2170 <row> 2171 <entry></entry> 2172 <entry></entry> 2173 <entry></entry> 2174 <entry spanname="col4_on"> 2175Solution: 2176 </entry> 2177 </row> 2178 2179 <row> 2180 <entry></entry> 2181 <entry></entry> 2182 <entry></entry> 2183 <entry></entry> 2184 <entry spanname="col5_on"> 2185<function>Refuse</function> 2186message is sent. 2187 </entry> 2188 </row> 2189 2190 2191 <row> 2192 <entry></entry> 2193 <entry></entry> 2194 <entry spanname="col3_on"> 2195Problem: 2196 </entry> 2197 </row> 2198 2199 <row> 2200 <entry></entry> 2201 <entry></entry> 2202 <entry></entry> 2203 <entry spanname="col4_on"> 2204Display cannot be opened on selected stream. 2205 </entry> 2206 </row> 2207 2208 <row> 2209 <entry></entry> 2210 <entry></entry> 2211 <entry></entry> 2212 <entry spanname="col4_on"> 2213Indication: 2214 </entry> 2215 </row> 2216 2217 <row> 2218 <entry></entry> 2219 <entry></entry> 2220 <entry></entry> 2221 <entry></entry> 2222 <entry spanname="col5_on"> 2223Display connection setup fails. 2224 </entry> 2225 </row> 2226 2227 <row> 2228 <entry></entry> 2229 <entry></entry> 2230 <entry></entry> 2231 <entry spanname="col4_on"> 2232Solution: 2233 </entry> 2234 </row> 2235 2236 <row> 2237 <entry></entry> 2238 <entry></entry> 2239 <entry></entry> 2240 <entry></entry> 2241 <entry spanname="col5_on"> 2242<function>Failed</function> 2243message is sent including a human readable reason. 2244 </entry> 2245 </row> 2246 2247 <row> 2248 <entry></entry> 2249 <entry></entry> 2250 <entry spanname="col3_on"> 2251Problem: 2252 </entry> 2253 </row> 2254 2255 <row> 2256 <entry></entry> 2257 <entry></entry> 2258 <entry></entry> 2259 <entry spanname="col4_on"> 2260Display open does not succeed before a second manage packet is received 2261because of a timeout occurring in the display. 2262 </entry> 2263 </row> 2264 2265 <row> 2266 <entry></entry> 2267 <entry></entry> 2268 <entry></entry> 2269 <entry spanname="col4_on"> 2270Indication: 2271 </entry> 2272 </row> 2273 2274 <row> 2275 <entry></entry> 2276 <entry></entry> 2277 <entry></entry> 2278 <entry></entry> 2279 <entry spanname="col5_on"> 2280<function>Manage</function> 2281packet received with Session ID matching the session 2282attempting to connect to the display. 2283 </entry> 2284 </row> 2285 2286 <row> 2287 <entry></entry> 2288 <entry></entry> 2289 <entry></entry> 2290 <entry spanname="col4_on"> 2291Solution: 2292 </entry> 2293 </row> 2294 2295 <row> 2296 <entry></entry> 2297 <entry></entry> 2298 <entry></entry> 2299 <entry></entry> 2300 <entry spanname="col5_on"> 2301<function>Manage</function> 2302packet is ignored. As the stream connection will either 2303succeed, which will result in an active session, or the stream will 2304eventually give up hope of connecting and send a 2305<function>Failed</function> 2306packet; no response to this 2307<function>Manage</function> 2308packet is necessary. 2309 </entry> 2310 </row> 2311 2312 <row> 2313 <entry></entry> 2314 <entry spanname="col2_on"> 2315Timeout/Retransmission policy: 2316 </entry> 2317 </row> 2318 2319 <row> 2320 <entry></entry> 2321 <entry></entry> 2322 <entry spanname="col3_on"> 2323Timeout after 2 seconds, exponential backoff to 32 seconds. After no more 2324than 126 seconds, give up and report an error to the user. 2325 </entry> 2326 </row> 2327 2328 <row> 2329 <entry spanname="col1_on"> 2330<function>Refuse</function> 2331 </entry> 2332 </row> 2333 2334 <row> 2335 <entry></entry> 2336 <entry spanname="col2_on"> 2337 <para> 2338Manager -> Display 2339 </para> 2340 <para> 2341Additional Fields: 2342 </para> 2343 </entry> 2344 </row> 2345 2346 <row> 2347 <entry></entry> 2348 <entry></entry> 2349 <entry spanname="col3_on"> 2350<emphasis remap='I'>Session ID</emphasis>: CARD32 2351 </entry> 2352 </row> 2353 2354 <row> 2355 <entry></entry> 2356 <entry></entry> 2357 <entry></entry> 2358 <entry spanname="col4_on"> 2359Should be set to the Session ID received in the 2360<function>Manage</function> 2361packet. 2362 </entry> 2363 </row> 2364 2365 2366 <row> 2367 <entry></entry> 2368 <entry spanname="col2_on"> 2369Semantics: 2370 </entry> 2371 </row> 2372 2373 <row> 2374 <entry></entry> 2375 <entry></entry> 2376 <entry spanname="col3_on"> 2377A 2378<function>Refuse</function> 2379packet is sent by a manager when the Session ID received in the 2380<function>Manage</function> 2381packet does not match the current Session ID. 2382The display should assume that it received an old 2383<function>Accept</function> 2384packet and should resend its 2385<function>Request</function> 2386packet. 2387 </entry> 2388 </row> 2389 2390 <row> 2391 <entry></entry> 2392 <entry spanname="col2_on"> 2393Problems/Solutions: 2394 </entry> 2395 </row> 2396 2397 <row> 2398 <entry></entry> 2399 <entry></entry> 2400 <entry spanname="col3_on"> 2401Problem: 2402 </entry> 2403 </row> 2404 2405 <row> 2406 <entry></entry> 2407 <entry></entry> 2408 <entry></entry> 2409 <entry spanname="col4_on"> 2410Error message is lost. 2411 </entry> 2412 </row> 2413 2414 <row> 2415 <entry></entry> 2416 <entry></entry> 2417 <entry></entry> 2418 <entry spanname="col4_on"> 2419Indication: 2420 </entry> 2421 </row> 2422 2423 <row> 2424 <entry></entry> 2425 <entry></entry> 2426 <entry></entry> 2427 <entry></entry> 2428 <entry spanname="col5_on"> 2429Display times out waiting for 2430new connection, 2431<function>Refuse</function> 2432or 2433<function>Failed .</function> 2434 </entry> 2435 </row> 2436 2437 <row> 2438 <entry></entry> 2439 <entry></entry> 2440 <entry></entry> 2441 <entry spanname="col4_on"> 2442Solution: 2443 </entry> 2444 </row> 2445 2446 <row> 2447 <entry></entry> 2448 <entry></entry> 2449 <entry></entry> 2450 <entry></entry> 2451 <entry spanname="col5_on"> 2452Display resends 2453<function>Manage</function> 2454message. 2455 </entry> 2456 </row> 2457 2458 2459 2460 <row> 2461 <entry></entry> 2462 <entry spanname="col2_on"> 2463Timeout/Retransmission policy: 2464 </entry> 2465 </row> 2466 2467 <row> 2468 <entry></entry> 2469 <entry></entry> 2470 <entry spanname="col3_on"> 2471Like all packets sent from a manager to a display, this packet should never be 2472retransmitted. 2473 </entry> 2474 </row> 2475 2476 <row> 2477 <entry spanname="col1_on"> 2478<function>Failed</function> 2479 </entry> 2480 </row> 2481 2482 <row> 2483 <entry></entry> 2484 <entry spanname="col2_on"> 2485 <para> 2486Manager -> Display 2487 </para> 2488 <para> 2489Additional Fields: 2490 </para> 2491 </entry> 2492 </row> 2493 2494 <row> 2495 <entry></entry> 2496 <entry></entry> 2497 <entry spanname="col3_on"> 2498<emphasis remap='I'>Session ID</emphasis>: CARD32 2499 </entry> 2500 </row> 2501 2502 <row> 2503 <entry></entry> 2504 <entry></entry> 2505 <entry></entry> 2506 <entry spanname="col4_on"> 2507Should be set to the Session ID received in the 2508<function>Manage</function> 2509packet. 2510 </entry> 2511 </row> 2512 2513 <row> 2514 <entry></entry> 2515 <entry></entry> 2516 <entry spanname="col3_on"> 2517<emphasis remap='I'>Status</emphasis>: ARRAY8 2518 </entry> 2519 </row> 2520 2521 <row> 2522 <entry></entry> 2523 <entry></entry> 2524 <entry></entry> 2525 <entry spanname="col4_on"> 2526Is a human readable string indicating the reason for failure. 2527 </entry> 2528 </row> 2529 2530 2531 <row> 2532 <entry></entry> 2533 <entry spanname="col2_on"> 2534Semantics: 2535 </entry> 2536 </row> 2537 2538 <row> 2539 <entry></entry> 2540 <entry></entry> 2541 <entry spanname="col3_on"> 2542A 2543<function>Failed</function> 2544packet is sent by a manager when it has problems establishing 2545the initial X connection in response to the 2546<function>Manage</function> 2547packet. 2548 </entry> 2549 </row> 2550 2551 <row> 2552 <entry></entry> 2553 <entry spanname="col2_on"> 2554Problems/Solutions 2555 </entry> 2556 </row> 2557 2558 <row> 2559 <entry></entry> 2560 <entry></entry> 2561 <entry spanname="col3_on"> 2562Same as for 2563<function>Refuse .</function> 2564 </entry> 2565 </row> 2566 2567 <row> 2568 <entry spanname="col1_on"> 2569<function>KeepAlive</function> 2570 </entry> 2571 </row> 2572 2573 <row> 2574 <entry></entry> 2575 <entry spanname="col2_on"> 2576 <para> 2577Display -> Manager 2578 </para> 2579 <para> 2580Additional Fields: 2581 </para> 2582 </entry> 2583 </row> 2584 2585 <row> 2586 <entry></entry> 2587 <entry></entry> 2588 <entry spanname="col3_on"> 2589<emphasis remap='I'>Display Number</emphasis>: CARD16 2590 </entry> 2591 </row> 2592 2593 <row> 2594 <entry></entry> 2595 <entry></entry> 2596 <entry></entry> 2597 <entry spanname="col4_on"> 2598Set to the display index for the display host. 2599 </entry> 2600 </row> 2601 2602 <row> 2603 <entry></entry> 2604 <entry></entry> 2605 <entry spanname="col3_on"> 2606<emphasis remap='I'>Session ID</emphasis>: CARD32 2607 </entry> 2608 </row> 2609 2610 <row> 2611 <entry></entry> 2612 <entry></entry> 2613 <entry></entry> 2614 <entry spanname="col4_on"> 2615Should be set to the Session ID received in the 2616<function>Manage</function> 2617packet during the negotiation for the current session. 2618 </entry> 2619 </row> 2620 2621 <row> 2622 <entry></entry> 2623 <entry spanname="col2_on"> 2624Semantics: 2625 </entry> 2626 </row> 2627 2628 <row> 2629 <entry></entry> 2630 <entry></entry> 2631 <entry spanname="col3_on"> 2632 <para> 2633A 2634<function>KeepAlive</function> 2635packet can be sent at any time during the session by a 2636display to discover if the manager is running. 2637The manager should respond with 2638<function>Alive</function> 2639whenever it receives this type of packet. 2640 </para> 2641 <para> 2642This allows the display to discover when the manager host 2643is no longer running. 2644A display is not required to send 2645<function>KeepAlive</function> 2646packets and, upon lack of receipt of 2647<function>Alive</function> 2648packets, is not required to perform any specific action. 2649 </para> 2650 <para> 2651The expected use of this packet is to terminate an active session when the 2652manager host or network link fails. The display should keep track of the 2653time since any packet has been received from the manager host and use 2654<function>KeepAlive</function> 2655packets when a substantial time has elapsed since the 2656most recent packet. 2657 </para> 2658 </entry> 2659 </row> 2660 2661 <row> 2662 <entry></entry> 2663 <entry spanname="col2_on"> 2664Valid Responses: 2665 </entry> 2666 </row> 2667 2668 <row> 2669 <entry></entry> 2670 <entry></entry> 2671 <entry spanname="col3_on"> 2672<function>Alive</function> 2673 </entry> 2674 </row> 2675 2676 <row> 2677 <entry></entry> 2678 <entry spanname="col2_on"> 2679Problems/Solutions: 2680 </entry> 2681 </row> 2682 2683 <row> 2684 <entry></entry> 2685 <entry></entry> 2686 <entry spanname="col3_on"> 2687Problem: 2688 </entry> 2689 </row> 2690 2691 <row> 2692 <entry></entry> 2693 <entry></entry> 2694 <entry></entry> 2695 <entry spanname="col4_on"> 2696Manager does not receive the packet or display does not receive the response. 2697 </entry> 2698 </row> 2699 2700 2701 <row> 2702 <entry></entry> 2703 <entry></entry> 2704 <entry></entry> 2705 <entry spanname="col4_on"> 2706Indication: 2707 </entry> 2708 </row> 2709 2710 <row> 2711 <entry></entry> 2712 <entry></entry> 2713 <entry></entry> 2714 <entry></entry> 2715 <entry spanname="col5_on"> 2716No 2717<function>Alive</function> 2718packet is returned. 2719 </entry> 2720 </row> 2721 2722 <row> 2723 <entry></entry> 2724 <entry></entry> 2725 <entry></entry> 2726 <entry spanname="col4_on"> 2727Solution: 2728 </entry> 2729 </row> 2730 2731 <row> 2732 <entry></entry> 2733 <entry></entry> 2734 <entry></entry> 2735 <entry></entry> 2736 <entry spanname="col5_on"> 2737Retransmit the packet with an exponential backoff; start at 2 seconds and 2738assume the host is not up after no less than 30 seconds. 2739 </entry> 2740 </row> 2741 2742 <row> 2743 <entry spanname="col1_on"> 2744<function>Alive</function> 2745 </entry> 2746 </row> 2747 2748 <row> 2749 <entry></entry> 2750 <entry spanname="col2_on"> 2751 <para> 2752Manager -> Display 2753 </para> 2754 <para> 2755Additional Fields: 2756 </para> 2757 </entry> 2758 </row> 2759 2760 <row> 2761 <entry></entry> 2762 <entry></entry> 2763 <entry spanname="col3_on"> 2764<emphasis remap='I'>Session Running</emphasis>: CARD8 2765 </entry> 2766 </row> 2767 2768 <row> 2769 <entry></entry> 2770 <entry></entry> 2771 <entry></entry> 2772 <entry spanname="col4_on"> 2773Indicates that the session identified by Session ID is 2774currently active. The value is zero if no session is active 2775or one if a session 2776is active. 2777 </entry> 2778 </row> 2779 2780 <row> 2781 <entry></entry> 2782 <entry></entry> 2783 <entry spanname="col3_on"> 2784<emphasis remap='I'>Session ID</emphasis>: CARD32 2785 </entry> 2786 </row> 2787 2788 <row> 2789 <entry></entry> 2790 <entry></entry> 2791 <entry></entry> 2792 <entry spanname="col4_on"> 2793Specifies the ID of the currently running session; if any. 2794When no session is active this field should be zero. 2795 </entry> 2796 </row> 2797 2798 2799 <row> 2800 <entry></entry> 2801 <entry spanname="col2_on"> 2802Semantics: 2803 </entry> 2804 </row> 2805 2806 <row> 2807 <entry></entry> 2808 <entry></entry> 2809 <entry spanname="col3_on"> 2810An 2811<function>Alive</function> 2812packet is sent in response to a 2813<function>KeepAlive</function> 2814request. 2815If a session is currently active on the display, the manager includes the 2816Session ID in the packet. The display can use this information to 2817determine the status of the manager. 2818 </entry> 2819 </row> 2820 </tbody> 2821 </tgroup> 2822</informaltable> 2823 2824</chapter> 2825 2826<chapter id="Session_Termination"> 2827<title>Session Termination</title> 2828<para> 2829When the session is over, the initial connection with the display (the one 2830that acknowledges the 2831<function>Manage</function> 2832packet) will be closed by the manager. 2833If only a single session was active on the display, 2834all other connections should be closed by the display 2835and the display should be reset. If multiple sessions 2836are active simultaneously and the display can identify which connections 2837belong to the terminated session, those connections should be closed. 2838Otherwise, all connections should be closed and the display reset only when 2839all sessions have been terminated (that is, all initial connections closed). 2840</para> 2841 2842<para> 2843The session may also be terminated at any time by the display if the 2844managing host no longer responds to 2845<function>KeepAlive</function> 2846packets. 2847The exact time-outs for sending 2848<function>KeepAlive</function> 2849packets is not specified in this protocol as the trade off 2850should not be fixed between loading an otherwise idle system with spurious 2851<function>KeepAlive</function> 2852packets and not noticing that the manager host is down for a long time. 2853</para> 2854</chapter> 2855 2856<chapter id="State_Diagrams"> 2857<title>State Diagrams</title> 2858<!-- .XS --> 2859<!-- (SN State Diagrams --> 2860<!-- .XE --> 2861<para> 2862<!-- .LP --> 2863The following state diagrams are designed to cover all actions of both 2864the display and the manager. Any packet that is received out-of-sequence 2865will be ignored. 2866</para> 2867<para> 2868<!-- .LP --> 2869Display: 2870</para> 2871 2872<variablelist> 2873 <varlistentry> 2874 <term><emphasis remap='I'>start</emphasis>:</term> 2875 <listitem> 2876 <para> 2877User-requested connect to one host -> <emphasis remap='I'>query</emphasis> 2878 </para> 2879 <para> 2880User-requested connect to some host -> <emphasis remap='I'>broadcast</emphasis> 2881 </para> 2882 <para> 2883User-requested connect to site host-list -> <emphasis remap='I'>indirect</emphasis> 2884 </para> 2885 </listitem> 2886 </varlistentry> 2887 <varlistentry> 2888 <term><emphasis remap='I'>query</emphasis>:</term> 2889 <listitem> 2890 <para> 2891Send <function>Query</function> packet 2892-> <emphasis remap='I'>collect-query</emphasis> 2893 </para> 2894 </listitem> 2895 </varlistentry> 2896 <varlistentry> 2897 <term><emphasis remap='I'>collect-query</emphasis>:</term> 2898 <listitem> 2899 <para> 2900Receive <function>Willing</function> -> 2901<emphasis remap='I'>start-connection</emphasis> 2902 </para> 2903 <para> 2904Receive <function>Unwilling</function> -> 2905<emphasis remap='I'>stop-connection</emphasis> 2906 </para> 2907 <para> 2908Timeout -> <emphasis remap='I'>query</emphasis> 2909 </para> 2910 </listitem> 2911 </varlistentry> 2912 2913 <varlistentry> 2914 <term><emphasis remap='I'>broadcast</emphasis>:</term> 2915 <listitem> 2916 <para> 2917Send <function>BroadcastQuery</function> packet 2918 </para> 2919 <para> 2920-> <emphasis remap='I'>collect-broadcast-query</emphasis> 2921 </para> 2922 </listitem> 2923 </varlistentry> 2924 <varlistentry> 2925 <term><emphasis remap='I'>collect-broadcast-query</emphasis>:</term> 2926 <listitem> 2927 <para> 2928Receive <function>Willing</function> -> 2929<emphasis remap='I'>update-broadcast-willing</emphasis> 2930 </para> 2931 <para> 2932User-requested connect to one host -> 2933<emphasis remap='I'>start-connection</emphasis> 2934 </para> 2935 <para> 2936Timeout -> <emphasis remap='I'>broadcast</emphasis> 2937 </para> 2938 </listitem> 2939 </varlistentry> 2940 <varlistentry> 2941 <term><emphasis remap='I'>update-broadcast-willing</emphasis>:</term> 2942 <listitem> 2943 <para> 2944Add new host to the host list presented to the user 2945 </para> 2946 <para> 2947-> <emphasis remap='I'>collect-broadcast-query</emphasis> 2948 </para> 2949 </listitem> 2950 </varlistentry> 2951 <varlistentry> 2952 <term><emphasis remap='I'>indirect</emphasis>:</term> 2953 <listitem> 2954 <para> 2955Send <function>IndirectQuery</function> packet 2956 </para> 2957 <para> 2958-> <emphasis remap='I'>collect-indirect-query</emphasis> 2959 </para> 2960 </listitem> 2961 </varlistentry> 2962 <varlistentry> 2963 <term><emphasis remap='I'>collect-indirect-query</emphasis>:</term> 2964 <listitem> 2965 <para> 2966Receive <function>Willing</function> -> 2967<emphasis remap='I'>update-indirect-willing</emphasis> 2968 </para> 2969 <para> 2970User-requested connect to one host -> 2971<emphasis remap='I'>start-connection</emphasis> 2972 </para> 2973 <para> 2974Timeout -> <emphasis remap='I'>indirect</emphasis> 2975 </para> 2976 </listitem> 2977 </varlistentry> 2978 <varlistentry> 2979 <term><emphasis remap='I'>update-indirect-willing</emphasis>:</term> 2980 <listitem> 2981 <para> 2982Add new host to the host list presented to the user 2983 </para> 2984 <para> 2985-> <emphasis remap='I'>collect-indirect-query</emphasis> 2986 </para> 2987 </listitem> 2988 </varlistentry> 2989 2990 <varlistentry> 2991 <term><emphasis remap='I'>start-connection</emphasis>:</term> 2992 <listitem> 2993 <para> 2994Send <function>Request</function> packet 2995 </para> 2996 <para> 2997-> <emphasis remap='I'>await-request-response</emphasis> 2998 </para> 2999 </listitem> 3000 </varlistentry> 3001 <varlistentry> 3002 <term><emphasis remap='I'>await-request-response</emphasis>:</term> 3003 <listitem> 3004 <para> 3005Receive <function>Accept</function> -> 3006<emphasis remap='I'>manage</emphasis> 3007 </para> 3008 <para> 3009Receive <function>Decline</function> -> 3010<emphasis remap='I'>stop-connection</emphasis> 3011 </para> 3012 <para> 3013Timeout -> <emphasis remap='I'>start-connection</emphasis> 3014 </para> 3015 </listitem> 3016 </varlistentry> 3017 <varlistentry> 3018 <term><emphasis remap='I'>manage</emphasis>:</term> 3019 <listitem> 3020 <para> 3021Save Session ID 3022 </para> 3023 <para> 3024Send <function>Manage</function> packet with Session ID 3025 </para> 3026 <para> 3027-> <emphasis remap='I'>await-manage-response</emphasis> 3028 </para> 3029 </listitem> 3030 </varlistentry> 3031 <varlistentry> 3032 <term><emphasis remap='I'>await-manage-response</emphasis>:</term> 3033 <listitem> 3034 <para> 3035Receive <function>XOpenDisplay :</function> -> 3036<emphasis remap='I'>run-session</emphasis> 3037 </para> 3038 <para> 3039Receive <function>Refuse</function> with matching Session ID 3040-> <emphasis remap='I'>start-connection</emphasis> 3041 </para> 3042 <para> 3043Receive <function>Failed</function> with matching Session ID 3044-> <emphasis remap='I'>stop-connection</emphasis> 3045 </para> 3046 <para> 3047Timeout -> <emphasis remap='I'>manage</emphasis> 3048 </para> 3049 </listitem> 3050 </varlistentry> 3051 <varlistentry> 3052 <term><emphasis remap='I'>stop-connection</emphasis>:</term> 3053 <listitem> 3054 <para> 3055Display cause of termination to user 3056 </para> 3057 <para> 3058-> <emphasis remap='I'>start</emphasis> 3059 </para> 3060 </listitem> 3061 </varlistentry> 3062 <varlistentry> 3063 <term><emphasis remap='I'>run-session</emphasis>:</term> 3064 <listitem> 3065 <para> 3066Decide to send <function>KeepAlive</function> packet -> 3067<emphasis remap='I'>keep-alive</emphasis> 3068 </para> 3069 <para> 3070wait close of first display connection 3071 </para> 3072 <para> 3073-> <emphasis remap='I'>reset-display</emphasis> 3074 </para> 3075 </listitem> 3076 </varlistentry> 3077 <varlistentry> 3078 <term><emphasis remap='I'>keep-alive</emphasis>:</term> 3079 <listitem> 3080 <para> 3081Send <function>KeepAlive</function> packet with current Session ID 3082 </para> 3083 <para> 3084-> <emphasis remap='I'>await-alive</emphasis> 3085 </para> 3086 </listitem> 3087 </varlistentry> 3088 <varlistentry> 3089 <term><emphasis remap='I'>await-alive</emphasis>:</term> 3090 <listitem> 3091 <para> 3092Receive <function>Alive</function> with matching Session ID -> 3093<emphasis remap='I'>run-session</emphasis> 3094 </para> 3095 <para> 3096Receive <function>Alive</function> with nonmatching Session ID 3097or FALSE Session Running -> <emphasis remap='I'>reset-display</emphasis> 3098 </para> 3099 <para> 3100Final timeout without receiving <function>Alive</function> 3101packet -> <emphasis remap='I'>reset-display</emphasis> 3102 </para> 3103 <para> 3104Timeout -> <emphasis remap='I'>keep-alive</emphasis> 3105 </para> 3106 </listitem> 3107 </varlistentry> 3108 <varlistentry> 3109 <term><emphasis remap='I'>reset-display</emphasis>:</term> 3110 <listitem> 3111 <para> 3112(if possible) -> close all display connections associated with this session 3113 </para> 3114 <para> 3115Last session -> close all display connections 3116 </para> 3117 <para> 3118-> <emphasis remap='I'>start</emphasis> 3119 </para> 3120 </listitem> 3121 </varlistentry> 3122</variablelist> 3123 3124 3125<para> 3126Manager: 3127</para> 3128 3129<variablelist> 3130 <varlistentry> 3131 <term><emphasis remap='I'>idle</emphasis>:</term> 3132 <listitem> 3133 <para> 3134Receive <function>Query</function> -> 3135<emphasis remap='I'>query-respond</emphasis> 3136 </para> 3137 <para> 3138Receive 3139<function>BroadcastQuery</function> 3140-> <emphasis remap='I'>broadcast-respond</emphasis> 3141 </para> 3142 <para> 3143Receive 3144<function>IndirectQuery</function> 3145-> <emphasis remap='I'>indirect-respond</emphasis> 3146 </para> 3147 <para> 3148Receive 3149<function>ForwardQuery</function> 3150-> <emphasis remap='I'>forward-respond</emphasis> 3151Receive 3152 </para> 3153 <para> 3154<function>Request</function> 3155-> <emphasis remap='I'>request-respond</emphasis> 3156 </para> 3157 <para> 3158Receive 3159<function>Manage</function> 3160-> <emphasis remap='I'>manage</emphasis> 3161 </para> 3162 <para> 3163An active session terminates 3164-> <emphasis remap='I'>finish-session</emphasis> 3165 </para> 3166 <para> 3167Receive <function>KeepAlive</function> 3168-> <emphasis remap='I'>send-alive</emphasis> 3169 </para> 3170 <para> 3171-> <emphasis remap='I'>idle</emphasis> 3172 </para> 3173 </listitem> 3174 </varlistentry> 3175 <varlistentry> 3176 <term><emphasis remap='I'>query-respond</emphasis>:</term> 3177 <listitem> 3178 <para> 3179If willing to manage -> <emphasis remap='I'>send-willing</emphasis> 3180 </para> 3181 <para> 3182-> <emphasis remap='I'>send-unwilling</emphasis> 3183 </para> 3184 </listitem> 3185 </varlistentry> 3186 <varlistentry> 3187 <term><emphasis remap='I'>broadcast-respond</emphasis>:</term> 3188 <listitem> 3189 <para> 3190If willing to manage -> <emphasis remap='I'>send-willing</emphasis> 3191 </para> 3192 <para> 3193-> <emphasis remap='I'>idle</emphasis> 3194 </para> 3195 </listitem> 3196 </varlistentry> 3197 <varlistentry> 3198 <term><emphasis remap='I'>indirect-respond</emphasis>:</term> 3199 <listitem> 3200 <para> 3201Send <function>ForwardQuery</function> 3202packets to all managers on redirect list 3203 </para> 3204 <para> 3205If willing to manage -> <emphasis remap='I'>send-willing</emphasis> 3206 </para> 3207 <para> 3208-> <emphasis remap='I'>idle</emphasis> 3209 </para> 3210 </listitem> 3211 </varlistentry> 3212 <varlistentry> 3213 <term><emphasis remap='I'>forward-respond</emphasis>:</term> 3214 <listitem> 3215 <para> 3216Decode destination address, if willing to manage -> 3217<emphasis remap='I'>send-willing</emphasis> 3218 </para> 3219 <para> 3220-> <emphasis remap='I'>idle</emphasis> 3221 </para> 3222 </listitem> 3223 </varlistentry> 3224 <varlistentry> 3225 <term><emphasis remap='I'>send-willing</emphasis>:</term> 3226 <listitem> 3227 <para> 3228Send <function>Willing</function> packet 3229 </para> 3230 <para> 3231-> <emphasis remap='I'>idle</emphasis> 3232 </para> 3233 </listitem> 3234 </varlistentry> 3235 <varlistentry> 3236 <term><emphasis remap='I'>send-unwilling</emphasis>:</term> 3237 <listitem> 3238 <para> 3239Send <function>Unwilling</function> packet 3240-> <emphasis remap='I'>idle</emphasis> 3241 </para> 3242 </listitem> 3243 </varlistentry> 3244 <varlistentry> 3245 <term><emphasis remap='I'>request-respond</emphasis>:</term> 3246 <listitem> 3247 <para> 3248If manager is willing to allow a session on display 3249-> <emphasis remap='I'>accept-session</emphasis> 3250 </para> 3251 <para> 3252-> <emphasis remap='I'>decline-session</emphasis> 3253 </para> 3254 </listitem> 3255 </varlistentry> 3256 <varlistentry> 3257 <term><emphasis remap='I'>accept-session</emphasis>:</term> 3258 <listitem> 3259 <para> 3260Generate Session ID and save Session ID, display address, and 3261display number somewhere 3262 </para> 3263 <para> 3264Send <function>Accept</function> packet 3265 </para> 3266 <para> 3267-> <emphasis remap='I'>idle</emphasis> 3268 </para> 3269 </listitem> 3270 </varlistentry> 3271 <varlistentry> 3272 <term><emphasis remap='I'>decline-session</emphasis>:</term> 3273 <listitem> 3274 <para> 3275Send <function>Decline</function> packet 3276 </para> 3277 <para> 3278-> <emphasis remap='I'>idle</emphasis> 3279 </para> 3280 </listitem> 3281 </varlistentry> 3282 <varlistentry> 3283 <term><emphasis remap='I'>manage</emphasis>:</term> 3284 <listitem> 3285 <para> 3286If Session ID matches saved Session ID -> 3287<emphasis remap='I'>run-session</emphasis> 3288 </para> 3289 <para> 3290If Session ID matches Session ID of session in process of 3291starting up, or currently active session -> 3292<emphasis remap='I'>idle</emphasis> 3293 </para> 3294 <para> 3295-> <emphasis remap='I'>refuse</emphasis> 3296 </para> 3297 </listitem> 3298 </varlistentry> 3299 <varlistentry> 3300 <term><emphasis remap='I'>refuse</emphasis>:</term> 3301 <listitem> 3302 <para> 3303Send <function>Refuse</function> packet 3304 </para> 3305 <para> 3306-> <emphasis remap='I'>idle</emphasis> 3307 </para> 3308 </listitem> 3309 </varlistentry> 3310 <varlistentry> 3311 <term><emphasis remap='I'>run-session</emphasis>:</term> 3312 <listitem> 3313 <para> 3314Terminate any session in progress 3315 </para> 3316 <para> 3317<olink targetdoc='libX11' targetptr='XOpenDisplay'><function>XOpenDisplay</function></olink> 3318 </para> 3319 <para> 3320Open display succeeds -> 3321<emphasis remap='I'>start-session</emphasis> 3322 </para> 3323 <para> 3324-> <emphasis remap='I'>failed</emphasis> 3325 </para> 3326 </listitem> 3327 </varlistentry> 3328 <varlistentry> 3329 <term><emphasis remap='I'>failed</emphasis>:</term> 3330 <listitem> 3331 <para> 3332Send <function>Failed</function> packet 3333 </para> 3334 <para> 3335-> <emphasis remap='I'>idle</emphasis> 3336 </para> 3337 </listitem> 3338 </varlistentry> 3339 <varlistentry> 3340 <term><emphasis remap='I'>start-session</emphasis>:</term> 3341 <listitem> 3342 <para> 3343Start a new session 3344 </para> 3345 <para> 3346-> <emphasis remap='I'>idle</emphasis> 3347 </para> 3348 </listitem> 3349 </varlistentry> 3350 <varlistentry> 3351 <term><emphasis remap='I'>finish-session</emphasis>:</term> 3352 <listitem> 3353 <para> 3354<function>XCloseDisplay</function> 3355 </para> 3356 <para> 3357-> <emphasis remap='I'>idle</emphasis> 3358 </para> 3359 </listitem> 3360 </varlistentry> 3361 <varlistentry> 3362 <term><emphasis remap='I'>send-alive</emphasis>:</term> 3363 <listitem> 3364 <para> 3365Send <function>Alive</function> packet containing current status 3366 </para> 3367 <para> 3368-> <emphasis remap='I'>idle</emphasis> 3369 </para> 3370 </listitem> 3371 </varlistentry> 3372</variablelist> 3373 3374</chapter> 3375 3376<chapter id="Protocol_Encoding"> 3377<title>Protocol Encoding</title> 3378<para> 3379When XDMCP is implemented on top of the Internet User Datagram Protocol (UDP), 3380port number 177 is to be used. When using UDP over IPv4, Broadcast Query 3381packets are sent via UDP broadcast. When using UDP over IPv6, Broadcast Query 3382packets are sent via multicast, either to an address in the IANA registered 3383XDMCP multicast address range of 3384FF0<emphasis remap='I'>X</emphasis>:0:0:0:0:0:0:12B 3385(where the <emphasis remap='I'>X</emphasis> is replaced by a valid scope id) 3386or to a locally assigned 3387multicast address. The version number in all packets will be 1. 3388Packet opcodes are 16-bit integers. 3389</para> 3390 3391<informaltable frame="topbot"> 3392 <tgroup cols='2' align='left' colsep='0' rowsep='0'> 3393 <colspec colname='c1' colwidth="1.0*"/> 3394 <colspec colname='c2' colwidth="3.0*"/> 3395 <thead> 3396 <row rowsep='1'> 3397 <entry>Packet Name</entry> 3398 <entry>Encoding</entry> 3399 </row> 3400 </thead> 3401 <tbody> 3402 <row> 3403 <entry>BroadcastQuery</entry> 3404 <entry>1</entry> 3405 </row> 3406 <row> 3407 <entry>Query</entry> 3408 <entry>2</entry> 3409 </row> 3410 <row> 3411 <entry>IndirectQuery</entry> 3412 <entry>3</entry> 3413 </row> 3414 <row> 3415 <entry>ForwardQuery</entry> 3416 <entry>4</entry> 3417 </row> 3418 <row> 3419 <entry>Willing</entry> 3420 <entry>5</entry> 3421 </row> 3422 <row> 3423 <entry>Unwilling</entry> 3424 <entry>6</entry> 3425 </row> 3426 <row> 3427 <entry>Request</entry> 3428 <entry>7</entry> 3429 </row> 3430 <row> 3431 <entry>Accept</entry> 3432 <entry>8</entry> 3433 </row> 3434 <row> 3435 <entry>Decline</entry> 3436 <entry>9</entry> 3437 </row> 3438 <row> 3439 <entry>Manage</entry> 3440 <entry>10</entry> 3441 </row> 3442 <row> 3443 <entry>Refuse</entry> 3444 <entry>11</entry> 3445 </row> 3446 <row> 3447 <entry>Failed</entry> 3448 <entry>12</entry> 3449 </row> 3450 <row> 3451 <entry>KeepAlive</entry> 3452 <entry>13 3453<footnote><para> 3454A previous version of this document incorrectly reversed the opcodes of 3455<emphasis role="bold">Alive</emphasis> and 3456<emphasis role="bold">KeepAlive</emphasis>. 3457</para></footnote> 3458 </entry> 3459 </row> 3460 <row> 3461 <entry>Alive</entry> 3462 <entry>14 3463<footnote><para> 3464A previous version of this document incorrectly reversed the opcodes of 3465<emphasis role="bold">Alive</emphasis> and 3466<emphasis role="bold">KeepAlive</emphasis>. 3467</para></footnote> 3468 </entry> 3469 </row> 3470 </tbody> 3471 </tgroup> 3472</informaltable> 3473 3474<para> 3475Per packet information follows: 3476</para> 3477 3478<para> 3479<function>Query</function>, 3480<function>BroadcastQuery</function>, 3481<function>IndirectQuery</function> 3482</para> 3483 3484<literallayout class="monospaced"> 3485 2 CARD16 version number (always 1) 3486 2 CARD16 opcode (always Query, BroadcastQuery or IndirectQuery) 3487 2 CARD16 length 3488 1 CARD8 number of Authentication Names sent (m) 3489 2 CARD16 length of first Authentication Name (m<emphasis role="subscript">1</emphasis>) 3490 m<emphasis role="subscript">1</emphasis> CARD8 first Authentication Name 3491 ... Other Authentication Names 3492</literallayout> 3493 3494<para> 3495Note that these three packets are identical except for the opcode field. 3496</para> 3497 3498<literallayout class="monospaced"> 3499<function>ForwardQuery</function> 3500 2 CARD16 version number (always 1) 3501 2 CARD16 opcode (always ForwardQuery) 3502 2 CARD16 length 3503 2 CARD16 length of Client Address (m) 3504 m CARD8 Client Address 3505 2 CARD16 length of Client Port (n) 3506 n CARD8 Client Port 3507 1 CARD8 number of Authentication Names sent (o) 3508 2 CARD16 length of first Authentication Name (o<emphasis role="subscript">1</emphasis>) 3509 o<emphasis role="subscript">1</emphasis> CARD8 first Authentication Name 3510 ... Other Authentication Names 3511</literallayout> 3512 3513<literallayout class="monospaced"> 3514<function>Willing</function> 3515 2 CARD16 version number (always 1) 3516 2 CARD16 opcode (always Willing) 3517 2 CARD16 length (6 + m + n + o) 3518 2 CARD16 Length of Authentication Name (m) 3519 m CARD8 Authentication Name 3520 2 CARD16 Hostname length (n) 3521 n CARD8 Hostname 3522 2 CARD16 Status length (o) 3523 o CARD8 Status 3524</literallayout> 3525 3526<literallayout class="monospaced"> 3527<function>Unwilling</function> 3528 2 CARD16 version number (always 1) 3529 2 CARD16 opcode (always Unwilling) 3530 2 CARD16 length (4 + m + n) 3531 2 CARD16 Hostname length (m) 3532 m CARD8 Hostname 3533 2 CARD16 Status length (n) 3534 n CARD8 Status 3535</literallayout> 3536 3537<literallayout class="monospaced"> 3538<function>Request</function> 3539 2 CARD16 version number (always 1) 3540 2 CARD16 opcode (always Request) 3541 2 CARD16 length 3542 2 CARD16 Display Number 3543 1 CARD8 Count of Connection Types (m) 3544 2xm CARD16 Connection Types 3545 1 CARD8 Count of Connection Addresses (n) 3546 2 CARD16 Length of first Connection Address (n<emphasis role="subscript">1</emphasis>) 3547 n<emphasis role="subscript">1</emphasis> CARD8 First Connection Address 3548 ... Other connection addresses 3549 2 CARD16 Length of Authentication Name (o) 3550 o CARD8 Authentication Name 3551 2 CARD16 Length of Authentication Data (p) 3552 p CARD8 Authentication Data 3553 1 CARD8 Count of Authorization Names (q) 3554 2 CARD16 Length of first Authorization Name (q<emphasis role="subscript">1</emphasis>) 3555 q<emphasis role="subscript">1</emphasis> CARD8 First Authorization Name 3556 ... Other authorization names 3557 2 CARD16 Length of Manufacturer Display ID (r) 3558 r CARD8 Manufacturer Display ID 3559</literallayout> 3560 3561<literallayout class="monospaced"> 3562<function>Accept</function> 3563 2 CARD16 version number (always 1) 3564 2 CARD16 opcode (always Accept) 3565 2 CARD16 length (12 + n + m + o + p) 3566 4 CARD32 Session ID 3567 2 CARD16 Length of Authentication Name (n) 3568 n CARD8 Authentication Name 3569 2 CARD16 Length of Authentication Data (m) 3570 m CARD8 Authentication Data 3571 2 CARD16 Length of Authorization Name (o) 3572 o CARD8 Authorization Name 3573 2 CARD16 Length of Authorization Data (p) 3574 p CARD8 Authorization Data 3575</literallayout> 3576 3577<literallayout class="monospaced"> 3578<function>Decline</function> 3579 2 CARD16 version number (always 1) 3580 2 CARD16 opcode (always Decline) 3581 2 CARD16 length (6 + m + n + o) 3582 2 CARD16 Length of Status (m) 3583 m CARD8 Status 3584 2 CARD16 Length of Authentication Name (n) 3585 n CARD8 Authentication Name 3586 2 CARD16 Length of Authentication Data (o) 3587 o CARD8 Authentication Data 3588</literallayout> 3589 3590<literallayout class="monospaced"> 3591<function>Manage</function> 3592 2 CARD16 version number (always 1) 3593 2 CARD16 opcode (always Manage) 3594 2 CARD16 length (8 + m) 3595 4 CARD32 Session ID 3596 2 CARD16 Display Number 3597 2 CARD16 Length of Display Class (m) 3598 m CARD8 Display Class 3599</literallayout> 3600 3601<literallayout class="monospaced"> 3602<function>Refuse</function> 3603 2 CARD16 version number (always 1) 3604 2 CARD16 opcode (always Refuse) 3605 2 CARD16 length (4) 3606 4 CARD32 Session ID 3607</literallayout> 3608 3609<literallayout class="monospaced"> 3610<function>Failed</function> 3611 2 CARD16 version number (always 1) 3612 2 CARD16 opcode (always Failed) 3613 2 CARD16 length (6 + m) 3614 4 CARD32 Session ID 3615 2 CARD16 Length of Status (m) 3616 m CARD8 Status 3617</literallayout> 3618 3619<literallayout class="monospaced"> 3620<function>KeepAlive</function> 3621 2 CARD16 version number (always 1) 3622 2 CARD16 opcode (always KeepAlive) 3623 2 CARD16 length (6) 3624 2 CARD16 Display Number 3625 4 CARD32 Session ID 3626</literallayout> 3627 3628<literallayout class="monospaced"> 3629<function>Alive</function> 3630 2 CARD16 version number (always 1) 3631 2 CARD16 opcode (always Alive) 3632 2 CARD16 length (5) 3633 1 CARD8 Session Running (0: not running 1: running) 3634 4 CARD32 Session ID (0: not running) 3635</literallayout> 3636</chapter> 3637 3638<chapter id="Display_Class_Format"> 3639<title>Display Class Format</title> 3640<!-- .XS --> 3641<!-- (SN Display Class Format --> 3642<!-- .XE --> 3643<para> 3644The Display Class field of the 3645<function>Manage</function> 3646packet is used by the display manager to collect common sorts of 3647displays into manageable groups. This field is a string encoded of 3648ISO-LATIN-1 characters in the following format: 3649</para> 3650 3651<literallayout class="monospaced"> 3652<emphasis remap='I'>ManufacturerID</emphasis>-<emphasis remap='I'>ModelNumber</emphasis> 3653</literallayout> 3654 3655<para> 3656Both elements of this string must exclude characters of the set 3657{ <function>-</function>, 3658<function>.</function>, 3659<function>:</function>, 3660<function>*</function>, 3661<function>?</function>, 3662<emphasis remap='I'><space></emphasis> }. 3663The ManufacturerID is a string that should be registered 3664with the X Consortium. 3665The ModelNumber is designed to identify characteristics of the display 3666within the manufacturer's product line. 3667This string should be documented in the users manual for the 3668particular device and should probably not be specifiable by the 3669display user to avoid unexpected configuration errors. 3670</para> 3671</chapter> 3672 3673<chapter id="Manufacturer_Display_ID_Format"> 3674<title>Manufacturer Display ID Format</title> 3675<!-- .XS --> 3676<!-- (SN Manufacturer Display ID Format --> 3677<!-- .XE --> 3678<para> 3679To authenticate the manager, the display and manager will share a private 3680key. 3681The manager, then, must be able to discover which key to use for a 3682particular device. 3683The Manufacturer Display ID field of the 3684<function>Request</function> 3685packet is intended for this purpose. Typically, the manager host will 3686contain a map between this number and the key. This field is intended to be 3687unique per display, possibly the ethernet address of the display in the form: 3688</para> 3689 3690<literallayout class="monospaced"> 3691-Ethernet-8:0:2b:a:f:d2 3692</literallayout> 3693 3694<para> 3695It can also be a string of the form: 3696</para> 3697 3698<literallayout class="monospaced"> 3699<emphasis remap='I'>ManufacturerID</emphasis>-<emphasis remap='I'>ModelNumber</emphasis>-<emphasis remap='I'>SerialNumber</emphasis> 3700</literallayout> 3701 3702<para> 3703The ManufacturerID, ModelNumber and SerialNumber are encoded using 3704ISO-LATIN-1 characters, excluding { 3705<function>-</function>, 3706<function>.</function>, 3707<function>*</function>, 3708<function>?</function>, 3709<emphasis remap='I'><space></emphasis> } 3710</para> 3711 3712<para> 3713When the display is shipped to a customer, it should include both the 3714Manufacturer Display ID and the private key in the documentation set. 3715This information should not be modifiable by the display user. 3716</para> 3717 3718</chapter> 3719 3720<chapter id="Authentication"> 3721<title>Authentication</title> 3722<!-- .XS --> 3723<!-- (SN Authentication --> 3724<!-- .XE --> 3725<para> 3726In an environment where authentication is not needed, XDMCP can disable 3727authentication by having the display send empty Authentication Name 3728and Authentication Data fields in the 3729<function>Request</function> 3730packet. 3731In this case, the manager will not attempt to authenticate itself. 3732Other authentication protocols may be developed, depending on local needs. 3733</para> 3734 3735<para> 3736In an unsecure environment, the display must be able to verify that the 3737source of the various packets is a trusted manager. These packets will 3738contain authentication information. As an example of such a system, the 3739following discussion describes the "XDM-AUTHENTICATION-1" authentication 3740system. This system uses a 56-bit shared private key, and 64 bits of 3741authentication data. An associated example X authorization protocol 3742"XDM-AUTHORIZATION-1" will also be discussed. The 56-bit key is represented 3743as a 64-bit number in network order (big endian). This means that the first 3744octet in the representation will be zero. When incrementing a 64-bit value, 3745the 8 octets of data will be interpreted in network order (big endian). 3746That is, the last octet will be incremented, subsequent carries propagate 3747towards the first octet. 3748</para> 3749 3750<para> 3751Assumptions: 3752</para> 3753 3754<orderedlist> 3755 <listitem> 3756 <para> 3757The display and manager share a private key. This key could be programmed 3758into the display by the manufacturer and shipped with the unit. It must not 3759be available from the display itself, but should allow the value to be 3760modified in some way. The system administrator would be responsible for 3761managing a database of terminal keys. 3762 </para> 3763 </listitem> 3764 <listitem> 3765 <para> 3766The display can generate random authentication numbers. 3767 </para> 3768 </listitem> 3769</orderedlist> 3770 3771<para> 3772Some definitions first: 3773</para> 3774 3775<!-- FIXME: --> 3776<!-- double chk math symbols, use mathml to display them? --> 3777<itemizedlist> 3778 <listitem> 3779 <para> 3780{&variable.D;}<superscript>&variable.kappa;</superscript> = encryption of plain text D by key &variable.kappa; 3781 </para> 3782 </listitem> 3783 <listitem> 3784 <para> 3785{&variable.Delta;}*<superscript>&variable.kappa;</superscript> = decryption of crypto text &variable.Delta; with key &variable.kappa; 3786 </para> 3787 </listitem> 3788 <listitem> 3789 <para> 3790&variable.tau; = private key shared by display and manager 3791 </para> 3792 </listitem> 3793 <listitem> 3794 <para> 3795&variable.rho; = 64 bit random number generated by display 3796 </para> 3797 </listitem> 3798 <listitem> 3799 <para> 3800&variable.alpha; = authentication data in XDMCP packets 3801 </para> 3802 </listitem> 3803 <listitem> 3804 <para> 3805&variable.sigma; = per-session private key, generated by manager 3806 </para> 3807 </listitem> 3808 <listitem> 3809 <para> 3810&variable.beta; = authorization data 3811 </para> 3812 </listitem> 3813</itemizedlist> 3814 3815<para> 3816Encryption will use the Data Encryption Standard (DES, FIPS 46-3); blocks 3817shorter than 64 bits will be zero-filled 3818on the right to 64 bits. Blocks longer than 64 bits will use block chaining: 3819</para> 3820<para> 3821{&variable.D;}<superscript>&variable.kappa;</superscript> = {&variable.D;<subscript>1</subscript>}<superscript>&variable.kappa;</superscript> {&variable.D;<subscript>2</subscript> xor {&variable.D;<subscript>1</subscript>}<superscript>&variable.kappa;</superscript>}<superscript>&variable.kappa;</superscript> 3822</para> 3823 3824<para> 3825The display generates the first authentication data in the 3826<function>Request</function> 3827packet: 3828</para> 3829 3830<para> 3831&variable.alpha;<subscript>Request</subscript> = {&variable.rho;}<superscript>&variable.tau;</superscript> 3832</para> 3833 3834<para> 3835For the <function>Accept</function> 3836packet, the manager decrypts the initial message and returns 3837&variable.alpha;<subscript>Accept</subscript>: 3838 3839</para> 3840 3841<para> 3842&variable.rho; = {&variable.alpha;<subscript>Request</subscript>}*<superscript>&variable.tau;</superscript> 3843</para> 3844 3845<para> 3846&variable.alpha;<subscript>Accept</subscript> = { &variable.rho; + 1}<superscript>&variable.tau;</superscript> 3847</para> 3848 3849<para> 3850The <function>Accept</function> 3851packet also contains the authorization intended for use by 3852the X server. A description of authorization type "XDM-AUTHORIZATION-1" 3853follows. 3854</para> 3855 3856<para> 3857The <function>Accept</function> 3858packet contains the authorization name 3859"XDM-AUTHORIZATION-1". The authorization data is the string: 3860</para> 3861<para> 3862&variable.beta;<subscript>Accept</subscript> = {&variable.sigma;}<superscript>&variable.tau;</superscript> 3863</para> 3864 3865<para> 3866To create authorization information for connection setup with the X server 3867using the XDM-AUTHORIZATION-1 authorization protocol, the client computes the 3868following: 3869</para> 3870<para> 3871&variable.N; = X client identifier 3872</para> 3873<para> 3874&variable.T; = Current time in seconds on client host (32 bits) 3875</para> 3876<para> 3877&variable.beta; = {&variable.rho;&variable.N;&variable.T;}<superscript>&variable.sigma;</superscript> 3878</para> 3879 3880<para> 3881For TCP connections &variable.N; is 48 bits long and contains the 32-bit IPv4 address of 3882the client host followed by the 16-bit port number of the client socket. 3883Formats for other connections must be registered. 3884The resulting value, &variable.beta;, is 192 bits of authorization data that is sent 3885in the connection setup to the server. The server receives the packet, 3886decrypts the contents. To accept the connection, the following must hold: 3887</para> 3888 3889<itemizedlist> 3890 <listitem> 3891 <para> 3892&variable.rho; must match the value generated for the most recent XDMCP negotiation. 3893 </para> 3894 </listitem> 3895 <listitem> 3896 <para> 3897&variable.T; must be within 1200 seconds of the internally stored time. If no time 3898been received before, the current time is set to &variable.T;. 3899 </para> 3900 </listitem> 3901 <listitem> 3902 <para> 3903No packet containing the same pair (&variable.N;, &variable.T;) can have been received 3904in the last 1200 seconds (20 minutes). 3905 </para> 3906 </listitem> 3907</itemizedlist> 3908</chapter> 3909</book> 3910