Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hdlcio(7) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

open(2)

read(2)

write(2)

hdlcdefs(4)

hios(7)

sih(7)

hdlcio(7)                       (RM400 only)                      hdlcio(7)

NAME
     hdlcio - HDLC-specific ioctl calls

SYNOPSIS
     #include <hdlcio.h>

     int ioctl(fildes, command, arg)
     int fildes, command;

     struct hdlcio *arg;

DESCRIPTION
     The HDLC-specific ioctl commands are used for setting the line and
     protocol parameters and for reading status information. The synopsis
     of the system call is compatible with the default ioctl(2). The para-
     meters to be read or set are created in a structure of the type struct
     hdlcio, the address of which is transferred as the argument arg.

     The following commands are supported:

     -  HDLCRSET

     -  HDLCSET

     -  HDLCGET

     -  HDLCWAIT

     -  HDLCINQGET

     The HDLC parameters relating to a device are set using the HDLCSET and
     HDLCRSET commands. These commands are identical, and are only sup-
     ported for reasons of compatibility.

     The HDLC parameters relating to a device can be read using the HDLCGET
     command.

     With the HDLCINQGET command, the parameters are copied to the hdlcio
     structure specified by arg, and data input from the terminal is
     stopped. The amount of data in the input queue is reported. Since the
     input for this device has been blocked, this amount remains unchanged
     until the data is retrieved or the device is closed. If all of the
     data was retrieved from the application, the input for this device is
     cleared again, and data can be received once more.

     The HDLCWAIT command is used to check an application to determine
     whether an HDLC terminal is responding to polls from the primary host.
     If this is the case, the command is canceled immediately. Otherwise,
     the procedure is blocked until the terminal responds.






Page 1                       Reliant UNIX 5.44                Printed 11/98

hdlcio(7)                       (RM400 only)                      hdlcio(7)

     The individual parameters are defined in the structure hdlcio.

     struct hdlcio {
            struct cbcount    hdlciocount;    /* HDLC counter        */
            struct cbltimer  hdlcioltimer;  /* HDLC line timer     */
            struct cbttimer  hdlciottimer;  /* HDLC terminal timer */
            struct cboutput   hdlciooutput;   /* HDLC output flags   */
            struct cbinput    hdlcioinput;    /* HDLC input flags    */
     };

     The structures used in the hdlcio structure are defined as follows:

     struct cbcount {         /* HDLC-spec. counter                   */
            ushort ActPCnt;    /* Retry counter for fast polls         */
            byte   RptCnt;     /* Retry counter for I frames           */
            byte   RespTOCnt;  /* Response timeout counter             */
     };

     ACTPCnt    Active Poll Count (retry counter for fast polls). Specifies
                how many poll attempts are to be made to send or receive an
                I frame without delay. The counter is reset every time an I
                frame is sent or received.

                When the timer expires, the primary host for this terminal
                switches to "inactive" mode.

                Default: 2350 (this corresponds to a period of 2.5 minutes
                with a polling frequency of 50 ms).

     RptCnt     Repeat Count (retry counter for I frames). Specifies how
                often an unacknowledged I frame is repeated, provided the
                terminal has responded.

                When this counter expires, an error message is generated
                and the terminal switches to "disconnected mode".

     RespTOCnt  Response Timeout Count (response timeout counter). Speci-
                fies how often a job is repeated if the terminal does not
                respond. The parameter is no longer evaluated. The RptCnt
                counter is used.

                Default: 6.












Page 2                       Reliant UNIX 5.44                Printed 11/98

hdlcio(7)                       (RM400 only)                      hdlcio(7)

     struct cbltimer {         /* Line-spec. timer        */
            ushort   M1Timer;    /* M1 timer in msec.       */
            ushort   M2Timer;    /* M2 timer in msec.       */
            ushort   CharTimer;  /* Charactertimer in msec. */
            ushort   LineType;   /* Line type               */
            ushort   ClockMode;  /* Clock mode              */
            ushort   TrailPads;  /* Delayed S2 return       */
     };

     M1Timer    M1 monitoring timer. Specifies the maximum waiting time M1
                (in msec.).

                This parameter is no longer evaluated, but is supported for
                compatibility reasons.

     M2Timer    M2 monitoring timer. Specifies the maximum waiting time for
                the M2 message.

                If M2 was not set within this time, the frame is not sent
                and the terminal switches to error status.

                Default: 3000 ms.

     CharTimer  Character Timer. Specifies the maximum time for sending and
                receiving the entire frame. This means that the process of
                sending and receiving the entire frame is monitored. The
                character timer depends on the line speed and the length of
                the frame. The timer should be set to cover all speeds. If
                a frame cannot be sent or received within the specified
                time, the terminal switches to error status.

                Default: 5000 ms.

     LineType   Line type. Specifies whether the line is a four-wire or
                two-wire line. If it is a two-wire line, the S2 signal must
                be canceled after every frame is sent; this does not apply
                to a four-wire line.

                For a two-wire line, set LineType to TWOWIRE.

                For a four-wire line, set LineType to FOURWIRE.

                This parameter only refers to the physical operation of the
                line. Logically, half-duplex mode is always used.

                Default: FOURWIRE.

     ClockMode  Clock mode. This parameter is no longer evaluated, but is
                supported for compatibility reasons. The clock mode is set
                by selecting the speed.

                Default: 0


