1: /*
   2:  * Copyright (c) 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)if_imp.h	1.1 (2.10BSD Berkeley) 12/1/86
   7:  */
   8: 
   9: /*
  10:  * Structure of IMP 1822 long leader.
  11:  */
  12: struct control_leader {
  13:     u_char  dl_format;  /* leader format */
  14:     u_char  dl_network; /* src/dest network */
  15:     u_char  dl_flags;   /* leader flags */
  16:     u_char  dl_mtype;   /* message type */
  17:     u_char  dl_htype;   /* handling type */
  18:     u_char  dl_host;    /* host number */
  19:     u_short dl_imp;     /* imp field */
  20:     u_char  dl_link;    /* link number */
  21:     u_char  dl_subtype; /* message subtype */
  22: };
  23: 
  24: struct imp_leader {
  25:     struct  control_leader il_dl;
  26: #define il_format   il_dl.dl_format
  27: #define il_network  il_dl.dl_network
  28: #define il_flags    il_dl.dl_flags
  29: #define il_mtype    il_dl.dl_mtype
  30: #define il_htype    il_dl.dl_htype
  31: #define il_host     il_dl.dl_host
  32: #define il_imp      il_dl.dl_imp
  33: #define il_link     il_dl.dl_link
  34: #define il_subtype  il_dl.dl_subtype
  35:     u_short il_length;  /* message length */
  36: };
  37: 
  38: #define IMP_DROPCNT 2   /* # of noops from imp to ignore */
  39: /* insure things are even... */
  40: #define IMPMTU      ((8159 / NBBY) & ~01)
  41: 
  42: /*
  43:  * IMP-host flags
  44:  */
  45: #define IMP_NFF     0xf /* 96-bit (new) format */
  46: #define IMP_TRACE   0x8 /* trace message route */
  47: 
  48: #define IMP_DMASK   0x3 /* host going down mask */
  49: 
  50: /*
  51:  * IMP-host message types.
  52:  */
  53: #define IMPTYPE_DATA        0   /* data for protocol */
  54: #define IMPTYPE_BADLEADER   1   /* leader error */
  55: #define IMPTYPE_DOWN        2   /* imp going down */
  56: #define IMPTYPE_NOOP        4   /* noop seen during initialization */
  57: #define IMPTYPE_RFNM        5   /* request for new messages */
  58: #define IMPTYPE_HOSTDEAD    6   /* host doesn't respond */
  59: #define IMPTYPE_HOSTUNREACH 7   /* host unreachable */
  60: #define IMPTYPE_BADDATA     8   /* data error */
  61: #define IMPTYPE_INCOMPLETE  9   /* incomplete message, send rest */
  62: #define IMPTYPE_RESET       10  /* reset complete */
  63: /* non-blocking IMP interface */
  64: #define IMPTYPE_RETRY       11  /* IMP refused, try again */
  65: #define IMPTYPE_NOTIFY      12  /* IMP refused, will notify */
  66: #define IMPTYPE_TRYING      13  /* IMP refused, still rexmt'ng */
  67: #define IMPTYPE_READY       14  /* ready for next message */
  68: 
  69: /*
  70:  * IMPTYPE_DOWN subtypes.
  71:  */
  72: #define IMPDOWN_GOING       0   /* 30 secs */
  73: #define IMPDOWN_PM      1   /* hardware PM */
  74: #define IMPDOWN_RELOAD      2   /* software reload */
  75: #define IMPDOWN_RESTART     3   /* emergency restart */
  76: 
  77: /*
  78:  * IMPTYPE_BADLEADER subtypes.
  79:  */
  80: #define IMPLEADER_ERR       0   /* error flip-flop set */
  81: #define IMPLEADER_SHORT     1   /* leader < 80 bits */
  82: #define IMPLEADER_TYPE      2   /* illegal type field */
  83: #define IMPLEADER_OPPOSITE  3   /* opposite leader type */
  84: 
  85: /*
  86:  * IMPTYPE_HOSTDEAD subtypes.
  87:  */
  88: #define IMPHOST_NORDY       1   /* ready-line negated */
  89: #define IMPHOST_TARDY       2   /* tardy receiving mesgs */
  90: #define IMPHOST_NOEXIST     3   /* NCC doesn't know host */
  91: #define IMPHOST_IMPSOFT     4   /* IMP software won't allow mesgs */
  92: #define IMPHOST_PM      5   /* host down for scheduled PM */
  93: #define IMPHOST_HARDSCHED   6   /* " " " " hardware work */
  94: #define IMPHOST_SOFTSCHED   7   /* " " " " software work */
  95: #define IMPHOST_RESTART     8   /* host down for emergency restart */
  96: #define IMPHOST_POWER       9   /* down because of power outage */
  97: #define IMPHOST_BREAKPOINT  10  /* host stopped at a breakpoint */
  98: #define IMPHOST_HARDWARE    11  /* hardware failure */
  99: #define IMPHOST_NOTUP       12  /* host not scheduled to be up */
 100: /* 13-14 currently unused */
 101: #define IMPHOST_COMINGUP    15  /* host in process of coming up */
 102: 
 103: /*
 104:  * IMPTYPE_HOSTUNREACH subtypes.
 105:  */
 106: #define IMPREACH_IMP        0   /* destination IMP can't be reached */
 107: #define IMPREACH_HOSTUP     1   /* destination host isn't up */
 108: #define IMPREACH_LEADER     2   /* host doesn't support long leader */
 109: #define IMPREACH_PROHIBITED 3   /* communication is prohibited */
 110: 
 111: /*
 112:  * IMPTYPE_INCOMPLETE subtypes.
 113:  */
 114: #define IMPCOMPLETE_SLOW    0   /* host didn't take data fast enough */
 115: #define IMPCOMPLETE_TOOLONG 1   /* message was too long */
 116: #define IMPCOMPLETE_TIMEOUT 2   /* mesg transmission time > 15 sec. */
 117: #define IMPCOMPLETE_FAILURE 3   /* IMP/circuit failure */
 118: #define IMPCOMPLETE_NOSPACE 4   /* no resources within 15 sec. */
 119: #define IMPCOMPLETE_IMPIO   5   /* src IMP I/O failure during receipt */
 120: 
 121: /*
 122:  * IMPTYPE_RETRY subtypes.
 123:  */
 124: #define IMPRETRY_BUFFER     0   /* IMP buffer wasn't available */
 125: #define IMPRETRY_BLOCK      1   /* connection block unavailable */
 126: 
 127: /*
 128:  * Data structure shared between IMP protocol module and hardware
 129:  * interface driver.  Used to allow layering of IMP routines on top
 130:  * of varying device drivers.  NOTE: there's a possible problem
 131:  * with ambiguity in the ``unit'' definition which is implicitly
 132:  * shared by the both IMP and device code.  If we have two IMPs,
 133:  * with each on top of a device of the same unit, things won't work.
 134:  * The assumption is if you've got multiple IMPs, then they all run
 135:  * on top of the same type of device, or they must have different units.
 136:  */
 137: struct impcb {
 138:     char    ic_oactive;     /* output in progress */
 139:     int (*ic_init)();       /* hardware init routine */
 140:     int (*ic_start)();      /* hardware start output routine */
 141: };
 142: 
 143: /*
 144:  * State of an IMP.
 145:  */
 146: #define IMPS_DOWN   0       /* unavailable, don't use */
 147: #define IMPS_GOINGDOWN  1       /* been told we go down soon */
 148: #define IMPS_INIT   2       /* coming up */
 149: #define IMPS_UP     3       /* ready to go */
 150: #define IMPS_RESET  4       /* reset in progress */
 151: 
 152: #define IMPTV_DOWN  (30*60)     /* going down timer 30 secs */
 153: 
 154: #ifdef IMPLEADERS
 155: char *impleaders[IMPTYPE_READY+1] = {
 156:     "DATA", "BADLEADER", "DOWN", "bad", "NOOP", "RFNM", "HOSTDEAD",
 157:     "HOSTUNREACH", "BADDATA", "INCOMPLETE", "RESET", "RETRY",
 158:     "NOTIFY", "TRYING", "READY"
 159: };
 160: #endif

