]> git.saurik.com Git - apple/libinfo.git/blobdiff - nis.subproj/yp_prot.h
Libinfo-517.30.1.tar.gz
[apple/libinfo.git] / nis.subproj / yp_prot.h
index 1be2a2e11eb2ccd310369563c2f7a51d09253cf4..94c75886f155e906472df31f46f69d26f4215fd6 100644 (file)
@@ -1,28 +1,5 @@
 /*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
- * Reserved.  This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License").  You may not use this file
- * except in compliance with the License.  Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca>
+ * Copyright (c) 1992/3 Theo de Raadt <deraadt@fsa.ca>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by Theo de Raadt.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -50,6 +25,8 @@
  * 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.
+ *
+ * $FreeBSD: src/include/rpcsvc/yp_prot.h,v 1.13 2005/12/06 02:01:06 peter Exp $
  */
 
 #ifndef _RPCSVC_YP_PROT_H_
@@ -57,9 +34,9 @@
 
 /*
  * YPSERV PROTOCOL:
- * 
+ *
  * ypserv supports the following procedures:
- * 
+ *
  * YPPROC_NULL         takes (void), returns (void).
  *                     called to check if server is alive.
  * YPPROC_DOMAIN       takes (char *), returns (bool_t).
  * YPPROC_MAPLIST      takes (char *), returns (struct ypmaplist *).
  */
 
-#ifndef BOOL_DEFINED
-typedef u_int bool;
-#define BOOL_DEFINED
-#endif
-
-
 /* Program and version symbols, magic numbers */
+
 #define YPPROG         ((u_long)100004)
 #define YPVERS         ((u_long)2)
 #define YPVERS_ORIG    ((u_long)1)
@@ -114,35 +86,35 @@ typedef u_int bool;
 
 #ifndef DATUM
 typedef struct {
-       const char      *dptr;
-       int              dsize;
+       char    *dptr;
+       int     dsize;
 } datum;
 #define DATUM
 #endif
 
 struct ypmap_parms {
-       const char *domain;
-       const char *map;
-       u_long ordernum;
+       char *domain;
+       char *map;
+       u_int ordernum;
        char *owner;
 };
 
 struct ypreq_key {
-       const char *domain;
-       const char *map;
+       char *domain;
+       char *map;
        datum keydat;
 };
 
 struct ypreq_nokey {
-       const char *domain;
-       const char *map;
+       char *domain;
+       char *map;
 };
 
 struct ypreq_xfr {
        struct ypmap_parms map_parms;
-       u_long transid;
-       u_long proto;
-       u_short port;
+       u_int transid;
+       u_int proto;
+       u_int port;
 };
 #define ypxfr_domain   map_parms.domain
 #define ypxfr_map      map_parms.map
