mmmd_mdps_list()

Get a list of all loaded MDPs.

Synopsis:

#include <md/md.h>
ssize_t mmmd_mdps_list( char *buffer, size_t buf_len )

Arguments:

buffer

A pointer to a string for storing the comma-separated list of MDP names (may be NULL)

buf_len

The length of buffer (may be 0)

Library:

libmd

Description:

Get a list of all MDPs successfully loaded and initialized. This function helps diagnose problems with library initialization.

To obtain the buffer length needed to store the list of all loaded MDPs, call this function with buffer set to NULL. Use the return value of this first function call to allocate sufficient buffer memory, then call this function a second time, passing in the updated buffer pointer to fill in the list of loaded MDPs.

Returns:

On success, a value greater than or equal to 0 that indicates either the buffer length needed for storing the MDPs list or the amount of data (in bytes) written to the buffer. On error, -1 is returned.