]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sunrpc/rpc/svc.h
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / sunrpc / rpc / svc.h
index d740f189a2d87e07b23fa9a50717f463e5e5fcab..b7c17cf337a96f38f1b6f4062088a764b2edd28a 100644 (file)
@@ -1,36 +1,51 @@
 /*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part.  Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
+ * svc.h, Server-side remote procedure call interface.
  *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * Copyright (C) 2012-2019 Free Software Foundation, Inc.
+ * This file is part of the GNU C Library.
  *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
+ * The GNU C Library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
+ * The GNU C Library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the GNU C Library; if not, see
+ * <https://www.gnu.org/licenses/>.
  *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California  94043
- */
-
-/*
- * svc.h, Server-side remote procedure call interface.
+ * Copyright (c) 2010, Oracle America, Inc.
  *
- * Copyright (C) 1984, Sun Microsystems, Inc.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ *       copyright notice, this list of conditions and the following
+ *       disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ *     * Neither the name of the "Oracle America, Inc." nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifndef _RPC_SVC_H
@@ -82,11 +97,11 @@ struct SVCXPRT {
     enum xprt_stat (*xp_stat) (SVCXPRT *__xprt);
                                /* get transport status */
     bool_t     (*xp_getargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args,
-                              caddr_t args_ptr); /* get arguments */
+                              caddr_t __args_ptr); /* get arguments */
     bool_t     (*xp_reply) (SVCXPRT *__xprt, struct rpc_msg *__msg);
                                /* send reply */
     bool_t     (*xp_freeargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args,
-                               caddr_t args_ptr);
+                               caddr_t __args_ptr);
                                /* free mem allocated for args */
     void       (*xp_destroy) (SVCXPRT *__xprt);
                                /* destroy this struct */
@@ -96,6 +111,7 @@ struct SVCXPRT {
   struct opaque_auth xp_verf;   /* raw response verifier */
   caddr_t              xp_p1;           /* private */
   caddr_t              xp_p2;           /* private */
+  char         xp_pad [256];   /* padding, internal use */
 };
 
 /*
@@ -166,7 +182,7 @@ typedef void (*__dispatch_fn_t) (struct svc_req*, SVCXPRT*);
  *     SVCXPRT *xprt;
  *     rpcprog_t prog;
  *     rpcvers_t vers;
- *     void (*dispatch)();
+ *     void (*dispatch)(struct svc_req*, SVCXPRT*);
  *     rpcprot_t protocol;  like TCP or UDP, zero means do not register
  */
 extern bool_t svc_register (SVCXPRT *__xprt, rpcprog_t __prog,
@@ -225,7 +241,7 @@ extern void xprt_unregister (SVCXPRT *__xprt) __THROW;
  * deadlock the caller and server processes!
  */
 
-extern bool_t  svc_sendreply (SVCXPRT *xprt, xdrproc_t __xdr_results,
+extern bool_t  svc_sendreply (SVCXPRT *__xprt, xdrproc_t __xdr_results,
                               caddr_t __xdr_location) __THROW;
 
 extern void    svcerr_decode (SVCXPRT *__xprt) __THROW;
@@ -302,6 +318,11 @@ extern SVCXPRT *svcudp_bufcreate (int __sock, u_int __sendsz, u_int __recvsz)
 extern SVCXPRT *svctcp_create (int __sock, u_int __sendsize, u_int __recvsize)
      __THROW;
 
+/*
+ * FD based rpc.
+ */
+extern SVCXPRT *svcfd_create (int __sock, u_int __sendsize, u_int __recvsize)
+     __THROW;
 
 /*
  * Unix based rpc.