cnet v2.0.5

home
introduction
simulation model

topology files
cmdline options
the API

FAQ

download

Event handling functions

int CNET_set_handler(CnetEvent ev, void (*func)(), CnetData data)

Register func as the void ``returning'' function to be invoked when the event ev occurs.

Possible errors: ER_BADEVENT, ER_NOTSUPPORTED.

int CNET_get_handler(CnetEvent ev, void (**handler)(), CnetData *data)

Obtains the address of the void ``returning'' function which will be invoked when the indicated event occurs, together with the user-specified data value that will be passed to the handler.

Possible errors: ER_BADEVENT, ER_NOTSUPPORTED.

cnet was written and is maintained by Chris McDonald (chris@csse.uwa.edu.au)