svn commit: r188388 - head/sys/netinet

Paolo Pisati p.pisati at oltrelinux.com
Tue Feb 10 06:04:38 PST 2009


Randall Stewart wrote:
> Hmm..
>
> My guess is it has to do with the NAT stuff that
> Paolo is working on. Basically the ipfw/nat is becoming
> SCTP aware and I believe we made the sctp_crc32c routines
> public so that he could access them.
>
> Paolo: maybe you need to include <opt_sctp.h> and then do
> some sort of
>
> #ifdef SCTP
>
> #endif
>
> Around the csum calls int crc32??
the problem with opt_scpt is that it's not available during module 
compilation.

my other solution:

-we define 2 functions ptrs: update_crc32_ptr and 
sctp_finalize_crc32_ptr, and initialize them with NULL
-during the SCPT initialization path, we set those 2 ptrs to point to 
the actual SCTP functions
-in alias_sctp.c, we check the value:
 -in case it's NULL, SCTP wasn't compiled in and thus we return 0
 -else we call the pointed functions

the only remaining open problem is where to put these 2 ptrs: it has to 
be a place that is always compiled in, but on the other hand
we should limit pollution.



More information about the svn-src-head mailing list