Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ t_optmgmt(3N) — Amiga System V Release 4 Version 2.03

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(3)



t_optmgmt(3N)           NETWORK FUNCTIONS           t_optmgmt(3N)



NAME
     toptmgmt - manage options for a transport endpoint

SYNOPSIS
     #include <tiuser.h>

     int toptmgmt (int fd, struct toptmgmt *req, struct toptmgmt *ret);

DESCRIPTION
     The toptmgmt function enables a transport user to retrieve,
     verify,  or  negotiate  protocol  options with the transport
     provider.  fd identifies a bound transport endpoint.

     The req and ret arguments point  to  a  toptmgmt  structure
     containing the following members:

          struct netbuf opt;
          long flags;

     The opt field identifies  protocol  options  and  the  flags
     field  is  used  to  specify  the  action to take with those
     options.

     The options are represented by a netbuf [see intro(3);  also
     for  len,  buf, and maxlen] structure in a manner similar to
     the address in tbind.  req is used to  request  a  specific
     action  of the provider and to send options to the provider.
     len specifies the number of bytes in the options, buf points
     to the options buffer, and maxlen has no meaning for the req
     argument.  The transport provider  may  return  options  and
     flag values to the user through ret.  For ret, maxlen speci-
     fies the maximum size of the options buffer and  buf  points
     to  the  buffer  where  the  options  are  to be placed.  On
     return,  len  specifies  the  number  of  bytes  of  options
     returned.   maxlen  has no meaning for the req argument, but
     must be set in the  ret  argument  to  specify  the  maximum
     number  of  bytes  the  options buffer can hold.  The actual
     structure and content of the options is imposed by the tran-
     sport provider.

     The flags field of req can  specify  one  of  the  following
     actions:

     TNEGOTIATE    This action enables the user to negotiate the
                    values  of  the options specified in req with
                    the transport provider.   The  provider  will
                    evaluate  the requested options and negotiate
                    the values, returning the  negotiated  values
                    through ret.

     TCHECK        This  action  enables  the  user  to   verify
                    whether  the  options  specified  in  req are



            Last change: Networking Support Utilities           1





t_optmgmt(3N)           NETWORK FUNCTIONS           t_optmgmt(3N)



                    supported  by  the  transport  provider.   On
                    return,  the  flags  field  of  ret will have
                    either TSUCCESS or TFAILURE set to indicate
                    to  the  user  whether  the  options are sup-
                    ported.  These flags are only meaningful  for
                    the TCHECK request.

     TDEFAULT      This action enables a user  to  retrieve  the
                    default  options  supported  by the transport
                    provider into the opt field of ret.  In  req,
                    the len field of opt must be zero and the buf
                    field may be NULL.

     If  issued  as  part  of  the  connectionless-mode  service,
     toptmgmt  may  block  due to flow control constraints.  The
     function will not complete until the transport provider  has
     processed  all  previously  sent  data  units.   On failure,
     terrno may be set to one of the following:

     [TBADF]             The specified file descriptor  does  not
                         refer to a transport endpoint.

     [TOUTSTATE]         The function was  issued  in  the  wrong
                         sequence.

     [TACCES]            The user does  not  have  permission  to
                         negotiate the specified options.

     [TBADOPT]           The specified protocol options  were  in
                         an incorrect format or contained illegal
                         information.

     [TBADFLAG]          An invalid flag was specified.

     [TBUFOVFLW]         The  number  of  bytes  allowed  for  an
                         incoming  argument  is not sufficient to
                         store the value of that  argument.   The
                         information  to  be returned in ret will
                         be discarded.

     [TSYSERR]           A system error has occurred during  exe-
                         cution of this function.

SEE ALSO
     intro(3), tgetinfo(3N), topen(3N).
     UNIX System V Network Programmer's Guide.

DIAGNOSTICS
     toptmgmt returns 0 on success and -1 on failure and terrno
     is set to indicate the error.





            Last change: Networking Support Utilities           2



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