/* $Header: /server/users/students/chow/mci/netrestoreW/sparcsrc/RREACT/RCS/globals.h,v 1.1 1993/12/28 02:37:58 chow Exp chow $ */ /* Header for module globals, generated by p2c */ #ifndef GLOBALS_H #define GLOBALS_H #ifndef STRINGS_H #include "strings2.h" #endif #ifndef LISTS_H #include "lists.h" #endif #ifdef GLOBALS_G # define vextern #else # define vextern #endif #define DBG_NETSIM 0 #define DBG_STRINGS 0 #define DBG_CLI 0 /* strings routines */ #define DBG_FIND_SYMB 0 #define DBG_INIT_SYMB 0 #define DBG_MATCH_SYMB 0 #define DBG_RREACT 1 /* rreact routines */ #define DBG_MAIN_LOOP 0 #define DBG_MAKE_PATH 0 #define DBG_INIT_NODES 0 #define DBG_OPT 0 #define DBG_KNAP 1 #define DBG_PROCESS 0 #define NIL_NODE 0 #define MAXNODES 128 #define MAXINT 0x7ffe #define BYTES_PER_NID 1 #define BYTES_PER_BW 1 #define FIXED_BYTE_OVERHEAD 6 #define KMPERDEG 111.3194 /* km/deg */ #define LIGHTSPEED 299796.0 /* km/sec */ /* index of refraction for glass -- lightspeed / index = lightspeed in material */ #define SEEK_MSG " SEEK" #define TRIGGER_EVENT " TRIGGER" #define CONNECT_MSG " CONNECT" #define REJECT_MSG " REJECT" #define STOP_MSG " STOP" #define SIM_MSG " SIM" typedef char pathsequence[MAXNODES]; typedef struct pathtuple { long id; boolean del; float wbw, wpl, weff, ww, wimp, wp; char *pathvec, *bwvec; long hc, bw, spares; list edges; } pathtuple; /* link description */ typedef struct linkdata { long dest; boolean active; float delay; long work, spare; } linkdata; /* RREACT capacity table */ typedef long cap_table[MAXNODES][MAXNODES]; /* RREACT node states */ typedef enum { IDLE, SEEKER, CONNECTOR } nodestates; /* RREACT optimization modes */ typedef enum { NO_OPT, KNAPSACK_OPT, HEURISTIC_OPT } opttypes; /* node state information for RREACT */ typedef struct node { long id; float time; list links; Char name[16]; float msg_process_delay; nodestates state; float lat, long_; long tofix; /* these down specific to RREACT */ list paths, bws; long (*capacity)[MAXNODES]; long nextpath; long repeatlimit; } node; /* typedef struct erec { float time; char next, src, dst; symbol_node *msg; } erec; */ extern float TRIGGER_TIMEOUT; extern float NOISE_SIZE; /* multiplied by random 0..100 */ extern float LINK_CHECK_SCALEFACTOR; /* fraction of node msg process delay */ extern float MSG_BYTE_DELAY; extern float STOP_TIME; /* sec -- total run time of simulation */ extern float REFRACINDEX; extern Char statechar[3]; /* state display in via path printout */ vextern long msg_count, sparesused; /* long msg_count, sparesused; long pathcount, bw_needed, bw_found; */ vextern unsigned short pathseq; vextern opttypes optmode; vextern long timer_seqnum; vextern erec *ee; vextern long i, j; vextern long idx; vextern boolean SaveEvents; vextern list net; vextern long netsize; vextern symbol_node *nodename; vextern FILE *log_; vextern Char printstr[256]; vextern node *nextnode; vextern boolean stop, verbose; vextern long pathcount, bw_found, bw_needed; vextern symbol_node *options; vextern Char result[256]; vextern Char outfilename[81], infilename[81]; vextern char break1, break2; vextern Char break1str[21], break2str[21]; vextern list tempstore, permstore, capacity; #undef vextern #endif /*GLOBALS_H*/ /* End. */