source: rtems/cpukit/librpc/include/rpc/rpc_msg.h @ 0ab65474

4.104.114.84.95
Last change on this file since 0ab65474 was 4721cf1, checked in by Joel Sherrill <joel.sherrill@…>, on 12/03/98 at 23:54:14

Patch from Emmanuel Raguet <raguet@…> to add remote debug server
and RPC support to RTEMS. Thanks. :) Email follows:

Hello,

For Xmas, here is the Remote Debugger on RTEMS !

Here are 2 patches for the Remote Debugger on RTEMS for pc386 from Linux
host :

  • one for RTEMS it self,
  • one for GDB-4.17.

1/ RTEMS patch
--------------

This patch adds 2 libraries :

  • a simplified SUN RPC library
  • the Remote Debugger library

The configuration command is the following :
../rtems4/configure --target=i386-rtemself --enable-rtemsbsp=pc386
--enable-rdbg

The SUN RPC library is built only if networking is set.
The RDBG library is built if networking and enable-rdbg are set.

The function used to initialize the debugger is :

rtems_rdbg_initialize ();

A special function has been created to force a task to be
in a "debug" state : enterRdbg().
The use of this function is not mandatory.

2/ GDB-4.17 patch
-----------------

This patch create a new RTEMS target for GDB-4.17.

The configuration command is the following :
./configure --enable-shared --target=i386RTEMS

To connect to a target, use :

target rtems [your_site_address]

Then, attach the target using : attach 1

And... Debug ;)

You can obtain the original GDB-4.17 on
ftp://ftp.debian.org/debian/dists/stable/main/source/devel/gdb_4.17.orig.tar.gz

This has been tested from a Debian 2.0.1 linux host.

  • Property mode set to 100644
File size: 4.1 KB
Line 
1#ifndef RPC_MSG_H
2#define RPC_MSG_H
3
4/* @(#)rpc_msg.h        2.1 88/07/29 4.0 RPCSRC */
5/*
6 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
7 * unrestricted use provided that this legend is included on all tape
8 * media and as a part of the software program in whole or part.  Users
9 * may copy or modify Sun RPC without charge, but are not authorized
10 * to license or distribute it to anyone else except as part of a product or
11 * program developed by the user.
12 *
13 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
14 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
15 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
16 *
17 * Sun RPC is provided with no support and without any obligation on the
18 * part of Sun Microsystems, Inc. to assist in its use, correction,
19 * modification or enhancement.
20 *
21 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
22 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
23 * OR ANY PART THEREOF.
24 *
25 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
26 * or profits or other special, indirect and consequential damages, even if
27 * Sun has been advised of the possibility of such damages.
28 *
29 * Sun Microsystems, Inc.
30 * 2550 Garcia Avenue
31 * Mountain View, California  94043
32 */
33/*      @(#)rpc_msg.h 1.7 86/07/16 SMI      */
34
35/*
36 * rpc_msg.h
37 * rpc message definition
38 *
39 * Copyright (C) 1984, Sun Microsystems, Inc.
40 */
41
42#define RPC_MSG_VERSION         ((u_long) 2)
43#define RPC_SERVICE_PORT        ((u_short) 2048)
44
45/*
46 * Bottom up definition of an rpc message.
47 * NOTE: call and reply use the same overall stuct but
48 * different parts of unions within it.
49 */
50
51enum msg_type {
52        CALL=0,
53        REPLY=1
54};
55
56enum reply_stat {
57        MSG_ACCEPTED=0,
58        MSG_DENIED=1
59};
60
61enum accept_stat {
62        SUCCESS=0,
63        PROG_UNAVAIL=1,
64        PROG_MISMATCH=2,
65        PROC_UNAVAIL=3,
66        GARBAGE_ARGS=4,
67        SYSTEM_ERR=5
68};
69
70enum reject_stat {
71        RPC_MISMATCH=0,
72        AUTH_ERROR=1
73};
74
75/*
76 * Reply part of an rpc exchange
77 */
78
79/*
80 * Reply to an rpc request that was accepted by the server.
81 * Note: there could be an error even though the request was
82 * accepted.
83 */
84struct accepted_reply {
85        struct opaque_auth      ar_verf;
86        enum accept_stat        ar_stat;
87        union {
88                struct {
89                        u_long  low;
90                        u_long  high;
91                } AR_versions;
92                struct {
93                        caddr_t where;
94                        xdrproc_t proc;
95                } AR_results;
96                /* and many other null cases */
97        } ru;
98#define ar_results      ru.AR_results
99#define ar_vers         ru.AR_versions
100};
101
102/*
103 * Reply to an rpc request that was rejected by the server.
104 */
105struct rejected_reply {
106        enum reject_stat rj_stat;
107        union {
108                struct {
109                        u_long low;
110                        u_long high;
111                } RJ_versions;
112                enum auth_stat RJ_why;  /* why authentication did not work */
113        } ru;
114#define rj_vers ru.RJ_versions
115#define rj_why  ru.RJ_why
116};
117
118/*
119 * Body of a reply to an rpc request.
120 */
121struct reply_body {
122        enum reply_stat rp_stat;
123        union {
124                struct accepted_reply RP_ar;
125                struct rejected_reply RP_dr;
126        } ru;
127#define rp_acpt ru.RP_ar
128#define rp_rjct ru.RP_dr
129};
130
131/*
132 * Body of an rpc request call.
133 */
134struct call_body {
135        u_long cb_rpcvers;      /* must be equal to two */
136        u_long cb_prog;
137        u_long cb_vers;
138        u_long cb_proc;
139        struct opaque_auth cb_cred;
140        struct opaque_auth cb_verf; /* protocol specific - provided by client */
141};
142
143/*
144 * The rpc message
145 */
146struct rpc_msg {
147        u_long                  rm_xid;
148        enum msg_type           rm_direction;
149        union {
150                struct call_body RM_cmb;
151                struct reply_body RM_rmb;
152        } ru;
153#define rm_call         ru.RM_cmb
154#define rm_reply        ru.RM_rmb
155};
156#define acpted_rply     ru.RM_rmb.ru.RP_ar
157#define rjcted_rply     ru.RM_rmb.ru.RP_dr
158
159
160/*
161 * XDR routine to handle a rpc message.
162 * xdr_callmsg(xdrs, cmsg)
163 *      XDR *xdrs;
164 *      struct rpc_msg *cmsg;
165 */
166extern bool_t   xdr_callmsg();
167
168/*
169 * XDR routine to pre-serialize the static part of a rpc message.
170 * xdr_callhdr(xdrs, cmsg)
171 *      XDR *xdrs;
172 *      struct rpc_msg *cmsg;
173 */
174extern bool_t   xdr_callhdr();
175
176/*
177 * XDR routine to handle a rpc reply.
178 * xdr_replymsg(xdrs, rmsg)
179 *      XDR *xdrs;
180 *      struct rpc_msg *rmsg;
181 */
182extern bool_t   xdr_replymsg();
183
184/*
185 * Fills in the error part of a reply message.
186 * _seterr_reply(msg, error)
187 *      struct rpc_msg *msg;
188 *      struct rpc_err *error;
189 */
190extern void     _seterr_reply();
191
192#endif /* RPC_MSG_H */
Note: See TracBrowser for help on using the repository browser.