Commit Graph

342 Commits

Author SHA1 Message Date
Jeremy Lakeman
c7caec488a Don't aggregate packets together on radio links 2013-02-20 15:36:23 +10:30
Jeremy Lakeman
84ad4debfa Throttle serial radio devices when tx buffer is in use 2013-02-20 15:36:22 +10:30
gardners
e20cfdb59d closer to working.
POLLOUT seems to get stuck once triggered.
2013-02-20 15:36:21 +10:30
gardners
7287a2d599 add hook for transmitting packet via packet radio interface.
make serial port non-blocking (which for some reason has also
killed our ability to read from it :/).
2013-02-20 15:36:20 +10:30
gardners
0268ccd21a setup serial port mode when opening packet radio interface.
(now reads bytes over serial line)
2013-02-20 15:36:20 +10:30
gardners
190a5e693f refactored packet radio code mostly into separate file.
began writing stateful packet decoder.
2013-02-20 15:36:20 +10:30
gardners
70af7fae0d initial work on implementing packet radio interface.
can open and read from TTY.
doesn't do anything with the data yet.
doesn't write proper packets to the interface yet.
doesn't use bitrate config option yet.
2013-02-20 15:36:19 +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
Andrew Bettison
c42260f5f9 Replace "add did" command with improved "keyring add did"
Output is same format as "keyring add" command

Fixed minor bug in rolling a random DID -- last byte was not random

Some code improvements, including better support for sid_t
2013-02-14 16:06:01 +10:30
Andrew Bettison
e86a129d49 Refactor: rename some cli.h structs
Now all symbols defined in cli.h start with or contain "cli_"
2013-02-13 17:43:24 +10:30
Andrew Bettison
f66a894a63 Improve keyring PIN handling
Replace explicit [<pin,pin...>] command-line arguments with --entry-pin=<pin>
options.  Update test scripts accordlingly.

Add --keyring-pin=<pin> option (with one test case).
2013-02-13 16:49:52 +10:30
Andrew Bettison
fcb6600cd6 Rewrite command-line parser
Now supports optional args followed by non-optional.
2013-02-12 18:00:37 +10:30
Jeremy Lakeman
b35c1aca43 Specify that unicast traffic should use unicast UDP packets 2013-01-29 11:57:13 +11:00
Jeremy Lakeman
88f7fef992 Reduce priority of rhizome on MDP, stop sooner when packet queues fill 2013-01-28 13:35:24 +11:00
Jeremy Lakeman
3a93fee8a5 New JNI interface to better support cursor result sets 2013-01-23 14:43:50 +10:30
Jeremy Lakeman
a492c05d64 Re-add database cleanup 2012-12-31 15:09:12 +10:30
Jeremy Lakeman
9a78e16625 Use payload queue for periodic route advertisements 2012-12-19 12:36:28 +10:30
Jeremy Lakeman
82db15db5b Use any packet as a self-announce
Stop sending OF_TYPE_SELFANNOUNCE
Deprecate OF_TYPE_DATA_VOICE
Tweak payload priorities
Don't allow client applications to send high priority payloads
2012-12-16 10:09:29 +10:30
Jeremy Lakeman
e517e3a59e Add per-interface packet transmit limits 2012-12-14 17:07:28 +10:30
Jeremy Lakeman
7be03f15e7 Move link tracking to one c file 2012-12-14 17:07:28 +10:30
Jeremy Lakeman
f41830ebfb Add interface and sequence flags to packet format 2012-12-14 17:07:27 +10:30
Andrew Bettison
8d5862d599 Server daemon reloads config every 1 sec 2012-12-14 16:48:12 +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
Jeremy Lakeman
3a4f052470 Modify vomp call state to use subscriber structures 2012-12-10 14:05:56 +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
Jeremy Lakeman
a4eaf37bbd Shrink vomp headers, reduce servald's knowledge of codec details 2012-12-05 15:38:04 +10:30
Jeremy Lakeman
3dfd64f4da Add manually triggered network scan command 2012-12-05 15:13:47 +10:30
Andrew Bettison
71ed78e058 Make all 'config' tests pass
Change a test case: configuration options are now case sensitive.

Fix config file load and parse logic in conf.c, always copy 'debug' flags
from config.debug.

The config schema 'interfaces' option is no longer MANDATORY.

Introduce new CLIFLAG_PERMISSIVE_CONFIG to supress bad-config ERROR messages
from the 'config set' and 'config get' commands.

Refactor cli_execute() into cli_parse() and cli_invoke().  Use *const* struct
command_line_option everywhere.
2012-12-04 16:52:49 +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
Andrew Bettison
d3c2205d44 Add os.c and "os.h", replacing mkdirs.c
The new header "os.h" defines a supplemental API around existing basic
operating system services (system calls and standard library functions).

Moved some function prototypes from serval.h and net.h into os.h.

This allows non-servald executables to take advantage of this API without
having to include serval.h and bringing in all the other servald link-time
baggage.
2012-12-04 10:12:35 +10:30
Andrew Bettison
5139d8d34d Add mem.c and "mem.h" with emalloc() etc. 2012-12-04 10:03:32 +10:30
Jeremy Lakeman
2b21a691ca Merge remote-tracking branch 'origin/master' into packet_format
Conflicts:
	constants.h
	packetformats.c
2012-12-03 14:10:32 +10:30
Jeremy Lakeman
a67e4114a8 Allow for payloads with a pre-determined destination 2012-12-03 13:44:31 +10:30
gardners
692817ffba added functions for reading values from byte streams. 2012-11-30 21:02:43 +10:30
gardners
7a4e3d20f8 Actually send Rhizome over MDP request packets.
Actually call appropriate callback when receiving Rhizome over
MDP packets.
2012-11-30 14:17:05 +10:30
gardners
eb7524e068 factored out internal MDP services into a separate file, and made
core case statement in that brief and clear.
2012-11-30 11:48:00 +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
5a5853f38a Don't lookup subscribers twice for route announcements 2012-11-28 15:43:58 +10:30
Jeremy Lakeman
e0878644fe Add command to dump routing table 2012-11-28 15:43:58 +10:30
Jeremy Lakeman
627e86fb73 Shift all payload header writing to one place 2012-11-28 15:43:58 +10:30
Jeremy Lakeman
ce63e96db2 Use decode structure for tracking previous sid 2012-11-28 15:43:57 +10:30
Jeremy Lakeman
3d14e2f3db Hide more information about packet headers 2012-11-28 15:43:56 +10:30
Jeremy Lakeman
4ca6db34d6 Encapsulate payload header details 2012-11-28 15:40:39 +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
Andrew Bettison
960a6293e1 Move str_is_uri() from dataformats.c to str.c
Add lots of URI unpacking functions as well.
2012-11-21 18:08:06 +10:30
Jeremy Lakeman
36cee7e9bc Move payload queueing functions to separate .c file 2012-11-21 11:02:00 +10:30
Jeremy Lakeman
10bde11918 Remove resolution of peer details from node info command 2012-11-14 12:17:41 +10:30
Jeremy Lakeman
93ee6b3fc8 Don't kill the interface for unreachable unicast peers 2012-11-12 14:46:09 +10:30