|
with various data-link layer, network layer, routing and transport
layer networking protocols. It has been specifically developed for
undergraduate teaching.">
undergraduate, teaching">
TEXT ="black" LINK="blue" VLINK="purple">
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.
|