File: flow_class.c

package info (click to toggle)
snort 2.3.3-11
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 22,512 kB
  • ctags: 11,344
  • sloc: ansic: 70,967; sh: 4,848; makefile: 748; perl: 478; sql: 212
file content (25 lines) | stat: -rw-r--r-- 455 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "flow_class.h"
#include "flow_error.h"

/** 
 * Find the relevant flow processing scheme for a packet
 * 
 * @param p packet to find the flow scheme for
 * 
 * @return 0 on success, 1 on failure
 */
int flow_classifier(FLOWPACKET *p, int *flowtype)
{
    if(p == NULL)
    {
        return FLOW_ENULL;
    }

    if(IsIPv4Packet(p))
    {
        *flowtype = FLOW_IPV4;            
        return FLOW_SUCCESS;
    }

    return FLOW_EINVALID;
}