Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ t_open(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

open(S)


 t_open(S)                 (TLI/XTI) 6 January 1993                 t_open(S)


 Name

    t_open - establish a transport endpoint

 Syntax


    TLI syntax


    cc . . . -lnsls


    #include <sys/tiuser.h>

    int t_open (path, oflag, info)
    char *path;
    int oflag;

    struct t_info *info;


    XTI syntax


    cc . . .  -lxti


    #include <xti.h>

    int t_open (path, oflag, info)
    char *path;
    int oflag;

    struct t_info *info;


 Description

    The topen function must be called as the first step in the initializa-
    tion of a transport endpoint.  This function establishes a transport end-
    point by opening a UNIX system file that identifies a particular trans-
    port provider (that is, transport protocol) and returning a file descrip-
    tor that identifies that endpoint.  For example, opening the file
    /dev/iso_cots identifies an OSI connection-oriented transport layer pro-
    tocol as the transport provider.

    path points to the pathname of the file to open, and oflag identifies any
    open flags (as in open(S).  topen returns a file descriptor that is used
    by all subsequent functions to identify the particular local transport
    endpoint.

    This function also returns various default characteristics of the under-
    lying transport protocol by setting fields in the tinfo structure.  This
    argument points to the t_info(FP) structure.

    The servtype member of tinfo may specify one of the following values on
    return:

    TCLTS         The transport provider supports a connectionless-mode ser-
                   vice.  For this service type, topen returns -2 for etsdu,
                   connect, and discon.

    TCOTS         The transport provider supports a connection-mode service
                   but does not support the optional orderly release facil-
                   ity.

    TCOTSORD     The transport provider supports a connection-mode service
                   with the optional orderly release facility.

    A single transport endpoint may support only one of the above services at
    one time.

    If info is set to NULL by the transport user, no protocol information is
    returned by topen.

    On failure, terrno may be set to the following:

    [TBADFLAG]          (XTI only.)  oflag is invalid.  The acceptable values
                        are ORDWR or ORDWR Or'ed with ONONBLOCK.

    [TBADNAME]          (XTI only.)  The open of the specified path failed.
                        errno is set to ENOENT.

    [TSYSERR]           A system error occurred during execution of this
                        function.  One reason for this error is an I/O error;
                        errno is then set to EIO.

 Diagnostics

    The topen function returns a valid file descriptor on success and -1 on
    failure, and terrno is set to indicate the error.

 See also

    open(S), tinfo(FP)

 Standards conformance

    topen is conformant with:
    AT&T SVID Issue 2;
    X/Open Portability Guide, Issue 3, 1989;
    and Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2).


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