Commit Graph

287 Commits

Author SHA1 Message Date
Jeremy Lakeman
de8ffd7ea9 Mark all subscribers as unreachable when the network goes down 2012-12-12 10:01:08 +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
bc91b05d7f Fix interface matching 2012-12-10 16:15:37 +10:30
Jeremy Lakeman
c3f573ea7f Add more messages, wait for directory service to start first
And make sure gaps in sockaddr_in are zeroed.
2012-12-10 14:42:57 +10:30
Jeremy Lakeman
2932544eb8 Add IPv4 addresses to dummy interface 2012-12-10 14:06:25 +10:30
Jeremy Lakeman
78aa01ad30 Add stun lookup messages 2012-12-10 14:05:57 +10:30
Andrew Bettison
8425882ffc Merge branch 'newconfig' into 'master'
Conflicts:
	commandline.c
	conf.h
	dataformats.c
	log.h
	overlay_address.c
	overlay_interface.c
	packetformats.c
	rhizome.c
	serval.h
	tests/directory_service
	vomp_console.c
2012-12-07 14:09:55 +10:30
Andrew Bettison
b497c88d9d Fix 'directory_service' test failures
New configuration schema.
2012-12-05 15:47:14 +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
Andrew Bettison
caa209fc1d Integrate new config into servald
Not passing any tests yet, but compiles and links and simple uses do not
SEGV.
2012-12-04 14:12:28 +10:30
Jeremy Lakeman
54f9d9b0e0 Rely on please explain, don't send too many full sids 2012-11-28 15:44:39 +10:30
Jeremy Lakeman
3d14e2f3db Hide more information about packet headers 2012-11-28 15:43:56 +10:30
Andrew Bettison
c4b90a108b Fix compile warnings on Solaris (gcc 4.4) 2012-11-28 14:13:25 +10:30
Andrew Bettison
494a766b9e Improve str.h and str.c
Move alloca_tohex() from serval.h into str.h so it can be used stand-alone.

Rename str_to_ll_scaled() to str_to_int64_scaled().  Add str_to_uint64_scaled()
and scale_factor().

Add a few more URI parsing functions.  Move some functions out of str.c and
into str.h as inline functions.
2012-11-22 18:15:40 +10:30
Jeremy Lakeman
36cee7e9bc Move payload queueing functions to separate .c file 2012-11-21 11:02:00 +10:30
Jeremy Lakeman
93ee6b3fc8 Don't kill the interface for unreachable unicast peers 2012-11-12 14:46:09 +10:30
Jeremy Lakeman
54e2d66934 Allow for with slightly longer paths 2012-11-09 13:40:55 +10:30
Andrew Bettison
d9fb8d7956 Refactor 'interfaces' config parsing
Use new "str.h" str_to_ll_scaled() function to implement parse_quantity().
2012-10-31 18:16:05 +10:30
Andrew Bettison
c3ef89acc1 Fix bug: "interfaces=+" not working
The logic was clobbered back in June in a refactor by Daniel.
2012-10-30 14:50:47 +10:30
Jeremy Lakeman
a4b392d693 Don't include rhizome adverts in packets with voice frames 2012-10-29 13:10:20 +10:30
Jeremy Lakeman
de95bb3971 Gracefully disable rhizome if the database cannot be opened
- close database after every command line operation
- don't cache rhizome enabled configuration
- don't send advertisements unless the database is open and the web server is running
- don't provess advertisements unless the database is open
2012-10-29 13:05:03 +10:30
Jeremy Lakeman
bb973e764e Don't send duplicate payloads over unicast 2012-10-19 10:40:35 +10:30
Jeremy Lakeman
3ab474be16 Always update unicast addresses 2012-10-19 10:40:02 +10:30
Andrew Bettison
259b9a9d24 Logging/debug improvements: __WHENCE__, __whence
Introduce __WHENCE__ macro and a block comment in log.h explaining it.

