Cosmetical update from FreeBSD.

This commit is contained in:
Ralf Corsepius
2005-05-10 08:56:01 +00:00
parent eb0901a482
commit 94c76bc730

View File

@@ -26,15 +26,15 @@
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
* *
* from: @(#)svc.h 1.20 88/02/08 SMI * from: @(#)svc.h 1.35 88/12/17 SMI
* from: @(#)svc.h 2.2 88/07/29 4.0 RPCSRC * from: @(#)svc.h 1.27 94/04/25 SMI
* $FreeBSD: src/include/rpc/svc.h,v 1.16 1999/12/29 05:00:43 peter Exp $ * $FreeBSD: src/include/rpc/svc.h,v 1.24 2003/06/15 10:32:01 mbr Exp $
*/ */
/* /*
* svc.h, Server-side remote procedure call interface. * svc.h, Server-side remote procedure call interface.
* *
* Copyright (C) 1984, Sun Microsystems, Inc. * Copyright (C) 1986-1993 by Sun Microsystems, Inc.
*/ */
#ifndef _RPC_SVC_H #ifndef _RPC_SVC_H
@@ -79,16 +79,14 @@ typedef struct __rpc_svcxprt {
u_short xp_port; /* associated port number */ u_short xp_port; /* associated port number */
struct xp_ops { struct xp_ops {
/* receive incoming requests */ /* receive incoming requests */
bool_t (*xp_recv) (struct __rpc_svcxprt *, bool_t (*xp_recv)(struct __rpc_svcxprt *, struct rpc_msg *);
struct rpc_msg *);
/* get transport status */ /* get transport status */
enum xprt_stat (*xp_stat)(struct __rpc_svcxprt *); enum xprt_stat (*xp_stat)(struct __rpc_svcxprt *);
/* get arguments */ /* get arguments */
bool_t (*xp_getargs)(struct __rpc_svcxprt *, xdrproc_t, bool_t (*xp_getargs)(struct __rpc_svcxprt *, xdrproc_t,
caddr_t); caddr_t);
/* send reply */ /* send reply */
bool_t (*xp_reply) (struct __rpc_svcxprt *, bool_t (*xp_reply)(struct __rpc_svcxprt *, struct rpc_msg *);
struct rpc_msg *);
/* free mem allocated for args */ /* free mem allocated for args */
bool_t (*xp_freeargs)(struct __rpc_svcxprt *, xdrproc_t, bool_t (*xp_freeargs)(struct __rpc_svcxprt *, xdrproc_t,
caddr_t); caddr_t);
@@ -96,12 +94,25 @@ typedef struct __rpc_svcxprt {
void (*xp_destroy)(struct __rpc_svcxprt *); void (*xp_destroy)(struct __rpc_svcxprt *);
} *xp_ops; } *xp_ops;
int xp_addrlen; /* length of remote address */ int xp_addrlen; /* length of remote address */
struct sockaddr_in xp_raddr; /* remote address */ struct sockaddr_in xp_raddr; /* remote addr. (backward ABI compat) */
struct opaque_auth xp_verf; /* raw response verifier */ struct opaque_auth xp_verf; /* raw response verifier */
caddr_t xp_p1; /* private */ caddr_t xp_p1; /* private */
caddr_t xp_p2; /* private */ caddr_t xp_p2; /* private */
} SVCXPRT; } SVCXPRT;
/*
* Service request
*/
struct svc_req {
u_int32_t rq_prog; /* service program number */
u_int32_t rq_vers; /* service protocol version */
u_int32_t rq_proc; /* the desired procedure */
struct opaque_auth rq_cred; /* raw creds from the wire */
caddr_t rq_clntcred; /* read only cooked cred */
SVCXPRT *rq_xprt; /* associated transport */
};
/* /*
* Approved way of getting address of caller * Approved way of getting address of caller
*/ */
@@ -146,19 +157,6 @@ typedef struct __rpc_svcxprt {
(*(xprt)->xp_ops->xp_destroy)(xprt) (*(xprt)->xp_ops->xp_destroy)(xprt)
/*
* Service request
*/
struct svc_req {
u_int32_t rq_prog; /* service program number */
u_int32_t rq_vers; /* service protocol version */
u_int32_t rq_proc; /* the desired procedure */
struct opaque_auth rq_cred; /* raw creds from the wire */
caddr_t rq_clntcred; /* read only cooked cred */
SVCXPRT *rq_xprt; /* associated transport */
};
/* /*
* Service registration * Service registration
* *
@@ -269,7 +267,9 @@ extern fd_set svc_fdset;
* a small program implemented by the svc_rpc implementation itself; * a small program implemented by the svc_rpc implementation itself;
* also see clnt.h for protocol numbers. * also see clnt.h for protocol numbers.
*/ */
extern void rpctest_service(); __BEGIN_DECLS
extern void rpctest_service(void);
__END_DECLS
#endif #endif
__BEGIN_DECLS __BEGIN_DECLS
@@ -283,6 +283,7 @@ __END_DECLS
* Socket to use on svcxxx_create call to get default socket * Socket to use on svcxxx_create call to get default socket
*/ */
#define RPC_ANYSOCK -1 #define RPC_ANYSOCK -1
#define RPC_ANYFD RPC_ANYSOCK
/* /*
* These are the existing service side transport implementations * These are the existing service side transport implementations