Commit Graph

21 Commits

Author SHA1 Message Date
Andrew Bettison
ffafae86b1 Issue #11: replace long long with int64_t 2013-10-07 05:54:46 +10:30
Romain Vimont (®om)
954a8a01a4 Use one MDP socket per binding instead of a single global socket. 2013-09-24 16:09:44 +09:30
Andrew Bettison
cc96e08e9d Issue #20: Improve socket name handling
The recently added cmp_sockaddr() function does not call stat(2) any
more to compare local AF_UNIX socket address paths, so not it is stable
enough to use for ordering sockaddr structs.

New function: real_sockaddr() converts the file path of a local AF_UNIX
file socket using realpath(3).  The MDP client uses it on the sender
address of every MDP reply packet it receives to ensure that symlinks in
the instance path do not cause MDP client failures.

Rename recently added socket_setname() function: make_local_sockaddr().
2013-09-20 14:07:19 +09:30
Andrew Bettison
ae61a4f35c Issue #20: Make abstract sockets work
Finish the work started by Daniel in 2012, by using abstract local
AF_UNIX sockets on platforms that support them (Linux, Android).

Fix all sorts of bugs and issues that prevented the existing MDP and
Monitor client and server code from working with abstract socket names.
2013-09-19 17:26:06 +09:30
Romain Vimont (®om)
f5fa988fcf Make overlay_mdp_client_socket_path local
Unlink mdp sockets by asking the OS what the bound name was.
2013-08-26 11:55:11 +09:30
Jeremy Lakeman
3855ff35c4 Clean up string formatting for 64bit compilation 2013-07-15 09:59:24 +09:30
Jeremy Lakeman
9ee09e36a0 Replace old routing engine with new link state engine 2013-05-02 14:29:28 +09:30
Andrew Bettison
a8b88a462f Fix clang compiler warnings (revealed some bugs) 2013-04-12 17:16:50 +09:30
Jeremy Lakeman
bb8b3d6376 Add new mdp trace command 2013-02-20 16:18:58 +10:30
Andrew Bettison
c176d23726 Add 'sid:' field to output of "reverse lookup"
Use sid_t in more places
2013-02-15 19:34:24 +10:30
Jeremy Lakeman
89fac207fe Remove timing from mdp client library 2013-01-15 16:15:36 +10:30
Jeremy Lakeman
e26522bdc6 Minor improvements to command line time measurements 2013-01-03 14:16:33 +10:30
Andrew Bettison
5985df751d Overhaul debug flags
Replace debugflags_t and DEBUG_XXX bit masks with config schema "debug.xxx"
entries.

No more support for "debug.all".
2012-12-11 15:59:46 +10:30
Jeremy Lakeman
3dfd64f4da Add manually triggered network scan command 2012-12-05 15:13:47 +10:30
Jeremy Lakeman
5c7eb4a594 Add unicast probe packets
Probe directory service instead of assuming that it is always reachable
Fix directory service and routing tests
2012-12-04 14:47:57 +10:30
Jeremy Lakeman
e0878644fe Add command to dump routing table 2012-11-28 15:43:58 +10:30
Jeremy Lakeman
54e2d66934 Allow for with slightly longer paths 2012-11-09 13:40:55 +10:30
Andrew Bettison
4450116472 Refactor string functions, add str_fromprint()
Move lots of non-Serval-specific string functions from "serval.h"/dataformats.c
to "str.h"/str.c.

Add str_fromprint() function that reverses the effect of toprint(): interprets
escape sequences in the source string "\n\t\r\0\xHH\\" and replaces them with a
single char in the destination string.
2012-11-07 16:42:45 +10:30
Jeremy Lakeman
9a7c18c9f6 Only parse incoming packets with port numbers matching our expected responses 2012-10-02 16:15:30 +09:30
Jeremy Lakeman
2a7bd28e51 Extend packet queue to allow sending multiple copies of the same payload for reliability 2012-09-28 11:28:01 +09:30
Jeremy Lakeman
6483d9e0ae Split client mdp functions so they can be built separately 2012-09-14 11:47:48 +09:30