Martin Willi
c2a6fdf286
error-notify: use a stream service to accept client connections
...
As TCP does not have SOCK_SEQPACKET, we now use SOCK_STREAM for the error-notify
socket. To have network transparency, the message now uses network byte order.
2013-07-18 16:00:29 +02:00
Martin Willi
83faec5abe
duplicheck: use a stream service to accept client connections
...
As we can't use SOCK_SEQPACKET over TCP, we now have to provide message
boundaries ourselves. We do this by appending a 16-bit length header to each
sent duplicate identity.
2013-07-18 16:00:29 +02:00
Martin Willi
065907b99d
stroke: use a stream service to handle stroke requests
2013-07-18 16:00:29 +02:00
Martin Willi
4701929266
stream: allow async read/write callback to destroy the stream explicitly
2013-07-18 16:00:29 +02:00
Martin Willi
c9d1742b5d
stream: don't close underlying socket when creating a stream from it
2013-07-18 16:00:29 +02:00
Martin Willi
58d0dadddc
watcher: add some debugging statements
2013-07-18 16:00:29 +02:00
Martin Willi
91a2ae644c
watcher: if the processor has no threads, execute the job with watcher thread
...
This is important during shutdown, where we might need to signal some FDs while
all idle threads are gone already.
2013-07-18 16:00:29 +02:00
Martin Willi
50720d7ce9
processor: add a getter for the threads passed to set_threads()
2013-07-18 16:00:29 +02:00
Martin Willi
a0e3a7363f
watcher: unregister a watcher FD if its thread gets cancelled
2013-07-18 16:00:29 +02:00
Martin Willi
a558ba16f3
watcher: release threads waiting in remove() when watcher thread gets cancelled
...
During daemon shutdown, users might call remove() after processor.set_threads(0)
has been called. This gets problematic, as a watch event might be unable
to signal completion when no threads are available anymore. Work around this
issue by cancelling waiters once processor.cancel() has been called.
2013-07-18 16:00:29 +02:00
Martin Willi
e6e8a2b2e0
stream: support keeping the service alive outside of service callback
2013-07-18 16:00:28 +02:00
Martin Willi
d57b9e7c82
stream: add read/write_all() methods to stream
2013-07-18 16:00:28 +02:00
Martin Willi
1d1ef9e7ca
stream: support cancellation of stream service callback
2013-07-18 16:00:28 +02:00
Martin Willi
047a190600
stream: use a service constructor to create services
...
It does not make much sense to reference running services in the manager,
especially as unregistration would need the URI (which a user would have to
store instead of the service reference).
2013-07-18 16:00:28 +02:00
Martin Willi
fbdc65debb
stream: replace print/vprint() convenience functions by a FILE* getter
...
While this will complicate the implementation of streams not based on a fd,
it allows us to unleash the full power of FILE based convenience functions.
2013-07-18 16:00:28 +02:00
Martin Willi
70d1ccec96
stream: add a concurrency option to services, limiting parallel callbacks
2013-07-18 16:00:28 +02:00
Martin Willi
db0e160ba2
stream: add a job priority option to stream services
2013-07-18 16:00:28 +02:00
Martin Willi
441bb9e7b7
stream: add backlog option to stream services, forward to listen()
2013-07-18 16:00:28 +02:00
Martin Willi
c5597a4b56
stream: add support for TCP stream services
2013-07-18 16:00:28 +02:00
Martin Willi
db1c8aa460
stream: add support for TCP streams
2013-07-18 16:00:28 +02:00
Martin Willi
f04746d9b4
stream: add support for UNIX stream services
2013-07-18 16:00:28 +02:00
Martin Willi
b785cfe05b
stream: add support for UNIX streams
2013-07-18 16:00:28 +02:00
Martin Willi
c1fd8c22ce
stream: support async operation using watcher
2013-07-18 16:00:28 +02:00
Martin Willi
7a23588195
stream: add printf()-style covenience functions
2013-07-18 16:00:28 +02:00
Martin Willi
2ba276017d
stream: create library instance of stream-manager
2013-07-18 16:00:28 +02:00
Martin Willi
d6ff53940f
stream: add a manager to dynamically register streams and services
2013-07-18 16:00:28 +02:00
Martin Willi
daf1880b39
stream: add a stream service class abstracting services using BSD sockets
2013-07-18 16:00:27 +02:00
Martin Willi
b6b940001a
stream: add a stream class abstracting BSD sockets
...
Currently only synchronous operation is supported, but this will be extended
with asynchronous methods using the new watcher.
2013-07-18 16:00:27 +02:00
Martin Willi
32b2a5e04b
watcher: add a centralized an generic facility to monitor file descriptors
2013-07-18 16:00:27 +02:00
Tobias Brunner
e5b5a66712
kernel-pfkey: Fail route installation if remote TS matches peer
2013-07-18 15:41:36 +02:00
Tobias Brunner
29bdfb4086
kernel-libipsec: Fail route installation if remote TS matches peer
2013-07-18 15:41:13 +02:00
Tobias Brunner
dfc9902013
capabilities: Some plugins don't actually require capabilities at runtime
2013-07-18 15:25:35 +02:00
Tobias Brunner
027676f750
capabilities: Add function to check if a capability is held, without keeping it
...
This can be useful if capabilities are not required anymore after
dropping privileges.
2013-07-18 15:25:35 +02:00
Martin Willi
19cb07b890
automake: replace INCLUDES by AM_CPPFLAGS
...
INCLUDES are now deprecated and throw warnings when using automake 1.13.
We now also differentiate AM_CPPFLAGS and AM_CFLAGS, where includes and
defines are passed to AM_CPPFLAGS only.
2013-07-18 14:59:19 +02:00
Martin Willi
2e9e2fa848
eap-sim-pcsc: fix compiler warning
2013-07-18 14:59:19 +02:00
Martin Willi
896abbefc5
nm: omit deprecated g_type_init() when using >= GLIB 2.36
2013-07-18 14:21:17 +02:00
Martin Willi
2d5a20061a
soup: omit deprecated g_type_init() when using >= GLIB 2.36
2013-07-18 14:20:57 +02:00
Martin Willi
b146ecbc4e
libfast: cancel thread if it fails to accept fcgi sessions
2013-07-18 12:24:38 +02:00
Martin Willi
890f20989f
libfast: add a fast_ prefix to all classes, avoiding namespace clashes
2013-07-18 12:24:38 +02:00
Martin Willi
b9c47eae06
xpc: allow easy copy & pase of ./configure instructions
2013-07-18 12:17:56 +02:00
Martin Willi
7f1adbe94e
xpc: use -idirafter to build against openssl headers from /usr/include
2013-07-18 12:17:56 +02:00
Martin Willi
06e8712cb3
xpc: forward some risen alerts over XPC to App
2013-07-18 12:17:56 +02:00
Martin Willi
e7ee45ef38
xpc: enable close_ike_on_child_failure
2013-07-18 12:17:56 +02:00
Martin Willi
e37c5d46d3
xpc: send a "connecting" event when establishing a connection starts
2013-07-18 12:17:56 +02:00
Martin Willi
3ffa310c44
xpc: use osx-attr plugin to install configuration attributes
2013-07-18 12:17:56 +02:00
Martin Willi
c7ac7f92e9
xpc: update README with new events, markdown style fixes
2013-07-18 12:17:55 +02:00
Martin Willi
4edcc86149
xpc: send child_updown events over XPC channel
2013-07-18 12:17:55 +02:00
Martin Willi
d60c8d2c74
xpc: support termination of IKE_SAs using XPC RPC on connection channel
2013-07-18 12:17:55 +02:00
Martin Willi
790ad9e677
xpc: move XPC RPC reply creation to command dispatching
2013-07-18 12:17:55 +02:00
Martin Willi
a0c125eacb
xpc: terminate daemon when last XPC connection to App gone
2013-07-18 12:17:55 +02:00