man(1) Manual page archive

     DKMGR(3X)                                               DKMGR(3X)

          dkmgr, dkmgrack, dkmgrnak, dkfilename - establish datakit

          #include <dkmgr.h>

          struct mgrmsg *
          dkmgr(srvname, traffic)
          char *srvname;

          char *


          dkmgrnak(chan, error)

          These routines are loaded by option -ldk of ld(1).

          Dkmgr sets up the calling process as a datakit server, and
          waits for service requests.  It returns a pointer to an
          incoming service request in the form:

               struct mgrmsg {
                         short m_chan;
                         short m_tstamp;
                         short m_traffic;
                         char *m_dial;
                         char *m_service;
                         char *m_source;
                         char *m_uid;
                         char *m_param1;
                         char *m_param2;

          Field m_chan gives the channel number of the incoming
          request. The circuit is already established, and this chan-
          nel need only be opened.  The appropriate special file name
          is returned as a static string by dkfilename. Field m_uid is
          generated by the caller (see tdkdial(3)), if the request
          originated in a standard UNIX system, and is the userid of
          the requester.  It can be trusted if, and only if, you trust
          the administrators and super-users on the calling system.
          Field m_param1 and m_param2 are the first and subsequent
          strings after the destination name in the dialstring.  They
          can be used to pass short pieces of information from the
          requester to the server about how to handle the call.

     DKMGR(3X)                                               DKMGR(3X)

          Traffic tells the network what types of requests this server
          is capable of handling.  Value 0 indicates terminal-like
          traffic only, value 2 allows either terminal or high-speed
          host-host traffic.  The field m_traffic of the incoming call
          message tells the traffic requested by the caller.

          The string m_dial gives the dialing string used by the call-
          ing process, and m_source is the name of the port in the
          network where the call originated.

          The server program is expected to call either dkmgrack or
          dkmgrnak to complete the call setup.  The first acknowledges
          and accepts the call, the second rejects the call with a
          specific error code giving the reason.

          /dev/dk   directory containing files naming each channel.


          In case of a major setup error, a message is printed on the
          standard error file and the process exits.  For minor
          errors, a message is printed and the process tries again
          after a wait interval.

          It always waits for connection requests; there should be a
          version that accepts them asynchronously.