Logo Search packages:      
Sourcecode: hlbr version File versions  Download package

int TestTCPListContent ( int  PacketSlot,
TestNode *  Nodes 
)

Apply the Test

Parameters:
PacketSlot Number of the packet in the Globals.Packets[] array
Nodes Data from the rules parameters stored for this test
Returns:
TRUE if successful or FALSE in case of failure

Definition at line 42 of file test_tcp_listcontent.c.

Referenced by InitTestTCPListContent().

                                                       {
      PacketRec*              p;
#ifdef DEBUGMATCH 
      int                           i;
#endif      

#ifdef DEBUGPATH
      printf("In TestTCPListContent\n");
#endif

#ifdef DEBUG
      printf("Testing TCP ListContent\n");
#endif      

      p=&Globals.Packets[PacketSlot];
      
      if (!Nodes) return FALSE;
      
#ifdef DEBUGMATCH
      printf("**************************************\n");
      printf("Before applying tcp no case tests\n");
      for (i=0;i<Globals.NumRules;i++)
      if (RuleIsActive(PacketSlot,i))
            printf("Rule %i is active\n",i);
      else
            printf("Rule %i is inactive\n",i);
      printf("**************************************\n");
#endif      

      MatchStrings(&TCPListContentTree, p->RuleBits, p->RawPacket+p->BeginData, p->PacketLen - p->BeginData);
      
#ifdef DEBUGMATCH
      printf("**************************************\n");
      for (i=0;i<Globals.NumRules;i++)
      if (RuleIsActive(PacketSlot,i))
            printf("Rule %i is active\n",i);
      else
            printf("Rule %i is inactive\n",i);
      printf("**************************************\n");
#endif      
            
      return TRUE;
}


Generated by  Doxygen 1.6.0   Back to index