1INNDCOMM(3)                Library Functions Manual                INNDCOMM(3)
2
3
4

NAME

6       inndcomm - INND communication part of InterNetNews library
7

SYNOPSIS

9       #include "inndcomm.h"
10
11       int
12       ICCopen()
13
14       int
15       ICCclose()
16
17       void
18       ICCsettimeout(i)
19           int              i;
20
21       int
22       ICCcommand(cmd, argv, replyp)
23           char             cmd;
24           char             *argv[];
25           char             **replyp;
26
27       int
28       ICCcancel(mesgid)
29           char             *mesgid;
30
31       int
32       ICCreserve(why)
33           char             *why;
34
35       int
36       ICCpause(why)
37           char             *why;
38
39       int
40       ICCgo(why)
41           char             *why;
42
43       extern char *ICCfailure;
44

DESCRIPTION

46       The routines described in this manual page are part of the InterNetNews
47       library, libinn(3).  They are  used  to  send  commands  to  a  running
48       innd(8)  daemon  on the local host.  The letters ``ICC'' stand for Innd
49       Control Command.
50
51       ICCopen creates a Unix-domain datagram  socket  and  binds  it  to  the
52       server's  control  socket, if <HAVE_UNIX_DOMAIN_SOCKETS in include/con‐
53       fig.h> is defined.  Otherwise it creates a named pipe for communicating
54       with  the  server.   It returns -1 on failure or zero on success.  This
55       routine must be called before any other routine.
56
57       ICCclose closes any descriptors that have been created by ICCopen.   It
58       returns -1 on failure or zero on success.
59
60       ICCsettimeout  can  be  called  before any of the following routines to
61       determine how long the library should wait before giving up on  getting
62       the  server's  reply.   This  is done by setting and catching a SIGALRM
63       signal(2).  If the timeout is less then zero  then  no  reply  will  be
64       waited  for.   The SC_SHUTDOWN, SC_XABORT, and SC_XEXEC commands do not
65       get a reply either.  The default, which can be obtained by setting  the
66       timeout to zero, is to wait until the server replies.
67
68       ICCcommand  sends  the  command cmd with parameters argv to the server.
69       It returns -1 on error.  If the server replies, and replyp is not NULL,
70       it  will  be  filled in with an allocated buffer that contains the full
71       text of the server's reply.  This buffer is a string  in  the  form  of
72       ``<digits><space><text>''  where  ``digits''  is  the text value of the
73       recommended exit code; zero indicates  success.   Replies  longer  then
74       4000  bytes  will be truncated.  The possible values of cmd are defined
75       in the ``inndcomm.h'' header file.  The parameters for each command are
76       described  in  ctlinnd(8).   This  routine  returns -1 on communication
77       failure, or the exit status sent by the server which will never be neg‐
78       ative.
79
80       ICCcancel sends a ``cancel'' message to the server.  Mesgid is the Mes‐
81       sage-ID of the article that should be canceled.  The  return  value  is
82       the same as for ICCcommand.
83
84       ICCpause,  ICCreserve,  and  ICCgo  send  a  ``pause,'' ``reserve,'' or
85       ``go'' command to the server, respectively.   If  ICCreserve  is  used,
86       then  the  why  value  used  in the ICCpause invocation must match; the
87       value used in the ICCgo invocation must always match that the one  used
88       in the ICCpause invocation.  The return value for all three routines is
89       the same as for ICCcommand.
90
91       If any routine described above  fails,  the  ICCfailure  variable  will
92       identify the system call that failed.
93

HISTORY

95       Written  by  Rich  $alz <rsalz@uunet.uu.net> for InterNetNews.  This is
96       revision 1586, dated 1998-12-09.
97

SEE ALSO

99       ctlinnd(8), innd(8), libinn(3).
100
101
102
103                                                                   INNDCOMM(3)
Impressum