convert action_type to enum

This patch converts packet action type to an enum. This will
provide some facilities and ease bad value detection by gcc.
remotes/origin/master-1.0.x
Eric Leblond 16 years ago committed by Victor Julien
parent f5743afed5
commit db2d483d11

@ -2,11 +2,13 @@
#ifndef __ACTION_GLOBALS_H__
#define __ACTION_GLOBALS_H__
#define ACTION_ALERT 0
#define ACTION_DROP 1
#define ACTION_REJECT 2
#define ACTION_REJECT_DST 3
#define ACTION_REJECT_BOTH 4
#define ACTION_PASS 5
typedef enum {
ACTION_ALERT,
ACTION_DROP,
ACTION_REJECT,
ACTION_REJECT_DST,
ACTION_REJECT_BOTH,
ACTION_PASS
} ActionType;
#endif /* __ACTION_GLOBALS_H__ */

@ -300,7 +300,7 @@ typedef struct Packet_
PacketAlerts alerts;
/* IPS action to take */
int action;
ActionType action;
/* double linked list ptrs */
struct Packet_ *next;

Loading…
Cancel
Save