~ubuntu-branches/ubuntu/quantal/zaptel/quantal

« back to all changes in this revision

Viewing changes to include/octrpc/rpc_protocol.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2006-10-24 22:41:01 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20061024224101-464p4n2jk16n1jrh
Tags: 1:1.2.10.dfsg-2
* bristuff-0.3.0-PRE-1v
* Remove redundant GPL LICENCE text

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
2
 
 
3
 
File:   rpc_protocol.h
4
 
 
5
 
    Copyright (c) 2001-2006 Octasic Inc.
6
 
    
7
 
Description: 
8
 
 
9
 
This file contains RPC related definitions and prototypes.
10
 
 
11
 
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API  is 
12
 
free software; you can redistribute it and/or modify it under the terms of 
13
 
the GNU General Public License as published by the Free Software Foundation; 
14
 
either version 2 of the License, or (at your option) any later version.
15
 
 
16
 
The OCT6100 GPL API is distributed in the hope that it will be useful, but 
17
 
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
18
 
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
19
 
for more details. 
20
 
 
21
 
You should have received a copy of the GNU General Public License 
22
 
along with the OCT6100 GPL API; if not, write to the Free Software 
23
 
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24
 
 
25
 
$Octasic_Release: OCT612xAPI-01.00-PR43 $
26
 
 
27
 
$Octasic_Revision: 23 $
28
 
 
29
 
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
30
 
 
31
 
#ifndef __RPC_PROTOCOL_H__
32
 
#define __RPC_PROTOCOL_H__
33
 
 
34
 
/*****************************  INCLUDE FILES  *******************************/
35
 
 
36
 
 
37
 
/*****************************  DEFINES  *************************************/
38
 
 
39
 
#define cOCTRPC_ENDIAN_DETECT                           0x27182819
40
 
#define cOCTRPC_ENDIAN_DETECT_BYTE_W            0x19
41
 
#define cOCTRPC_ENDIAN_DETECT_BYTE_X            0x28
42
 
#define cOCTRPC_ENDIAN_DETECT_BYTE_Y            0x18
43
 
#define cOCTRPC_ENDIAN_DETECT_BYTE_Z            0x27
44
 
#define cOCTRPC_ECHO_PROTOCOL                           0x00000000
45
 
 
46
 
#define cOCTRPC_MIN_PACKET_BYTE_LENGTH          (sizeof( tOCTRPC_OGRDTP_HEADER ))
47
 
#define cOCTRPC_FIRST_COMMAND_BYTE_OFFSET       (sizeof( tOCTRPC_OGRDTP_HEADER ) + sizeof( tOCTRPC_INTERFACE_HEADER ))
48
 
#define cOCTRPC_GENERIC_HEADERS_BYTE_SIZE       (sizeof( tOCTRPC_OGRDTP_HEADER ) + sizeof( tOCTRPC_INTERFACE_HEADER ) + sizeof( tOCTRPC_COMMAND_HEADER ))
49
 
#define cOCTRPC_MAX_PACKET_BYTE_LENGTH          32768
50
 
 
51
 
/* Protocol versions */
52
 
#define cOCTRPC_PROTOCOL_V1_0                           0x00010000
53
 
#define cOCTRPC_PROTOCOL_V1_1                           0x00010001
54
 
#define cOCTRPC_PROTOCOL_V1_2                           0x00010002
55
 
#define cOCTRPC_PROTOCOL_V1_3                           0x00010003
56
 
#define cOCTRPC_OCTASIC_PROTOCOL_V1_0           0xFF010000
57
 
#define cOCTRPC_OCTASIC_PROTOCOL_V1_1           0xFF010001
58
 
#define cOCTRPC_OCTASIC_PROTOCOL_V1_2           0xFF010002
59
 
#define cOCTRPC_OCTASIC_PROTOCOL_V1_3           0xFF010003
60
 
 
61
 
/* Chips */
62
 
#define cOCTRPC_OCT8304_INTERFACE                       0x00000000
63
 
#define cOCTRPC_OCT6100_INTERFACE                       0x00000001
64
 
 
65
 
/* Timeout values. */
66
 
#define cOCTRPC_SESSION_TIMEOUT                         30
67
 
 
68
 
/* Generic errors */
69
 
#define cOCTRPC_RDBGERR_OK                                                      0x00000000
70
 
#define cOCTRPC_RDBGERR_NO_ANSWER                                       0xFFFF0000
71
 
#define cOCTRPC_RDBGERR_ALL_SESSIONS_OPEN                       0xFFFF0001
72
 
#define cOCTRPC_RDBGERR_PROTOCOL_NUMBER                         0xFFFF0002
73
 
#define cOCTRPC_RDBGERR_NO_COMMAND_HEADER                       0xFFFF0003
74
 
#define cOCTRPC_RDBGERR_INTERFACE_TYPE                          0xFFFF0004
75
 
#define cOCTRPC_RDBGERR_INTERFACE_VERSION                       0xFFFF0005
76
 
#define cOCTRPC_RDBGERR_INVALID_PACKET_LENGTH           0xFFFF0006
77
 
#define cOCTRPC_RDBGERR_INVALID_COMMAND_LENGTH          0xFFFF0007
78
 
#define cOCTRPC_RDBGERR_INVALID_COMMAND_NUMBER          0xFFFF0008
79
 
#define cOCTRPC_RDBGERR_PACKET_TOO_LARGE                        0xFFFF0009
80
 
#define cOCTRPC_RDBGERR_LIST_EMPTY                                      0xFFFF000A
81
 
 
82
 
#define cOCTRPC_RDBGERR_FATAL                                           0xFFFFFFFF
83
 
 
84
 
 
85
 
/*****************************  TYPES  ***************************************/
86
 
 
87
 
typedef struct _OCTRPC_OGRDTP_HEADER_
88
 
{
89
 
        UINT32  IN              ulEndianDetect;
90
 
        UINT32  IN              ulDebugSessionNum;
91
 
        UINT32  IN              ulTransactionNum;
92
 
        UINT32  IN              ulPktRetryNum;
93
 
        UINT32  IN              ulPktByteSize;
94
 
        UINT32  IN              ulChecksum;
95
 
        UINT32  OUT             ulParsingError;
96
 
        UINT32  IN              ulRpcProtocolNum;
97
 
 
98
 
} tOCTRPC_OGRDTP_HEADER, *tPOCTRPC_OGRDTP_HEADER;
99
 
 
100
 
typedef struct _OCTRPC_INTERFACE_HEADER_
101
 
{
102
 
        UINT32  IN              ulInterfaceType;
103
 
        UINT32  IN              ulInterfaceVersion;
104
 
 
105
 
} tOCTRPC_INTERFACE_HEADER, *tPOCTRPC_INTERFACE_HEADER;
106
 
 
107
 
typedef struct _OCTRPC_COMMAND_HEADER_
108
 
{
109
 
        UINT32  IN              ulCommandByteSize;
110
 
        UINT32  IN OUT  ulRpcCommandNum;
111
 
        UINT32  OUT             ulFunctionResult;
112
 
 
113
 
} tOCTRPC_COMMAND_HEADER, *tPOCTRPC_COMMAND_HEADER;
114
 
 
115
 
#endif /* __RPC_PROTOCOL_H__ */