unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 nlio(7)							     nlio(7)




 NAME
      nlio - Native Language I/O server

 DESCRIPTION
      The NLIO server runs between the terminal or printer device of an
      actual terminal or printer and the master side of a pseudo terminal.
      The NLIO interface is available on the slave side of the pseudo
      terminal (see pty(7) for information on pseudo terminals).  All I/O to
      the terminal is performed through the server.

      Several ioctl(2) requests are provided to control NLIO on the
      terminal.	 Some of them are also applicable to Native Language Output
      to the printer.  The ioctl(2) system call has the form:

	   #include <&lt&lt&lt;sys/ioctl.h>&gt&gt&gt;
	   #include <&lt&lt&lt;nlio.h>&gt&gt&gt;

	   int ioctl(int fildes, int request, char arg[NLIOREQLEN]);

      The header <&lt&lt&lt;sys/ioctl.h>&gt&gt&gt; must be included before <&lt&lt&lt;nlio.h>&gt&gt&gt;.

      The buffer specified by arg must not be less than NLIOREQLEN bytes in
      length.

      request can have the following values:

      ISNLIO	     Check whether a Native Language I/O server is running
		     for the device associated with fildes.  The buffer
		     specified by arg is not used.  If the server is
		     running, NLIOSERV is returned; otherwise, -1 is
		     returned.

      NLIOGSERV	     Get the name of the server that is running for the
		     device associated with fildes.  The name is returned to
		     the buffer specified by arg.  The name is terminated
		     with '\0'.

      NLIOGTB	     Get the current terminal behavior or printer behavior.
		     The name of terminal behavior or printer behavior is
		     returned to the buffer specified by arg.  It is
		     terminated with '\0'.  If no terminal behavior or
		     printer behavior is currently specified, only '\0' is
		     returned.	This can occur if an unknown terminal
		     behavior or printer behavior was previously specified.

      NLIOSTB	     Set terminal behavior or printer behavior.	 The current
		     terminal behavior or printer behavior is changed to the
		     terminal behavior or printer behavior in the buffer
		     specified by arg.	It must be terminated with '\0'.





 Hewlett-Packard Company	    - 1 -		HP-UX 11i : Oct 2000






 nlio(7)							     nlio(7)




      NLIOGFLAGS     Get the current values of the flags.  The byte flags
		     are returned in the buffer specified by arg.  If a
		     particular flag is not available for the device, '\0'
		     is returned in that flag's buffer position.  Only the
		     following flag is defined at this time:

		     arg[NLIO]	  This flag controls 16-bit data parsing and
				  conversion, and has one of these values:

				     NLIO_I    enable input parsing only.

				     NLIO_O    enable output conversion
					       only.

				     NLIO_IO   enable both input parsing and
					       output conversion.

				     NLIO_N    enable neither of the above.

      NLIOSFLAGS     Set flags.	 See NLIOGFLAGS for description of the
		     flags.  The current values of the flags are changed to
		     the values passed in the buffer specified by arg.	If a
		     flag value is '\0', it is ignored and that flag's
		     current value is not changed.  Clear the whole array of
		     NLIOREQLEN flags with '\0' characters before setting
		     the new values.

 RETURN VALUE
      A value of NLIOSERV is returned if the NLIO server is running for the
      device associated with fildes and no errors have occurred.

      If ioctl(2) is called with invalid arguments, a value of -1 is
      returned and errno is set as described in ioctl(2).

      If a request error has occurred, a value of -1 is returned and errno
      is set to EINVAL.

 ERRORS
      After a request error has occurred, the NLIOGERR request is available
      to determine what is wrong.  The form of this call is:

	   #include <&lt&lt&lt;sys/ioctl.h>&gt&gt&gt;
	   #include <&lt&lt&lt;nlio.h>&gt&gt&gt;

	   int ioctl(int fildes, int request, int *error);

      NLIOGERR	     Get the error code of the last unsuccessful request.
		     The error code is returned in the integer variable
		     pointed to by error, and will be one of the following:





 Hewlett-Packard Company	    - 2 -		HP-UX 11i : Oct 2000






 nlio(7)							     nlio(7)




			UNKNOWN_TB	    An unknown terminal behavior or
					    printer behavior was passed.

			BAD_TB		    The terminal behavior or printer
					    behavior requested was invalid
					    or not appropriate.

			INVALID_FLAG	    The flags supplied with
					    NLIOSFLAGS were invalid or
					    unknown.

			TOO_LONG_NAME	    The specified name was too long.

			UNKNOWN_REQ	    An unknown nlio request was
					    passed.

 WARNINGS
      When the file code is based on HP-15 encoding scheme, do not set the
      TTY special control characters such as INTR, ERASE, and KILL (see
      termio(7)) to ASCII characters with values in the range of '\021'
      through '\0176' inclusive for the terminal with which the NLIO server
      is associated, because HP-15 can include these values as the second
      byte of a 16-bit character code.

      Clear the whole array of NLIOREQLEN bytes with '\0' characters before
      setting flags with NLIOSFLAGS, even if only one flag is used.
      Otherwise, unexpected things can happen to the I/O.

 AUTHOR
      nlio was developed by HP.

 SEE ALSO
      nlio(1), nliostart(1), nlioinit(1M), ioctl(2), pty(7), termio(7).





















 Hewlett-Packard Company	    - 3 -		HP-UX 11i : Oct 2000