summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-01-19 16:20:29 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-01-19 16:20:29 +0000
commit347f8a8a14e3fb736ea6f42c7a0da1a0472f947f (patch)
tree02733a960b201ec3466f97d53329b85505de1315 /src/include
parent16de50671c7ad77f2acb4ca19d8806aad0490f03 (diff)
downloadskalibs-347f8a8a14e3fb736ea6f42c7a0da1a0472f947f.tar.xz
- Added unixconnection
- Added sig_name & sig_number (suggestion from Olivier Brunel) - version bumped to 2.2.1.0, rc
Diffstat (limited to 'src/include')
-rw-r--r--src/include/skalibs/sig.h3
-rw-r--r--src/include/skalibs/unixconnection.h25
-rw-r--r--src/include/skalibs/unixonacid.h1
3 files changed, 29 insertions, 0 deletions
diff --git a/src/include/skalibs/sig.h b/src/include/skalibs/sig.h
index 7972e14..fa46b00 100644
--- a/src/include/skalibs/sig.h
+++ b/src/include/skalibs/sig.h
@@ -43,4 +43,7 @@ extern void sig_pause (void) ;
extern void sig_shield (void) ;
extern void sig_unshield (void) ;
+extern char const *sig_name (int) ;
+extern int sig_number (char const *) ;
+
#endif
diff --git a/src/include/skalibs/unixconnection.h b/src/include/skalibs/unixconnection.h
new file mode 100644
index 0000000..50a6ee8
--- /dev/null
+++ b/src/include/skalibs/unixconnection.h
@@ -0,0 +1,25 @@
+ /* ISC license. */
+
+#ifndef UNIXCONNECTION_H
+#define UNIXCONNECTION_H
+
+#include <skalibs/unixmessage.h>
+
+typedef struct unixconnection_s unixconnection_t, *unixconnection_t_ref ;
+struct unixconnection_s
+{
+ unixmessage_sender_t out ;
+ unixmessage_receiver_t in ;
+ char mainbuf[UNIXMESSAGE_BUFSIZE] ;
+ char auxbuf[UNIXMESSAGE_AUXBUFSIZE] ;
+} ;
+#define UNIXCONNECTION_ZERO { .out = UNIXMESSAGE_SENDER_ZERO, .in = UNIXMESSAGE_RECEIVER_ZERO } ;
+extern unixconnection_t const unixconnection_zero ;
+
+extern void unixconnection_init (unixconnection_t *, int, int) ;
+extern void unixconnection_free (unixconnection_t *) ;
+
+#define unixconnection_flush(io) unixmessage_sender_flush(&(io)->out)
+#define unixconnection_receive(io, m) unixmessage_receive(&(io)->in, m)
+
+#endif
diff --git a/src/include/skalibs/unixonacid.h b/src/include/skalibs/unixonacid.h
index a150e39..9ec3fe8 100644
--- a/src/include/skalibs/unixonacid.h
+++ b/src/include/skalibs/unixonacid.h
@@ -6,6 +6,7 @@
#include <skalibs/unix-transactional.h>
#include <skalibs/unix-timed.h>
#include <skalibs/unixmessage.h>
+#include <skalibs/unixconnection.h>
#include <skalibs/kolbak.h>
#include <skalibs/skaclient.h>