In "primitive" kinds of functions, rename 'whence' arguments to '__whence' and
use WHYF(), WARNF(), DEBUGF() macros instead of calling logMessage() directly.
2012-10-16 17:00:03 +10:30
Andrew Bettison
89343c69cd Merge branch 'rhizomedirect' into 'master' 2012-10-05 17:45: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
Andrew Bettison
fb7c9e5633 Fix compiler warnings on Linux gcc 4.7.1 2012-09-27 11:02:58 +09:30
Jeremy Lakeman
b7c088f2fd Reduce latency of dummy interface, improve some debug messages 2012-09-20 10:28:02 +09:30
Jeremy Lakeman
ac00c06a18 Improve reliability of tests with dummy interface 2012-09-20 10:28:01 +09:30
Jeremy Lakeman
0538e95be8 Reduce the potential for packet storms 2012-09-20 10:28:01 +09:30
Jeremy Lakeman
dc8a453b7f Add please explain message
- non-tick packets now include a poorly formed SELF_ANNOUNCE to correctly identify every packet sender
2012-09-20 10:28:01 +09:30
Jeremy Lakeman
ee4e05109f Improvements to dummy interfaces
- separate folder configuration
- allow for tickless dummy interface
- allow for "unicast" peer discovery (though there's no packet filtering)
2012-09-19 09:52:14 +09:30
Jeremy Lakeman
5914bc92ce Use a directory service as a default route 2012-09-19 09:50:29 +09:30
Jeremy Lakeman
7c73ca7a78 Finish test and implementation of directory service 2012-09-18 12:30:15 +09:30
Jeremy Lakeman
ac8d9b93e6 Add stub directory service 2012-09-14 11:50:45 +09:30
Jeremy Lakeman
58fae14ef2 Bind to interface address so unicast packets can be received & always bind to INADDR_ANY 2012-09-11 15:20:44 +09:30
Jeremy Lakeman
fbe9980199 Add explicit flag for unicast peers 2012-09-10 10:55:12 +09:30
Jeremy Lakeman
f2bae4361e Improve logging and failure handling 2012-09-10 10:31:01 +09:30
Jeremy Lakeman
2b530bb02a Trying to send unicast sas request 2012-09-07 13:04:40 +09:30
Jeremy Lakeman
3b55643b08 Send my full sid periodically for any outgoing payload header 2012-09-07 10:01:34 +09:30
Jeremy Lakeman
adde23dfd0 Fix for restarting interfaces with different broadcast address 2012-09-06 09:57:36 +09:30
Paul Gardner-Stephen
bba6839656 Initial stab at porting to Solaris.
It compiles without warning (with CC=gcc) but doesn't link
because NaCL doesn't build yet.
2012-09-05 20:42:50 +09:30
Jeremy Lakeman
c6eafb5380 Demote port comparison from an assert to an error 2012-09-01 12:41:51 +09:30
Jeremy Lakeman
cf22ef8e8c Ensure route and interface is still valid before sending packet 2012-09-01 12:41:50 +09:30
Jeremy Lakeman
211e25608e Send packet to unicast address 2012-09-01 12:18:39 +09:30
Jeremy Lakeman
1b91724da2 Allow for interfaces that don't tick, pack rhizome manifests into all packets 2012-09-01 12:18:39 +09:30
Jeremy Lakeman
e05806f25e Separate routing calculation from resulting rules, refactor more code to use subscriber structure 2012-08-31 15:11:18 +09:30
Jeremy Lakeman
df0e20408c Close sockets on poll errors 2012-08-31 15:04:06 +09:30
Jeremy Lakeman
f6c899e107 Refactor overlay buffer interface to support simple parsing 2012-08-31 15:03:07 +09:30
Jeremy Lakeman
22c6b530ed Rework broadcast address handling, working towards a unified address struct 2012-08-31 15:03:07 +09:30
Daniel O'Connor
e7201963d0 Staticise a bunch of functions so I get some understanding of what is needed where. 2012-08-31 12:13:20 +09:30
Daniel O'Connor
0dd2145ed4 assert that the port number matches between calls to overlay_interface_init_any() 2012-08-24 15:21:23 +09:30
Andrew Bettison
27a0a6eeb5 Introduce struct __sourceloc
Replaces (const char *file, unsigned int line, const char *function) arguments
to all logging functions, simplifies malloc/free tracking code in
overlay_buffer.c and Rhizome manifest alloc/free tracking in rhizome_bundle.c.

Use __HERE__ macro instead of (__FILE__, __LINE__, __FUNCTION__) everywhere.

Special __NOWHERE__ macro is equivalent to (NULL, 0, NULL).

Declare net.c functions in new "net.h" header, so log.c doesn't have to pull
in the entire "serval.h" just to use write_str().

Facilitates progress on issue #2.
2012-08-23 12:31:07 +09:30
Jeremy Lakeman
60a82eb251 Improve logging 2012-08-14 16:31:29 +09:30
Jeremy Lakeman
fd111a4d1f Listen to INADDR_ANY on OSX, otherwise we can't hear broadcasts 2012-08-09 13:32:08 +09:30
Andrew Bettison
12d8bc0c12 Use new typedef time_ms_t everywhere 2012-08-09 12:14:32 +09:30
Andrew Bettison
858c6c3efc Improve logging to diagnose dnaprotocol test failure 2012-08-03 19:08:44 +09:30
Andrew Bettison
03da89225d Add xprintf() extensible stream formatter
Use it to replace open_memstream(3) in logServalPacket() -- not available on
Mac OS X
2012-08-03 16:44:05 +09:30
Andrew Bettison
9ede55ab4c Fix DEBUG_packet_visualise() log output 2012-08-03 13:12:54 +09:30
Andrew Bettison
f37ec5af09 Reduce use of stderr in many places
serval_packetvisualise() is now replaced by DEBUG_packet_visualise() which uses
logging system not stderr (so now it will appear in Android log).

Replaced several fprintf(stderr,...) with DEBUGF(...).

Command line only prints a full help message on "help" command -- a command
parse failure simply informs the user about the "help" command.
2012-08-01 17:54:02 +09:30
Andrew Bettison
76cfb7beae Fix bug failed dnaprotocol tests non-deterministically
Appending to the dummy interface file was altering the read offset position, so
very many receive packets were being lost.
2012-07-31 17:49:24 +09:30
Andrew Bettison
24b05eaeaa Fix bug in self-announcements
On first tick, do not send s1 = 0, but s1 = s2 - 1 (1 ms window)
2012-07-31 16:21:29 +09:30
Andrew Bettison
ddc17434c4 Fix next-hop logic for case of no interfaces up 2012-07-30 18:35:28 +09:30
Andrew Bettison
240be25793 Replace overlay_gettime_ms() with gettime_ms() 2012-07-30 17:22:38 +09:30
Jeremy Lakeman
6e7c2196ba Close interfaces on socket errors or when not detected 2012-07-25 16:53:44 +09:30
Jeremy Lakeman
74095e5356 Correctly display interface ip addresses on android 2012-07-25 14:53:53 +09:30
Jeremy Lakeman
ddba8033e4 Refactor packet envelope and sid abbreviation reading and writing 2012-07-17 15:30:50 +09:30
Jeremy Lakeman
5e915bcc09 Schedule packet sending 2012-07-13 12:18:50 +09:30
Jeremy Lakeman
d36ba78afe Refactor packet construction and sending 2012-07-13 12:18:50 +09:30
Jeremy Lakeman
27c24f377e Add deadline time for alarm prioritisation 2012-07-13 12:18:45 +09:30
Jeremy Lakeman
35b4ba8594 Schedule interface ticks per interface 2012-07-13 12:13:46 +09:30
Andrew Bettison
d111f763c7 Fix bugs revealed by 'rhizomeprotocol' test
Was not transmitting actual HTTP server port in rhizome announcements, was
always transmitting port 4110.

When trying for a free HTTP server port, sometimes bind() succeeds but listen()
fails with EADDRINUSE, so new logic to deal with that.
2012-07-12 12:10:59 +09:30
Jeremy Lakeman
ef8c1dd981 Simplify next interface tick calculation 2012-07-05 15:56:42 +09:30
Andrew Bettison
451e517c02 Clean up last #warning compiler message 2012-07-04 10:49:31 +09:30
Andrew Bettison
72769e162b Replace overlay_render_sid_prefix() with alloca_tohex()
To eliminate timebomb bugs caused by rotor wraparound
2012-07-04 10:30:46 +09:30
Andrew Bettison
2c87039307 Replace overlay_render_sid() with alloca_tohex_sid()
To eliminate timebomb bugs caused by rotor wraparound
2012-07-03 17:59:30 +09:30
Andrew Bettison
78a8aaca16 Code improvements while debugging 'dnaprotocol' tests
Use ssize_t and size_t where required by system calls
More stringent checking of errors from system calls
Log the offset when writing to dummy interface file
Clean up many WHY/INFO/DEBUG statements
Convert many fprintf(stderr,...) to DEBUGF()
2012-07-03 15:36:51 +09:30
Andrew Bettison
8020ea3b74 Merge branch 'eventscheduler' into master
Conflicts:
	commandline.c
	monitor.c
	overlay.c
	overlay_interface.c
	overlay_packetformats.c
	rhizome_fetch.c
	rhizome_http.c
	rhizome_packetformats.c
	serval.h
	server.c
	testdefs.sh
	testframework.sh
	tests/dnaprotocol
	tests/server
2012-07-03 10:26:22 +09:30
Jeremy Lakeman
132d3a6f9b rename profiling structure 2012-07-02 16:04:00 +09:30
Jeremy Lakeman
e705696896 separate statistics gathering from the scheduler structure 2012-07-02 15:20:30 +09:30
Jeremy Lakeman
89566e4d3d Refactor how functions are scheduled or file handes are watched 2012-07-02 13:19:54 +09:30
Andrew Bettison
fc8df7d5d4 Config options for tick duration 2012-07-02 12:26:01 +09:30
Andrew Bettison
b9836af8a2 Fix debug logging in overlay_interface.c
Also fix bug that closed the logfile when forking the server process.
2012-06-28 17:34:21 +09:30
Andrew Bettison
a5ba1ecacd Clean up debugging code
Only use DEBUG inside "if (debug & DEBUG_BLAH)", not INFO or WARN or WHY!
INFO messages for starting/stopping servald server.
2012-06-28 15:37:36 +09:30
Jeremy Lakeman
29cba17891 Fix rhizome transfers 2012-06-27 16:54:42 +09:30
gardners
1897aa2eef only handle one packet per call to help stats gathering and fairness. 2012-06-25 15:46:34 +09:30
gardners
0c0e5b73e9 reduced debugging output. 2012-06-25 14:46:55 +09:30
gardners
3b6a004cc9 new event scheduler almost working, but after a while can stop
calling overlay_check_ticks alarm for some reason, which causes
queues to congest and bad things to generally happen.
2012-06-22 17:30:21 +09:30
gardners
3e88400e16 cleaned up some debugging. 2012-06-22 16:06:47 +09:30
gardners
895b5873f0 fixed bug cpu time wasting bug for dummynets. 2012-06-22 16:06:46 +09:30
gardners
b675e8eefd removed debugging 2012-06-22 16:06:46 +09:30
gardners
91bccec71d various fixes related to event scheduler.
server main loop is now just fd_poll()
2012-06-22 16:05:50 +09:30
gardners
7ea0c2f3bf fixed bug in dummynet interface handling with new event scheduler. 2012-06-22 16:05:49 +09:30
gardners
5dc6d122a5 significant progress towards clean callback scheduler for poll()
events and timed callbacks.
2012-06-22 16:05:49 +09:30
gardners
2d718a297f reversed changes that broke DNA tests. Improved dnaprotocol
test script slightly.
2012-06-21 17:02:36 +09:30
gardners
136a7bcf56 fixed bug with absolute-path dummynet files.
added pid of producer to dummynet packets.
2012-06-21 16:36:38 +09:30
gardners
5d3e9a21f7 fixed bug with interface specifications to allow - in dummynet paths. 2012-06-21 16:36:37 +09:30
gardners
500b9f9f28 fixed a memory leak, more to find. 2012-06-21 11:33:43 +09:30
Jeremy Lakeman
926d4296c4 Added overall timer for main loop, minor tweaks to order and freq. of processes 2012-06-21 11:33:43 +09:30
gardners
b48fdb6567 added deeper timing checks to reveal that rhizome advertisements
are the slowest part -- need to add caching of manifests so that
we don't hit the database every interface tick.
2012-06-21 11:33:43 +09:30
gardners
0dd5845cdd added instrumentation to detect when servald spends more than 5ms doing
anything.  Reports which bit of the overlay mesh main loop the time was
spent in, to help track it down.
2012-06-15 15:13:45 +09:30
Daniel O'Connor
e8c648c724 Remove reference to non existent variable. 2012-06-15 15:09:21 +09:30
Daniel O'Connor
c5a9321880 Improve debug output (translate IPs & ports into human readable things).
Revert change to use src_addr as this will break other platforms and needs more thought.
Reformat overlay_interface_discover.
2012-06-15 15:09:21 +09:30
Daniel O'Connor
c2411780a9 Cleanup overlay_check_ticks() and overlay_interface_register().
- Remove [f]printf()s.
- Reduce nested if's.
- Add glorious whitespace.
2012-06-08 18:29:27 +09:30
Daniel O'Connor
86c5e6945f Don't force signedness for name in overlay_interface_register().
I can't see any point to forcing the signedness, it causes warnings on platforms with a signed-char by default.
2012-06-08 17:01:50 +09:30
Daniel O'Connor
ea9993dc91 Fix detection on OSX and make detection smarter.
- Fix lsif() on OSX.
- Make lsif() smarter and avoid non-broadcast and no AF_INET addresses.
- Don't run multiple interface detectors, run one at a time until one works.
- Factor out HAVE_IFADDRS_H code into a separate function into lsif.c with the other interface detection routines.
- Prefer HAVE_IFADDRS_H (random bias..)
2012-06-08 16:36:33 +09:30
Daniel O'Connor
8882515d03 Fix compilation on OSX.
- /proc/net/route is Linux only.
- lsif() will work anywhere SIOCGIFCONF is defined.
- Abstract namespace UNIX domain sockets are Linux only.
- Rework code to reduce indent levels.
2012-05-28 15:00:54 +09:30
gardners
30e53f963c fixed various manifest synchronisation bugs, including probably
the main one that was stopping meshms (large manifests would
practically never get advertised under certain (common) conditions).
2012-05-27 08:31:48 +02:00
gardners
082b517fc9 improved debugging of interface connections. 2012-05-22 10:00:06 +09:30
gardners
4ddb7a5572 fixed bug in overlay_gettime_ms() (start time was 32bits not 64bits,
so strange behaviour resulted, breaking dna number lookup).
2012-05-18 12:55:15 +09:30
gardners
fa8825a3ec try to reuse interface binding socket addresses instead of failing. 2012-05-17 13:14:16 +09:30
Andrew Bettison
f90b21ec78 Implement rhizome config options
rhizome.datastore_path - if not set, reverts to serval instance path
rhizome.enable - if not set, defaults to true
2012-05-15 12:56:10 +09:30
Andrew Bettison
d11258cefc Overhaul debug flags
Config debug flags are now represented as individual items, eg:
   servald config set debug.verbose yes
   servald config set debug.rhizome yes
instead of aggregated, eg:
   servald config set debug verbose,rhizome  <-- no longer works

Added a debug flag "debug.all" that can be set and cleared, over which
individual flag sets/clears take priority.

Slimmed down dna.c by moving some globals and functions to the files where they
are used.

Default command line (help message) is now the new style, not the deprecated
style.
2012-05-14 18:37:32 +09:30
Andrew Bettison
e746557a08 Fix bug in overlay_gettime_ms()
The sequence start time was only getting set in overlay_interface_init(), which
was not always called, or was called after overlay_gettime_ms() had already
been used.

Added FATALF(), FATAL() and FATAL_perror() macros.

Removed a bunch of debug statements no longer needed in monitor.c and server.c.
2012-05-11 10:38:46 +09:30
Andrew Bettison
881576212c Fix all trivial compiler warnings 2012-05-10 18:08:59 +09:30
Andrew Bettison
836f8332e8 Replace perror() with WHY_perror()
Puts more diagnostics to Android log
2012-05-08 14:53:34 +09:30
Andrew Bettison
cbc367b1f5 Rewrite server start/status/stop commands
Now correctly probes for server process existence using kill(pid, 0)
Status command does not dump config (use "config get" instead)
Output uses JNI cli output fields
Stop command uses 5 Hz wakeup, not busy wait while server exits
2012-05-07 13:49:38 +09:30
gardners
7b520e7a49 fixed various bugs with priorty dispatch of voice traffic.
some debug tweaking etc.
2012-05-07 08:31:53 +09:30
gardners
6718d06421 cleaned up debug output. 2012-05-04 02:40:54 +09:30
gardners
98ea86bde0 added new /proc/net/route method to find interfaces on android
(would you believe that using ifconfig to READ about interfaces
requires ROOT on android).
should also help for interfaces with multiple addresses.
2012-05-03 22:46:00 +09:30
gardners
82ca3dde5d impoved debugging and operation of interface detection
(since it has suddenly decided to fail)
2012-05-03 17:15:05 +09:30
gardners
c9e429e36b and another fd leak. 2012-05-02 02:33:38 +09:30
gardners
cf500085b4 fixed file descriptor leak when trying to bind to an interface. 2012-05-02 02:32:37 +09:30
gardners
da494c7124 removed debugging output 2012-05-01 05:26:28 +09:30
gardners
c9863fe11e lots of fixes to get overlay mesh routing working on linux with
real network interfaces and no dummy interfaces.  neighbour discovery
now seems to work.
2012-04-29 11:56:47 +09:30
gardners
5497b8fd0d fixed broadcast listening bug. 2012-04-28 15:20:06 +09:30
gardners
4c498afd19 changed macro used to select interface listing code 2012-04-28 12:29:29 +09:30
gardners
2ab32197a7 Put new linux-specific interface listing routine in that is needed
for android, where the portable method isn't easily available.
2012-04-28 12:25:19 +09:30
gardners
ec94f6c12f fixed bug in queue handling.
removed some debugging.
2012-04-20 19:26:25 +09:30
gardners
5c52c8e274 trying to find memory corruption bug, probably queue handling
related.
2012-04-20 17:14:04 +09:30
gardners
e7e8b2d630 fixed bug in RFS size patching.
A lot of debug output tweaks to track the problem down.
2012-04-16 06:06:43 +09:30
gardners
b55f945133 fixed packet dequeue bug (mdp ping has no duplicate replies now).
cleaned up debug output.
2012-04-15 00:02:54 +09:30
gardners
2581e9fe4c Revamped dequeuing of TXd frames.
Now almost works (queues don't stay full of junk), although
mdp ping still gets a duplicate reply for 2-hop pings.
2012-04-14 23:12:45 +09:30
gardners
c37d83bddd forwarding of overlay frames substantially in place, but requires
testing.
2012-04-14 10:56:03 +09:30
gardners
02e1b0f723 fixed bugs in dequeuing (or lack thereof) of broadcast frames and
unicast frames at the right time.
2012-04-14 10:14:43 +09:30
gardners
9398f94a22 Cleaned up debug output. 2012-04-14 09:39:14 +09:30
gardners
ca7924f134 Removed debugging output. 2012-04-14 09:35:35 +09:30
gardners
d808534a1e Fixed some comments to make code easier to follow, and remove a
note for an issue that has been fixed.
2012-04-14 06:59:12 +09:30
gardners
283b29af6b Improved packet tx and rx debugging and made it more logical. 2012-04-14 06:38:11 +09:30
gardners
167c59d50d Added debug option to suppress rhizome traffic to make it easier
to see what is going on.
Similarly there is now a debug option to show outgoing packets.
2012-04-14 06:26:20 +09:30
gardners
0cb3e6e60b Added code to properly direct both broadcast and unicast packets
to the correct interface(s).  An issue with the node lookup is
preventing it from working at present, however.
2012-04-14 04:05:05 +09:30
Andrew Bettison
a338c2f0f9 Refactor instance path handling
- handle buffer limits when forming path names within instance dir
 - uniform use of serval_instancepath()
2012-03-29 14:07:07 +10:30
gardners
6759a26720 Cleaned out some debugging output after tracking down and fixing
memory corruption bug.  Next challenge is to find out why broadcast
MDP packets are not getting dispatched properly (is trying to treat
broadcast address as unicast address it seems).
2012-03-23 07:06:57 +10:30
gardners
13d1d3084e Various fixes to track down memory handling bugs.
Fixed one free-before-time bug with queuing MDP frames.
Some heap corruption bug seems to remain.
2012-03-22 16:33:25 +10:30
gardners
c7dd475d50 Further work on MDP, including dispatching low-priority data when
it can fit in frames.  A nasty bug in queue code needs fixing.
Also, we only send tick frames at present, and need to add code
for dispatching packets at other times (bandwidth allowance permitting).
So the whole bandwidth management code needs to get finished.
2012-03-22 08:26:19 +10:30
gardners
70497df7b5 More work on MDP. Removed some debug fluff.
Added framework for MDP ping, and some work towards MDP port binding
and sending packets with option to wait for reply.  MDP server
doesn't yet support port binding, and client doesn't yet support
reading replies.
2012-03-19 16:06:34 +10:30
gardners
1eb4c34015 Renamed mphlr.h to serval.h
(also some temporary debugging has been added in some places)
2012-02-23 12:45:42 +10:30
gardners
6397fa70d9 overlay interface file descriptors now marked close-on-exec so that
if we get a sigabort or segmentation violation and restart ourselves,
we don't wind up with stuck/lost sockets.
2012-02-23 11:57:46 +10:30
gardners
5cc6079c0f Move from recvfrom() to recvmsg() so that we can get packet TTLs on
reception.  Other changes associated with overlay mesh.
2012-02-05 16:15:19 +10:30