formpkt.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:5k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /****************************************************************************
  2.  *******                                                              *******
  3.  *******         F O R M   P A C K E T   H E A D E R   F I L E
  4.  *******                                                              *******
  5.  ****************************************************************************
  6.  Author  : Ian Nandhra
  7.  Date    :
  8.  *
  9.  *  (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
  10.  *
  11.  *      This program is free software; you can redistribute it and/or modify
  12.  *      it under the terms of the GNU General Public License as published by
  13.  *      the Free Software Foundation; either version 2 of the License, or
  14.  *      (at your option) any later version.
  15.  *
  16.  *      This program is distributed in the hope that it will be useful,
  17.  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.  *      GNU General Public License for more details.
  20.  *
  21.  *      You should have received a copy of the GNU General Public License
  22.  *      along with this program; if not, write to the Free Software
  23.  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24.  Version : 0.01
  25.                             Mods
  26.  ----------------------------------------------------------------------------
  27.   Date     By                Description
  28.  ----------------------------------------------------------------------------
  29.  ***************************************************************************/
  30. #ifndef _formpkt_h
  31. #define _formpkt_h 1
  32. #ifndef lint
  33. #ifdef SCCS
  34. static char *_rio_formpkt_h_sccs = "@(#)formpkt.h 1.1" ;
  35. #endif
  36. #endif
  37. typedef struct FORM_BOOT_PKT_1 FORM_BOOT_PKT_1 ;
  38. struct FORM_BOOT_PKT_1 {
  39.                            ushort pkt_number ;
  40.                            ushort pkt_total ;
  41.                            ushort boot_top ;
  42.                        } ;
  43. typedef struct FORM_BOOT_PKT_2 FORM_BOOT_PKT_2 ;
  44. struct FORM_BOOT_PKT_2 {
  45.                            ushort pkt_number ;
  46.                            char   boot_data[10] ;
  47.                        } ;
  48. typedef struct FORM_ATTACH_RTA   FORM_ATTACH_RTA ;
  49. struct FORM_ATTACH_RTA  {
  50.                        char    cmd_code ;
  51.                        char    booter_serial[4] ;
  52.                        char    booter_link ;
  53.                        char    bootee_serial[4] ;
  54.                        char    bootee_link ;
  55.                    } ;
  56. typedef struct FORM_BOOT_ID   FORM_BOOT_ID ;
  57. struct FORM_BOOT_ID  {
  58.                        char    cmd_code ;
  59.                        char    bootee_serial[4] ;
  60.                        char    bootee_prod_id ;
  61.                        char    bootee_link ;
  62.                    } ;
  63. typedef struct FORM_ROUTE_1   FORM_ROUTE_1 ;
  64. struct FORM_ROUTE_1 {
  65.                         char     cmd_code ;
  66.                         char     pkt_number ;
  67.                         char     total_in_sequence ;
  68.                         char     unit_id ;
  69.                         char     host_unit_id ;
  70.                     } ;
  71. typedef struct FORM_ROUTE_2   FORM_ROUTE_2 ;
  72. struct FORM_ROUTE_2 {
  73.                         char   cmd_code ;
  74.                         char   pkt_number ;
  75.                         char   total_in_sequence ;
  76.                         char   route_data[9] ;
  77.                     } ;
  78. typedef struct FORM_ROUTE_REQ   FORM_ROUTE_REQ ;
  79. struct FORM_ROUTE_REQ {
  80.                           char   cmd_code ;
  81.                           char   pkt_number ;
  82.                           char   total_in_sequence ;
  83.                           char   route_data[10] ;
  84.                       } ;
  85. typedef struct FORM_ERROR   FORM_ERROR ;
  86. struct FORM_ERROR {
  87.                         char   cmd_code ;
  88.                         char   error_code ;
  89.                     } ;
  90. typedef struct FORM_STATUS   FORM_STATUS ;
  91. struct FORM_STATUS {
  92.                         char   cmd_code ;
  93.                         char   status_code ;
  94.                         char   last_packet_valid ;
  95.                         char   tx_buffer ;
  96.                         char   rx_buffer ;
  97.                         char   port_status ;
  98.                         char   phb_status ;
  99.                     } ;
  100. typedef struct FORM_LINK_STATUS   FORM_LINK_STATUS ;
  101. struct FORM_LINK_STATUS {
  102.                         char    cmd_code ;
  103.                         char    status_code ;
  104.                         char    link_number ;
  105.                         ushort  rx_errors ;
  106.                         ushort  tx_errors ;
  107.                         ushort  csum_errors ;
  108.                         ushort  disconnects ;
  109.                     } ;
  110. typedef struct FORM_PARTITION FORM_PARTITION ;
  111. struct FORM_PARTITION {
  112.                         char    cmd_code ;
  113.                         char    status_code ;
  114.                         char    port_number ;
  115.                         char    tx_max ;
  116.                         char    rx_max ;
  117.                         char    rx_limit ;
  118.                       } ;
  119. #endif
  120. /*********** end of file ***********/