Netmanage Framework Library Initialization Functions

#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.

Detailed Description

These functions initiate, terminate and manage a connection with a NMF server.

Define Documentation

#define NMF_EVENT_NONE   0

These are special event parameter values that indicate which events the caller is interested in receiving notification for.

Definition at line 157 of file nmf.h.


Typedef Documentation

typedef void(* nmf_aeh_t)(nmf_client_t client_id, int type, void *e, u_int ctxt)

Asynchronous Event Handler.

Parameters:
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.

Definition at line 137 of file nmf.h.

typedef nm_u32_t nmf_client_t

Client Handle.

An opaque handle that uniquely identifies the user to the API. A client handle is returned by the nmf_open function and is passed as an argument to all NMF API.

Definition at line 72 of file nmf.h.

typedef nm_u32_t nmf_id_t

NMF Identifier.

Generic object identifier handle.

Definition at line 63 of file nmf.h.


Enumeration Type Documentation

enum nmf_status

NMF Error Codes.

Errors returned by the NMF API. These are a simple map of the Unix error codes.

Definition at line 79 of file nmf.h.


Function Documentation

void nmf_close ( nmf_client_t  clid  ) 

Close the client handle and stop managing the host.

Parameters:
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.

Parameters:
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.
Returns:
NMF_OK Success

-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).

Parameters:
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.
Returns:
A client handle for this host. The client handle thereafter specifies the host to which an API call refers.

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.

Parameters:
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.


Generated on Wed Sep 1 09:40:57 2010 for NetManage by  doxygen 1.5.6