Commit Graph

39 Commits

Author SHA1 Message Date
Chrissie Caulfield
de5ab3029c
ipcc: Add an async connect API (#450) 2022-01-05 10:53:09 +00:00
Chrissie Caulfield
680db526f6
ipc: add qb_ipcc_auth_get() API call (#418)
* ipc: addd qb_ipcc_auth_get() API call

We can't use SO_PEERCRED on the client fd when using socket IPC
becayse it's a DGRAM socket (pacemaker tries this). So provide
an API to get the server credentials that libqb has already
squirreled away for its own purposes.

Also, fix some unused-variable compiler warnings in unix.c
when building on systems without posix_fallocate().
2020-09-28 09:53:21 +01:00
Chrissie Caulfield
6d35611524
doxygen2man: Add option to read copyright line from the header file (#415)
* doxygen2man: Add option to read copyright line from the header file

This should help make builds reproducible.

I tried various methods of getting the date, using 'git' is no use as
it could be run from a tarball, using the file date doesn't work either
so this seems a reasonable compromise.

* man: Use SOURCE_EPOCH to make manpage dates reproducible

Also add build-aux/update-copyright.sh to keep header file
copyright lines up-to-date.

All code taken from knet
2020-09-09 15:06:55 +01:00
Christine Caulfield
3da80822b2 lib: Fix some minor warnings from newer compilers
and doxygen
2019-12-11 11:14:47 +00:00
Jan Pokorný
d107a2ab3b
Low: further sanitize qbipc[cs].h public headers wrt. includes 2016-10-17 17:41:37 +02:00
Jan Pokorný
ab78f2a4fd
Low: sanitize import of <poll.h> symbols 2016-10-17 17:39:09 +02:00
Jan Pokorný
c1c26c94cb
Low: sanitize import of <qb/qbarray.h> symbols 2016-10-17 17:25:50 +02:00
Jan Pokorný
d2b15efe60
Fix typo: asyncronous -> asynchronous 2016-09-30 14:26:15 +02:00
David Vossel
8bd36d3e5c Feature: New api function to retrieve client buffer size
When server side buffer limits are in use, this is
necessary to determine the buffer size the server
is enforcing after the client connection is established.
2013-11-18 16:53:39 -06:00
David Vossel
65d044be18 High: ipcc: Add abilty to verify dgram kernel buffer size meets max msg value 2013-07-19 18:51:59 -05:00
Angus Salkeld
b29326a363 IPC: add a is_connected client side function.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 12:43:22 +10:00
Angus Salkeld
154ccabdb5 docs: clarify the need to use request/response headers
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 12:14:58 +10:00
Angus Salkeld
2f99276d16 IPC: add a context to the client interface
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-18 15:24:34 +11:00
Angus Salkeld
ab3dc60f7f Merge some portability changes from the mingw branch
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-21 14:23:43 +11:00
Angus Salkeld
e0c5187023 IPC: provide finer grained flowcontrol
this will allow the user to control the behaviour better.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-14 00:55:06 +11:00
Angus Salkeld
dfe624f5a9 examples: add ipc client/server
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-23 22:40:26 +11:00
Angus Salkeld
1a9c549eb5 Be more consistent with the C++ protection
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-30 19:53:41 +11:00
Angus Salkeld
3c742eb761 DOCS: add missing @param on new timeout argument
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-01-09 17:23:45 +11:00
Angus Salkeld
43181d5a95 IPC: add a timeout to the client recv functions
Also allow the ringbuffer to pass ETIMEDOUT back to the
client applications.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-16 21:47:47 +11:00
Angus Salkeld
47443a5b63 DOCS: do some work on the doxygen output.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-17 19:31:24 +11:00
Angus Salkeld
e9d10dfdbe IPC: remove flow control API and move functionality into send()
There is no point in a separate API.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-14 09:16:00 +11:00
Angus Salkeld
0d9f8720b9 IPC: add qb_ipcc_sendv_recv() convenience function.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-13 10:01:30 +11:00
Angus Salkeld
e1686dbd6a IPC: add support for flowcontrol & rate limiting
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:53 +11:00
Angus Salkeld
3dcd1126f6 IPC: remove qb_ipcc_event_release()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:46:53 +11:00
Angus Salkeld
e0f942bfee IPC: teach event_recv() to take a timeout
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-06 20:39:23 +11:00
Angus Salkeld
c1a3b0d029 IPC: add sendv() functions to handle iovecs.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-06 20:39:23 +11:00
Angus Salkeld
86c84f6ae0 IPC: new auth improvement and limits work around.
Create the queues/ringbuffers on the server so we don't
have to modify proc entries. Then chown them so that
the clients can access them.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-30 20:17:59 +10:00
Angus Salkeld
b6d4fb95b8 IPC: add events back (were dispatch messages in corosync)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-29 14:32:51 +10:00
Angus Salkeld
64b4aac413 IPC: un-const the data pointer in recv()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-29 14:32:51 +10:00
Angus Salkeld
b28173ee81 IPC: get shm & pmq working
Note: pmq needs "sudo make check"

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-07 14:11:42 +10:00
Angus Salkeld
8a6b8d78db IPC: rewrite (simpler API & more structured layout).
- implement using posix message queues
- implement using sys-v message queues
- implement shared memory ringbuffers
- add auth via unix sockets
- add items to the TODO

This is still a bit rough, more work to follow...

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-08-23 12:46:36 +10:00
Angus Salkeld
b8a5a74fcc hdb: move functions into cfile
convert int -> int32_t
rename qb_hdb_handle_t -> qb_handle_t
rename DECLARE_HDB_DATABASE -> QB_HDB_DECLARE
rename qb_hdb_handle_database -> qb_hdb

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-16 09:12:20 +10:00
Angus Salkeld
87f204469a ipc: convert int -> int32_t; unsigned int -> uint32_t
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-15 14:46:52 +10:00
Angus Salkeld
7a90cdda1f Remove unneccessary extern's.
http://gcc.gnu.org/ml/gcc/2009-04/msg00812.html
http://publications.gbdirect.co.uk/c_book/chapter4/linkage.html
http://www.eskimo.com/~scs/cclass/notes/sx5b.html

note in ipcs.c qb_ipcs_ipc_init() is extern'ed, I don't
think that this is needed - we'll soon see :)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-11 08:29:31 +10:00
Angus Salkeld
0a23eb2be1 Format all files with Lindent
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-10 21:42:08 +10:00
Angus Salkeld
caecbe6542 Re-license to LGPL 2.1
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-05-25 06:11:59 +10:00
Angus Salkeld
74a7a49354 ipc: add a non-blocking send function.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-04-29 14:47:42 +10:00
Angus Salkeld
3eb313a848 ipc: add common types to qbipc_common.h
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-04-29 11:23:35 +10:00
Angus Salkeld
ceff27f370 Add ipcc from corosync
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-03-19 14:42:25 +11:00