Ejemplo n.º 1
0
Archivo: ipobj.c Proyecto: sdnnfv/snort
/*


   IP COLLECTION INTERFACE


   Snort Accepts:

   IP-Address		192.168.1.1
   IP-Address/MaskBits	192.168.1.0/24
   IP-Address/Mask		192.168.1.0/255.255.255.0


   These can all be handled via the CIDR block notation : IP/MaskBits

   We use collections (lists) of cidr blocks to represent address blocks
   and indivdual addresses.

   For a single IPAddress the implied Mask is 32 bits,or 255.255.255.255, or 0xffffffff, or -1.

*/
IPSET * ipset_new(void)
{
    IPSET * p = (IPSET *)SnortAlloc( sizeof(IPSET));
    sflist_init(&p->ip_list);

    return p;
}
Ejemplo n.º 2
0
/*
*    NEW
*/
SF_LIST * sflist_new(void) 
{
   SF_LIST * s;
   s = (SF_LIST*)s_alloc( sizeof(SF_LIST) );
   if( s )sflist_init( s );
   return s;
}
Ejemplo n.º 3
0
static void ipset6_init( IPSET * ipc )
{
    if( ipc )
    {
        ipc->family = IPV6_FAMILY;  
        sflist_init( &ipc->cidr_list );
    }
}
Ejemplo n.º 4
0
static void portset_init( PORTSET * portset )
{ 
    sflist_init(&portset->port_list);
}