[comp.windows.x] XDMCP

john@jstrong.austin.ibm.com (John Strong 6C-52 Bldg. 996 (512) 823-4890 VMID-JSTRONG@AUSVMQ) (01/17/91)

    XDMCP geniuses!!!!

    I could keep staring at this problem. (I know, 'Use the Source,
    Luke!'), but right now I'm under the gun and what I need,
    to be able to meet my deadlines, is a little help from
    Obi Wan Kenobi himself (Alas, **The Source** yields its
    mysteries more readily to some than to others).
    
    I am trying to get XDMCP (X11.4, of course) running on an
    IBM RISC/6000, and I am running into the following problem:

    The initial handshakes between the server and the manager (xdm)
    seem to go well. The server sends a QUERY packet. The manager
    replies with a WILLING. The server sends a REQUEST packet with
    two IP addresses in the ConnectionAddresses structure, the
    address of the server and the address of a gateway ("localhost").
    These two addresses were obtained from the SIOCGIFCONF ioctl
    in the DefineSelf routine. So far so good. The problem seems
    to come in the request_respond routine in xdm, after xdm
    receives the REQUEST packet. request_respond calls
    SelectConnectionTypeIndex which in my version of the code
    is stubbed out and always returns zero. Here's the offending
    code:


    i = SelectConnectionTypeIndex (&connectionTypes,
				   &connectionAddresses);

    [irrelevant code deleted]
				   
    connectionAddress = &connectionAddresses.data[i];
    pdpy = NewProtoDisplay (from, fromlen,
			    displayNumber,
			    connectionTypes.data[i],
			    connectionAddress,
			    NextSessionID());

    Since SelectConnectionTypeIndex always returns zero, the only
    "connection address" that gets stored in the protoDisplays
    list is the first of the two, the gateway "localhost:0", and
    the name of the server host is never entered. When the
    manager finally gets the MANAGE packet, it tries to manage
    "localhost" instead of the server node. I'd like to blame
    this on the Dark Side of the Source, but I suppose it is a
    more prosaic sort of screwup on my part, either a configuration
    issue or a missing bug-fix. Help, Obi Wan!

    - John Strong
      (cs.utexas.edu!romp!auschs!jstrong.austin.ibm.com!jstrong!john)
      (512) 823-4890