Fix up the handling of endian translation and add support for decoding
new and del server messages.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
The two added functions can be used by an application to check if a
sockaddr is from the control port and for parsing the control messages
that is passed to registered clients.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Now that we have moved all operations to the control socket we can
remove the ns handler. The query function in the library is racy, as
there might be non-response messages in our incoming buffer when we
start reading, so this is dropped too - rather than just being
translated to the new interface.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Introduce a subscription based lookup model, in order for a client to be
able to listen to a future spawning service. The client can register any
number of queries with the ns and the ns will post lookup-results as
services are registred.
As a special case the list of lookup-results that is sent out as a
result of the registration of a new lookup will be finished by an empty
lookup response, allowing tools like qrtr-lookup to terminate as the
entire list of currently registed services is received.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Replace the implementation of the two library functions with calls to
the new APIs, so that we can remove the server-side implementation of
the previous messages.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Add a new set of operations to libqrtr for sending registration events
to the control service, rather than using the nameservice port.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Extract the libqrtr source and header file to a separate directory,
making it more convinient to include the header file from other
projects.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>