| #define | NMF_EVENT_NONE 0 |
Defines | |
| #define | NMF_ATTR_ERROR -1 |
| Attribute Value Error. | |
Typedefs | |
| typedef nm_u32_t | nmf_id_t |
| NMF Identifier. | |
| typedef nm_u32_t | nmf_client_t |
| Client Handle. | |
| typedef void(* | nmf_aeh_t )(nmf_client_t client_id, int type, void *e, u_int ctxt) |
| Asynchronous Event Handler. | |
Enumerations | |
| enum | nmf_status |
| NMF Error Codes. More... | |
Functions | |
| nmf_status_t | nmf_init (nmf_aeh_t aeh, u_int context) |
| Initialize the NMF library. | |
| nmf_client_t | nmf_open (char *host, u_int events, nmf_aeh_t cb, u_int ctxt) |
| Manage the specified host (switch). | |
| void | nmf_close (nmf_client_t clid) |
| Close the client handle and stop managing the host. | |
| void | nmf_close_all () |
| Close all open client handles. | |
| void | nmf_set_eh (nmf_client_t client_id, nmf_aeh_t aeh, void *context) |
| Set the client async event handler function. | |
| #define NMF_EVENT_NONE 0 |
| typedef void(* nmf_aeh_t)(nmf_client_t client_id, int type, void *e, u_int ctxt) |
Asynchronous Event Handler.
| client_id | The client handle | |
| type | The type of event. | |
| e | A pointer to event that was generated. The event is only valid for the duration of the callback. If it is to be referenced later, it must be copied. | |
| ctxt | The context specified by the client in nmf_init and/or nmf_open. |
| typedef nm_u32_t nmf_client_t |
| typedef nm_u32_t nmf_id_t |
| enum nmf_status |
| void nmf_close | ( | nmf_client_t | clid | ) |
Close the client handle and stop managing the host.
| clid | The client handle for the host being managed. |
| nmf_status_t nmf_init | ( | nmf_aeh_t | aeh, | |
| u_int | context | |||
| ) |
Initialize the NMF library.
| aeh | Asynchronous Event Handler function. This is default event handler function if the user specifies NULL for nmf_open. | |
| context | The context specified by the client when initializing. |
-NMF_ENOMEM Unable to allocate necessary resources.
| nmf_client_t nmf_open | ( | char * | host, | |
| u_int | events, | |||
| nmf_aeh_t | cb, | |||
| u_int | ctxt | |||
| ) |
Manage the specified host (switch).
| host | The host name or IP address of the server providing the NMF server. | |
| events | An event mask indicating which events the callback handler should receive. | |
| cb | A callback handler that will be invoked when events are received. This parameter may be NULL. | |
| ctxt | A 32b value that will be passed to the cb function as a parameter. |
0 if the specified host could not be opened.
| void nmf_set_eh | ( | nmf_client_t | client_id, | |
| nmf_aeh_t | aeh, | |||
| void * | context | |||
| ) |
Set the client async event handler function.
When events arrive for a particular client, the aeh function is called with the event.
| client_id | The client handle for the host being managed. | |
| aeh | Pointer to asynchronous event handler function. | |
| context | Pointer to be passed to aeh along with the event. |
1.5.6