- Removed some old-fashioned defines, replacing them with enum constants.

This commit is contained in:
ccremers 2004-07-29 11:26:59 +00:00
parent b22667a791
commit d181365e3e
4 changed files with 30 additions and 33 deletions

View File

@ -8,9 +8,7 @@
#include "constraint.h"
#include "states.h"
#define READ 1
#define SEND 2
#define CLAIM 3
enum eventtype { READ, SEND, CLAIM };
//! The container for the claim info list
struct claimlist

View File

@ -6,11 +6,7 @@
*/
#define HASHSIZE 997
#define T_UNDEF -1
#define T_PROTOCOL 0
#define T_CONST 1
#define T_VAR 2
#define T_SYSCONST 3
enum symboltypes { T_UNDEF = -1, T_PROTOCOL, T_CONST, T_VAR, T_SYSCONST };
#define EOS 0

View File

@ -7,26 +7,28 @@
* TAC instructions
*/
#define TAC_UNDEF 0
#define TAC_SYM 1
#define TAC_TUPLE 3
#define TAC_ENCRYPT 4
#define TAC_VAR 7
#define TAC_CONST 8
#define TAC_READ 9
#define TAC_SEND 10
#define TAC_CLAIM 11
#define TAC_FUNC 12
#define TAC_STRING 13
#define TAC_ROLE 14
#define TAC_PROTOCOL 15
#define TAC_RUN 16
#define TAC_ROLEREF 17
#define TAC_SECRET 18
#define TAC_INVERSEKEYS 19
#define TAC_UNTRUSTED 20
#define TAC_COMPROMISED 21
#define TAC_USERTYPE 22
enum tactypes {
TAC_UNDEF,
TAC_SYM,
TAC_TUPLE,
TAC_ENCRYPT,
TAC_VAR,
TAC_CONST,
TAC_READ,
TAC_SEND,
TAC_CLAIM,
TAC_FUNC,
TAC_STRING,
TAC_ROLE,
TAC_PROTOCOL,
TAC_RUN,
TAC_ROLEREF,
TAC_SECRET,
TAC_INVERSEKEYS,
TAC_UNTRUSTED,
TAC_COMPROMISED,
TAC_USERTYPE
};
struct tacnode
{

View File

@ -7,11 +7,12 @@
#include "system.h"
/* STATUS symbols */
#define S_UNK 0 // UNKnown : unprocessed.
#define S_OKE 1 // OKE : done, but required for the attack.
#define S_RED 2 // REDundant : is not needed for attack, we're sure.
#define S_TOD 3 // TODo : The previous suggestion REQ was too similar to RED.
// This is reserved for reads.
enum statussymbols {
S_UNK, // UNKnown : unprocessed.
S_OKE, // OKE : done, but required for the attack.
S_RED, // REDundant : is not needed for attack, we're sure.
S_TOD // TODo : The previous suggestion REQ was too similar to RED. This is reserved for reads.
};
/*