Re: KTR and SCTP

From: Kris Kennaway <kris_at_obsecurity.org>
Date: Thu, 14 Jun 2007 01:54:01 -0400
On Wed, Jun 13, 2007 at 11:10:24PM -0400, Randall Stewart wrote:
> Kris Kennaway wrote:
> >On Wed, Jun 13, 2007 at 06:23:31PM -0400, Randall Stewart wrote:
> >
> >>All:
> >>
> >>I am in the process of converting all the logging that
> >>SCTP does to use the KTR sub-system. This will fit
> >>nicely.. I still need to do some things to make it
> >>so I can pull out the logs and make pretty charts and
> >>graphs (in SCTP its used for debugging but also exploring
> >>how CC and other niceties works)..
> >>
> >>But I was wondering.. would anyone mind if I took
> >>KTR_SPARE2
> >>
> >>and made it:
> >>
> >>KTR_SCTP_SUBSYS
> >>
> >>I have a huge amount of tracing under SCTP now.. so
> >>many I am setting in a seperate mask set to enable/disable
> >>various pieces of it.. So I was thinking it would
> >>warrent a sub-system of its own :-D
> >>
> >>Any objections? If not I will change it :-D
> >
> >
> >Yeah, we really do need to keep those spare fields for local use.
> >
> >Kris
> >
> Ok.. so I will just use
> 
> KTR_SPARE2
> 
> in my logs then I guess.. :-)

You can't use KTR_SPARE* in committed code either, or it's no longer
spare :) You should do something like:

i.e. do something like

#ifdef SCTP_TRACE
#define KTR_SCTP KTR_SUBSYS
#else
#define KTR_SCTP 0
#endif

see the comment in <sys/ktr.h>

 * Two of the trace classes (KTR_DEV and KTR_SUBSYS) are special in that
 * they are really placeholders so that indvidual drivers and subsystems
 * can map their internal tracing to the general class when they wish to
 * have tracing enabled and map it to 0 when they don't.

Kris
Received on Thu Jun 14 2007 - 03:54:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:12 UTC