Merge github.com:crotsos/signpostd into crotsos-merge

Conflicts:
	lib/config.ml
	scripts/run-client
Raise exception when to few argumetns

Correction pointed out by avsm.
Could lead to a hard to track down bug.
Cosmetic fix
Let RPCs timeout

RPCs can now timeout. Timed out RPCs raise an
exception, which can be caught by the module
making the blocking RPC call.
Add OpenVPN tactic ++

New features major:
1) OpenVPN:
  Adds an OpenVPN tactic that connects end points using OpenVPN

2) DNS on clientside
  Clients listen for DNS, forwarding on requests that are
  not for the signpost domain

New features minor:
1) RPCs timeout:
  Blocking RPCs (`Nodes.send_blocking`) now throw an
  RPC.Timeout exception if no reply is returned before
  a timeout value, configurable in lib/config.ml

Bug fix:
1) Preemtive bugfix:
  Reported by avsm:
    A patternmatch in openvpn could lead to a hard to
    detect bug. It now fails with an Lwt.fail InconsistentState
    exception.

Signed-of by: Haris Rotsos (crotsos)
Signed-of by: Sebastian Probst Eide (sebastian)
Merge branch 'pull-branch' of http://github.com/sebastian/signpostd
Regenerate autogenerated OASIS files.

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
Harden the RPC protocol against a possible match failure.
We now discard non-string arguments.

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
Split using Re_str.regexp_string to generate the string.

This avoid an illegal string escape when trying to create the "."
character.

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
Also add the mllib file from OASIS, since pack is now disabled.

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
Allow clients to autodiscover server configuration

Support a new RPC for autodiscovery of service settings.
This limits the amount of redundant data the user has to type in when
setting up new clients.
Make RPC less sensitive to JSON order

This is just a temporary change needed in order to
make the client script pass.
For later rewrites, the whole module should be structured like this.
Oasis generated file...
Replacing redundant functionality

I realized a function I had implemented for
providing unique id's, had already been implemented
as part of the Json module. I therefore replace my own
implementation with that of the JSON module.
Revert previous change

Replaced the local new id function with the one
used in the Json module, only to realize the
json module didn't export it, and I had used it wrongly...
Jesus... ok, this time the code compiles at least.
Adding RPC changes

This code does NOT compile.
Just to show for feedback.
Rpc module builds

The parsing is not correct, but at least
it all builds like it should.
All code that relied on the Rpc module
have been cleaned up and are now using the
new interface.
Fixed notification parsing bug

Notifications were parsed as if the ID field
should not exist, while the JSON-RPC specifies
them as being required to be Null. The creation
of the Notification messages was correct, but not
the parsing.

The notification also tried to parse for "args"
rather than "params".
Sending and receiving requests, responses and notifications
now seem to work.
Updated OpenVPN manager to use new RPC module

Instead of sending the desired action through
the arguments, it is now part of the RPC method
name itself. I believe this is semantically cleaner.
Merge with avsm/master

Minor conflicts in client.ml
In all other cases the new changes are valid.