Defined variables

impleaders defined in line 155; used 1 times

Defined struct's

control_leader defined in line 12; used 28 times
imp_leader defined in line 24; used 46 times
impcb defined in line 137; used 22 times

Defined macros

IMPCOMPLETE_FAILURE defined in line 117; never used
IMPCOMPLETE_IMPIO defined in line 119; never used
IMPCOMPLETE_NOSPACE defined in line 118; never used
IMPCOMPLETE_SLOW defined in line 114; never used
IMPCOMPLETE_TIMEOUT defined in line 116; never used
IMPCOMPLETE_TOOLONG defined in line 115; never used
IMPDOWN_GOING defined in line 72; never used
IMPDOWN_PM defined in line 73; never used
IMPDOWN_RELOAD defined in line 74; never used
IMPDOWN_RESTART defined in line 75; never used
IMPHOST_BREAKPOINT defined in line 97; never used
IMPHOST_COMINGUP defined in line 101; never used
IMPHOST_HARDSCHED defined in line 93; never used
IMPHOST_HARDWARE defined in line 98; never used
IMPHOST_IMPSOFT defined in line 91; never used
IMPHOST_NOEXIST defined in line 90; never used
IMPHOST_NORDY defined in line 88; never used
IMPHOST_NOTUP defined in line 99; never used
IMPHOST_PM defined in line 92; never used
IMPHOST_POWER defined in line 96; never used
IMPHOST_RESTART defined in line 95; never used
IMPHOST_SOFTSCHED defined in line 94; never used
IMPHOST_TARDY defined in line 89; never used
IMPLEADER_ERR defined in line 80; never used
IMPLEADER_OPPOSITE defined in line 83; never used
IMPLEADER_SHORT defined in line 81; never used
IMPLEADER_TYPE defined in line 82; never used
IMPREACH_HOSTUP defined in line 107; never used
IMPREACH_IMP defined in line 106; never used
IMPREACH_LEADER defined in line 108; never used
IMPREACH_PROHIBITED defined in line 109; never used
IMPRETRY_BLOCK defined in line 125; never used
IMPRETRY_BUFFER defined in line 124; never used
IMPS_DOWN defined in line 146; used 3 times
IMPS_GOINGDOWN defined in line 147; used 1 times
IMPS_INIT defined in line 148; used 5 times
IMPS_RESET defined in line 150; never used
IMPS_UP defined in line 149; used 2 times
IMPTV_DOWN defined in line 152; never used
IMPTYPE_BADDATA defined in line 60; never used
IMPTYPE_BADLEADER defined in line 54; never used
IMPTYPE_DATA defined in line 53; used 6 times
IMPTYPE_DOWN defined in line 55; never used
IMPTYPE_HOSTDEAD defined in line 58; used 1 times
IMPTYPE_HOSTUNREACH defined in line 59; used 1 times
IMPTYPE_INCOMPLETE defined in line 61; never used
IMPTYPE_NOOP defined in line 56; used 1 times
IMPTYPE_NOTIFY defined in line 65; never used
IMPTYPE_READY defined in line 67; used 2 times
IMPTYPE_RESET defined in line 62; never used
IMPTYPE_RETRY defined in line 64; never used
IMPTYPE_RFNM defined in line 57; never used
IMPTYPE_TRYING defined in line 66; never used
IMP_DMASK defined in line 48; used 2 times
IMP_DROPCNT defined in line 38; used 3 times
IMP_NFF defined in line 45; used 4 times
IMP_TRACE defined in line 46; never used
il_flags defined in line 28; used 2 times
il_format defined in line 26; used 4 times
il_host defined in line 31; used 8 times
il_htype defined in line 30; used 2 times
il_imp defined in line 32; used 9 times
il_link defined in line 33; used 9 times
il_mtype defined in line 29; used 9 times
il_network defined in line 27; used 2 times
il_subtype defined in line 34; used 2 times

Usage of this include

Last modified: 1987-06-20
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 4657
Valid CSS Valid XHTML 1.0 Strict