[comp.sys.sun] X.29 Problems with some PDNs

lewis@larry.mcrcim.mcgill.edu (Pierre Lewis) (09/20/89)

We've had problems running x29 server when called from an X.25 PDN via
PAD.  The following is a detailed analysis.

Running  SunOS 4.0  with  SunLink X.25 software, version 6.0 beta.
Workstations: 3/60s;  servers: 3/280s (X.25 on a server with MCP).  X.25
PDN is  DataPac  (subscribed to 1980 service -- SunLink supports the 1980
CCITT recommendation - cf 1.10 in X25 Admin Guide, Chapter "Overview")

PROBLEM:  after using 'vi' (or any other program that puts terminal in raw
mode), entering a command (e.g. 'who') followed by CR does not bring any
output from SUN until one hits break to force data to be transmitted to
host.

ANALYSIS was thru trace of session (using x25trace) and dump of PAD
parameters (using command PAR) at various points in session.  The problem
concerns parameters P3 (data forwarding) essentially, but strange things
are also observed with P7 (break handling) and P10 (line folding).

After connecting to PAD (before calling SUN), we have the following values
for given PAD parameters:
   P3    2   - Forward data on CR.
   P4    0   - No forwarding on timeout.  Typically, either P3 or P4 is non-
               zero allowing data forwarding before packet is full.
   P7   21   - Send interrupt and break_indication on break from terminal.

Immediately after call establishment, x29 server sets some of the PAD
parameters to new values.  In particular, it attempts the following:
   P2    1   - PAD echoes characters.
   P3   54   - This is rejected by the PDN.  This value is neither mandatory
               nor optional in X.3 (1984 - red book version - PAD must support
               0, 2, 126; may support 6, 18 - see Table 1/X.3).  Current value
               (2, forwarding on CR) is retained.
   P4    0   - No forwarding on timeout.
   P7    5   - Also rejected by the PDN.  This value is optional in 1984 (red
               book), not mentioned in 1980 (yellow).  Current value retained.
   P10   0   - No line folding.
   P15   1   - Local editing within PAD.
P2 (echo) is also set momentarily to 0 during the login process (password).

When entering 'vi' the following changes to parameters are done:
   P2    0   - No echo.                                        | in support
   P3    0   - No forwarding of data on specific character.    | of raw input
   P4    1   - Forwarding of data on timeout (20th of second). | mode (cano-
   P15   0   - No editing within PAD.                          | nical off)
And a few others.....

When exiting 'vi' the parameters changed in preceding step are reset, in
particular,
   P2    1   - Echo
   P3   54   - Rejected by the PDN as above.  But now the retained value is
               0 which means we no longer have forward on CR.
   P4    0   - No forwarding on timeout.
   P10  80   - Reset to a different value as the one used after login (why?)
And we are left with no data forwarding trigger (P3 and P4 both set to zero).
Of course, one can go into PAD command mode and reset P3 to some acceptable
value such as 2, but that's not exactly convenient.  Note also that SUN's
PAD (pad) supports the values rejected by the PDN's PAD, so that when you
call one SUN using the 'pad' command on another one, there are no problems.

Strangely (and conveniently) enough, this problem does not appear when
remote logging to another SUN station on network.  Did not investigate
further.  Possibly because terminal put in raw mode once and for all?

X.25 trace available if interested.  Problem has been submitted to SUN thru
appropriate channels.

Pierre LEWIS

Bell-Northern Research      Tel: (514) 765-8207         Fax: (514) 765-7359
3, Place du Commerce        Internet:  bnrmtl!lewis@Larry.McRCIM.McGill.EDU
Verdun, Quebec              Uucp:  ...!mcgill-vision!bnrmtl!lewis
CANADA    H3E 1H6

mills@ccu.umanitoba.ca (10/18/89)

In an expired article, bnrmtl!lewis@larry.mcrcim.mcgill.edu 
	(Pierre Lewis) writes:
>various problems with SunLink X.25 X.29 server PAD parameters being
>rejected by the Datapac PDN and left at previous settings.

I had exactly this problem.  Once the terminal went into `raw' mode, and
back to `cooked' mode, both parameters 3 and 4 were set to zero, and all
forwarding to the host was lost.  The solution is to have the X.29 server
only attempt to set PAD parameters that are accepted by the PDN.  This can
be done in the /etc/sunlink/x25/x29-auth file, with `PC3=126'.  

There are also a few things that don't work.  I wanted to disable pad
recall in raw mode, so the ^P character would get through.  (This is
needed by the emacs editor).  I tried `PC1=1:PN1=0' as in the Sun X.25
manual, but found that the X.29 server never sends a packet to set
parameter 1 to zero when entering `raw' mode.  Using `PC1=0:PN1=0' works,
but it disables pad recall in both modes.  I also wanted to disable flow
control to the PAD so ^S and ^Q would get through.  This is supposed to be
done by disabling flow control with stty, but again, the X.29 server never
sends the packet.  When I do a:

	stty ixon stop '^S' start '^Q'

it does send a packet to set parameter 12 to 1, but when I do a:

	stty -ixon stop '^-' start '^-'

it does not send a packet, even though it does disable the stop/start
characters.  I found no solution for this.

-Gary Mills-             -University of Manitoba-             -Winnipeg-