mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
Misc. fixes.
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
/* $NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $ */
|
||||||
|
/* $FreeBSD: src/include/rpc/rpc_com.h,v 1.6 2003/01/16 07:13:51 mbr Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||||
* unrestricted use provided that this legend is included on all tape
|
* unrestricted use provided that this legend is included on all tape
|
||||||
@@ -30,6 +33,10 @@
|
|||||||
* Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
|
* Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rpc_com.h, Common definitions for both the server and client side.
|
* rpc_com.h, Common definitions for both the server and client side.
|
||||||
* All for the topmost layer of rpc
|
* All for the topmost layer of rpc
|
||||||
@@ -39,17 +46,10 @@
|
|||||||
#ifndef _RPC_RPCCOM_H
|
#ifndef _RPC_RPCCOM_H
|
||||||
#define _RPC_RPCCOM_H
|
#define _RPC_RPCCOM_H
|
||||||
|
|
||||||
/* From: #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* File descriptor to be used on xxx_create calls to get default descriptor
|
|
||||||
*/
|
|
||||||
#define RPC_ANYSOCK -1
|
|
||||||
#define RPC_ANYFD RPC_ANYSOCK
|
|
||||||
/*
|
/*
|
||||||
* The max size of the transport, if the size cannot be determined
|
* The max size of the transport, if the size cannot be determined
|
||||||
* by other means.
|
* by other means.
|
||||||
@@ -57,22 +57,12 @@ extern "C" {
|
|||||||
#define RPC_MAXDATASIZE 9000
|
#define RPC_MAXDATASIZE 9000
|
||||||
#define RPC_MAXADDRSIZE 1024
|
#define RPC_MAXADDRSIZE 1024
|
||||||
|
|
||||||
#if defined(__STDC__) || defined(__cplusplus)
|
__BEGIN_DECLS
|
||||||
extern u_int __rpc_get_t_size (int, long);
|
extern u_int __rpc_get_a_size(int);
|
||||||
extern u_int __rpc_get_a_size (long);
|
extern u_int __rpc_get_t_size(int, long);
|
||||||
extern int __rpc_dtbsize (void);
|
extern int __rpc_dtbsize(void);
|
||||||
extern int _rpc_dtablesize (void);
|
extern int _rpc_dtablesize(void);
|
||||||
extern int _rpc_get_default_domain(char **);
|
extern int _rpc_get_default_domain(char **);
|
||||||
#else
|
__END_DECLS
|
||||||
extern u_int __rpc_get_t_size ();
|
|
||||||
extern u_int __rpc_get_a_size ();
|
|
||||||
extern int __rpc_dtbsize ();
|
|
||||||
extern int _rpc_dtablesize ();
|
|
||||||
extern int _rpc_get_default_domain();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _RPC_RPCCOM_H */
|
#endif /* _RPC_RPCCOM_H */
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* from: @(#)rpc_msg.h 1.7 86/07/16 SMI
|
* from: @(#)rpc_msg.h 1.7 86/07/16 SMI
|
||||||
* from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC
|
* from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC
|
||||||
* $FreeBSD: src/include/rpc/rpc_msg.h,v 1.12 1999/08/27 23:45:05 peter Exp $
|
* $FreeBSD: src/include/rpc/rpc_msg.h,v 1.15 2003/01/01 18:48:42 schweikh Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -38,10 +38,14 @@
|
|||||||
* Copyright (C) 1984, Sun Microsystems, Inc.
|
* Copyright (C) 1984, Sun Microsystems, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _RPC_RPCMSG_H
|
/*
|
||||||
#define _RPC_RPCMSG_H
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
#define RPC_MSG_VERSION ((u_long) 2)
|
#ifndef _RPC_RPC_MSG_H
|
||||||
|
#define _RPC_RPC_MSG_H
|
||||||
|
|
||||||
|
#define RPC_MSG_VERSION ((u_int32_t) 2)
|
||||||
#define RPC_SERVICE_PORT ((u_short) 2048)
|
#define RPC_SERVICE_PORT ((u_short) 2048)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -165,7 +169,7 @@ __BEGIN_DECLS
|
|||||||
* XDR *xdrs;
|
* XDR *xdrs;
|
||||||
* struct rpc_msg *cmsg;
|
* struct rpc_msg *cmsg;
|
||||||
*/
|
*/
|
||||||
extern bool_t xdr_callmsg __P((XDR *, struct rpc_msg *));
|
extern bool_t xdr_callmsg(XDR *, struct rpc_msg *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XDR routine to pre-serialize the static part of a rpc message.
|
* XDR routine to pre-serialize the static part of a rpc message.
|
||||||
@@ -173,7 +177,7 @@ extern bool_t xdr_callmsg __P((XDR *, struct rpc_msg *));
|
|||||||
* XDR *xdrs;
|
* XDR *xdrs;
|
||||||
* struct rpc_msg *cmsg;
|
* struct rpc_msg *cmsg;
|
||||||
*/
|
*/
|
||||||
extern bool_t xdr_callhdr __P((XDR *, struct rpc_msg *));
|
extern bool_t xdr_callhdr(XDR *, struct rpc_msg *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XDR routine to handle a rpc reply.
|
* XDR routine to handle a rpc reply.
|
||||||
@@ -189,8 +193,7 @@ extern bool_t xdr_replymsg __P((XDR *, struct rpc_msg *));
|
|||||||
* struct rpc_msg *msg;
|
* struct rpc_msg *msg;
|
||||||
* struct rpc_err *error;
|
* struct rpc_err *error;
|
||||||
*/
|
*/
|
||||||
struct rpc_err;
|
extern void _seterr_reply(struct rpc_msg *, struct rpc_err *);
|
||||||
extern void _seterr_reply __P((struct rpc_msg *, struct rpc_err *));
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* !_RPC_RPCMSG_H */
|
#endif /* !_RPC_RPC_MSG_H */
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ static char *rcsid = "$FreeBSD: src/lib/libc/rpc/svc_simple.c,v 1.9 1999/08/28 0
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <rpc/rpc.h>
|
#include <rpc/rpc.h>
|
||||||
#include <rpc/pmap_clnt.h>
|
#include <rpc/pmap_clnt.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
@@ -50,8 +51,8 @@ static char *rcsid = "$FreeBSD: src/lib/libc/rpc/svc_simple.c,v 1.9 1999/08/28 0
|
|||||||
|
|
||||||
struct prog_lst {
|
struct prog_lst {
|
||||||
char *(*p_progname)();
|
char *(*p_progname)();
|
||||||
int p_prognum;
|
rpcprog_t p_prognum;
|
||||||
int p_procnum;
|
rpcproc_t p_procnum;
|
||||||
xdrproc_t p_inproc, p_outproc;
|
xdrproc_t p_inproc, p_outproc;
|
||||||
struct prog_lst *p_nxt;
|
struct prog_lst *p_nxt;
|
||||||
};
|
};
|
||||||
@@ -72,7 +73,7 @@ registerrpc(
|
|||||||
|
|
||||||
if (procnum == NULLPROC) {
|
if (procnum == NULLPROC) {
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"can't reassign procedure number %ld\n", NULLPROC);
|
"can't reassign procedure number %" PRIu32 "\n", NULLPROC);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
if (transp == 0) {
|
if (transp == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user