Page 3                       Reliant UNIX 5.44                Printed 11/98

hdlcio(7)                       (RM400 only)                      hdlcio(7)

     TrailPads  Delayed S2 return. This parameter is not supported.

     struct cbttimer {             /* Terminal-spec. timer          */
            ushort   SnrmRespTimer;  /* Response timer in DM in msec. */
            ushort   RespTimer;      /* Response timer in NRM in msec.*/
            ushort   M5Timer;        /* M5 timer in msec.             */
            ushort   IActPoll;       /* Poll spacing for              */
                                     /* fast polls in msec.           */
            ushort   IInActPoll;     /* Poll spacing for              */
                                     /* delayed polls in msec.        */
            ushort   INoRspPoll;     /* Poll spacing in               */
                                     /* no-response mode in msec.     */
            ushort   IStdbyPoll;     /* Poll spacing in               */
                                     /* standby-poll mode in msec.    */
     };

     SnrmRespTimer
                Set Normal Response Mode Timer. Specifies the maximum wait-
                ing time for a "quick" response (e. g. UA). The job is
                repeated after the timer has expired.

                Default: 32 ms.

     RespTimer  Response timer in normal response mode (NRM). Specifies the
                maximum waiting time for a response in NRM, if an I frame
                is expected. The last job is repeated after the timer
                expires.

                Default: 300 ms.

     M5Timer    M5 monitoring timer. Specifies the maximum time the last
                secondary polled will wait before canceling the S2 signal.
                After the timer has expired, the next secondary is polled.
                If S2 is not canceled after the specified time hs elapsed,
                the next secondary is nonetheless polled.

                Default: 10 ms.

     IActPoll   Active Poll. Polling frequency for fast polls. Specifies
                the frequency with which a terminal in active mode is to be
                polled.

                Default: 50 ms.

     IINActPoll Inactive Poll. Polling frequency for delayed polls. Speci-
                fies the frequency with which a terminal in inactive mode
                is to be polled.

                A terminal is said to be inactive if the retry counter for
                ACTPCnt has expired.

                Default: 500 ms.


Page 4                       Reliant UNIX 5.44                Printed 11/98

hdlcio(7)                       (RM400 only)                      hdlcio(7)

     INoRspPoll No Response Poll. Polling frequency for terminals in no
                response mode. Specifies the frequency with which a termi-
                nal in no response mode is to be polled.

                A terminal is said to be in no response mode if a long
                period of time has elapsed since it answered a poll. The
                terminal is probably switched off or is not connected.

                Default: 10000 ms.

     IStdbyPoll Standby Poll. Polling frequency for terminals in standby
                poll mode. Specifies the frequency with which a terminal in
                standby poll mode is to be polled.

                A terminal is said to be in standby poll mode if an open
                exists but the terminal has not yet answered.

                Default: 5000 ms.

     struct cboutput {         /* Parameter for output control    */
            byte    oflag;      /* Flag for setting                */
                                /* blocked write                   */
            ushort  SUsrDataL;  /* Send data length                */
                                /* Default: 100 chars.             */
     };

     oflag      output flag. Flag for setting the blocked write/read. The
                values UNBLOCKED and BLOCKED are permitted here. The
                default value is set if UNBLOCKED is used. The value
                BLOCKED activates blocked mode by assigning control of the
                data field of a HDLC frame to the application.

                Default: UNBLOCKED.

     SUsrDataL  Send User Data Length. The application can use this parame-
                ter to set the maximum length of a frame. A maximum length
                of 1 KByte is permitted. If a write command is issued with
                n data, this function can only be executed correctly if n
                is less than or equal to the maximum size of the send
                frame.

                If a value >1 KByte is set using ioctl for SUsrDataL, ioctl
                is rejected with the error EINVAL.

                Default: 100.

     InqAnz     Volume of data in the input queue. The application can use
                this field to poll the data available in the input queue.
                This field is only filled in using the HDLCINQGET command.





Page 5                       Reliant UNIX 5.44                Printed 11/98

hdlcio(7)                       (RM400 only)                      hdlcio(7)

NOTES
     The link-, or line-specific parameters can be set using any device
     that belongs to this link or line. They are set automatically for all
     devices operating on this link/line.

FILES
     /usr/include/sys/hdlcio.h

SEE ALSO
     ioctl(2), open(2), read(2), write(2), hdlcdefs(4), hios(7), sih(7).












































Page 6                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026