Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 421775
Collapse All | Expand All

(-)snort-2.9.2.3/src/active.c (-1 / +12 lines)
Lines 39-46 Link Here
39
39
40
#include "preprocessors/spp_frag3.h"
40
#include "preprocessors/spp_frag3.h"
41
41
42
#ifdef ACTIVE_RESPONSE
43
#include "encode.h"
42
#include "encode.h"
43
44
#ifdef ACTIVE_RESPONSE
44
#include "sfdaq.h"
45
#include "sfdaq.h"
45
#endif
46
#endif
46
47
Lines 196-204 int Active_Term (void) Link Here
196
}
197
}
197
198
198
int Active_IsEnabled (void) { return s_enabled; }
199
int Active_IsEnabled (void) { return s_enabled; }
200
#endif // ACTIVE_RESPONSE
199
201
202
#ifdef ACTIVE_RESPONSE
200
void Active_SetEnabled (int on_off) { s_enabled = on_off; }
203
void Active_SetEnabled (int on_off) { s_enabled = on_off; }
204
#else
205
void Active_SetEnabled (int on_off) { }
206
#endif // ACTIVE_RESPONSE
201
207
208
#ifdef ACTIVE_RESPONSE
202
static inline uint32_t GetFlags (void)
209
static inline uint32_t GetFlags (void)
203
{
210
{
204
    uint32_t flags = ENC_FLAG_ID;
211
    uint32_t flags = ENC_FLAG_ID;
Lines 244-253 void Active_SendUnreach(Packet* p, Encod Link Here
244
251
245
    s_send(p->pkth, 1, rej, len);
252
    s_send(p->pkth, 1, rej, len);
246
}
253
}
254
#endif // ACTIVE_RESPONSE
247
255
248
void Active_SendData (
256
void Active_SendData (
249
    Packet* p, EncodeFlags flags, const uint8_t* buf, uint32_t blen)
257
    Packet* p, EncodeFlags flags, const uint8_t* buf, uint32_t blen)
250
{
258
{
259
#ifdef ACTIVE_RESPONSE
251
    int i;
260
    int i;
252
    flags |= GetFlags();
261
    flags |= GetFlags();
253
262
Lines 264-271 void Active_SendData ( Link Here
264
        if ( !seg ) return;
273
        if ( !seg ) return;
265
        s_send(p->pkth, !(flags & ENC_FLAG_FWD), seg, plen);
274
        s_send(p->pkth, !(flags & ENC_FLAG_FWD), seg, plen);
266
    }
275
    }
276
#endif // ACTIVE_RESPONSE
267
}
277
}
268
278
279
#ifdef ACTIVE_RESPONSE
269
//--------------------------------------------------------------------
280
//--------------------------------------------------------------------
270
281
271
int Active_IsRSTCandidate(const Packet* p)
282
int Active_IsRSTCandidate(const Packet* p)
(-)snort-2.9.2.3/src/active.h (-4 / +4 lines)
Lines 29-37 Link Here
29
#include "decode.h"
29
#include "decode.h"
30
#include "snort.h"
30
#include "snort.h"
31
31
32
#ifdef ACTIVE_RESPONSE
33
#include "encode.h"
32
#include "encode.h"
34
33
34
void Active_SendData(Packet*, EncodeFlags, const uint8_t* buf, uint32_t len);
35
void Active_SetEnabled(int on_off);
36
37
#ifdef ACTIVE_RESPONSE
35
int Active_Init(SnortConfig*);
38
int Active_Init(SnortConfig*);
36
int Active_Term(void);
39
int Active_Term(void);
37
40
Lines 51-63 void Active_KillSession(Packet*, EncodeF Link Here
51
54
52
void Active_SendReset(Packet*, EncodeFlags);
55
void Active_SendReset(Packet*, EncodeFlags);
53
void Active_SendUnreach(Packet*, EncodeType);
56
void Active_SendUnreach(Packet*, EncodeType);
54
void Active_SendData(Packet*, EncodeFlags, const uint8_t* buf, uint32_t len);
55
56
int Active_IsRSTCandidate(const Packet*);
57
int Active_IsRSTCandidate(const Packet*);
57
int Active_IsUNRCandidate(const Packet*);
58
int Active_IsUNRCandidate(const Packet*);
58
59
59
int Active_IsEnabled(void);
60
int Active_IsEnabled(void);
60
void Active_SetEnabled(int on_off);
61
#endif // ACTIVE_RESPONSE
61
#endif // ACTIVE_RESPONSE
62
62
63
typedef enum {
63
typedef enum {

Return to bug 421775