Commit Graph

58 Commits

Author SHA1 Message Date
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ý
7f0dc55b8f
doc: qbloop.h: document pros/cons of using built-in event loop impl
Make the qbipcs.h module interdependence clear (also shedding light to
some semantic dependencies) as well.

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2019-06-07 17:37:23 +02:00
Chrissie Caulfield
75ab31bdd0
ipc_shm: Don't truncate SHM files of an active server (#307)
* ipc_shm: Don't truncate SHM files of an active server

I've put in an extra check so that clients don't truncate the
SHM file if the server still exists. Sadly on FreeBSD we can't
get the server PID for the client (unless someone has a patch handy!)
so we still do the truncate when disconnected. As a backstop (and also
to cover the BSD issue) I've added a SIGBUS trap to the server shutdown
so that it doesn't cause a server crash.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed by: Jan Friesse <jfriesse@redhat.com>
2018-04-20 09:48:04 +01:00
Jan Pokorný
833298e265
Fix typo: repeat{ivi -> ed}ly
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2017-06-08 12:32:22 +02:00
Jan Pokorný
d107a2ab3b
Low: further sanitize qbipc[cs].h public headers wrt. includes 2016-10-17 17:41:37 +02:00
Jan Pokorný
c1c26c94cb
Low: sanitize import of <qb/qbarray.h> symbols 2016-10-17 17:25:50 +02:00
Jan Pokorný
b7f6dae97a
Fix typos: availabi{l -> li}ty, explici{lt -> tl}y 2016-10-12 20:10:22 +02:00
Jan Pokorný
d2b15efe60
Fix typo: asyncronous -> asynchronous 2016-09-30 14:26:15 +02:00
Ferenc Wágner
4fbef9b74b Fix comment typos: incomming -> incoming 2015-04-20 16:12:56 +02:00
David Vossel
eb7d6c5455 Low: qbipcs.h: fix doxygen comments for ipcs buffer size enforcement 2014-08-21 12:12:05 -05:00
David Vossel
16855e5058 Low: ipcs: Clarifications to the ipcs server callback documentation. 2014-01-07 14:22:46 -06:00
David Vossel
9f6e4bb52d Feature: Enforce buffer size limits on the server side 2013-11-18 16:51:31 -06:00
David Vossel
2b11b783c7 High: ipcs: Api function allowing server to retrieve client connection's ipc buffer size 2013-10-08 17:11:53 -05:00
David Vossel
75b22a20c8 Low: qbipcs.h: update ipcs connection iterator documentation 2013-07-02 18:55:08 -05:00
David Vossel
abdf8cd94a Simplify internal ipcs ref counting, add comments and document api behavior 2013-06-28 20:27:02 -05:00
Michael van der Westhuizen
652766c002 Add a IPC service context pointer and accessors from both the connection and service level. 2013-05-25 22:57:53 +01:00
Angus Salkeld
22569f51ba Add user control of the permissions that are set on the shared mem files
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-13 08:21:09 +10:00
Angus Salkeld
908bdfd172 IPC: add a new function to get (and alloc) the extended stats.
This should handle any further additions to the stats
as the library allocs the struct.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-10 20:20:29 +10:00
Angus Salkeld
c221922291 Revert "Add the event queue length to the connection stats."
This reverts commit 6b7da3f531.
2012-05-10 16:09:48 +10:00
Angus Salkeld
6b7da3f531 Add the event queue length to the connection stats.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 13:22:16 +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
2d3d3eaae0 Make all headers self standing
So the user does not have to include any required headers.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-16 22:21:03 +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
859006bb14 IPC: rename _ref_inc() to _ref()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-13 16:18:19 +11:00
Angus Salkeld
fa72adc5be DOCS: fix some doxygen warnings for missing comments.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-13 10:43:35 +11:00
Angus Salkeld
47cedda894 IPC: export qb_ipcs_disconnect()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-03 11:19:09 +11:00
Angus Salkeld
c516965fbb IPC: add connection_closed() callback.
- added another callback closed() and use this as the current
  destroyed_connection() has been used.
- the destroyed() event changes meaning to
  "the connection object is about to be free'ed"
  and the user can free the context memory.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-04 10:16:58 +11:00
Angus Salkeld
b07b65df42 IPC: change service instance from handle to pointer.
Mainly to be consistent with the other objects.

Also:
- splint warnings(-weak) are now zero.
- Added a reference counter to replace the handle.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-11-03 21:41:05 +11:00
Angus Salkeld
e390a373d5 IPC: add server connection states for better shutdown.
This also fixes the refcounting, which was not quite right.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-27 11:48:56 +11:00
Angus Salkeld
90beaae095 IPC: add qb_ipcs_response_sendv()
iovec friendly response function

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-27 11:36:13 +11:00
Angus Salkeld
36d1171e2a IPC: add job_add() API to the poll abstraction.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-27 11:33:00 +11:00
Angus Salkeld
2549e5c24a IPC: add a connection iterator.
So we can iterate over all connections on a service.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-21 21:48:29 +11:00
Angus Salkeld
c5ed1450a1 IPC: add stats to server end.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-21 21:43:26 +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
8df21458f5 IPC: get the poll independent functions working.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:52 +11:00
Angus Salkeld
1f6c42b098 IPC: make msg_process return type int
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:52 +11:00
Angus Salkeld
08e5a9004d Add a priority based main loop.
This is to try and get a better balance in the amount
of processing between IPC and totem in corosync.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-12 21:53:52 +11:00
Angus Salkeld
dc618488d2 IPC: add a user context_get/set() functions.
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
69f2c88081 IPC: add a service_id and merge qb_ipcs_create() + qb_ipcs_service_handlers_set()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-02 21:06:12 +10:00
Angus Salkeld
fcd0ca69d9 IPC: change the ipcs_connection to a pointer (not handle).
This is make integrating with corosync easier.
Also technically it doesn't really matter it still
has a reference counter.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-01 22:57:02 +10:00
Angus Salkeld
2aae94eb1d IPC: make authenticate callback more generic "accept".
This is so that it is more obvious that you can use
it for authentication, service availabilty and
process resource constraints.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-01 22:57:02 +10: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
b29a1809f4 IPC: rename qb_ipcs_connection_pt -> qb_ipcs_connection_handle_t
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-09-29 14:32:51 +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