Correct the polarity of ring pointers in unix impl

The unix implementation's xs_transport_xen module's read and write functions were using the "frontend" view of the ring. But this code is only ever used by xenstored in dom0, which should always have the "backend" view of the ring.

The symptom of this was that the "req" and "rsp" pointers were inverted.

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
Merge pull request #1 from jjd27/master

Correct the polarity of ring pointers in unix impl
Write pidfile on startup, to keep xl happy
Merge pull request #2 from jjd27/master

Write pidfile on startup, to keep xl happy
Treat domain_infolist_job's page parameter as cstruct, not bigarray

On the OCaml side, since c/s 77f0707f, the argument of domain_infolist_job (i.e. lwt_domain_infolist_job in the C stubs) is a cstruct. But the C stubs treated this as if it were a bigarray.
Use LWT_UNIX_INIT_JOB macro in LWT function stubs
Remove declaration of unused variable in C stubs
Use Caml_ba_data_val(x) macro rather than Caml_ba_array_val(x)->data
Fully initialise struct job_domain_infolist at creation time

This is purely to keep valgrind happy. Without this, you get warnings along the following lines from valgrind:

==26143== Conditional jump or move depends on uninitialised value(s)
==26143==    at 0x80B46D8: result_domain_infolist (xenstore_stubs.c:77)
==26143==    by 0x80B4BA1: lwt_unix_self_result (lwt_unix_stubs.c:1465)
==26143==    by 0x8055096: camlLwt_unix__self_result_1175 (in /root/server_unix.native)
==26143==  Uninitialised value was created by a heap allocation
==26143==    at 0x4022B83: malloc (vg_replace_malloc.c:195)
==26143==    by 0x80B5E4C: lwt_unix_malloc (lwt_unix_stubs.c:106)
==26143==    by 0x80B4322: lwt_domain_infolist_job (xenstore_stubs.c:101)
==26143==    by 0x804E339: camlXenstore__fun_1136 (in /root/server_unix.native)
Don't pad connection address names

The truncation causes addresses with long process names to be conflated, e.g. "1234:qemu-dm-1:14" and "1234:qemu-dm-1:17" both get truncated to "1234:qemu-dm-1:1". This causes the connection on fd 17 to appear to come from the same address, which causes the first connection to be destroyed, forgetting all of its watches.
Merge pull request #3 from jjd27/master

Fix a few issues
Incremental commit of a 'dbgring' binary for xenstore ring debugging.
Update OASIS
Use simple heuristics to detect packet boundaries and print.
Add some nice commandline parsing
Analyse both requests and replies.
Debug print unparsed bytes up to the producer pointer itself -- this should represent partially printed packets.
Print the location of the consumer pointer, relative to the producer pointer
Analyse the headers of partial packets and generate an error if any are invalid.
More reindent