Annotation of xinu/h/ip.h, revision 1.1

1.1     ! root        1: /* ip.h */
        !             2: 
        !             3: /* DARPA Internet Protocol (IP)  Constants and Datagram Format */
        !             4: 
        !             5: #define        IPLEN   4               /* IP address length in bytes (octets)  */
        !             6: typedef        char    IPaddr[IPLEN];  /* DARPA internet address               */
        !             7: #define        IPTMASK 0300            /* Mask for IP type in top byte of addr */
        !             8: #define        IPATYP  0000            /* IP Class A address (1st 2 bits)      */
        !             9: #define        IPBTYP  0200            /* IP Class B address (1st 2 bits)      */
        !            10: #define        IPCTYP  0300            /* IP Class C address (1st 2 bits)      */
        !            11: #define        IPHLEN  20              /* IP datagram header length in bytes   */
        !            12: #define        IMAXLEN 1200            /* Maximum IP datagram length (Notes:   */
        !            13:                                /*  1) hosts & gateways only required   */
        !            14:                                /*  to recognize 576 bytes. 2) must be  */
        !            15:                                /*  less than EMAXPAK for our network   */
        !            16: /* Assigned Protocol numbers */
        !            17: 
        !            18: #define        IPRO_ICMP       1       /* protocol type for ICMP packets       */
        !            19: #define        IPRO_UDP        17      /* protocol type for UDP packets        */
        !            20: 
        !            21: struct ip      {               /* Format of DARPA Internet datagram    */
        !            22:        char    i_verlen;       /* IP vers.(0x40) + hdr len in longs (5)*/
        !            23:        char    i_svctyp;       /* service type (0 => normal service)   */
        !            24:        short   i_paclen;       /* packet length in octets (bytes)      */
        !            25:        short   i_id;           /* datagram id (to help gateways frag.) */
        !            26:        short   i_fragoff;      /* fragment offset (0 for 1st fragment) */
        !            27:        char    i_tim2liv;      /* time to live in gateway hops (10)    */
        !            28:        char    i_proto;        /* IP protocol (UDP is assigned 17)     */
        !            29:        short   i_cksum;        /* 1s compl. of sum of shorts in header */
        !            30:        IPaddr  i_src;          /* IP address of source                 */
        !            31:        IPaddr  i_dest;         /* IP address of destination            */
        !            32:        char    i_data[1];      /* IP datagram data area                */
        !            33: };
        !            34: 
        !            35: /* Datagram field constants used by simple IP software */
        !            36: 
        !            37: #define        IVERLEN         0x45    /* current version length field value   */
        !            38: #define        ISVCTYP         '\0'    /* service type for normal service      */
        !            39: #define        IFRAGOFF        0       /* Fragment offset (0 => no fragment)   */
        !            40: #define        ITIM2LIV        10      /* Initial time-to-live value           */
        !            41: 
        !            42: extern int     ipackid;        /* Internet datagram id                 */

unix.superglobalmegacorp.com

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