@@ -150,24 +122,24 @@ struct ypreq_xfr {
 #define ypxfr_owner    map_parms.owner
 
 struct ypresp_val {
-       u_long status;
+       u_int status;
        datum valdat;
 };
 
 struct ypresp_key_val {
-       u_long status;
+       u_int status;
        datum keydat;
        datum valdat;
 };
 
 struct ypresp_master {
-       u_long status;
+       u_int status;
        char *master;
 };
 
 struct ypresp_order {
-       u_long status;
-       u_long ordernum;
+       u_int status;
+       u_int ordernum;
 };
 
 struct ypresp_all {
@@ -178,12 +150,12 @@ struct ypresp_all {
 };
 
 struct ypmaplist {
-       char ypml_name[YPMAXMAP + 1];
+       char *ypml_name;
        struct ypmaplist *ypml_next;
 };
 
 struct ypresp_maplist {
-       u_long status;
+       u_int status;
        struct ypmaplist *list;
 };
 
@@ -220,7 +192,7 @@ struct ypresp_maplist {
  * Users of the ypclnt package (or of this protocol) don't HAVE to know about
  * it, but it must be available to users because _yp_dobind is a public
  * interface."
- * 
+ *
  * This is totally bogus! Nowhere else does Sun state that _yp_dobind() is
  * a public interface, and I don't know any reason anyone would want to call
  * it. But, just in case anyone does actually expect it to be available..
@@ -239,7 +211,7 @@ struct dom_binding {
 
 /*
  * YPBIND PROTOCOL:
- * 
+ *
  * ypbind supports the following procedures:
  *
  * YPBINDPROC_NULL     takes (void), returns (void).
@@ -250,7 +222,7 @@ struct dom_binding {
  * YPBINDPROC_SETDOM   takes (struct ypbind_setdom), returns (void).
  *                     used by ypset.
  */
+
 #define YPBINDPROG             ((u_long)100007)
 #define YPBINDVERS             ((u_long)2)
 #define YPBINDVERS_ORIG                ((u_long)1)
@@ -275,7 +247,7 @@ struct ypbind_binding {
 struct ypbind_resp {
        enum ypbind_resptype    ypbind_status;
        union {
-               u_long                  ypbind_error;
+               u_int                   ypbind_error;
                struct ypbind_binding   ypbind_bindinfo;
        } ypbind_respbody;
 };
@@ -291,22 +263,22 @@ struct ypbind_resp {
 struct ypbind_setdom {
        char ypsetdom_domain[YPMAXDOMAIN + 1];
        struct ypbind_binding ypsetdom_binding;
-       u_short ypsetdom_vers;
+       u_int ypsetdom_vers;
 };
 #define ypsetdom_addr ypsetdom_binding.ypbind_binding_addr
 #define ypsetdom_port ypsetdom_binding.ypbind_binding_port
 
 /*
  * YPPUSH PROTOCOL:
- * 
+ *
  * Sun says:
  * "Protocol between clients (ypxfr, only) and yppush
  *  yppush speaks a protocol in the transient range, which
  *  is supplied to ypxfr as a command-line parameter when it
  *  is activated by ypserv."
- * 
- * This protocol is not implimented, naturally, because this YP
- * implimentation only does the client side.
+ *
+ * This protocol is not implemented, naturally, because this YP
+ * implementation only does the client side.
  */
 #define YPPUSHVERS             ((u_long)1)
 #define YPPUSHVERS_ORIG                ((u_long)1)
@@ -316,8 +288,8 @@ struct ypbind_setdom {
 #define YPPUSHPROC_XFRRESP     ((u_long)1)
 
 struct yppushresp_xfr {
-       u_long  transid;
-       u_long  status;
+       u_int   transid;
+       u_int   status;
 };
 
 /* yppush status value in yppushresp_xfr.status */
@@ -325,7 +297,7 @@ struct yppushresp_xfr {
 #define YPPUSH_AGE     ((long)2)       /* Master's version not newer */
 #define YPPUSH_NOMAP   ((long)-1)      /* Can't find server for map */
 #define YPPUSH_NODOM   ((long)-2)      /* Domain not supported */
-#define YPPUSH_RSRC    ((long)-3)      /* Local resouce alloc failure */
+#define YPPUSH_RSRC    ((long)-3)      /* Local resource alloc failure */
 #define YPPUSH_RPC     ((long)-4)      /* RPC failure talking to server */
 #define YPPUSH_MADDR   ((long)-5)      /* Can't get master address */
 #define YPPUSH_YPERR   ((long)-6)      /* YP server/map db error */
@@ -354,7 +326,7 @@ bool_t xdr_ypresp_val __P((XDR *, struct ypresp_val *));
 bool_t xdr_ypbind_setdom __P((XDR *, struct ypbind_setdom *));
 bool_t xdr_ypresp_key_val __P((XDR *, struct ypresp_key_val *));
 bool_t xdr_ypresp_all __P((XDR *, struct ypresp_all *));
-bool_t xdr_ypresp_all_seq __P((XDR *, u_long *));
+bool_t xdr_ypresp_all_seq __P((XDR *, unsigned long *));
 bool_t xdr_ypresp_master __P((XDR *, struct ypresp_master *));
 bool_t xdr_ypmaplist_str __P((XDR *, char *));
 bool_t xdr_ypmaplist __P((XDR *, struct ypmaplist *));