1
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
5
Copyright (c) 2001-2007 Octasic Inc.
9
This file contains RPC related definitions and prototypes.
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.
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
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.
25
$Octasic_Release: OCT612xAPI-01.00-PR49 $
27
$Octasic_Revision: 23 $
29
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
31
#ifndef __RPC_PROTOCOL_H__
32
#define __RPC_PROTOCOL_H__
34
/***************************** INCLUDE FILES *******************************/
37
/***************************** DEFINES *************************************/
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
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
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
62
#define cOCTRPC_OCT8304_INTERFACE 0x00000000
63
#define cOCTRPC_OCT6100_INTERFACE 0x00000001
66
#define cOCTRPC_SESSION_TIMEOUT 30
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
82
#define cOCTRPC_RDBGERR_FATAL 0xFFFFFFFF
85
/***************************** TYPES ***************************************/
87
typedef struct _OCTRPC_OGRDTP_HEADER_
89
UINT32 IN ulEndianDetect;
90
UINT32 IN ulDebugSessionNum;
91
UINT32 IN ulTransactionNum;
92
UINT32 IN ulPktRetryNum;
93
UINT32 IN ulPktByteSize;
95
UINT32 OUT ulParsingError;
96
UINT32 IN ulRpcProtocolNum;
98
} tOCTRPC_OGRDTP_HEADER, *tPOCTRPC_OGRDTP_HEADER;
100
typedef struct _OCTRPC_INTERFACE_HEADER_
102
UINT32 IN ulInterfaceType;
103
UINT32 IN ulInterfaceVersion;
105
} tOCTRPC_INTERFACE_HEADER, *tPOCTRPC_INTERFACE_HEADER;
107
typedef struct _OCTRPC_COMMAND_HEADER_
109
UINT32 IN ulCommandByteSize;
110
UINT32 IN OUT ulRpcCommandNum;
111
UINT32 OUT ulFunctionResult;
113
} tOCTRPC_COMMAND_HEADER, *tPOCTRPC_COMMAND_HEADER;
115
#endif /* __RPC_PROTOCOL_H__ */