The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/norma/ipc_ether.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1991 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        ipc_ether.h,v $
   29  * Revision 2.4  91/12/14  14:33:00  jsb
   30  *      Picked up bootconfig code from sjs@osf.org.
   31  * 
   32  * Revision 2.3  91/08/28  11:15:57  jsb
   33  *      Added fields to support nrp (node table resolution protocol).
   34  *      [91/08/15  08:50:29  jsb]
   35  * 
   36  * Revision 2.2  91/08/03  18:19:16  jsb
   37  *      Made netipc_udpip_header field names more regular.
   38  *      [91/07/27  18:59:59  jsb]
   39  * 
   40  *      First checkin.
   41  *      [91/07/24  23:37:33  jsb]
   42  * 
   43  */
   44 /*
   45  *      File:   norma/ipc_ether.h
   46  *      Author: Joseph S. Barrera III
   47  *      Date:   1990
   48  *
   49  *      Definitions for NORMA_IPC over ethernet.
   50  */
   51 
   52 #include <device/if_ether.h>
   53 
   54 #define EHLEN           14
   55 #define ETHERTYPE_IP    0x0800
   56 #define IPVERSION       4
   57 #define IP_OVERHEAD     20
   58 #define UDP_PROTOCOL    17
   59 #define UDP_OVERHEAD    8
   60 #define NETIPC_UDPPORT  0xffff
   61 
   62 extern struct node_addr *node_self_addr;
   63 
   64 typedef struct node_addr                *node_addr_t;
   65 typedef struct netipc_ether_header      *netipc_ether_header_t;
   66 typedef struct netipc_udpip_header      *netipc_udpip_header_t;
   67 
   68 struct node_addr {
   69         unsigned short  node_ether_addr[3];     /* typedef this? */
   70         unsigned long   node_ip_addr;
   71 };
   72 
   73 struct netipc_ether_header {
   74         u_short e_dest[3];
   75         u_short e_src[3];
   76         short   e_ptype;
   77 };
   78 
   79 struct netipc_udpip_header {
   80 #if     BYTE_MSF
   81         u_char  ip_version:4,           /* version */
   82                 ip_header_length:4;     /* header length */
   83 #else   BYTE_MSF
   84         u_char  ip_header_length:4,     /* header length */
   85                 ip_version:4;           /* version */
   86 #endif  BYTE_MSF
   87         u_char  ip_type_of_service;     /* type of service */
   88         short   ip_total_length;        /* total length */
   89         u_short ip_id;                  /* identification */
   90         short   ip_fragment_offset;     /* fragment offset field */
   91 #define IP_DF 0x4000                    /* dont fragment flag */
   92 #define IP_MF 0x2000                    /* more fragments flag */
   93         u_char  ip_time_to_live;        /* time to live */
   94         u_char  ip_protocol;            /* protocol */
   95         u_short ip_checksum;            /* checksum */
   96         u_long  ip_src;                 /* source ip address */
   97         u_long  ip_dst;                 /* dest ip address */
   98 
   99         u_short udp_source_port;        /* source port */
  100         u_short udp_dest_port;          /* destination port */
  101         short   udp_length;             /* udp length */
  102         u_short udp_checksum;           /* udp checksum */
  103 };
  104 
  105 #define IPPORT_NDREQUEST        10067
  106 #define IPPORT_NDREPLY          10068
  107 
  108 #define NDRQ_MAGIC              0xfc0a8319
  109 #define NDRP_MAGIC              0xfc0a831a
  110 #define NDRC_MAGIC              0xfc0a831b
  111 #define BOOT_CONFIG_SIZE        2048            /* max size of boot params */
  112 #define BOOT_CONFIG_PCKT_SIZE   1400            /* max size of boot params */
  113 
  114 struct nd {
  115         unsigned long   nd_iaddr;
  116         short           nd_valid;
  117         char            nd_eaddr[6];
  118 };
  119 
  120 struct nd_request {
  121         unsigned long   ndrq_magic;
  122         unsigned short  ndrq_start;
  123         char            ndrq_eaddr[6];
  124         char            ndrq_pad[2];
  125 };
  126 
  127 struct nd_reply {
  128         unsigned long   ndrp_magic;
  129         unsigned short  ndrp_node_self;
  130         unsigned short  ndrp_table_size;
  131         unsigned short  ndrp_start;
  132         unsigned short  ndrp_count;
  133         struct nd       ndrp_table[120];
  134 };
  135 
  136 struct nd_config {
  137         unsigned long   ndrc_magic;
  138         unsigned short  ndrc_config_size;
  139         unsigned short  ndrc_offset;
  140         unsigned short  ndrc_msg_size;
  141         char            ndrc_boot_data[BOOT_CONFIG_PCKT_SIZE];
  142 };

Cache object: 06e14d5a2a2067e7d1a36846797a26bd


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.