CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected] 2026/11/30 03:48:21

Modified files:
        usr.sbin/ospfd : control.c control.h imsgev.c imsgev.h ospfd.c 
                         ospfd.h ospfe.c ospfe.h rde.c 

Log message:
Extend the imsgev code to handle read and write internally

imsgev_new() now takes a imsg_handler and and error_handler as callbacks
and calls them when imsg are available or when an error happened.
The imsg_handler now simply gets a imsg pointer and so functions like
main_dispatch_ospfe become a lot simpler.

The error handler is called with an event of EV_WRITE or EV_READ and passes
errno or 0 (for the connection close case).
ospfd does not care about any of that. Since errors are either ignored
(control socker) or are terminal.

Also rework the various imsg dispatch functions to stop peaking at imsg
internals like imsg->data.

OK tb@

Reply via email to