# 2.11BSD#431 - /usr/src/sys/netimp/if_imp.h

##### Variables

    impleaders        X

##### Macros

    IMPCOMPLETE_FAILUREX
    IMPCOMPLETE_IMPIO X
    IMPCOMPLETE_NOSPACEX
    IMPCOMPLETE_SLOW  X
    IMPCOMPLETE_TIMEOUTX
    IMPCOMPLETE_TOOLONGX
    IMPDOWN_GOING     X
    IMPDOWN_PM        X
    IMPDOWN_RELOAD    X
    IMPDOWN_RESTART   X
    IMPHOST_BREAKPOINTX
    IMPHOST_COMINGUP  X
    IMPHOST_HARDSCHED X
    IMPHOST_HARDWARE  X
    IMPHOST_IMPSOFT   X
    IMPHOST_NOEXIST   X
    IMPHOST_NORDY     X
    IMPHOST_NOTUP     X
    IMPHOST_PM        X
    IMPHOST_POWER     X
    IMPHOST_RESTART   X
    IMPHOST_SOFTSCHED X
    IMPHOST_TARDY     X
    IMPLEADER_ERR     X
    IMPLEADER_OPPOSITEX
    IMPLEADER_SHORT   X
    IMPLEADER_TYPE    X
    IMPMTU            X
    IMPREACH_HOSTUP   X
    IMPREACH_IMP      X
    IMPREACH_LEADER   X
    IMPREACH_PROHIBITEDX
    IMPRETRY_BLOCK    X
    IMPRETRY_BUFFER   X
    IMPS_DOWN         X
    IMPS_GOINGDOWN    X
    IMPS_INIT         X
    IMPS_RESET        X
    IMPS_UP           X
    IMPTV_DOWN        X
    IMPTYPE_BADDATA   X
    IMPTYPE_BADLEADER X
    IMPTYPE_DATA      X
    IMPTYPE_DOWN      X
    IMPTYPE_HOSTDEAD  X
    IMPTYPE_HOSTUNREACHX
    IMPTYPE_INCOMPLETEX
    IMPTYPE_NOOP      X
    IMPTYPE_NOTIFY    X
    IMPTYPE_READY     X
    IMPTYPE_RESET     X
    IMPTYPE_RETRY     X
    IMPTYPE_RFNM      X
    IMPTYPE_TRYING    X
    IMP_DMASK         X
    IMP_DROPCNT       X
    IMP_NFF           X
    IMP_TRACE         X
    il_flags          X
    il_format         X
    il_host           X
    il_htype          X
    il_imp            X
    il_link           X
    il_mtype          X
    il_network        X
    il_subtype        X

##### struct's

    control_leader    X
    imp_leader        X
    impcb             X

       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

- in /usr/src/sys/netimp/if_imp.c line 678

#### Defined struct's

control_leader defined in line 12; used 28 times

- in line 25(2)
- in /usr/src/sys/netimp/if_imp.c line 165(2), 177-180(6), 417(2), 428(2), 622(2), 628-629(4)
- in /usr/src/sys/netimp/raw_imp.c line 48(2), 54-59(6)

imp_leader defined in line 24; used 46 times

- in /usr/src/sys/netimp/if_imp.c line 110(2), 160(2), 182-185(6), 215-216(4), 429(2), 464(2), 508(2), 515-520(8), 545-550(4), 671(2), 723(2), 750(2)
- in /usr/src/sys/netimp/raw_imp.c line 44(2), 61-66(6)

impcb defined in line 137; used 22 times

- in /usr/src/sys/netimp/if_imp.c line 60(2), 547(2)
- in /usr/src/sys/pdpif/if_acc.c line 65(2), 111-114(4)
- in /usr/src/sys/pdpif/if_css.c line 85(2), 134-137(4)
- in /usr/src/sys/pdpif/if_sri.c line 74(2), 125-128(4)

#### 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
IMPMTU defined in line 40; used 16 times

