- Removed some old-fashioned defines, replacing them with enum constants.
This commit is contained in:
parent
b22667a791
commit
d181365e3e
@ -8,9 +8,7 @@
|
|||||||
#include "constraint.h"
|
#include "constraint.h"
|
||||||
#include "states.h"
|
#include "states.h"
|
||||||
|
|
||||||
#define READ 1
|
enum eventtype { READ, SEND, CLAIM };
|
||||||
#define SEND 2
|
|
||||||
#define CLAIM 3
|
|
||||||
|
|
||||||
//! The container for the claim info list
|
//! The container for the claim info list
|
||||||
struct claimlist
|
struct claimlist
|
||||||
|
@ -6,11 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
#define HASHSIZE 997
|
#define HASHSIZE 997
|
||||||
|
|
||||||
#define T_UNDEF -1
|
enum symboltypes { T_UNDEF = -1, T_PROTOCOL, T_CONST, T_VAR, T_SYSCONST };
|
||||||
#define T_PROTOCOL 0
|
|
||||||
#define T_CONST 1
|
|
||||||
#define T_VAR 2
|
|
||||||
#define T_SYSCONST 3
|
|
||||||
|
|
||||||
#define EOS 0
|
#define EOS 0
|
||||||
|
|
||||||
|
42
src/tac.h
42
src/tac.h
@ -7,26 +7,28 @@
|
|||||||
* TAC instructions
|
* TAC instructions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define TAC_UNDEF 0
|
enum tactypes {
|
||||||
#define TAC_SYM 1
|
TAC_UNDEF,
|
||||||
#define TAC_TUPLE 3
|
TAC_SYM,
|
||||||
#define TAC_ENCRYPT 4
|
TAC_TUPLE,
|
||||||
#define TAC_VAR 7
|
TAC_ENCRYPT,
|
||||||
#define TAC_CONST 8
|
TAC_VAR,
|
||||||
#define TAC_READ 9
|
TAC_CONST,
|
||||||
#define TAC_SEND 10
|
TAC_READ,
|
||||||
#define TAC_CLAIM 11
|
TAC_SEND,
|
||||||
#define TAC_FUNC 12
|
TAC_CLAIM,
|
||||||
#define TAC_STRING 13
|
TAC_FUNC,
|
||||||
#define TAC_ROLE 14
|
TAC_STRING,
|
||||||
#define TAC_PROTOCOL 15
|
TAC_ROLE,
|
||||||
#define TAC_RUN 16
|
TAC_PROTOCOL,
|
||||||
#define TAC_ROLEREF 17
|
TAC_RUN,
|
||||||
#define TAC_SECRET 18
|
TAC_ROLEREF,
|
||||||
#define TAC_INVERSEKEYS 19
|
TAC_SECRET,
|
||||||
#define TAC_UNTRUSTED 20
|
TAC_INVERSEKEYS,
|
||||||
#define TAC_COMPROMISED 21
|
TAC_UNTRUSTED,
|
||||||
#define TAC_USERTYPE 22
|
TAC_COMPROMISED,
|
||||||
|
TAC_USERTYPE
|
||||||
|
};
|
||||||
|
|
||||||
struct tacnode
|
struct tacnode
|
||||||
{
|
{
|
||||||
|
@ -7,11 +7,12 @@
|
|||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
/* STATUS symbols */
|
/* STATUS symbols */
|
||||||
#define S_UNK 0 // UNKnown : unprocessed.
|
enum statussymbols {
|
||||||
#define S_OKE 1 // OKE : done, but required for the attack.
|
S_UNK, // UNKnown : unprocessed.
|
||||||
#define S_RED 2 // REDundant : is not needed for attack, we're sure.
|
S_OKE, // OKE : done, but required for the attack.
|
||||||
#define S_TOD 3 // TODo : The previous suggestion REQ was too similar to RED.
|
S_RED, // REDundant : is not needed for attack, we're sure.
|
||||||
// This is reserved for reads.
|
S_TOD // TODo : The previous suggestion REQ was too similar to RED. This is reserved for reads.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user