Thanks for all your effort Michael and Andreas. I appreciate it. This code is really helpful for exploring SCTP.
I'd like to feed back what I've found. With a couple of small modifications, the speed of the stack can be increased by 25%. These modifications are basically centered around not generating strings/information that you weren't going to print anyway. These places are:
distribution.c:
* method: mdi_receiveMessage
-only call adl_sockunion2str if you really are going to log
that address - would have to tie that into the log message that prints it
* method: mdi_send_message
-only call adl_sockunion2str if you really are going to log
that address - would have to tie that into the log message that prints it
globals.h:
* modify the event_log* and error_log* defines so that the "am I going to print this" check comes before the actual log method. This prevents things like inet_ntoa (adaption.c - dispatch_event) from being evaluated when they aren't going to be logged.
For example, convert:
#define event_log(x,y) event_log1((x), __FILE__, (y))
to
#define event_log(x,y) if ((x) <= CURRENT_LEVEL) event_log1((x), __FILE__, (y))
On a separate topic, my wish list for the API is basically to expose a few details so that the stack can be more easily incorporated into some other existing event loop. This basically would be:
* have a way of getting the opened fd's so that they can be added to
an existing event loop
* an interface to trigger the outstanding timers: one example would
be to have the external event loop "tick" the stack at some
pre-specified rate (maybe only if there hasn't been other activity)
* have the sctp_event_loop() be non-blocking
I have built the SCTP stack on Solaris 2.6 using the WorkShop Pro 4.2 suite of compilers. I had to make a couple of modifications and I will gather these up and submit them to the list shortly.
I know you just added DOC++ support, but have you seen Doxygen? It seems to provide more functionality and can generate useful information without having to modify your source at all. Of course, like DOC++, the documentation benefits from commenting the code in specific ways. FYI: http://www.stack.nl/~dimitri/doxygen/index.html
Thanks,
Jim
Archive powered by MHonArc 2.6.19+.