Annotation of researchv8dc/sys/chaosld/chrouteld.h, revision 1.1

1.1     ! root        1: /*
        !             2:  *             C H R O U T E L D . H
        !             3:  *
        !             4:  * Definitions for use with the chroute line discipline for
        !             5:  * chaosnet routing.
        !             6:  *
        !             7:  *
        !             8:  * (c) Copyright 1984  Nirvonics, Inc.
        !             9:  *
        !            10:  * Written by Kurt Gollhardt
        !            11:  * Last update Mon Sep 24 16:33:37 1984
        !            12:  *
        !            13:  * This software is the property of Nirvonics, Inc.
        !            14:  * All rights reserved.
        !            15:  *
        !            16:  */
        !            17: 
        !            18: #ifndef _CHROUTE_
        !            19: #define _CHROUTE_
        !            20: 
        !            21:      /* Subnet Routing Types */
        !            22: 
        !            23: #define CHNOPATH    0    /* No connection */
        !            24: #define CHDIRECT    1    /* Direct connection to this subnet */
        !            25: #define CHBRIDGE    2    /* Can get to this subnet via a bridge */
        !            26: #define CHFIXED     3    /* Same as CHBRIDGE, but statically configured */
        !            27: 
        !            28:      /* Subnet Costs */
        !            29: 
        !            30: #define DIRECT_COST 10   /* Direct connection, e.g. DR11 parallel line */
        !            31: #define CABLE_COST  16   /* High speed cable, e.g. ethernet */
        !            32: #define ASYNC_COST  20   /* Low speed connection, e.g. asynchronous RS-232 */
        !            33: #define HIGH_COST   512  /* infinity */
        !            34: 
        !            35:      /* Chroute_ld Per Interface Structure */
        !            36: 
        !            37: struct chif {
        !            38:      struct queue   *rdq;     /* This interface's line discipline read queue */
        !            39:      chaddr         my_addr;  /* Chaosnet address of this interface */
        !            40:      dev_t          if_dev;   /* UNIX device number of this interface */
        !            41:      u_short        if_cost;  /* Cost of sending via this interface */
        !            42:      u_short        arp;      /* Address resolution channel number */
        !            43:      struct statxcvr if_stat; /* Status information */
        !            44: };
        !            45: 
        !            46: #define ist_xmit    if_stat.sx_Xmtd  /* # successfully transmitted packets */
        !            47: #define ist_abrt    if_stat.sx_Abrt  /* # transmission failures */
        !            48: #define ist_rcvd    if_stat.sx_Rcvd  /* # successfully received packets */
        !            49: #define ist_rej     if_stat.sx_Rej   /* # reception failures */
        !            50: #define ist_len     if_stat.sx_Leng  /* # length errors */
        !            51: 
        !            52:      /* Chroute_ld Per Subnet Routing Information */
        !            53: 
        !            54: struct chroute {
        !            55:      u_char         rt_type;  /* Type of connection to this subnet */
        !            56:      u_short        rt_cost;  /* Current cost of sending via this subnet */
        !            57:      union {
        !            58:           chaddr         bridge;   /* Chaosnet address of bridge */
        !            59:          struct chif    *ifp;     /* Interface for a direct connection */
        !            60:      } rt_path;               /* Info on how to get to this subnet */
        !            61: };
        !            62: 
        !            63:      /* Chaosnet-Ethernet Address Resolution Pair */
        !            64: 
        !            65: struct chaddr_pair {
        !            66:      chaddr         ch_addr;       /* Chaosnet address */
        !            67:      u_char         en_addr[6];    /* Ethernet address */
        !            68: };
        !            69: 
        !            70:      /* Ioctl Codes */
        !            71: 
        !            72: #define CRIOADDR    (('C'<<8)|1)   /* Set Chaosnet and Ethernet addresses */
        !            73: #define CRIOCOST    (('C'<<8)|2)   /* Set cost for this interface */
        !            74: #define CRIOPRIMARY (('C'<<8)|3)   /* Establish this as the primary interface;
        !            75:                                         i.e. packets addressed to us will be
        !            76:                                        passed to this stream */
        !            77: 
        !            78: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.