Subject: SrcTransMask and DestTransMask

From: Carlos del Castillo <[email-masked]>
Date: 21 Apr 2002 23:20:49 -0500

Hello, I have a srl file, but does not compile it claims about
SrcTransMask and DestTransMask, it says the following:

RROR >>>>  Attribute not allowed in FORMAT
 tmpreaderone.srl   49:         SourceTransAddress SourceTransMask
DestTransAddress DestTransMask " "
                                                   ^^^^^^^^^^^^^^^

Why is that, I saw this in an example that compiles whit srl 4.3, I'm
currently using NeTraMet 4.3 and srl 4.4.

Any ideas?

Thanks.

---

From: [email-masked]
Date: Sat, 27 Apr 2002 07:03:59 -0700 (PDT)

Hello Carlos:

> DestTransAddress DestTransMask " "

Looking at the srl compiler code (in rtfm_atr.h) I see that the compiler
won't let you use any of the *mask attributes directly.
I've tried to remember why I did that - the reasons are something like
this:

 a) The mask field of Pattern Matching Engine instructions is set
    by the compiler, i.e. you specify it when you tell it to test
    by saying something like   if SourcePeerAddress == 130.216/16
    so you know what the mask is.

 b) To save the mask would require an explicit save statement, and
    SRL doesn't have one.

 c) Otherwise the compiler would have to determine which was the last
    masked comparison, and save the mask for that.  

Overall, I think that it isn't useful to work directly with masks.
If you really need that, you could use one of the meter attributes,
like FlowClass, and store a mask width value into that.  Doing that,
you'd have explicit control.

Again, if you're working with NetFlowMet and want to know the ASN prefix
lengths, SRL will give you those (i.e. let you use them in test, save,
and format statements), they're the SourcePrefix and DestPrefix
attributes.

Cheers, Nevil

-----------------------------------------------------------------------
   Nevil Brownlee                   Director, Technology Development
   Phone: +64 9 373 7599 x8941      ITSS, The University of Auckland
   FAX: +64 9 373 7021      Private Bag 92019, Auckland, New Zealand