~ubuntu-branches/ubuntu/saucy/suricata/saucy-updates

« back to all changes in this revision

Viewing changes to src/flow-var.h

  • Committer: Package Import Robot
  • Author(s): Pierre Chifflier
  • Date: 2013-05-29 16:24:52 UTC
  • mfrom: (1.1.20)
  • Revision ID: package-import@ubuntu.com-20130529162452-kujdwfkf24i9qdfu
Tags: 1.4.2-1
ImportedĀ UpstreamĀ versionĀ 1.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2007-2010 Open Information Security Foundation
 
1
/* Copyright (C) 2007-2013 Open Information Security Foundation
2
2
 *
3
3
 * You can copy, redistribute or modify this Program under the terms of
4
4
 * the GNU General Public License version 2 as published by the Free
37
37
typedef struct FlowVarTypeStr {
38
38
    uint8_t *value;
39
39
    uint16_t value_len;
40
 
}FlowVarTypeStr;
 
40
} FlowVarTypeStr;
41
41
 
42
42
/** Struct used to hold the integer data type for flowvars */
43
43
typedef struct FlowVarTypeInt_ {
44
44
    uint32_t value;
45
 
}FlowVarTypeInt;
 
45
} FlowVarTypeInt;
46
46
 
47
47
/** Generic Flowvar Structure */
48
48
typedef struct FlowVar_ {
49
 
    uint8_t type; /* type, DETECT_FLOWVAR in this case */
50
 
    GenericVar *next; /* right now just implement this as a list,
51
 
                       * in the long run we have think of something
52
 
                       * faster. */
53
 
    uint16_t idx; /* name idx */
 
49
    uint8_t type;       /* type, DETECT_FLOWVAR in this case */
 
50
    GenericVar *next;   /* right now just implement this as a list,
 
51
                         * in the long run we have think of something
 
52
                         * faster. */
 
53
    uint16_t idx;       /* name idx */
54
54
    uint8_t datatype;
55
55
    union {
56
56
        FlowVarTypeStr fv_str;
59
59
 
60
60
} FlowVar;
61
61
 
62
 
 
63
62
/** Flowvar Interface API */
64
63
 
65
 
void FlowVarAddStr(Flow *, uint8_t, uint8_t *, uint16_t);
66
 
void FlowVarAddInt(Flow *, uint8_t, uint32_t);
67
 
FlowVar *FlowVarGet(Flow *, uint8_t);
 
64
void FlowVarAddStr(Flow *, uint16_t, uint8_t *, uint16_t);
 
65
void FlowVarAddInt(Flow *, uint16_t, uint32_t);
 
66
FlowVar *FlowVarGet(Flow *, uint16_t);
68
67
void FlowVarFree(FlowVar *);
69
68
void FlowVarPrint(GenericVar *);
70
69