[Snort-sigs] What is the & operator in byte_test for?

Alex Kirk alex.kirk at ...435...
Thu Aug 5 08:25:01 EDT 2004


I know this reply is a few days late, but I can confirm that & is indeed 
a bitwise AND and ^ does exist as a bitwise OR. They both call the C 
bitwise operators.

I've created a bug to get this information put into the FAQ on Snort.org.

Alex Kirk
Research Analyst
Sourcefire, Inc.

> At 03:16 PM 7/29/2004, Joseph Gama wrote:
>> I couldn't find any documentation explaining what the
>> & operator in byte_test does. Does anyone know the
>> answer?
> I'd assume it does a bit-wise AND and results in truth if the result 
> is non-zero, as per C language conventions.
> Basically this is useful as a bitmask test. (ie: using &,15 would 
> result in checking if any of the least-significant 4 bits are set)
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Snort-sigs mailing list
> Snort-sigs at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/snort-sigs

More information about the Snort-sigs mailing list