.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "libinn_inndcomm 3" .TH libinn_inndcomm 3 "2022-07-10" "INN 2.7.2" "InterNetNews Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" inndcomm \- Routines for managing innd control commands .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& #include \& \& #define SC_ADDHIST ... \& #define SC_ALLOW ... \& #define SC_BEGIN ... \& #define SC_CANCEL ... \& #define SC_CHANGEGROUP ... \& #define SC_CHECKFILE ... \& #define SC_DROP ... \& #define SC_FEEDINFO ... \& #define SC_FLUSH ... \& #define SC_FLUSHLOGS ... \& #define SC_GO ... \& #define SC_HANGUP ... \& #define SC_LOGMODE ... \& #define SC_LOWMARK ... \& #define SC_MODE ... \& #define SC_NAME ... \& #define SC_NEWGROUP ... \& #define SC_PARAM ... \& #define SC_PAUSE ... \& #define SC_PERL ... \& #define SC_PYTHON ... \& #define SC_READERS ... \& #define SC_REJECT ... \& #define SC_RELOAD ... \& #define SC_RENUMBER ... \& #define SC_RESERVE ... \& #define SC_RMGROUP ... \& #define SC_SEND ... \& #define SC_SHUTDOWN ... \& #define SC_STATHIST ... \& #define SC_STATUS ... \& #define SC_SIGNAL ... \& #define SC_THROTTLE ... \& #define SC_TIMER ... \& #define SC_TRACE ... \& #define SC_XABORT ... \& #define SC_XEXEC ... \& \& #define MAX_REASON_LEN ... \& \& extern int ICCopen(void); \& extern int ICCclose(void); \& extern void ICCsettimeout(int i); \& extern int ICCcommand(char cmd, const char *argv[], char **replyp); \& extern int ICCcancel(const char *msgid); \& extern int ICCpause(const char *why); \& extern int ICCreserve(const char *why); \& extern int ICCgo(const char *why); \& \& extern const char *ICCfailure; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The routines described in this manual page are part of the InterNetNews library, \fBlibinn\fR\|(3). They are used to send commands to a running \fBinnd\fR daemon on the local host. The letters \f(CW\*(C`ICC\*(C'\fR stand for \fBI\fRnnd \fBC\fRontrol \&\fBC\fRommand. .PP The \fBICCopen\fR function creates a Unix-domain datagram socket and binds it to the server's control socket, if such sockets are supported. Otherwise, it creates a named pipe for communicating with the server. It returns \&\f(CW\*(C`\-1\*(C'\fR on failure or \f(CW0\fR on success. This routine must be called before any other routine. .PP The \fBICCclose\fR function closes any descriptors that have been created by \fBICCopen\fR. It returns \f(CW\*(C`\-1\*(C'\fR on failure or \f(CW0\fR on success. .PP The \fBICCsettimeout\fR function can be called before any of the following routines to determine how long the library should wait before giving up on getting the server's reply. This is done by setting and catching a \&\s-1SIGALRM\s0 \fBsignal\fR\|(2). If the timeout is less than zero, then no reply will be waited for. The \fB\s-1SC_SHUTDOWN\s0\fR, \fB\s-1SC_XABORT\s0\fR, and \fB\s-1SC_XEXEC\s0\fR commands do not get a reply either. The default, which can be obtained by setting the timeout to <0>, is to wait during 2 minutes. .PP The \fBICCcommand\fR function sends the command \fIcmd\fR with parameters \fIargv\fR to the server. It returns \f(CW\*(C`\-1\*(C'\fR on error. If the server replies, and \&\fIreplyp\fR is not \s-1NULL,\s0 it will be filled in with an allocated buffer that contains the full text of the server's reply. This buffer is a string in the form of "\fIdigits\fR \fItext\fR" where \fIdigits\fR is the text value of the recommended exit code (usually \f(CW1\fR, followed with \fItext\fR, giving the reason of the failure); a \f(CW0\fR value indicates success. Replies longer than 64KB will be truncated. The possible values of \fIcmd\fR are defined in the \fIinn/inndcomm.h\fR header file, and also in the \s-1SYNOPSIS\s0 of this man page. The parameters for each command are described in \fBctlinnd\fR\|(8). This routine returns \f(CW\*(C`\-1\*(C'\fR on communication failure, or the exit status sent by the server which will never be negative. .PP The \fBICCcancel\fR function sends a \f(CW\*(C`cancel\*(C'\fR message to the server. Its \fImsgid\fR argument is the Message-ID of the article that should be cancelled. The return value is the same as for \fBICCcommand\fR. .PP The \fBICCpause\fR, \fBICCreserve\fR, and \fBICCgo\fR functions send a \f(CW\*(C`pause\*(C'\fR, \&\f(CW\*(C`reserve\*(C'\fR, or \f(CW\*(C`go\*(C'\fR command to the server, respectively. If \fBICCreserve\fR is used, then the \fIwhy\fR value used in the \fBICCpause\fR invocation must match; the value used in the \fBICCgo\fR invocation must always match the one used in the \fBICCpause\fR invocation. The return value for all three routines is the same as for \fBICCcommand\fR. .PP If any routine described above fails, the \fIICCfailure\fR variable will identify the system call that failed. .SH "HISTORY" .IX Header "HISTORY" Written by Rich \f(CW$alz\fR for InterNetNews. Rewritten into \&\s-1POD\s0 by Julien Elie. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBctlinnd\fR\|(8), \fBinnd\fR\|(8), \fBlibinn\fR\|(3).