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
Andrew Bettison
4937757d36
Improve Serval instance path operations
...
Replace form_serval_instance_path(), which takes a single 'path'
argument, with formf_serval_instance_path() and
vformf_serval_instance_path(), which take printf(3)-like arguments.
This supports more flexible instance path file names.
FORM_SERVAL_INSTANCE_PATH() macro works as before, but reimplemented
2013-09-19 17:19:37 +09:30
Andrew Bettison
f3cd0d8718
Improve socket function prototypes and macros
...
Remove '__whence' argument name from all struct __sourceloc prototype
arguments
Parentheses around macro arguments
Use __WHENCE__ instead of __HERE__ in macros
2013-09-19 16:37:34 +09:30
Andrew Bettison
7453e82a27
Issue #20 : improve new socket function logging
...
__whence argument and function macros
2013-09-19 04:30:40 +09:30
Andrew Bettison
2b3119b49b
Issue #20 : merge branch 'sockets' into 'development'
...
Daniel's improvements to the local file/abstract socket code, with many
improvements to bring it up to date.
2013-09-19 04:30:14 +09:30
Andrew Bettison
7add45214c
Add [keyring-pin] arg to keyring load command
2013-09-10 11:28:55 +09:30
Jeremy Lakeman
d1234cb0f9
Use consistent integer types and formats
2013-09-09 12:09:40 +09:30
Andrew Bettison
f0a74e6cf2
Merge "keyring load" command and other keyring improvements into 'development'
2013-09-07 04:22:55 +09:30
Andrew Bettison
8a300c2520
Get new keyring dump command and test working
2013-09-05 16:34:01 +09:30
Andrew Bettison
f95e41374b
Implement keyring load command, not working yet
...
Write new keyring test, fails with ERROR because assertGrep -F option is
not supported.
2013-09-04 23:47:17 +09:30
Andrew Bettison
08c02e0e20
More progress towards keyring load command
2013-09-03 17:31:10 +09:30
Andrew Bettison
425aa1005c
Start work on "keyring load" command
2013-09-02 17:33:52 +09:30
Jeremy Lakeman
3be2ed615d
Resurrect packet visualisation
2013-09-02 14:55:02 +09:30
Jeremy Lakeman
8935db4184
Only ack soon if we have been asked to
2013-08-30 17:38:29 +09:30
Andrew Bettison
3b1ae5cbb0
Env vars SERVAL_KEYRING_PATH and SERVAL_KEYRING_READONLY
...
To support release signing operations without having to copy the release
keyring from its USB stick (into an instance directory), and reducing
the risk of corrupting the release keyring file while using it in-place.
2013-08-30 11:20:19 +09:30
Andrew Bettison
7d30b3cce7
Pass command-line args to server() function
...
So that the daemon can open the keyring file with --keyring-pin and --entry-pin
options.
Also remove some unused code.
2013-08-30 11:20:19 +09:30
Jeremy Lakeman
bf4269e98e
Adjust retransmission delay based on measured RTT
2013-08-29 15:28:20 +09:30
Romain Vimont (®om)
4f89a69365
overlay_mdp_bind and overlay_mdp_getmyaddr should be visible in MDP API
2013-08-26 11:55:11 +09:30
Romain Vimont (®om)
2c6a14dd56
Delete all socket files on servald start
...
If serval does not close properly, socket files are kept in
/data/data/org.servalproject/var/serval-node. Therefore, we need to clean up
when servald starts.
2013-08-26 11:55:11 +09:30
Jeremy Lakeman
a516af616e
Improve reliability
...
- don't drop packets that haven't been resolved yet on incoming acks
- statistically drop unicast packets during tests
2013-08-12 16:38:37 +09:30
Jeremy Lakeman
9a50d8a9ef
Route mulit-hop via unicast links
2013-08-09 16:37:54 +09:30
Jeremy Lakeman
55657623aa
Detect unicast links
2013-08-09 12:18:14 +09:30
Jeremy Lakeman
81afc42d8b
Major refactor to packet queuing and delivery in preparation for unicast link tracking.
...
Unicast tests broken
2013-08-09 09:37:08 +09:30
Jeremy Lakeman
d47d1b1684
Split network destination structure from interface structure
2013-08-05 14:35:49 +09:30
Jeremy Lakeman
8a1c0a39e3
Merge branch 'meshmsv2' into development
2013-08-05 13:05:44 +09:30
Jeremy Lakeman
6c85999917
Log crashes and unexpected signals as FATAL
2013-07-31 14:53:52 +09:30
Jeremy Lakeman
7634e1fcfb
Add command to mark messages as read
2013-07-26 14:36:11 +09:30
Jeremy Lakeman
f1139d4c0e
Reduce meshms entry encoding size
2013-07-23 16:21:07 +09:30
Jeremy Lakeman
ddfb7d9417
First cut of new meshms API, unfinished
2013-07-22 17:55:02 +09:30
gardners
8968d5cf05
report RFD900 packets received as well as link margin estimate.
...
(non-zero packets received implies radio link).
2013-07-19 20:04:15 +09:30
Jeremy Lakeman
49e0286b43
Reduce packet header size for point-to-point links
...
- new interface.x.point_to_point config
- disable local echo for point to point dummy interfaces
- add ME and YOU sid abbreviation codes after learning other sid
2013-07-16 15:38:00 +09:30
Jeremy Lakeman
a73814571d
Only send one packet per alarm with single encapsulation
2013-07-15 15:29:14 +09:30
Jeremy Lakeman
8ac359e550
Use consistent integer types for 64bit compilation
2013-07-13 14:47:06 +09:30
Jeremy Lakeman
9f9893095b
Add small delays to route announcements to reduce packet spam
2013-07-10 13:16:22 +09:30
Jeremy Lakeman
88d88e685c
Improve backward compatibility for broadcasts & packet retries
2013-07-08 16:01:58 +09:30
Jeremy Lakeman
53f3920b90
Move cli global state into a structure and pass it around
2013-07-03 16:51:27 +09:30
Jeremy Lakeman
61a958fd34
Avoid setting alarms with deadlines that have already elapsed
2013-06-19 15:36:18 +09:30
Jeremy Lakeman
adbbed5275
Add new rhizome sync protocol
2013-06-19 12:05:57 +09:30
Jeremy Lakeman
50bcd3883b
Don't forward broadcasts unless we are vital to their delivery
2013-05-29 11:58:06 +09:30
Jeremy Lakeman
8ab5073869
Adjust packet format for better duplicate detection
2013-05-29 11:58:05 +09:30
Jeremy Lakeman
5b4e4919cf
Mark resent packets so they can be dropped
2013-05-29 11:58:05 +09:30
Jeremy Lakeman
e5856225cf
Add packet retransmissions due to missed ack's
2013-05-29 11:58:05 +09:30
Jeremy Lakeman
b10746b3a5
Add stub functions for retransmission / throttling
2013-05-29 11:58:04 +09:30
Jeremy Lakeman
a71c3f3c1f
Don't send broadcast payloads on interfaces with no neighbours
2013-05-22 11:57:38 +09:30
Jeremy Lakeman
ef1e93bf52
Establish neighbour links with nodes running our legacy routing engine
2013-05-09 16:57:33 +09:30
Jeremy Lakeman
dcdb8fcdd4
Announce all links on connection to monitor interface
2013-05-08 13:42:11 +09:30
Jeremy Lakeman
c0b31a2774
Report packet acks, make routing decisions based on dropped packets
2013-05-08 11:37:02 +09:30
gardners
3f77702ee6
add nonce generation function to remove strain on /dev/urandom on
...
slow embedded devices. Wrote test to make sure that nonces are
indeed unique.
2013-05-07 14:41:59 +09:30
Jeremy Lakeman
79f4a78278
Add link state monitor commands
2013-05-02 16:19:59 +09:30