[checkers] multipath-wide shared context for checkers
authorChristophe Varoqui <cvaroqui@zezette.localdomain>
Thu, 23 Nov 2006 21:52:35 +0000 (22:52 +0100)
committerChristophe Varoqui <cvaroqui@zezette.localdomain>
Thu, 23 Nov 2006 21:52:35 +0000 (22:52 +0100)
commit0685846d00f41e7d2ec537beb9f783e41efa3f9c
tree88800e719b20de527f4b44017beff782f6675384
parent4491532458337586e90c7b155a1992d52dddbe45
[checkers] multipath-wide shared context for checkers

At least one checker need to shared data between checkers attached to
all paths of a multipath.

This patch addresses this need by adding a "void * mpcontext" to
struct multipath, and its "void **" sibling in struct checker.

checker_init() ensures the multipath->mpcontext is attached to
*checker->mpcontext.

Checkers are in charge of allocating the memory block and attaching it
to *checker->mpcontext. the .init checker function is a natural
place for that.

Freeing the mpcontext in done in free_multipath().
libcheckers/checkers.c
libcheckers/checkers.h
libmultipath/discovery.c
libmultipath/structs.c
libmultipath/structs.h