- in /usr/src/sys/netimp/if_imp.c line 110
- in /usr/src/sys/pdpif/if_acc.c line 177, 204, 350-351(2), 384
- in /usr/src/sys/pdpif/if_css.c line 198, 247, 362-363(2), 396
- in /usr/src/sys/pdpif/if_sri.c line 189, 229, 384-385(2), 418

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

- in /usr/src/sys/netimp/if_imp.c line 134, 265, 386

IMPS_GOINGDOWN defined in line 147; used 1 times

- in /usr/src/sys/netimp/if_imp.c line 252

IMPS_INIT defined in line 148; used 5 times

- in /usr/src/sys/netimp/if_imp.c line 139, 236, 249, 266-269(2)

IMPS_RESET defined in line 150; never used
IMPS_UP defined in line 149; used 2 times

- in /usr/src/sys/netimp/if_imp.c line 284, 472

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

- in /usr/src/sys/netimp/if_imp.c line 181, 198, 522, 557, 593
- in /usr/src/sys/netimp/raw_imp.c line 60

IMPTYPE_DOWN defined in line 55; never used
IMPTYPE_HOSTDEAD defined in line 58; used 1 times

- in /usr/src/sys/netimp/if_imp.c line 434

IMPTYPE_HOSTUNREACH defined in line 59; used 1 times

- in /usr/src/sys/netimp/if_imp.c line 435

IMPTYPE_INCOMPLETE defined in line 61; never used
IMPTYPE_NOOP defined in line 56; used 1 times

- in /usr/src/sys/netimp/if_imp.c line 632

IMPTYPE_NOTIFY defined in line 65; never used
IMPTYPE_READY defined in line 67; used 2 times

- in line 155
- in /usr/src/sys/netimp/if_imp.c line 677

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

- in /usr/src/sys/netimp/if_imp.c line 251-256(2)

IMP_DROPCNT defined in line 38; used 3 times

- in /usr/src/sys/netimp/if_imp.c line 267, 624-625(2)

IMP_NFF defined in line 45; used 4 times

- in /usr/src/sys/netimp/if_imp.c line 193, 521, 630
- in /usr/src/sys/netimp/raw_imp.c line 67

IMP_TRACE defined in line 46; never used
il_flags defined in line 28; used 2 times

- in /usr/src/sys/netimp/if_imp.c line 527, 676

il_format defined in line 26; used 4 times

- in /usr/src/sys/netimp/if_imp.c line 193, 521, 675
- in /usr/src/sys/netimp/raw_imp.c line 67

il_host defined in line 31; used 8 times

- in /usr/src/sys/netimp/if_imp.c line 279, 681, 735-741(3), 758-764(3)

il_htype defined in line 30; used 2 times

- in /usr/src/sys/netimp/if_imp.c line 527, 681

il_imp defined in line 32; used 9 times

- in /usr/src/sys/netimp/if_imp.c line 272, 280, 682, 728, 759-767(5)

il_link defined in line 33; used 9 times

- in /usr/src/sys/netimp/if_imp.c line 212, 251-256(2), 526, 683-686(2)
- in /usr/src/sys/netimp/raw_imp.c line 72-73(3)

il_mtype defined in line 29; used 9 times

- in /usr/src/sys/netimp/if_imp.c line 198-203(2), 313, 522, 557, 593, 677-680(3)

il_network defined in line 27; used 2 times

- in /usr/src/sys/netimp/if_imp.c line 675, 755

il_subtype defined in line 34; used 2 times

- in /usr/src/sys/netimp/if_imp.c line 527, 687

#### Usage of this include

if_imp.h used 6 times

- in /usr/src/sys/netimp/if_imp.c line 35
- in /usr/src/sys/netimp/if_imphost.c line 25
- in /usr/src/sys/netimp/raw_imp.c line 24
- in /usr/src/sys/pdpif/if_acc.c line 32
- in /usr/src/sys/pdpif/if_css.c line 52
- in /usr/src/sys/pdpif/if_sri.c line 28

Last modified: 1987-06-20 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1655 |