buffer: implement a contents_equal function on bufferlists

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
StateTracker: add new state tracking implementation.

This is simple and won't fit every use case, but it's a flexible
beginning and shouldn't be difficult to expand or speed up.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
add really pathetic msgr test executable
test: Sketch out the initial MessengerDriver and TestDriver components.

For now these are super-simple with only a few orders, and
a bunch of those are marked "LATER". The first implementation we're
going to do won't even rely on the Messenger reporting any state
back; it'll just use the existing public interface.
Once that's done and works, we'll use StateTracker in the Messenger
and use that for the stuff marked LATER, then move on to more
sophisticated testing.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
test: write an initial MessengerDriver implementation

It's pretty trivial right now, but that's okay for the moment!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
test: write an initial TestDriver implementation

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
test: add a StateAlert class to the TestDriver interface

This lets us do async notifications.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
test: set up a StateTracker for MessengerDrivers.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
test: MessengerDriver implements its part of the alert system.

And TestDriver has a very simple run_tests sample.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
test: change calling conventions in msgr TestDriver

Expecting tests to be based on subclasses is wrong. Instead, just
expose the management functions to the public. Then we can start
making it more capable of handling grunt work on its own.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
StateTracker: extract State from StateTrackerImpl.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
test: TestMsgr::connect_messengers takes two MDrivers

Nobody's going to be setting up connections to an endpoint they
don't control, right?

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
test: add lookup_state functions to TestDriver

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
test: add a unittest_msgr with the sample test.

Move the sample test to a new msgr_tests_functions header.
msgr: store the entity_inst_t in the Messenger.

Convert ms_addr and _my_name to be references to their fields in
the entity_inst_t my_inst.
This way we can use const references for accessing all of them,
instead of the bizarre distinction we had before for get_myinst().

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
msgr: Remove _my_name and ms_addr, replace with direct access to my_inst.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
msgr: rename set_ip() -> set_addr_unknowns()

The generic interface shouldn't reference specifics like that.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
dispatcher: fix documentation for ms_handle_reset

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
test: add more reporting states to MessengerDriver.

Unfortunately there's not yet a good way to trigger these; it'll
require introducing faults to the system.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
test: add TestDriver::clean_up() to stop all the attached MDrivers.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>