index.txt
DKMGR(3X) DKMGR(3X) NAME dkmgr, dkmgrack, dkmgrnak, dkfilename - establish datakit server SYNOPSIS #include <dkmgr.h> struct mgrmsg * dkmgr(srvname, traffic) char *srvname; char * dkfilename(chan) dkmgrack(chan) dkmgrnak(chan, error) DESCRIPTION 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 channel need only be opened. The appropriate special file name is returned as a static string by dk‐ filename. 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 admin‐ istrators 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 in‐ formation from the requester to the server about how to handle the call. Traffic tells the network what types of requests this server is capable of handling. Value 0 indicates terminal-like traffic only, value 2 al‐ lows 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 calling 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 rea‐ son. FILES /dev/dk directory containing files naming each channel. SEE ALSO tdkdial(3) DIAGNOSTICS 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. BUGS It always waits for connection requests; there should be a version that accepts them asynchronously. DKMGR(3X)