openbox lab initialized
This commit is contained in:
23
openflow/usr/include/rpcsvc/bootparam.h
Normal file
23
openflow/usr/include/rpcsvc/bootparam.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/* Copyright (C) 1999-2016 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _RPCSVC_BOOTPARAM_H
|
||||
#define _RPCSVC_BOOTPARAM_H
|
||||
|
||||
#include <rpcsvc/bootparam_prot.h>
|
||||
|
||||
#endif /* _RPCSVC_BOOTPARAM_H */
|
||||
124
openflow/usr/include/rpcsvc/bootparam_prot.h
Normal file
124
openflow/usr/include/rpcsvc/bootparam_prot.h
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _BOOTPARAM_PROT_H_RPCGEN
|
||||
#define _BOOTPARAM_PROT_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rpc/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/errno.h>
|
||||
#include <nfs/nfs.h>
|
||||
#define MAX_MACHINE_NAME 255
|
||||
#define MAX_PATH_LEN 1024
|
||||
#define MAX_FILEID 32
|
||||
#define IP_ADDR_TYPE 1
|
||||
|
||||
typedef char *bp_machine_name_t;
|
||||
|
||||
typedef char *bp_path_t;
|
||||
|
||||
typedef char *bp_fileid_t;
|
||||
|
||||
struct ip_addr_t {
|
||||
char net;
|
||||
char host;
|
||||
char lh;
|
||||
char impno;
|
||||
};
|
||||
typedef struct ip_addr_t ip_addr_t;
|
||||
|
||||
struct bp_address {
|
||||
int address_type;
|
||||
union {
|
||||
ip_addr_t ip_addr;
|
||||
} bp_address_u;
|
||||
};
|
||||
typedef struct bp_address bp_address;
|
||||
|
||||
struct bp_whoami_arg {
|
||||
bp_address client_address;
|
||||
};
|
||||
typedef struct bp_whoami_arg bp_whoami_arg;
|
||||
|
||||
struct bp_whoami_res {
|
||||
bp_machine_name_t client_name;
|
||||
bp_machine_name_t domain_name;
|
||||
bp_address router_address;
|
||||
};
|
||||
typedef struct bp_whoami_res bp_whoami_res;
|
||||
|
||||
struct bp_getfile_arg {
|
||||
bp_machine_name_t client_name;
|
||||
bp_fileid_t file_id;
|
||||
};
|
||||
typedef struct bp_getfile_arg bp_getfile_arg;
|
||||
|
||||
struct bp_getfile_res {
|
||||
bp_machine_name_t server_name;
|
||||
bp_address server_address;
|
||||
bp_path_t server_path;
|
||||
};
|
||||
typedef struct bp_getfile_res bp_getfile_res;
|
||||
|
||||
#define BOOTPARAMPROG 100026
|
||||
#define BOOTPARAMVERS 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define BOOTPARAMPROC_WHOAMI 1
|
||||
extern bp_whoami_res * bootparamproc_whoami_1(bp_whoami_arg *, CLIENT *);
|
||||
extern bp_whoami_res * bootparamproc_whoami_1_svc(bp_whoami_arg *, struct svc_req *);
|
||||
#define BOOTPARAMPROC_GETFILE 2
|
||||
extern bp_getfile_res * bootparamproc_getfile_1(bp_getfile_arg *, CLIENT *);
|
||||
extern bp_getfile_res * bootparamproc_getfile_1_svc(bp_getfile_arg *, struct svc_req *);
|
||||
extern int bootparamprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define BOOTPARAMPROC_WHOAMI 1
|
||||
extern bp_whoami_res * bootparamproc_whoami_1();
|
||||
extern bp_whoami_res * bootparamproc_whoami_1_svc();
|
||||
#define BOOTPARAMPROC_GETFILE 2
|
||||
extern bp_getfile_res * bootparamproc_getfile_1();
|
||||
extern bp_getfile_res * bootparamproc_getfile_1_svc();
|
||||
extern int bootparamprog_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_bp_machine_name_t (XDR *, bp_machine_name_t*);
|
||||
extern bool_t xdr_bp_path_t (XDR *, bp_path_t*);
|
||||
extern bool_t xdr_bp_fileid_t (XDR *, bp_fileid_t*);
|
||||
extern bool_t xdr_ip_addr_t (XDR *, ip_addr_t*);
|
||||
extern bool_t xdr_bp_address (XDR *, bp_address*);
|
||||
extern bool_t xdr_bp_whoami_arg (XDR *, bp_whoami_arg*);
|
||||
extern bool_t xdr_bp_whoami_res (XDR *, bp_whoami_res*);
|
||||
extern bool_t xdr_bp_getfile_arg (XDR *, bp_getfile_arg*);
|
||||
extern bool_t xdr_bp_getfile_res (XDR *, bp_getfile_res*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_bp_machine_name_t ();
|
||||
extern bool_t xdr_bp_path_t ();
|
||||
extern bool_t xdr_bp_fileid_t ();
|
||||
extern bool_t xdr_ip_addr_t ();
|
||||
extern bool_t xdr_bp_address ();
|
||||
extern bool_t xdr_bp_whoami_arg ();
|
||||
extern bool_t xdr_bp_whoami_res ();
|
||||
extern bool_t xdr_bp_getfile_arg ();
|
||||
extern bool_t xdr_bp_getfile_res ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_BOOTPARAM_PROT_H_RPCGEN */
|
||||
97
openflow/usr/include/rpcsvc/bootparam_prot.x
Normal file
97
openflow/usr/include/rpcsvc/bootparam_prot.x
Normal file
@@ -0,0 +1,97 @@
|
||||
/* @(#)bootparam_prot.x 2.1 88/08/01 4.0 RPCSRC */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* RPC for bootparms service.
|
||||
* There are two procedures:
|
||||
* WHOAMI takes a net address and returns a client name and also a
|
||||
* likely net address for routing
|
||||
* GETFILE takes a client name and file identifier and returns the
|
||||
* server name, server net address and pathname for the file.
|
||||
* file identifiers typically include root, swap, pub and dump
|
||||
*/
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%#include <rpc/types.h>
|
||||
%#include <sys/time.h>
|
||||
%#include <sys/errno.h>
|
||||
%#include <nfs/nfs.h>
|
||||
#endif
|
||||
|
||||
const MAX_MACHINE_NAME = 255;
|
||||
const MAX_PATH_LEN = 1024;
|
||||
const MAX_FILEID = 32;
|
||||
const IP_ADDR_TYPE = 1;
|
||||
|
||||
typedef string bp_machine_name_t<MAX_MACHINE_NAME>;
|
||||
typedef string bp_path_t<MAX_PATH_LEN>;
|
||||
typedef string bp_fileid_t<MAX_FILEID>;
|
||||
|
||||
struct ip_addr_t {
|
||||
char net;
|
||||
char host;
|
||||
char lh;
|
||||
char impno;
|
||||
};
|
||||
|
||||
union bp_address switch (int address_type) {
|
||||
case IP_ADDR_TYPE:
|
||||
ip_addr_t ip_addr;
|
||||
};
|
||||
|
||||
struct bp_whoami_arg {
|
||||
bp_address client_address;
|
||||
};
|
||||
|
||||
struct bp_whoami_res {
|
||||
bp_machine_name_t client_name;
|
||||
bp_machine_name_t domain_name;
|
||||
bp_address router_address;
|
||||
};
|
||||
|
||||
struct bp_getfile_arg {
|
||||
bp_machine_name_t client_name;
|
||||
bp_fileid_t file_id;
|
||||
};
|
||||
|
||||
struct bp_getfile_res {
|
||||
bp_machine_name_t server_name;
|
||||
bp_address server_address;
|
||||
bp_path_t server_path;
|
||||
};
|
||||
|
||||
program BOOTPARAMPROG {
|
||||
version BOOTPARAMVERS {
|
||||
bp_whoami_res BOOTPARAMPROC_WHOAMI(bp_whoami_arg) = 1;
|
||||
bp_getfile_res BOOTPARAMPROC_GETFILE(bp_getfile_arg) = 2;
|
||||
} = 1;
|
||||
} = 100026;
|
||||
236
openflow/usr/include/rpcsvc/key_prot.h
Normal file
236
openflow/usr/include/rpcsvc/key_prot.h
Normal file
@@ -0,0 +1,236 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _KEY_PROT_H_RPCGEN
|
||||
#define _KEY_PROT_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#pragma ident "@(#)key_prot.x 1.7 94/04/29 SMI"
|
||||
#endif
|
||||
|
||||
/* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */
|
||||
|
||||
/*
|
||||
* Compiled from key_prot.x using rpcgen.
|
||||
* DO NOT EDIT THIS FILE!
|
||||
* This is NOT source code!
|
||||
*/
|
||||
#define PROOT 3
|
||||
#define HEXMODULUS "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b"
|
||||
#define HEXKEYBYTES 48
|
||||
#define KEYSIZE 192
|
||||
#define KEYBYTES 24
|
||||
#define KEYCHECKSUMSIZE 16
|
||||
|
||||
enum keystatus {
|
||||
KEY_SUCCESS = 0,
|
||||
KEY_NOSECRET = 1,
|
||||
KEY_UNKNOWN = 2,
|
||||
KEY_SYSTEMERR = 3,
|
||||
};
|
||||
typedef enum keystatus keystatus;
|
||||
|
||||
typedef char keybuf[HEXKEYBYTES];
|
||||
|
||||
typedef char *netnamestr;
|
||||
|
||||
struct cryptkeyarg {
|
||||
netnamestr remotename;
|
||||
des_block deskey;
|
||||
};
|
||||
typedef struct cryptkeyarg cryptkeyarg;
|
||||
|
||||
struct cryptkeyarg2 {
|
||||
netnamestr remotename;
|
||||
netobj remotekey;
|
||||
des_block deskey;
|
||||
};
|
||||
typedef struct cryptkeyarg2 cryptkeyarg2;
|
||||
|
||||
struct cryptkeyres {
|
||||
keystatus status;
|
||||
union {
|
||||
des_block deskey;
|
||||
} cryptkeyres_u;
|
||||
};
|
||||
typedef struct cryptkeyres cryptkeyres;
|
||||
#define MAXGIDS 16
|
||||
|
||||
struct unixcred {
|
||||
u_int uid;
|
||||
u_int gid;
|
||||
struct {
|
||||
u_int gids_len;
|
||||
u_int *gids_val;
|
||||
} gids;
|
||||
};
|
||||
typedef struct unixcred unixcred;
|
||||
|
||||
struct getcredres {
|
||||
keystatus status;
|
||||
union {
|
||||
unixcred cred;
|
||||
} getcredres_u;
|
||||
};
|
||||
typedef struct getcredres getcredres;
|
||||
|
||||
struct key_netstarg {
|
||||
keybuf st_priv_key;
|
||||
keybuf st_pub_key;
|
||||
netnamestr st_netname;
|
||||
};
|
||||
typedef struct key_netstarg key_netstarg;
|
||||
|
||||
struct key_netstres {
|
||||
keystatus status;
|
||||
union {
|
||||
key_netstarg knet;
|
||||
} key_netstres_u;
|
||||
};
|
||||
typedef struct key_netstres key_netstres;
|
||||
|
||||
#ifndef opaque
|
||||
#define opaque char
|
||||
#endif
|
||||
|
||||
|
||||
#define KEY_PROG 100029
|
||||
#define KEY_VERS 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define KEY_SET 1
|
||||
extern keystatus * key_set_1(char *, CLIENT *);
|
||||
extern keystatus * key_set_1_svc(char *, struct svc_req *);
|
||||
#define KEY_ENCRYPT 2
|
||||
extern cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *);
|
||||
extern cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *);
|
||||
#define KEY_DECRYPT 3
|
||||
extern cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *);
|
||||
extern cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *);
|
||||
#define KEY_GEN 4
|
||||
extern des_block * key_gen_1(void *, CLIENT *);
|
||||
extern des_block * key_gen_1_svc(void *, struct svc_req *);
|
||||
#define KEY_GETCRED 5
|
||||
extern getcredres * key_getcred_1(netnamestr *, CLIENT *);
|
||||
extern getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *);
|
||||
extern int key_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define KEY_SET 1
|
||||
extern keystatus * key_set_1();
|
||||
extern keystatus * key_set_1_svc();
|
||||
#define KEY_ENCRYPT 2
|
||||
extern cryptkeyres * key_encrypt_1();
|
||||
extern cryptkeyres * key_encrypt_1_svc();
|
||||
#define KEY_DECRYPT 3
|
||||
extern cryptkeyres * key_decrypt_1();
|
||||
extern cryptkeyres * key_decrypt_1_svc();
|
||||
#define KEY_GEN 4
|
||||
extern des_block * key_gen_1();
|
||||
extern des_block * key_gen_1_svc();
|
||||
#define KEY_GETCRED 5
|
||||
extern getcredres * key_getcred_1();
|
||||
extern getcredres * key_getcred_1_svc();
|
||||
extern int key_prog_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
#define KEY_VERS2 2
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern keystatus * key_set_2(char *, CLIENT *);
|
||||
extern keystatus * key_set_2_svc(char *, struct svc_req *);
|
||||
extern cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *);
|
||||
extern cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *);
|
||||
extern cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *);
|
||||
extern cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *);
|
||||
extern des_block * key_gen_2(void *, CLIENT *);
|
||||
extern des_block * key_gen_2_svc(void *, struct svc_req *);
|
||||
extern getcredres * key_getcred_2(netnamestr *, CLIENT *);
|
||||
extern getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *);
|
||||
#define KEY_ENCRYPT_PK 6
|
||||
extern cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *);
|
||||
extern cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *);
|
||||
#define KEY_DECRYPT_PK 7
|
||||
extern cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *);
|
||||
extern cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *);
|
||||
#define KEY_NET_PUT 8
|
||||
extern keystatus * key_net_put_2(key_netstarg *, CLIENT *);
|
||||
extern keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *);
|
||||
#define KEY_NET_GET 9
|
||||
extern key_netstres * key_net_get_2(void *, CLIENT *);
|
||||
extern key_netstres * key_net_get_2_svc(void *, struct svc_req *);
|
||||
#define KEY_GET_CONV 10
|
||||
extern cryptkeyres * key_get_conv_2(char *, CLIENT *);
|
||||
extern cryptkeyres * key_get_conv_2_svc(char *, struct svc_req *);
|
||||
extern int key_prog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
extern keystatus * key_set_2();
|
||||
extern keystatus * key_set_2_svc();
|
||||
extern cryptkeyres * key_encrypt_2();
|
||||
extern cryptkeyres * key_encrypt_2_svc();
|
||||
extern cryptkeyres * key_decrypt_2();
|
||||
extern cryptkeyres * key_decrypt_2_svc();
|
||||
extern des_block * key_gen_2();
|
||||
extern des_block * key_gen_2_svc();
|
||||
extern getcredres * key_getcred_2();
|
||||
extern getcredres * key_getcred_2_svc();
|
||||
#define KEY_ENCRYPT_PK 6
|
||||
extern cryptkeyres * key_encrypt_pk_2();
|
||||
extern cryptkeyres * key_encrypt_pk_2_svc();
|
||||
#define KEY_DECRYPT_PK 7
|
||||
extern cryptkeyres * key_decrypt_pk_2();
|
||||
extern cryptkeyres * key_decrypt_pk_2_svc();
|
||||
#define KEY_NET_PUT 8
|
||||
extern keystatus * key_net_put_2();
|
||||
extern keystatus * key_net_put_2_svc();
|
||||
#define KEY_NET_GET 9
|
||||
extern key_netstres * key_net_get_2();
|
||||
extern key_netstres * key_net_get_2_svc();
|
||||
#define KEY_GET_CONV 10
|
||||
extern cryptkeyres * key_get_conv_2();
|
||||
extern cryptkeyres * key_get_conv_2_svc();
|
||||
extern int key_prog_2_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_keystatus (XDR *, keystatus*);
|
||||
extern bool_t xdr_keybuf (XDR *, keybuf);
|
||||
extern bool_t xdr_netnamestr (XDR *, netnamestr*);
|
||||
extern bool_t xdr_cryptkeyarg (XDR *, cryptkeyarg*);
|
||||
extern bool_t xdr_cryptkeyarg2 (XDR *, cryptkeyarg2*);
|
||||
extern bool_t xdr_cryptkeyres (XDR *, cryptkeyres*);
|
||||
extern bool_t xdr_unixcred (XDR *, unixcred*);
|
||||
extern bool_t xdr_getcredres (XDR *, getcredres*);
|
||||
extern bool_t xdr_key_netstarg (XDR *, key_netstarg*);
|
||||
extern bool_t xdr_key_netstres (XDR *, key_netstres*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_keystatus ();
|
||||
extern bool_t xdr_keybuf ();
|
||||
extern bool_t xdr_netnamestr ();
|
||||
extern bool_t xdr_cryptkeyarg ();
|
||||
extern bool_t xdr_cryptkeyarg2 ();
|
||||
extern bool_t xdr_cryptkeyres ();
|
||||
extern bool_t xdr_unixcred ();
|
||||
extern bool_t xdr_getcredres ();
|
||||
extern bool_t xdr_key_netstarg ();
|
||||
extern bool_t xdr_key_netstres ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_KEY_PROT_H_RPCGEN */
|
||||
283
openflow/usr/include/rpcsvc/key_prot.x
Normal file
283
openflow/usr/include/rpcsvc/key_prot.x
Normal file
@@ -0,0 +1,283 @@
|
||||
/*
|
||||
* Key server protocol definition
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*
|
||||
* The keyserver is a public key storage/encryption/decryption service
|
||||
* The encryption method used is based on the Diffie-Hellman exponential
|
||||
* key exchange technology.
|
||||
*
|
||||
* The key server is local to each machine, akin to the portmapper.
|
||||
* Under TI-RPC, communication with the keyserver is through the
|
||||
* loopback transport.
|
||||
*
|
||||
* NOTE: This .x file generates the USER level headers for the keyserver.
|
||||
* the KERNEL level headers are created by hand as they kernel has special
|
||||
* requirements.
|
||||
*/
|
||||
|
||||
%#if 0
|
||||
%#pragma ident "@(#)key_prot.x 1.7 94/04/29 SMI"
|
||||
%#endif
|
||||
%
|
||||
%/* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */
|
||||
%
|
||||
%/*
|
||||
% * Compiled from key_prot.x using rpcgen.
|
||||
% * DO NOT EDIT THIS FILE!
|
||||
% * This is NOT source code!
|
||||
% */
|
||||
|
||||
/*
|
||||
* PROOT and MODULUS define the way the Diffie-Hellman key is generated.
|
||||
*
|
||||
* MODULUS should be chosen as a prime of the form: MODULUS == 2*p + 1,
|
||||
* where p is also prime.
|
||||
*
|
||||
* PROOT satisfies the following two conditions:
|
||||
* (1) (PROOT ** 2) % MODULUS != 1
|
||||
* (2) (PROOT ** p) % MODULUS != 1
|
||||
*
|
||||
*/
|
||||
|
||||
const PROOT = 3;
|
||||
const HEXMODULUS = "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b";
|
||||
|
||||
const HEXKEYBYTES = 48; /* HEXKEYBYTES == strlen(HEXMODULUS) */
|
||||
const KEYSIZE = 192; /* KEYSIZE == bit length of key */
|
||||
const KEYBYTES = 24; /* byte length of key */
|
||||
|
||||
/*
|
||||
* The first 16 hex digits of the encrypted secret key are used as
|
||||
* a checksum in the database.
|
||||
*/
|
||||
const KEYCHECKSUMSIZE = 16;
|
||||
|
||||
/*
|
||||
* status of operation
|
||||
*/
|
||||
enum keystatus {
|
||||
KEY_SUCCESS, /* no problems */
|
||||
KEY_NOSECRET, /* no secret key stored */
|
||||
KEY_UNKNOWN, /* unknown netname */
|
||||
KEY_SYSTEMERR /* system error (out of memory, encryption failure) */
|
||||
};
|
||||
|
||||
typedef opaque keybuf[HEXKEYBYTES]; /* store key in hex */
|
||||
|
||||
typedef string netnamestr<MAXNETNAMELEN>;
|
||||
|
||||
/*
|
||||
* Argument to ENCRYPT or DECRYPT
|
||||
*/
|
||||
struct cryptkeyarg {
|
||||
netnamestr remotename;
|
||||
des_block deskey;
|
||||
};
|
||||
|
||||
/*
|
||||
* Argument to ENCRYPT_PK or DECRYPT_PK
|
||||
*/
|
||||
struct cryptkeyarg2 {
|
||||
netnamestr remotename;
|
||||
netobj remotekey; /* Contains a length up to 1024 bytes */
|
||||
des_block deskey;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Result of ENCRYPT, DECRYPT, ENCRYPT_PK, and DECRYPT_PK
|
||||
*/
|
||||
union cryptkeyres switch (keystatus status) {
|
||||
case KEY_SUCCESS:
|
||||
des_block deskey;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
const MAXGIDS = 16; /* max number of gids in gid list */
|
||||
|
||||
/*
|
||||
* Unix credential
|
||||
*/
|
||||
struct unixcred {
|
||||
u_int uid;
|
||||
u_int gid;
|
||||
u_int gids<MAXGIDS>;
|
||||
};
|
||||
|
||||
/*
|
||||
* Result returned from GETCRED
|
||||
*/
|
||||
union getcredres switch (keystatus status) {
|
||||
case KEY_SUCCESS:
|
||||
unixcred cred;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
/*
|
||||
* key_netstarg;
|
||||
*/
|
||||
|
||||
struct key_netstarg {
|
||||
keybuf st_priv_key;
|
||||
keybuf st_pub_key;
|
||||
netnamestr st_netname;
|
||||
};
|
||||
|
||||
union key_netstres switch (keystatus status){
|
||||
case KEY_SUCCESS:
|
||||
key_netstarg knet;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%
|
||||
%#ifndef opaque
|
||||
%#define opaque char
|
||||
%#endif
|
||||
%
|
||||
#endif
|
||||
program KEY_PROG {
|
||||
version KEY_VERS {
|
||||
|
||||
/*
|
||||
* This is my secret key.
|
||||
* Store it for me.
|
||||
*/
|
||||
keystatus
|
||||
KEY_SET(keybuf) = 1;
|
||||
|
||||
/*
|
||||
* I want to talk to X.
|
||||
* Encrypt a conversation key for me.
|
||||
*/
|
||||
cryptkeyres
|
||||
KEY_ENCRYPT(cryptkeyarg) = 2;
|
||||
|
||||
/*
|
||||
* X just sent me a message.
|
||||
* Decrypt the conversation key for me.
|
||||
*/
|
||||
cryptkeyres
|
||||
KEY_DECRYPT(cryptkeyarg) = 3;
|
||||
|
||||
/*
|
||||
* Generate a secure conversation key for me
|
||||
*/
|
||||
des_block
|
||||
KEY_GEN(void) = 4;
|
||||
|
||||
/*
|
||||
* Get me the uid, gid and group-access-list associated
|
||||
* with this netname (for kernel which cannot use NIS)
|
||||
*/
|
||||
getcredres
|
||||
KEY_GETCRED(netnamestr) = 5;
|
||||
} = 1;
|
||||
version KEY_VERS2 {
|
||||
|
||||
/*
|
||||
* #######
|
||||
* Procedures 1-5 are identical to version 1
|
||||
* #######
|
||||
*/
|
||||
|
||||
/*
|
||||
* This is my secret key.
|
||||
* Store it for me.
|
||||
*/
|
||||
keystatus
|
||||
KEY_SET(keybuf) = 1;
|
||||
|
||||
/*
|
||||
* I want to talk to X.
|
||||
* Encrypt a conversation key for me.
|
||||
*/
|
||||
cryptkeyres
|
||||
KEY_ENCRYPT(cryptkeyarg) = 2;
|
||||
|
||||
/*
|
||||
* X just sent me a message.
|
||||
* Decrypt the conversation key for me.
|
||||
*/
|
||||
cryptkeyres
|
||||
KEY_DECRYPT(cryptkeyarg) = 3;
|
||||
|
||||
/*
|
||||
* Generate a secure conversation key for me
|
||||
*/
|
||||
des_block
|
||||
KEY_GEN(void) = 4;
|
||||
|
||||
/*
|
||||
* Get me the uid, gid and group-access-list associated
|
||||
* with this netname (for kernel which cannot use NIS)
|
||||
*/
|
||||
getcredres
|
||||
KEY_GETCRED(netnamestr) = 5;
|
||||
|
||||
/*
|
||||
* I want to talk to X. and I know X's public key
|
||||
* Encrypt a conversation key for me.
|
||||
*/
|
||||
cryptkeyres
|
||||
KEY_ENCRYPT_PK(cryptkeyarg2) = 6;
|
||||
|
||||
/*
|
||||
* X just sent me a message. and I know X's public key
|
||||
* Decrypt the conversation key for me.
|
||||
*/
|
||||
cryptkeyres
|
||||
KEY_DECRYPT_PK(cryptkeyarg2) = 7;
|
||||
|
||||
/*
|
||||
* Store my public key, netname and private key.
|
||||
*/
|
||||
keystatus
|
||||
KEY_NET_PUT(key_netstarg) = 8;
|
||||
|
||||
/*
|
||||
* Retrieve my public key, netname and private key.
|
||||
*/
|
||||
key_netstres
|
||||
KEY_NET_GET(void) = 9;
|
||||
|
||||
/*
|
||||
* Return me the conversation key that is constructed
|
||||
* from my secret key and this publickey.
|
||||
*/
|
||||
|
||||
cryptkeyres
|
||||
KEY_GET_CONV(keybuf) = 10;
|
||||
|
||||
|
||||
} = 2;
|
||||
} = 100029;
|
||||
136
openflow/usr/include/rpcsvc/klm_prot.h
Normal file
136
openflow/usr/include/rpcsvc/klm_prot.h
Normal file
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _KLM_PROT_H_RPCGEN
|
||||
#define _KLM_PROT_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LM_MAXSTRLEN 1024
|
||||
|
||||
enum klm_stats {
|
||||
klm_granted = 0,
|
||||
klm_denied = 1,
|
||||
klm_denied_nolocks = 2,
|
||||
klm_working = 3,
|
||||
};
|
||||
typedef enum klm_stats klm_stats;
|
||||
|
||||
struct klm_lock {
|
||||
char *server_name;
|
||||
netobj fh;
|
||||
int pid;
|
||||
u_int l_offset;
|
||||
u_int l_len;
|
||||
};
|
||||
typedef struct klm_lock klm_lock;
|
||||
|
||||
struct klm_holder {
|
||||
bool_t exclusive;
|
||||
int svid;
|
||||
u_int l_offset;
|
||||
u_int l_len;
|
||||
};
|
||||
typedef struct klm_holder klm_holder;
|
||||
|
||||
struct klm_stat {
|
||||
klm_stats stat;
|
||||
};
|
||||
typedef struct klm_stat klm_stat;
|
||||
|
||||
struct klm_testrply {
|
||||
klm_stats stat;
|
||||
union {
|
||||
struct klm_holder holder;
|
||||
} klm_testrply_u;
|
||||
};
|
||||
typedef struct klm_testrply klm_testrply;
|
||||
|
||||
struct klm_lockargs {
|
||||
bool_t block;
|
||||
bool_t exclusive;
|
||||
struct klm_lock alock;
|
||||
};
|
||||
typedef struct klm_lockargs klm_lockargs;
|
||||
|
||||
struct klm_testargs {
|
||||
bool_t exclusive;
|
||||
struct klm_lock alock;
|
||||
};
|
||||
typedef struct klm_testargs klm_testargs;
|
||||
|
||||
struct klm_unlockargs {
|
||||
struct klm_lock alock;
|
||||
};
|
||||
typedef struct klm_unlockargs klm_unlockargs;
|
||||
|
||||
#define KLM_PROG 100020
|
||||
#define KLM_VERS 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define KLM_TEST 1
|
||||
extern klm_testrply * klm_test_1(struct klm_testargs *, CLIENT *);
|
||||
extern klm_testrply * klm_test_1_svc(struct klm_testargs *, struct svc_req *);
|
||||
#define KLM_LOCK 2
|
||||
extern klm_stat * klm_lock_1(struct klm_lockargs *, CLIENT *);
|
||||
extern klm_stat * klm_lock_1_svc(struct klm_lockargs *, struct svc_req *);
|
||||
#define KLM_CANCEL 3
|
||||
extern klm_stat * klm_cancel_1(struct klm_lockargs *, CLIENT *);
|
||||
extern klm_stat * klm_cancel_1_svc(struct klm_lockargs *, struct svc_req *);
|
||||
#define KLM_UNLOCK 4
|
||||
extern klm_stat * klm_unlock_1(struct klm_unlockargs *, CLIENT *);
|
||||
extern klm_stat * klm_unlock_1_svc(struct klm_unlockargs *, struct svc_req *);
|
||||
extern int klm_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define KLM_TEST 1
|
||||
extern klm_testrply * klm_test_1();
|
||||
extern klm_testrply * klm_test_1_svc();
|
||||
#define KLM_LOCK 2
|
||||
extern klm_stat * klm_lock_1();
|
||||
extern klm_stat * klm_lock_1_svc();
|
||||
#define KLM_CANCEL 3
|
||||
extern klm_stat * klm_cancel_1();
|
||||
extern klm_stat * klm_cancel_1_svc();
|
||||
#define KLM_UNLOCK 4
|
||||
extern klm_stat * klm_unlock_1();
|
||||
extern klm_stat * klm_unlock_1_svc();
|
||||
extern int klm_prog_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_klm_stats (XDR *, klm_stats*);
|
||||
extern bool_t xdr_klm_lock (XDR *, klm_lock*);
|
||||
extern bool_t xdr_klm_holder (XDR *, klm_holder*);
|
||||
extern bool_t xdr_klm_stat (XDR *, klm_stat*);
|
||||
extern bool_t xdr_klm_testrply (XDR *, klm_testrply*);
|
||||
extern bool_t xdr_klm_lockargs (XDR *, klm_lockargs*);
|
||||
extern bool_t xdr_klm_testargs (XDR *, klm_testargs*);
|
||||
extern bool_t xdr_klm_unlockargs (XDR *, klm_unlockargs*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_klm_stats ();
|
||||
extern bool_t xdr_klm_lock ();
|
||||
extern bool_t xdr_klm_holder ();
|
||||
extern bool_t xdr_klm_stat ();
|
||||
extern bool_t xdr_klm_testrply ();
|
||||
extern bool_t xdr_klm_lockargs ();
|
||||
extern bool_t xdr_klm_testargs ();
|
||||
extern bool_t xdr_klm_unlockargs ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_KLM_PROT_H_RPCGEN */
|
||||
130
openflow/usr/include/rpcsvc/klm_prot.x
Normal file
130
openflow/usr/include/rpcsvc/klm_prot.x
Normal file
@@ -0,0 +1,130 @@
|
||||
/* @(#)klm_prot.x 2.1 88/08/01 4.0 RPCSRC */
|
||||
|
||||
/*
|
||||
* Kernel/lock manager protocol definition
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*
|
||||
* protocol used between the UNIX kernel (the "client") and the
|
||||
* local lock manager. The local lock manager is a deamon running
|
||||
* above the kernel.
|
||||
*/
|
||||
|
||||
const LM_MAXSTRLEN = 1024;
|
||||
|
||||
/*
|
||||
* lock manager status returns
|
||||
*/
|
||||
enum klm_stats {
|
||||
klm_granted = 0, /* lock is granted */
|
||||
klm_denied = 1, /* lock is denied */
|
||||
klm_denied_nolocks = 2, /* no lock entry available */
|
||||
klm_working = 3 /* lock is being processed */
|
||||
};
|
||||
|
||||
/*
|
||||
* lock manager lock identifier
|
||||
*/
|
||||
struct klm_lock {
|
||||
string server_name<LM_MAXSTRLEN>;
|
||||
netobj fh; /* a counted file handle */
|
||||
int pid; /* holder of the lock */
|
||||
unsigned l_offset; /* beginning offset of the lock */
|
||||
unsigned l_len; /* byte length of the lock;
|
||||
* zero means through end of file */
|
||||
};
|
||||
|
||||
/*
|
||||
* lock holder identifier
|
||||
*/
|
||||
struct klm_holder {
|
||||
bool exclusive; /* FALSE if shared lock */
|
||||
int svid; /* holder of the lock (pid) */
|
||||
unsigned l_offset; /* beginning offset of the lock */
|
||||
unsigned l_len; /* byte length of the lock;
|
||||
* zero means through end of file */
|
||||
};
|
||||
|
||||
/*
|
||||
* reply to KLM_LOCK / KLM_UNLOCK / KLM_CANCEL
|
||||
*/
|
||||
struct klm_stat {
|
||||
klm_stats stat;
|
||||
};
|
||||
|
||||
/*
|
||||
* reply to a KLM_TEST call
|
||||
*/
|
||||
union klm_testrply switch (klm_stats stat) {
|
||||
case klm_denied:
|
||||
struct klm_holder holder;
|
||||
default: /* All other cases return no arguments */
|
||||
void;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* arguments to KLM_LOCK
|
||||
*/
|
||||
struct klm_lockargs {
|
||||
bool block;
|
||||
bool exclusive;
|
||||
struct klm_lock alock;
|
||||
};
|
||||
|
||||
/*
|
||||
* arguments to KLM_TEST
|
||||
*/
|
||||
struct klm_testargs {
|
||||
bool exclusive;
|
||||
struct klm_lock alock;
|
||||
};
|
||||
|
||||
/*
|
||||
* arguments to KLM_UNLOCK
|
||||
*/
|
||||
struct klm_unlockargs {
|
||||
struct klm_lock alock;
|
||||
};
|
||||
|
||||
program KLM_PROG {
|
||||
version KLM_VERS {
|
||||
|
||||
klm_testrply KLM_TEST (struct klm_testargs) = 1;
|
||||
|
||||
klm_stat KLM_LOCK (struct klm_lockargs) = 2;
|
||||
|
||||
klm_stat KLM_CANCEL (struct klm_lockargs) = 3;
|
||||
/* klm_granted=> the cancel request fails due to lock is already granted */
|
||||
/* klm_denied=> the cancel request successfully aborts
|
||||
lock request */
|
||||
|
||||
klm_stat KLM_UNLOCK (struct klm_unlockargs) = 4;
|
||||
} = 1;
|
||||
} = 100020;
|
||||
144
openflow/usr/include/rpcsvc/mount.h
Normal file
144
openflow/usr/include/rpcsvc/mount.h
Normal file
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _MOUNT_H_RPCGEN
|
||||
#define _MOUNT_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MNTPATHLEN 1024
|
||||
#define MNTNAMLEN 255
|
||||
#define FHSIZE 32
|
||||
|
||||
typedef char fhandle[FHSIZE];
|
||||
|
||||
struct fhstatus {
|
||||
u_int fhs_status;
|
||||
union {
|
||||
fhandle fhs_fhandle;
|
||||
} fhstatus_u;
|
||||
};
|
||||
typedef struct fhstatus fhstatus;
|
||||
|
||||
typedef char *dirpath;
|
||||
|
||||
typedef char *name;
|
||||
|
||||
typedef struct mountbody *mountlist;
|
||||
|
||||
struct mountbody {
|
||||
name ml_hostname;
|
||||
dirpath ml_directory;
|
||||
mountlist ml_next;
|
||||
};
|
||||
typedef struct mountbody mountbody;
|
||||
|
||||
typedef struct groupnode *groups;
|
||||
|
||||
struct groupnode {
|
||||
name gr_name;
|
||||
groups gr_next;
|
||||
};
|
||||
typedef struct groupnode groupnode;
|
||||
|
||||
typedef struct exportnode *exports;
|
||||
|
||||
struct exportnode {
|
||||
dirpath ex_dir;
|
||||
groups ex_groups;
|
||||
exports ex_next;
|
||||
};
|
||||
typedef struct exportnode exportnode;
|
||||
|
||||
#define MOUNTPROG 100005
|
||||
#define MOUNTVERS 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define MOUNTPROC_NULL 0
|
||||
extern void * mountproc_null_1(void *, CLIENT *);
|
||||
extern void * mountproc_null_1_svc(void *, struct svc_req *);
|
||||
#define MOUNTPROC_MNT 1
|
||||
extern fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);
|
||||
extern fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);
|
||||
#define MOUNTPROC_DUMP 2
|
||||
extern mountlist * mountproc_dump_1(void *, CLIENT *);
|
||||
extern mountlist * mountproc_dump_1_svc(void *, struct svc_req *);
|
||||
#define MOUNTPROC_UMNT 3
|
||||
extern void * mountproc_umnt_1(dirpath *, CLIENT *);
|
||||
extern void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);
|
||||
#define MOUNTPROC_UMNTALL 4
|
||||
extern void * mountproc_umntall_1(void *, CLIENT *);
|
||||
extern void * mountproc_umntall_1_svc(void *, struct svc_req *);
|
||||
#define MOUNTPROC_EXPORT 5
|
||||
extern exports * mountproc_export_1(void *, CLIENT *);
|
||||
extern exports * mountproc_export_1_svc(void *, struct svc_req *);
|
||||
#define MOUNTPROC_EXPORTALL 6
|
||||
extern exports * mountproc_exportall_1(void *, CLIENT *);
|
||||
extern exports * mountproc_exportall_1_svc(void *, struct svc_req *);
|
||||
extern int mountprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define MOUNTPROC_NULL 0
|
||||
extern void * mountproc_null_1();
|
||||
extern void * mountproc_null_1_svc();
|
||||
#define MOUNTPROC_MNT 1
|
||||
extern fhstatus * mountproc_mnt_1();
|
||||
extern fhstatus * mountproc_mnt_1_svc();
|
||||
#define MOUNTPROC_DUMP 2
|
||||
extern mountlist * mountproc_dump_1();
|
||||
extern mountlist * mountproc_dump_1_svc();
|
||||
#define MOUNTPROC_UMNT 3
|
||||
extern void * mountproc_umnt_1();
|
||||
extern void * mountproc_umnt_1_svc();
|
||||
#define MOUNTPROC_UMNTALL 4
|
||||
extern void * mountproc_umntall_1();
|
||||
extern void * mountproc_umntall_1_svc();
|
||||
#define MOUNTPROC_EXPORT 5
|
||||
extern exports * mountproc_export_1();
|
||||
extern exports * mountproc_export_1_svc();
|
||||
#define MOUNTPROC_EXPORTALL 6
|
||||
extern exports * mountproc_exportall_1();
|
||||
extern exports * mountproc_exportall_1_svc();
|
||||
extern int mountprog_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_fhandle (XDR *, fhandle);
|
||||
extern bool_t xdr_fhstatus (XDR *, fhstatus*);
|
||||
extern bool_t xdr_dirpath (XDR *, dirpath*);
|
||||
extern bool_t xdr_name (XDR *, name*);
|
||||
extern bool_t xdr_mountlist (XDR *, mountlist*);
|
||||
extern bool_t xdr_mountbody (XDR *, mountbody*);
|
||||
extern bool_t xdr_groups (XDR *, groups*);
|
||||
extern bool_t xdr_groupnode (XDR *, groupnode*);
|
||||
extern bool_t xdr_exports (XDR *, exports*);
|
||||
extern bool_t xdr_exportnode (XDR *, exportnode*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_fhandle ();
|
||||
extern bool_t xdr_fhstatus ();
|
||||
extern bool_t xdr_dirpath ();
|
||||
extern bool_t xdr_name ();
|
||||
extern bool_t xdr_mountlist ();
|
||||
extern bool_t xdr_mountbody ();
|
||||
extern bool_t xdr_groups ();
|
||||
extern bool_t xdr_groupnode ();
|
||||
extern bool_t xdr_exports ();
|
||||
extern bool_t xdr_exportnode ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_MOUNT_H_RPCGEN */
|
||||
161
openflow/usr/include/rpcsvc/mount.x
Normal file
161
openflow/usr/include/rpcsvc/mount.x
Normal file
@@ -0,0 +1,161 @@
|
||||
/* @(#)mount.x 2.1 88/08/01 4.0 RPCSRC */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Protocol description for the mount program
|
||||
*/
|
||||
|
||||
|
||||
const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */
|
||||
const MNTNAMLEN = 255; /* maximum bytes in a name argument */
|
||||
const FHSIZE = 32; /* size in bytes of a file handle */
|
||||
|
||||
/*
|
||||
* The fhandle is the file handle that the server passes to the client.
|
||||
* All file operations are done using the file handles to refer to a file
|
||||
* or a directory. The file handle can contain whatever information the
|
||||
* server needs to distinguish an individual file.
|
||||
*/
|
||||
typedef opaque fhandle[FHSIZE];
|
||||
|
||||
/*
|
||||
* If a status of zero is returned, the call completed successfully, and
|
||||
* a file handle for the directory follows. A non-zero status indicates
|
||||
* some sort of error. The status corresponds with UNIX error numbers.
|
||||
*/
|
||||
union fhstatus switch (unsigned fhs_status) {
|
||||
case 0:
|
||||
fhandle fhs_fhandle;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
/*
|
||||
* The type dirpath is the pathname of a directory
|
||||
*/
|
||||
typedef string dirpath<MNTPATHLEN>;
|
||||
|
||||
/*
|
||||
* The type name is used for arbitrary names (hostnames, groupnames)
|
||||
*/
|
||||
typedef string name<MNTNAMLEN>;
|
||||
|
||||
/*
|
||||
* A list of who has what mounted
|
||||
*/
|
||||
typedef struct mountbody *mountlist;
|
||||
struct mountbody {
|
||||
name ml_hostname;
|
||||
dirpath ml_directory;
|
||||
mountlist ml_next;
|
||||
};
|
||||
|
||||
/*
|
||||
* A list of netgroups
|
||||
*/
|
||||
typedef struct groupnode *groups;
|
||||
struct groupnode {
|
||||
name gr_name;
|
||||
groups gr_next;
|
||||
};
|
||||
|
||||
/*
|
||||
* A list of what is exported and to whom
|
||||
*/
|
||||
typedef struct exportnode *exports;
|
||||
struct exportnode {
|
||||
dirpath ex_dir;
|
||||
groups ex_groups;
|
||||
exports ex_next;
|
||||
};
|
||||
|
||||
program MOUNTPROG {
|
||||
/*
|
||||
* Version one of the mount protocol communicates with version two
|
||||
* of the NFS protocol. The only connecting point is the fhandle
|
||||
* structure, which is the same for both protocols.
|
||||
*/
|
||||
version MOUNTVERS {
|
||||
/*
|
||||
* Does no work. It is made available in all RPC services
|
||||
* to allow server response testing and timing
|
||||
*/
|
||||
void
|
||||
MOUNTPROC_NULL(void) = 0;
|
||||
|
||||
/*
|
||||
* If fhs_status is 0, then fhs_fhandle contains the
|
||||
* file handle for the directory. This file handle may
|
||||
* be used in the NFS protocol. This procedure also adds
|
||||
* a new entry to the mount list for this client mounting
|
||||
* the directory.
|
||||
* Unix authentication required.
|
||||
*/
|
||||
fhstatus
|
||||
MOUNTPROC_MNT(dirpath) = 1;
|
||||
|
||||
/*
|
||||
* Returns the list of remotely mounted filesystems. The
|
||||
* mountlist contains one entry for each hostname and
|
||||
* directory pair.
|
||||
*/
|
||||
mountlist
|
||||
MOUNTPROC_DUMP(void) = 2;
|
||||
|
||||
/*
|
||||
* Removes the mount list entry for the directory
|
||||
* Unix authentication required.
|
||||
*/
|
||||
void
|
||||
MOUNTPROC_UMNT(dirpath) = 3;
|
||||
|
||||
/*
|
||||
* Removes all of the mount list entries for this client
|
||||
* Unix authentication required.
|
||||
*/
|
||||
void
|
||||
MOUNTPROC_UMNTALL(void) = 4;
|
||||
|
||||
/*
|
||||
* Returns a list of all the exported filesystems, and which
|
||||
* machines are allowed to import it.
|
||||
*/
|
||||
exports
|
||||
MOUNTPROC_EXPORT(void) = 5;
|
||||
|
||||
/*
|
||||
* Identical to MOUNTPROC_EXPORT above
|
||||
*/
|
||||
exports
|
||||
MOUNTPROC_EXPORTALL(void) = 6;
|
||||
} = 1;
|
||||
} = 100005;
|
||||
450
openflow/usr/include/rpcsvc/nfs_prot.h
Normal file
450
openflow/usr/include/rpcsvc/nfs_prot.h
Normal file
@@ -0,0 +1,450 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _NFS_PROT_H_RPCGEN
|
||||
#define _NFS_PROT_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NFS_PORT 2049
|
||||
#define NFS_MAXDATA 8192
|
||||
#define NFS_MAXPATHLEN 1024
|
||||
#define NFS_MAXNAMLEN 255
|
||||
#define NFS_FHSIZE 32
|
||||
#define NFS_COOKIESIZE 4
|
||||
#define NFS_FIFO_DEV -1
|
||||
#define NFSMODE_FMT 0170000
|
||||
#define NFSMODE_DIR 0040000
|
||||
#define NFSMODE_CHR 0020000
|
||||
#define NFSMODE_BLK 0060000
|
||||
#define NFSMODE_REG 0100000
|
||||
#define NFSMODE_LNK 0120000
|
||||
#define NFSMODE_SOCK 0140000
|
||||
#define NFSMODE_FIFO 0010000
|
||||
|
||||
enum nfsstat {
|
||||
NFS_OK = 0,
|
||||
NFSERR_PERM = 1,
|
||||
NFSERR_NOENT = 2,
|
||||
NFSERR_IO = 5,
|
||||
NFSERR_NXIO = 6,
|
||||
NFSERR_ACCES = 13,
|
||||
NFSERR_EXIST = 17,
|
||||
NFSERR_NODEV = 19,
|
||||
NFSERR_NOTDIR = 20,
|
||||
NFSERR_ISDIR = 21,
|
||||
NFSERR_FBIG = 27,
|
||||
NFSERR_NOSPC = 28,
|
||||
NFSERR_ROFS = 30,
|
||||
NFSERR_NAMETOOLONG = 63,
|
||||
NFSERR_NOTEMPTY = 66,
|
||||
NFSERR_DQUOT = 69,
|
||||
NFSERR_STALE = 70,
|
||||
NFSERR_WFLUSH = 99,
|
||||
};
|
||||
typedef enum nfsstat nfsstat;
|
||||
|
||||
enum ftype {
|
||||
NFNON = 0,
|
||||
NFREG = 1,
|
||||
NFDIR = 2,
|
||||
NFBLK = 3,
|
||||
NFCHR = 4,
|
||||
NFLNK = 5,
|
||||
NFSOCK = 6,
|
||||
NFBAD = 7,
|
||||
NFFIFO = 8,
|
||||
};
|
||||
typedef enum ftype ftype;
|
||||
|
||||
struct nfs_fh {
|
||||
char data[NFS_FHSIZE];
|
||||
};
|
||||
typedef struct nfs_fh nfs_fh;
|
||||
|
||||
struct nfstime {
|
||||
u_int seconds;
|
||||
u_int useconds;
|
||||
};
|
||||
typedef struct nfstime nfstime;
|
||||
|
||||
struct fattr {
|
||||
ftype type;
|
||||
u_int mode;
|
||||
u_int nlink;
|
||||
u_int uid;
|
||||
u_int gid;
|
||||
u_int size;
|
||||
u_int blocksize;
|
||||
u_int rdev;
|
||||
u_int blocks;
|
||||
u_int fsid;
|
||||
u_int fileid;
|
||||
nfstime atime;
|
||||
nfstime mtime;
|
||||
nfstime ctime;
|
||||
};
|
||||
typedef struct fattr fattr;
|
||||
|
||||
struct sattr {
|
||||
u_int mode;
|
||||
u_int uid;
|
||||
u_int gid;
|
||||
u_int size;
|
||||
nfstime atime;
|
||||
nfstime mtime;
|
||||
};
|
||||
typedef struct sattr sattr;
|
||||
|
||||
typedef char *filename;
|
||||
|
||||
typedef char *nfspath;
|
||||
|
||||
struct attrstat {
|
||||
nfsstat status;
|
||||
union {
|
||||
fattr attributes;
|
||||
} attrstat_u;
|
||||
};
|
||||
typedef struct attrstat attrstat;
|
||||
|
||||
struct sattrargs {
|
||||
nfs_fh file;
|
||||
sattr attributes;
|
||||
};
|
||||
typedef struct sattrargs sattrargs;
|
||||
|
||||
struct diropargs {
|
||||
nfs_fh dir;
|
||||
filename name;
|
||||
};
|
||||
typedef struct diropargs diropargs;
|
||||
|
||||
struct diropokres {
|
||||
nfs_fh file;
|
||||
fattr attributes;
|
||||
};
|
||||
typedef struct diropokres diropokres;
|
||||
|
||||
struct diropres {
|
||||
nfsstat status;
|
||||
union {
|
||||
diropokres diropres;
|
||||
} diropres_u;
|
||||
};
|
||||
typedef struct diropres diropres;
|
||||
|
||||
struct readlinkres {
|
||||
nfsstat status;
|
||||
union {
|
||||
nfspath data;
|
||||
} readlinkres_u;
|
||||
};
|
||||
typedef struct readlinkres readlinkres;
|
||||
|
||||
struct readargs {
|
||||
nfs_fh file;
|
||||
u_int offset;
|
||||
u_int count;
|
||||
u_int totalcount;
|
||||
};
|
||||
typedef struct readargs readargs;
|
||||
|
||||
struct readokres {
|
||||
fattr attributes;
|
||||
struct {
|
||||
u_int data_len;
|
||||
char *data_val;
|
||||
} data;
|
||||
};
|
||||
typedef struct readokres readokres;
|
||||
|
||||
struct readres {
|
||||
nfsstat status;
|
||||
union {
|
||||
readokres reply;
|
||||
} readres_u;
|
||||
};
|
||||
typedef struct readres readres;
|
||||
|
||||
struct writeargs {
|
||||
nfs_fh file;
|
||||
u_int beginoffset;
|
||||
u_int offset;
|
||||
u_int totalcount;
|
||||
struct {
|
||||
u_int data_len;
|
||||
char *data_val;
|
||||
} data;
|
||||
};
|
||||
typedef struct writeargs writeargs;
|
||||
|
||||
struct createargs {
|
||||
diropargs where;
|
||||
sattr attributes;
|
||||
};
|
||||
typedef struct createargs createargs;
|
||||
|
||||
struct renameargs {
|
||||
diropargs from;
|
||||
diropargs to;
|
||||
};
|
||||
typedef struct renameargs renameargs;
|
||||
|
||||
struct linkargs {
|
||||
nfs_fh from;
|
||||
diropargs to;
|
||||
};
|
||||
typedef struct linkargs linkargs;
|
||||
|
||||
struct symlinkargs {
|
||||
diropargs from;
|
||||
nfspath to;
|
||||
sattr attributes;
|
||||
};
|
||||
typedef struct symlinkargs symlinkargs;
|
||||
|
||||
typedef char nfscookie[NFS_COOKIESIZE];
|
||||
|
||||
struct readdirargs {
|
||||
nfs_fh dir;
|
||||
nfscookie cookie;
|
||||
u_int count;
|
||||
};
|
||||
typedef struct readdirargs readdirargs;
|
||||
|
||||
struct entry {
|
||||
u_int fileid;
|
||||
filename name;
|
||||
nfscookie cookie;
|
||||
struct entry *nextentry;
|
||||
};
|
||||
typedef struct entry entry;
|
||||
|
||||
struct dirlist {
|
||||
entry *entries;
|
||||
bool_t eof;
|
||||
};
|
||||
typedef struct dirlist dirlist;
|
||||
|
||||
struct readdirres {
|
||||
nfsstat status;
|
||||
union {
|
||||
dirlist reply;
|
||||
} readdirres_u;
|
||||
};
|
||||
typedef struct readdirres readdirres;
|
||||
|
||||
struct statfsokres {
|
||||
u_int tsize;
|
||||
u_int bsize;
|
||||
u_int blocks;
|
||||
u_int bfree;
|
||||
u_int bavail;
|
||||
};
|
||||
typedef struct statfsokres statfsokres;
|
||||
|
||||
struct statfsres {
|
||||
nfsstat status;
|
||||
union {
|
||||
statfsokres reply;
|
||||
} statfsres_u;
|
||||
};
|
||||
typedef struct statfsres statfsres;
|
||||
|
||||
#define NFS_PROGRAM 100003
|
||||
#define NFS_VERSION 2
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define NFSPROC_NULL 0
|
||||
extern void * nfsproc_null_2(void *, CLIENT *);
|
||||
extern void * nfsproc_null_2_svc(void *, struct svc_req *);
|
||||
#define NFSPROC_GETATTR 1
|
||||
extern attrstat * nfsproc_getattr_2(nfs_fh *, CLIENT *);
|
||||
extern attrstat * nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *);
|
||||
#define NFSPROC_SETATTR 2
|
||||
extern attrstat * nfsproc_setattr_2(sattrargs *, CLIENT *);
|
||||
extern attrstat * nfsproc_setattr_2_svc(sattrargs *, struct svc_req *);
|
||||
#define NFSPROC_ROOT 3
|
||||
extern void * nfsproc_root_2(void *, CLIENT *);
|
||||
extern void * nfsproc_root_2_svc(void *, struct svc_req *);
|
||||
#define NFSPROC_LOOKUP 4
|
||||
extern diropres * nfsproc_lookup_2(diropargs *, CLIENT *);
|
||||
extern diropres * nfsproc_lookup_2_svc(diropargs *, struct svc_req *);
|
||||
#define NFSPROC_READLINK 5
|
||||
extern readlinkres * nfsproc_readlink_2(nfs_fh *, CLIENT *);
|
||||
extern readlinkres * nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *);
|
||||
#define NFSPROC_READ 6
|
||||
extern readres * nfsproc_read_2(readargs *, CLIENT *);
|
||||
extern readres * nfsproc_read_2_svc(readargs *, struct svc_req *);
|
||||
#define NFSPROC_WRITECACHE 7
|
||||
extern void * nfsproc_writecache_2(void *, CLIENT *);
|
||||
extern void * nfsproc_writecache_2_svc(void *, struct svc_req *);
|
||||
#define NFSPROC_WRITE 8
|
||||
extern attrstat * nfsproc_write_2(writeargs *, CLIENT *);
|
||||
extern attrstat * nfsproc_write_2_svc(writeargs *, struct svc_req *);
|
||||
#define NFSPROC_CREATE 9
|
||||
extern diropres * nfsproc_create_2(createargs *, CLIENT *);
|
||||
extern diropres * nfsproc_create_2_svc(createargs *, struct svc_req *);
|
||||
#define NFSPROC_REMOVE 10
|
||||
extern nfsstat * nfsproc_remove_2(diropargs *, CLIENT *);
|
||||
extern nfsstat * nfsproc_remove_2_svc(diropargs *, struct svc_req *);
|
||||
#define NFSPROC_RENAME 11
|
||||
extern nfsstat * nfsproc_rename_2(renameargs *, CLIENT *);
|
||||
extern nfsstat * nfsproc_rename_2_svc(renameargs *, struct svc_req *);
|
||||
#define NFSPROC_LINK 12
|
||||
extern nfsstat * nfsproc_link_2(linkargs *, CLIENT *);
|
||||
extern nfsstat * nfsproc_link_2_svc(linkargs *, struct svc_req *);
|
||||
#define NFSPROC_SYMLINK 13
|
||||
extern nfsstat * nfsproc_symlink_2(symlinkargs *, CLIENT *);
|
||||
extern nfsstat * nfsproc_symlink_2_svc(symlinkargs *, struct svc_req *);
|
||||
#define NFSPROC_MKDIR 14
|
||||
extern diropres * nfsproc_mkdir_2(createargs *, CLIENT *);
|
||||
extern diropres * nfsproc_mkdir_2_svc(createargs *, struct svc_req *);
|
||||
#define NFSPROC_RMDIR 15
|
||||
extern nfsstat * nfsproc_rmdir_2(diropargs *, CLIENT *);
|
||||
extern nfsstat * nfsproc_rmdir_2_svc(diropargs *, struct svc_req *);
|
||||
#define NFSPROC_READDIR 16
|
||||
extern readdirres * nfsproc_readdir_2(readdirargs *, CLIENT *);
|
||||
extern readdirres * nfsproc_readdir_2_svc(readdirargs *, struct svc_req *);
|
||||
#define NFSPROC_STATFS 17
|
||||
extern statfsres * nfsproc_statfs_2(nfs_fh *, CLIENT *);
|
||||
extern statfsres * nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *);
|
||||
extern int nfs_program_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define NFSPROC_NULL 0
|
||||
extern void * nfsproc_null_2();
|
||||
extern void * nfsproc_null_2_svc();
|
||||
#define NFSPROC_GETATTR 1
|
||||
extern attrstat * nfsproc_getattr_2();
|
||||
extern attrstat * nfsproc_getattr_2_svc();
|
||||
#define NFSPROC_SETATTR 2
|
||||
extern attrstat * nfsproc_setattr_2();
|
||||
extern attrstat * nfsproc_setattr_2_svc();
|
||||
#define NFSPROC_ROOT 3
|
||||
extern void * nfsproc_root_2();
|
||||
extern void * nfsproc_root_2_svc();
|
||||
#define NFSPROC_LOOKUP 4
|
||||
extern diropres * nfsproc_lookup_2();
|
||||
extern diropres * nfsproc_lookup_2_svc();
|
||||
#define NFSPROC_READLINK 5
|
||||
extern readlinkres * nfsproc_readlink_2();
|
||||
extern readlinkres * nfsproc_readlink_2_svc();
|
||||
#define NFSPROC_READ 6
|
||||
extern readres * nfsproc_read_2();
|
||||
extern readres * nfsproc_read_2_svc();
|
||||
#define NFSPROC_WRITECACHE 7
|
||||
extern void * nfsproc_writecache_2();
|
||||
extern void * nfsproc_writecache_2_svc();
|
||||
#define NFSPROC_WRITE 8
|
||||
extern attrstat * nfsproc_write_2();
|
||||
extern attrstat * nfsproc_write_2_svc();
|
||||
#define NFSPROC_CREATE 9
|
||||
extern diropres * nfsproc_create_2();
|
||||
extern diropres * nfsproc_create_2_svc();
|
||||
#define NFSPROC_REMOVE 10
|
||||
extern nfsstat * nfsproc_remove_2();
|
||||
extern nfsstat * nfsproc_remove_2_svc();
|
||||
#define NFSPROC_RENAME 11
|
||||
extern nfsstat * nfsproc_rename_2();
|
||||
extern nfsstat * nfsproc_rename_2_svc();
|
||||
#define NFSPROC_LINK 12
|
||||
extern nfsstat * nfsproc_link_2();
|
||||
extern nfsstat * nfsproc_link_2_svc();
|
||||
#define NFSPROC_SYMLINK 13
|
||||
extern nfsstat * nfsproc_symlink_2();
|
||||
extern nfsstat * nfsproc_symlink_2_svc();
|
||||
#define NFSPROC_MKDIR 14
|
||||
extern diropres * nfsproc_mkdir_2();
|
||||
extern diropres * nfsproc_mkdir_2_svc();
|
||||
#define NFSPROC_RMDIR 15
|
||||
extern nfsstat * nfsproc_rmdir_2();
|
||||
extern nfsstat * nfsproc_rmdir_2_svc();
|
||||
#define NFSPROC_READDIR 16
|
||||
extern readdirres * nfsproc_readdir_2();
|
||||
extern readdirres * nfsproc_readdir_2_svc();
|
||||
#define NFSPROC_STATFS 17
|
||||
extern statfsres * nfsproc_statfs_2();
|
||||
extern statfsres * nfsproc_statfs_2_svc();
|
||||
extern int nfs_program_2_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_nfsstat (XDR *, nfsstat*);
|
||||
extern bool_t xdr_ftype (XDR *, ftype*);
|
||||
extern bool_t xdr_nfs_fh (XDR *, nfs_fh*);
|
||||
extern bool_t xdr_nfstime (XDR *, nfstime*);
|
||||
extern bool_t xdr_fattr (XDR *, fattr*);
|
||||
extern bool_t xdr_sattr (XDR *, sattr*);
|
||||
extern bool_t xdr_filename (XDR *, filename*);
|
||||
extern bool_t xdr_nfspath (XDR *, nfspath*);
|
||||
extern bool_t xdr_attrstat (XDR *, attrstat*);
|
||||
extern bool_t xdr_sattrargs (XDR *, sattrargs*);
|
||||
extern bool_t xdr_diropargs (XDR *, diropargs*);
|
||||
extern bool_t xdr_diropokres (XDR *, diropokres*);
|
||||
extern bool_t xdr_diropres (XDR *, diropres*);
|
||||
extern bool_t xdr_readlinkres (XDR *, readlinkres*);
|
||||
extern bool_t xdr_readargs (XDR *, readargs*);
|
||||
extern bool_t xdr_readokres (XDR *, readokres*);
|
||||
extern bool_t xdr_readres (XDR *, readres*);
|
||||
extern bool_t xdr_writeargs (XDR *, writeargs*);
|
||||
extern bool_t xdr_createargs (XDR *, createargs*);
|
||||
extern bool_t xdr_renameargs (XDR *, renameargs*);
|
||||
extern bool_t xdr_linkargs (XDR *, linkargs*);
|
||||
extern bool_t xdr_symlinkargs (XDR *, symlinkargs*);
|
||||
extern bool_t xdr_nfscookie (XDR *, nfscookie);
|
||||
extern bool_t xdr_readdirargs (XDR *, readdirargs*);
|
||||
extern bool_t xdr_entry (XDR *, entry*);
|
||||
extern bool_t xdr_dirlist (XDR *, dirlist*);
|
||||
extern bool_t xdr_readdirres (XDR *, readdirres*);
|
||||
extern bool_t xdr_statfsokres (XDR *, statfsokres*);
|
||||
extern bool_t xdr_statfsres (XDR *, statfsres*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_nfsstat ();
|
||||
extern bool_t xdr_ftype ();
|
||||
extern bool_t xdr_nfs_fh ();
|
||||
extern bool_t xdr_nfstime ();
|
||||
extern bool_t xdr_fattr ();
|
||||
extern bool_t xdr_sattr ();
|
||||
extern bool_t xdr_filename ();
|
||||
extern bool_t xdr_nfspath ();
|
||||
extern bool_t xdr_attrstat ();
|
||||
extern bool_t xdr_sattrargs ();
|
||||
extern bool_t xdr_diropargs ();
|
||||
extern bool_t xdr_diropokres ();
|
||||
extern bool_t xdr_diropres ();
|
||||
extern bool_t xdr_readlinkres ();
|
||||
extern bool_t xdr_readargs ();
|
||||
extern bool_t xdr_readokres ();
|
||||
extern bool_t xdr_readres ();
|
||||
extern bool_t xdr_writeargs ();
|
||||
extern bool_t xdr_createargs ();
|
||||
extern bool_t xdr_renameargs ();
|
||||
extern bool_t xdr_linkargs ();
|
||||
extern bool_t xdr_symlinkargs ();
|
||||
extern bool_t xdr_nfscookie ();
|
||||
extern bool_t xdr_readdirargs ();
|
||||
extern bool_t xdr_entry ();
|
||||
extern bool_t xdr_dirlist ();
|
||||
extern bool_t xdr_readdirres ();
|
||||
extern bool_t xdr_statfsokres ();
|
||||
extern bool_t xdr_statfsres ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_NFS_PROT_H_RPCGEN */
|
||||
352
openflow/usr/include/rpcsvc/nfs_prot.x
Normal file
352
openflow/usr/include/rpcsvc/nfs_prot.x
Normal file
@@ -0,0 +1,352 @@
|
||||
/* @(#)nfs_prot.x 2.1 88/08/01 4.0 RPCSRC */
|
||||
|
||||
/*
|
||||
* nfs_prot.x 1.2 87/10/12
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
const NFS_PORT = 2049;
|
||||
const NFS_MAXDATA = 8192;
|
||||
const NFS_MAXPATHLEN = 1024;
|
||||
const NFS_MAXNAMLEN = 255;
|
||||
const NFS_FHSIZE = 32;
|
||||
const NFS_COOKIESIZE = 4;
|
||||
const NFS_FIFO_DEV = -1; /* size kludge for named pipes */
|
||||
|
||||
/*
|
||||
* File types
|
||||
*/
|
||||
const NFSMODE_FMT = 0170000; /* type of file */
|
||||
const NFSMODE_DIR = 0040000; /* directory */
|
||||
const NFSMODE_CHR = 0020000; /* character special */
|
||||
const NFSMODE_BLK = 0060000; /* block special */
|
||||
const NFSMODE_REG = 0100000; /* regular */
|
||||
const NFSMODE_LNK = 0120000; /* symbolic link */
|
||||
const NFSMODE_SOCK = 0140000; /* socket */
|
||||
const NFSMODE_FIFO = 0010000; /* fifo */
|
||||
|
||||
/*
|
||||
* Error status
|
||||
*/
|
||||
enum nfsstat {
|
||||
NFS_OK= 0, /* no error */
|
||||
NFSERR_PERM=1, /* Not owner */
|
||||
NFSERR_NOENT=2, /* No such file or directory */
|
||||
NFSERR_IO=5, /* I/O error */
|
||||
NFSERR_NXIO=6, /* No such device or address */
|
||||
NFSERR_ACCES=13, /* Permission denied */
|
||||
NFSERR_EXIST=17, /* File exists */
|
||||
NFSERR_NODEV=19, /* No such device */
|
||||
NFSERR_NOTDIR=20, /* Not a directory*/
|
||||
NFSERR_ISDIR=21, /* Is a directory */
|
||||
NFSERR_FBIG=27, /* File too large */
|
||||
NFSERR_NOSPC=28, /* No space left on device */
|
||||
NFSERR_ROFS=30, /* Read-only file system */
|
||||
NFSERR_NAMETOOLONG=63, /* File name too long */
|
||||
NFSERR_NOTEMPTY=66, /* Directory not empty */
|
||||
NFSERR_DQUOT=69, /* Disc quota exceeded */
|
||||
NFSERR_STALE=70, /* Stale NFS file handle */
|
||||
NFSERR_WFLUSH=99 /* write cache flushed */
|
||||
};
|
||||
|
||||
/*
|
||||
* File types
|
||||
*/
|
||||
enum ftype {
|
||||
NFNON = 0, /* non-file */
|
||||
NFREG = 1, /* regular file */
|
||||
NFDIR = 2, /* directory */
|
||||
NFBLK = 3, /* block special */
|
||||
NFCHR = 4, /* character special */
|
||||
NFLNK = 5, /* symbolic link */
|
||||
NFSOCK = 6, /* unix domain sockets */
|
||||
NFBAD = 7, /* unused */
|
||||
NFFIFO = 8 /* named pipe */
|
||||
};
|
||||
|
||||
/*
|
||||
* File access handle
|
||||
*/
|
||||
struct nfs_fh {
|
||||
opaque data[NFS_FHSIZE];
|
||||
};
|
||||
|
||||
/*
|
||||
* Timeval
|
||||
*/
|
||||
struct nfstime {
|
||||
unsigned seconds;
|
||||
unsigned useconds;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* File attributes
|
||||
*/
|
||||
struct fattr {
|
||||
ftype type; /* file type */
|
||||
unsigned mode; /* protection mode bits */
|
||||
unsigned nlink; /* # hard links */
|
||||
unsigned uid; /* owner user id */
|
||||
unsigned gid; /* owner group id */
|
||||
unsigned size; /* file size in bytes */
|
||||
unsigned blocksize; /* preferred block size */
|
||||
unsigned rdev; /* special device # */
|
||||
unsigned blocks; /* Kb of disk used by file */
|
||||
unsigned fsid; /* device # */
|
||||
unsigned fileid; /* inode # */
|
||||
nfstime atime; /* time of last access */
|
||||
nfstime mtime; /* time of last modification */
|
||||
nfstime ctime; /* time of last change */
|
||||
};
|
||||
|
||||
/*
|
||||
* File attributes which can be set
|
||||
*/
|
||||
struct sattr {
|
||||
unsigned mode; /* protection mode bits */
|
||||
unsigned uid; /* owner user id */
|
||||
unsigned gid; /* owner group id */
|
||||
unsigned size; /* file size in bytes */
|
||||
nfstime atime; /* time of last access */
|
||||
nfstime mtime; /* time of last modification */
|
||||
};
|
||||
|
||||
|
||||
typedef string filename<NFS_MAXNAMLEN>;
|
||||
typedef string nfspath<NFS_MAXPATHLEN>;
|
||||
|
||||
/*
|
||||
* Reply status with file attributes
|
||||
*/
|
||||
union attrstat switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
fattr attributes;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
struct sattrargs {
|
||||
nfs_fh file;
|
||||
sattr attributes;
|
||||
};
|
||||
|
||||
/*
|
||||
* Arguments for directory operations
|
||||
*/
|
||||
struct diropargs {
|
||||
nfs_fh dir; /* directory file handle */
|
||||
filename name; /* name (up to NFS_MAXNAMLEN bytes) */
|
||||
};
|
||||
|
||||
struct diropokres {
|
||||
nfs_fh file;
|
||||
fattr attributes;
|
||||
};
|
||||
|
||||
/*
|
||||
* Results from directory operation
|
||||
*/
|
||||
union diropres switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
diropokres diropres;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
union readlinkres switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
nfspath data;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
/*
|
||||
* Arguments to remote read
|
||||
*/
|
||||
struct readargs {
|
||||
nfs_fh file; /* handle for file */
|
||||
unsigned offset; /* byte offset in file */
|
||||
unsigned count; /* immediate read count */
|
||||
unsigned totalcount; /* total read count (from this offset)*/
|
||||
};
|
||||
|
||||
/*
|
||||
* Status OK portion of remote read reply
|
||||
*/
|
||||
struct readokres {
|
||||
fattr attributes; /* attributes, need for pagin*/
|
||||
opaque data<NFS_MAXDATA>;
|
||||
};
|
||||
|
||||
union readres switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
readokres reply;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
/*
|
||||
* Arguments to remote write
|
||||
*/
|
||||
struct writeargs {
|
||||
nfs_fh file; /* handle for file */
|
||||
unsigned beginoffset; /* beginning byte offset in file */
|
||||
unsigned offset; /* current byte offset in file */
|
||||
unsigned totalcount; /* total write count (to this offset)*/
|
||||
opaque data<NFS_MAXDATA>;
|
||||
};
|
||||
|
||||
struct createargs {
|
||||
diropargs where;
|
||||
sattr attributes;
|
||||
};
|
||||
|
||||
struct renameargs {
|
||||
diropargs from;
|
||||
diropargs to;
|
||||
};
|
||||
|
||||
struct linkargs {
|
||||
nfs_fh from;
|
||||
diropargs to;
|
||||
};
|
||||
|
||||
struct symlinkargs {
|
||||
diropargs from;
|
||||
nfspath to;
|
||||
sattr attributes;
|
||||
};
|
||||
|
||||
|
||||
typedef opaque nfscookie[NFS_COOKIESIZE];
|
||||
|
||||
/*
|
||||
* Arguments to readdir
|
||||
*/
|
||||
struct readdirargs {
|
||||
nfs_fh dir; /* directory handle */
|
||||
nfscookie cookie;
|
||||
unsigned count; /* number of directory bytes to read */
|
||||
};
|
||||
|
||||
struct entry {
|
||||
unsigned fileid;
|
||||
filename name;
|
||||
nfscookie cookie;
|
||||
entry *nextentry;
|
||||
};
|
||||
|
||||
struct dirlist {
|
||||
entry *entries;
|
||||
bool eof;
|
||||
};
|
||||
|
||||
union readdirres switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
dirlist reply;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
struct statfsokres {
|
||||
unsigned tsize; /* preferred transfer size in bytes */
|
||||
unsigned bsize; /* fundamental file system block size */
|
||||
unsigned blocks; /* total blocks in file system */
|
||||
unsigned bfree; /* free blocks in fs */
|
||||
unsigned bavail; /* free blocks avail to non-superuser */
|
||||
};
|
||||
|
||||
union statfsres switch (nfsstat status) {
|
||||
case NFS_OK:
|
||||
statfsokres reply;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
/*
|
||||
* Remote file service routines
|
||||
*/
|
||||
program NFS_PROGRAM {
|
||||
version NFS_VERSION {
|
||||
void
|
||||
NFSPROC_NULL(void) = 0;
|
||||
|
||||
attrstat
|
||||
NFSPROC_GETATTR(nfs_fh) = 1;
|
||||
|
||||
attrstat
|
||||
NFSPROC_SETATTR(sattrargs) = 2;
|
||||
|
||||
void
|
||||
NFSPROC_ROOT(void) = 3;
|
||||
|
||||
diropres
|
||||
NFSPROC_LOOKUP(diropargs) = 4;
|
||||
|
||||
readlinkres
|
||||
NFSPROC_READLINK(nfs_fh) = 5;
|
||||
|
||||
readres
|
||||
NFSPROC_READ(readargs) = 6;
|
||||
|
||||
void
|
||||
NFSPROC_WRITECACHE(void) = 7;
|
||||
|
||||
attrstat
|
||||
NFSPROC_WRITE(writeargs) = 8;
|
||||
|
||||
diropres
|
||||
NFSPROC_CREATE(createargs) = 9;
|
||||
|
||||
nfsstat
|
||||
NFSPROC_REMOVE(diropargs) = 10;
|
||||
|
||||
nfsstat
|
||||
NFSPROC_RENAME(renameargs) = 11;
|
||||
|
||||
nfsstat
|
||||
NFSPROC_LINK(linkargs) = 12;
|
||||
|
||||
nfsstat
|
||||
NFSPROC_SYMLINK(symlinkargs) = 13;
|
||||
|
||||
diropres
|
||||
NFSPROC_MKDIR(createargs) = 14;
|
||||
|
||||
nfsstat
|
||||
NFSPROC_RMDIR(diropargs) = 15;
|
||||
|
||||
readdirres
|
||||
NFSPROC_READDIR(readdirargs) = 16;
|
||||
|
||||
statfsres
|
||||
NFSPROC_STATFS(nfs_fh) = 17;
|
||||
} = 2;
|
||||
} = 100003;
|
||||
616
openflow/usr/include/rpcsvc/nis.h
Normal file
616
openflow/usr/include/rpcsvc/nis.h
Normal file
@@ -0,0 +1,616 @@
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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 _RPCSVC_NIS_H
|
||||
#define _RPCSVC_NIS_H 1
|
||||
|
||||
#include <features.h>
|
||||
#include <rpc/rpc.h>
|
||||
#include <rpcsvc/nis_tags.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/*
|
||||
* nis.h
|
||||
*
|
||||
* This file is the main include file for NIS clients. It contains
|
||||
* both the client library function defines and the various data
|
||||
* structures used by the NIS service. It includes the file nis_tags.h
|
||||
* which defines the tag values. This allows the tags to change without
|
||||
* having to change the nis.x file.
|
||||
*
|
||||
* NOTE : THIS FILE IS NOT GENERATED WITH RPCGEN ! SO YOU HAVE TO
|
||||
* ADD ALL THE CHANGES ON nis_*.x FILES HERE AGAIN !
|
||||
*
|
||||
* I have removed all the Solaris internal structs and variables,
|
||||
* because they are not supported, Sun changed them between various
|
||||
* releases and they shouldn't be used in user programs.
|
||||
* <kukuk@suse.de>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __nis_object_h
|
||||
#define __nis_object_h
|
||||
|
||||
#define NIS_MAXSTRINGLEN 255
|
||||
#define NIS_MAXNAMELEN 1024
|
||||
#define NIS_MAXATTRNAME 32
|
||||
#define NIS_MAXATTRVAL 2048
|
||||
#define NIS_MAXCOLUMNS 64
|
||||
#define NIS_MAXATTR 16
|
||||
#define NIS_MAXPATH 1024
|
||||
#define NIS_MAXREPLICAS 128
|
||||
#define NIS_MAXLINKS 16
|
||||
#define NIS_PK_NONE 0
|
||||
#define NIS_PK_DH 1
|
||||
#define NIS_PK_RSA 2
|
||||
#define NIS_PK_KERB 3
|
||||
#define NIS_PK_DHEXT 4
|
||||
|
||||
struct nis_attr {
|
||||
char *zattr_ndx;
|
||||
struct {
|
||||
u_int zattr_val_len;
|
||||
char *zattr_val_val;
|
||||
} zattr_val;
|
||||
};
|
||||
typedef struct nis_attr nis_attr;
|
||||
|
||||
typedef char *nis_name;
|
||||
|
||||
enum zotypes {
|
||||
BOGUS_OBJ = 0,
|
||||
NO_OBJ = 1,
|
||||
DIRECTORY_OBJ = 2,
|
||||
GROUP_OBJ = 3,
|
||||
TABLE_OBJ = 4,
|
||||
ENTRY_OBJ = 5,
|
||||
LINK_OBJ = 6,
|
||||
PRIVATE_OBJ = 7,
|
||||
NIS_BOGUS_OBJ = 0,
|
||||
NIS_NO_OBJ = 1,
|
||||
NIS_DIRECTORY_OBJ = 2,
|
||||
NIS_GROUP_OBJ = 3,
|
||||
NIS_TABLE_OBJ = 4,
|
||||
NIS_ENTRY_OBJ = 5,
|
||||
NIS_LINK_OBJ = 6,
|
||||
NIS_PRIVATE_OBJ = 7
|
||||
};
|
||||
typedef enum zotypes zotypes;
|
||||
|
||||
enum nstype {
|
||||
UNKNOWN = 0,
|
||||
NIS = 1,
|
||||
SUNYP = 2,
|
||||
IVY = 3,
|
||||
DNS = 4,
|
||||
X500 = 5,
|
||||
DNANS = 6,
|
||||
XCHS = 7,
|
||||
CDS = 8,
|
||||
};
|
||||
typedef enum nstype nstype;
|
||||
|
||||
struct oar_mask {
|
||||
uint32_t oa_rights;
|
||||
zotypes oa_otype;
|
||||
};
|
||||
typedef struct oar_mask oar_mask;
|
||||
|
||||
struct endpoint {
|
||||
char *uaddr;
|
||||
char *family;
|
||||
char *proto;
|
||||
};
|
||||
typedef struct endpoint endpoint;
|
||||
|
||||
struct nis_server {
|
||||
nis_name name;
|
||||
struct {
|
||||
u_int ep_len;
|
||||
endpoint *ep_val;
|
||||
} ep;
|
||||
uint32_t key_type;
|
||||
netobj pkey;
|
||||
};
|
||||
typedef struct nis_server nis_server;
|
||||
|
||||
struct directory_obj {
|
||||
nis_name do_name;
|
||||
nstype do_type;
|
||||
struct {
|
||||
u_int do_servers_len;
|
||||
nis_server *do_servers_val;
|
||||
} do_servers;
|
||||
uint32_t do_ttl;
|
||||
struct {
|
||||
u_int do_armask_len;
|
||||
oar_mask *do_armask_val;
|
||||
} do_armask;
|
||||
};
|
||||
typedef struct directory_obj directory_obj;
|
||||
|
||||
#define EN_BINARY 1
|
||||
#define EN_CRYPT 2
|
||||
#define EN_XDR 4
|
||||
#define EN_MODIFIED 8
|
||||
#define EN_ASN1 64
|
||||
|
||||
struct entry_col {
|
||||
uint32_t ec_flags;
|
||||
struct {
|
||||
u_int ec_value_len;
|
||||
char *ec_value_val;
|
||||
} ec_value;
|
||||
};
|
||||
typedef struct entry_col entry_col;
|
||||
|
||||
struct entry_obj {
|
||||
char *en_type;
|
||||
struct {
|
||||
u_int en_cols_len;
|
||||
entry_col *en_cols_val;
|
||||
} en_cols;
|
||||
};
|
||||
typedef struct entry_obj entry_obj;
|
||||
|
||||
struct group_obj {
|
||||
uint32_t gr_flags;
|
||||
struct {
|
||||
u_int gr_members_len;
|
||||
nis_name *gr_members_val;
|
||||
} gr_members;
|
||||
};
|
||||
typedef struct group_obj group_obj;
|
||||
|
||||
struct link_obj {
|
||||
zotypes li_rtype;
|
||||
struct {
|
||||
u_int li_attrs_len;
|
||||
nis_attr *li_attrs_val;
|
||||
} li_attrs;
|
||||
nis_name li_name;
|
||||
};
|
||||
typedef struct link_obj link_obj;
|
||||
|
||||
#define TA_BINARY 1
|
||||
#define TA_CRYPT 2
|
||||
#define TA_XDR 4
|
||||
#define TA_SEARCHABLE 8
|
||||
#define TA_CASE 16
|
||||
#define TA_MODIFIED 32
|
||||
#define TA_ASN1 64
|
||||
|
||||
struct table_col {
|
||||
char *tc_name;
|
||||
uint32_t tc_flags;
|
||||
uint32_t tc_rights;
|
||||
};
|
||||
typedef struct table_col table_col;
|
||||
|
||||
struct table_obj {
|
||||
char *ta_type;
|
||||
int ta_maxcol;
|
||||
u_char ta_sep;
|
||||
struct {
|
||||
u_int ta_cols_len;
|
||||
table_col *ta_cols_val;
|
||||
} ta_cols;
|
||||
char *ta_path;
|
||||
};
|
||||
typedef struct table_obj table_obj;
|
||||
|
||||
struct objdata {
|
||||
zotypes zo_type;
|
||||
union {
|
||||
struct directory_obj di_data;
|
||||
struct group_obj gr_data;
|
||||
struct table_obj ta_data;
|
||||
struct entry_obj en_data;
|
||||
struct link_obj li_data;
|
||||
struct {
|
||||
u_int po_data_len;
|
||||
char *po_data_val;
|
||||
} po_data;
|
||||
} objdata_u;
|
||||
};
|
||||
typedef struct objdata objdata;
|
||||
|
||||
struct nis_oid {
|
||||
uint32_t ctime;
|
||||
uint32_t mtime;
|
||||
};
|
||||
typedef struct nis_oid nis_oid;
|
||||
|
||||
struct nis_object {
|
||||
nis_oid zo_oid;
|
||||
nis_name zo_name;
|
||||
nis_name zo_owner;
|
||||
nis_name zo_group;
|
||||
nis_name zo_domain;
|
||||
uint32_t zo_access;
|
||||
uint32_t zo_ttl;
|
||||
objdata zo_data;
|
||||
};
|
||||
typedef struct nis_object nis_object;
|
||||
|
||||
#endif /* if __nis_object_h */
|
||||
|
||||
enum nis_error {
|
||||
NIS_SUCCESS = 0,
|
||||
NIS_S_SUCCESS = 1,
|
||||
NIS_NOTFOUND = 2,
|
||||
NIS_S_NOTFOUND = 3,
|
||||
NIS_CACHEEXPIRED = 4,
|
||||
NIS_NAMEUNREACHABLE = 5,
|
||||
NIS_UNKNOWNOBJ = 6,
|
||||
NIS_TRYAGAIN = 7,
|
||||
NIS_SYSTEMERROR = 8,
|
||||
NIS_CHAINBROKEN = 9,
|
||||
NIS_PERMISSION = 10,
|
||||
NIS_NOTOWNER = 11,
|
||||
NIS_NOT_ME = 12,
|
||||
NIS_NOMEMORY = 13,
|
||||
NIS_NAMEEXISTS = 14,
|
||||
NIS_NOTMASTER = 15,
|
||||
NIS_INVALIDOBJ = 16,
|
||||
NIS_BADNAME = 17,
|
||||
NIS_NOCALLBACK = 18,
|
||||
NIS_CBRESULTS = 19,
|
||||
NIS_NOSUCHNAME = 20,
|
||||
NIS_NOTUNIQUE = 21,
|
||||
NIS_IBMODERROR = 22,
|
||||
NIS_NOSUCHTABLE = 23,
|
||||
NIS_TYPEMISMATCH = 24,
|
||||
NIS_LINKNAMEERROR = 25,
|
||||
NIS_PARTIAL = 26,
|
||||
NIS_TOOMANYATTRS = 27,
|
||||
NIS_RPCERROR = 28,
|
||||
NIS_BADATTRIBUTE = 29,
|
||||
NIS_NOTSEARCHABLE = 30,
|
||||
NIS_CBERROR = 31,
|
||||
NIS_FOREIGNNS = 32,
|
||||
NIS_BADOBJECT = 33,
|
||||
NIS_NOTSAMEOBJ = 34,
|
||||
NIS_MODFAIL = 35,
|
||||
NIS_BADREQUEST = 36,
|
||||
NIS_NOTEMPTY = 37,
|
||||
NIS_COLDSTART_ERR = 38,
|
||||
NIS_RESYNC = 39,
|
||||
NIS_FAIL = 40,
|
||||
NIS_UNAVAIL = 41,
|
||||
NIS_RES2BIG = 42,
|
||||
NIS_SRVAUTH = 43,
|
||||
NIS_CLNTAUTH = 44,
|
||||
NIS_NOFILESPACE = 45,
|
||||
NIS_NOPROC = 46,
|
||||
NIS_DUMPLATER = 47,
|
||||
};
|
||||
typedef enum nis_error nis_error;
|
||||
|
||||
struct nis_result {
|
||||
nis_error status;
|
||||
struct {
|
||||
u_int objects_len;
|
||||
nis_object *objects_val;
|
||||
} objects;
|
||||
netobj cookie;
|
||||
uint32_t zticks;
|
||||
uint32_t dticks;
|
||||
uint32_t aticks;
|
||||
uint32_t cticks;
|
||||
};
|
||||
typedef struct nis_result nis_result;
|
||||
|
||||
struct ns_request {
|
||||
nis_name ns_name;
|
||||
struct {
|
||||
u_int ns_object_len;
|
||||
nis_object *ns_object_val;
|
||||
} ns_object;
|
||||
};
|
||||
typedef struct ns_request ns_request;
|
||||
|
||||
struct ib_request {
|
||||
nis_name ibr_name;
|
||||
struct {
|
||||
u_int ibr_srch_len;
|
||||
nis_attr *ibr_srch_val;
|
||||
} ibr_srch;
|
||||
uint32_t ibr_flags;
|
||||
struct {
|
||||
u_int ibr_obj_len;
|
||||
nis_object *ibr_obj_val;
|
||||
} ibr_obj;
|
||||
struct {
|
||||
u_int ibr_cbhost_len;
|
||||
nis_server *ibr_cbhost_val;
|
||||
} ibr_cbhost;
|
||||
u_int ibr_bufsize;
|
||||
netobj ibr_cookie;
|
||||
};
|
||||
typedef struct ib_request ib_request;
|
||||
|
||||
struct ping_args {
|
||||
nis_name dir;
|
||||
uint32_t stamp;
|
||||
};
|
||||
typedef struct ping_args ping_args;
|
||||
|
||||
enum log_entry_t {
|
||||
LOG_NOP = 0,
|
||||
ADD_NAME = 1,
|
||||
REM_NAME = 2,
|
||||
MOD_NAME_OLD = 3,
|
||||
MOD_NAME_NEW = 4,
|
||||
ADD_IBASE = 5,
|
||||
REM_IBASE = 6,
|
||||
MOD_IBASE = 7,
|
||||
UPD_STAMP = 8,
|
||||
};
|
||||
typedef enum log_entry_t log_entry_t;
|
||||
|
||||
struct log_entry {
|
||||
uint32_t le_time;
|
||||
log_entry_t le_type;
|
||||
nis_name le_princp;
|
||||
nis_name le_name;
|
||||
struct {
|
||||
u_int le_attrs_len;
|
||||
nis_attr *le_attrs_val;
|
||||
} le_attrs;
|
||||
nis_object le_object;
|
||||
};
|
||||
typedef struct log_entry log_entry;
|
||||
|
||||
struct log_result {
|
||||
nis_error lr_status;
|
||||
netobj lr_cookie;
|
||||
struct {
|
||||
u_int lr_entries_len;
|
||||
log_entry *lr_entries_val;
|
||||
} lr_entries;
|
||||
};
|
||||
typedef struct log_result log_result;
|
||||
|
||||
struct cp_result {
|
||||
nis_error cp_status;
|
||||
uint32_t cp_zticks;
|
||||
uint32_t cp_dticks;
|
||||
};
|
||||
typedef struct cp_result cp_result;
|
||||
|
||||
struct nis_tag {
|
||||
uint32_t tag_type;
|
||||
char *tag_val;
|
||||
};
|
||||
typedef struct nis_tag nis_tag;
|
||||
|
||||
struct nis_taglist {
|
||||
struct {
|
||||
u_int tags_len;
|
||||
nis_tag *tags_val;
|
||||
} tags;
|
||||
};
|
||||
typedef struct nis_taglist nis_taglist;
|
||||
|
||||
struct dump_args {
|
||||
nis_name da_dir;
|
||||
uint32_t da_time;
|
||||
struct {
|
||||
u_int da_cbhost_len;
|
||||
nis_server *da_cbhost_val;
|
||||
} da_cbhost;
|
||||
};
|
||||
typedef struct dump_args dump_args;
|
||||
|
||||
struct fd_args {
|
||||
nis_name dir_name;
|
||||
nis_name requester;
|
||||
};
|
||||
typedef struct fd_args fd_args;
|
||||
|
||||
struct fd_result {
|
||||
nis_error status;
|
||||
nis_name source;
|
||||
struct {
|
||||
u_int dir_data_len;
|
||||
char *dir_data_val;
|
||||
} dir_data;
|
||||
struct {
|
||||
u_int signature_len;
|
||||
char *signature_val;
|
||||
} signature;
|
||||
};
|
||||
typedef struct fd_result fd_result;
|
||||
|
||||
/* Generic client creating flags */
|
||||
#define ZMH_VC 1
|
||||
#define ZMH_DG 2
|
||||
#define ZMH_AUTH 4
|
||||
|
||||
/* Testing Access rights for objects */
|
||||
|
||||
#define NIS_READ_ACC 1
|
||||
#define NIS_MODIFY_ACC 2
|
||||
#define NIS_CREATE_ACC 4
|
||||
#define NIS_DESTROY_ACC 8
|
||||
/* Test macros. a == access rights, m == desired rights. */
|
||||
#define NIS_WORLD(a, m) (((a) & (m)) != 0)
|
||||
#define NIS_GROUP(a, m) (((a) & ((m) << 8)) != 0)
|
||||
#define NIS_OWNER(a, m) (((a) & ((m) << 16)) != 0)
|
||||
#define NIS_NOBODY(a, m) (((a) & ((m) << 24)) != 0)
|
||||
/*
|
||||
* EOL Alert - The following non-prefixed test macros are
|
||||
* here for backward compatibility, and will be not be present
|
||||
* in future releases - use the NIS_*() macros above.
|
||||
*/
|
||||
#define WORLD(a, m) (((a) & (m)) != 0)
|
||||
#define GROUP(a, m) (((a) & ((m) << 8)) != 0)
|
||||
#define OWNER(a, m) (((a) & ((m) << 16)) != 0)
|
||||
#define NOBODY(a, m) (((a) & ((m) << 24)) != 0)
|
||||
|
||||
#define OATYPE(d, n) (((d)->do_armask.do_armask_val+n)->oa_otype)
|
||||
#define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights)
|
||||
#define WORLD_DEFAULT (NIS_READ_ACC)
|
||||
#define GROUP_DEFAULT (NIS_READ_ACC << 8)
|
||||
#define OWNER_DEFAULT ((NIS_READ_ACC + NIS_MODIFY_ACC + NIS_CREATE_ACC +\
|
||||
NIS_DESTROY_ACC) << 16)
|
||||
#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT)
|
||||
|
||||
/* Result manipulation defines ... */
|
||||
#define NIS_RES_NUMOBJ(x) ((x)->objects.objects_len)
|
||||
#define NIS_RES_OBJECT(x) ((x)->objects.objects_val)
|
||||
#define NIS_RES_COOKIE(x) ((x)->cookie)
|
||||
#define NIS_RES_STATUS(x) ((x)->status)
|
||||
|
||||
/* These defines make getting at the variant part of the object easier. */
|
||||
#define TA_data zo_data.objdata_u.ta_data
|
||||
#define EN_data zo_data.objdata_u.en_data
|
||||
#define DI_data zo_data.objdata_u.di_data
|
||||
#define LI_data zo_data.objdata_u.li_data
|
||||
#define GR_data zo_data.objdata_u.gr_data
|
||||
|
||||
#define __type_of(o) ((o)->zo_data.zo_type)
|
||||
|
||||
/* Declarations for the internal subroutines in nislib.c */
|
||||
enum name_pos {SAME_NAME, HIGHER_NAME, LOWER_NAME, NOT_SEQUENTIAL, BAD_NAME};
|
||||
typedef enum name_pos name_pos;
|
||||
|
||||
/*
|
||||
* Defines for getting at column data in entry objects. Because RPCGEN
|
||||
* generates some rather wordy structures, we create some defines that
|
||||
* collapse the needed keystrokes to access a particular value using
|
||||
* these definitions they take an nis_object *, and an int and return
|
||||
* a u_char * for Value, and an int for length.
|
||||
*/
|
||||
#define ENTRY_VAL(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val
|
||||
#define ENTRY_LEN(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len
|
||||
|
||||
|
||||
/* Prototypes, and extern declarations for the NIS library functions. */
|
||||
#include <rpcsvc/nislib.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* nis_3.h
|
||||
*
|
||||
* This file contains definitions that are only of interest to the actual
|
||||
* service daemon and client stubs. Normal users of NIS will not include
|
||||
* this file.
|
||||
*
|
||||
* NOTE : This include file is automatically created by a combination
|
||||
* of rpcgen and sed. DO NOT EDIT IT, change the nis.x file instead
|
||||
* and then remake this file.
|
||||
*/
|
||||
#ifndef __nis_3_h
|
||||
#define __nis_3_h
|
||||
|
||||
#define NIS_PROG 100300
|
||||
#define NIS_VERSION 3
|
||||
|
||||
#define NIS_LOOKUP 1
|
||||
extern nis_result * nis_lookup_3 (ns_request *, CLIENT *) __THROW;
|
||||
extern nis_result * nis_lookup_3_svc (ns_request *, struct svc_req *) __THROW;
|
||||
#define NIS_ADD 2
|
||||
extern nis_result * nis_add_3 (ns_request *, CLIENT *) __THROW;
|
||||
extern nis_result * nis_add_3_svc (ns_request *, struct svc_req *) __THROW;
|
||||
#define NIS_MODIFY 3
|
||||
extern nis_result * nis_modify_3 (ns_request *, CLIENT *) __THROW;
|
||||
extern nis_result * nis_modify_3_svc (ns_request *, struct svc_req *) __THROW;
|
||||
#define NIS_REMOVE 4
|
||||
extern nis_result * nis_remove_3 (ns_request *, CLIENT *) __THROW;
|
||||
extern nis_result * nis_remove_3_svc (ns_request *, struct svc_req *) __THROW;
|
||||
#define NIS_IBLIST 5
|
||||
extern nis_result * nis_iblist_3 (ib_request *, CLIENT *) __THROW;
|
||||
extern nis_result * nis_iblist_3_svc (ib_request *, struct svc_req *) __THROW;
|
||||
#define NIS_IBADD 6
|
||||
extern nis_result * nis_ibadd_3 (ib_request *, CLIENT *) __THROW;
|
||||
extern nis_result * nis_ibadd_3_svc (ib_request *, struct svc_req *) __THROW;
|
||||
#define NIS_IBMODIFY 7
|
||||
extern nis_result * nis_ibmodify_3 (ib_request *, CLIENT *) __THROW;
|
||||
extern nis_result * nis_ibmodify_3_svc (ib_request *, struct svc_req *)
|
||||
__THROW;
|
||||
#define NIS_IBREMOVE 8
|
||||
extern nis_result * nis_ibremove_3 (ib_request *, CLIENT *) __THROW;
|
||||
extern nis_result * nis_ibremove_3_svc (ib_request *, struct svc_req *)
|
||||
__THROW;
|
||||
#define NIS_IBFIRST 9
|
||||
extern nis_result * nis_ibfirst_3 (ib_request *, CLIENT *) __THROW;
|
||||
extern nis_result * nis_ibfirst_3_svc (ib_request *, struct svc_req *)
|
||||
__THROW;
|
||||
#define NIS_IBNEXT 10
|
||||
extern nis_result * nis_ibnext_3 (ib_request *, CLIENT *) __THROW;
|
||||
extern nis_result * nis_ibnext_3_svc (ib_request *, struct svc_req *) __THROW;
|
||||
#define NIS_FINDDIRECTORY 12
|
||||
extern fd_result * nis_finddirectory_3 (fd_args *, CLIENT *) __THROW;
|
||||
extern fd_result * nis_finddirectory_3_svc (fd_args *,
|
||||
struct svc_req *) __THROW;
|
||||
#define NIS_STATUS 14
|
||||
extern nis_taglist * nis_status_3 (nis_taglist *, CLIENT *) __THROW;
|
||||
extern nis_taglist * nis_status_3_svc (nis_taglist *, struct svc_req *)
|
||||
__THROW;
|
||||
#define NIS_DUMPLOG 15
|
||||
extern log_result * nis_dumplog_3 (dump_args *, CLIENT *) __THROW;
|
||||
extern log_result * nis_dumplog_3_svc (dump_args *, struct svc_req *) __THROW;
|
||||
#define NIS_DUMP 16
|
||||
extern log_result * nis_dump_3 (dump_args *, CLIENT *) __THROW;
|
||||
extern log_result * nis_dump_3_svc (dump_args *, struct svc_req *) __THROW;
|
||||
#define NIS_CALLBACK 17
|
||||
extern bool_t * nis_callback_3 (netobj *, CLIENT *) __THROW;
|
||||
extern bool_t * nis_callback_3_svc (netobj *, struct svc_req *) __THROW;
|
||||
#define NIS_CPTIME 18
|
||||
extern uint32_t * nis_cptime_3 (nis_name *, CLIENT *) __THROW;
|
||||
extern uint32_t * nis_cptime_3_svc (nis_name *, struct svc_req *) __THROW;
|
||||
#define NIS_CHECKPOINT 19
|
||||
extern cp_result * nis_checkpoint_3 (nis_name *, CLIENT *) __THROW;
|
||||
extern cp_result * nis_checkpoint_3_svc (nis_name *, struct svc_req *)
|
||||
__THROW;
|
||||
#define NIS_PING 20
|
||||
extern void * nis_ping_3 (ping_args *, CLIENT *) __THROW;
|
||||
extern void * nis_ping_3_svc (ping_args *, struct svc_req *) __THROW;
|
||||
#define NIS_SERVSTATE 21
|
||||
extern nis_taglist * nis_servstate_3 (nis_taglist *, CLIENT *) __THROW;
|
||||
extern nis_taglist * nis_servstate_3_svc (nis_taglist *,
|
||||
struct svc_req *) __THROW;
|
||||
#define NIS_MKDIR 22
|
||||
extern nis_error * nis_mkdir_3 (nis_name *, CLIENT *) __THROW;
|
||||
extern nis_error * nis_mkdir_3_svc (nis_name *, struct svc_req *) __THROW;
|
||||
#define NIS_RMDIR 23
|
||||
extern nis_error * nis_rmdir_3 (nis_name *, CLIENT *) __THROW;
|
||||
extern nis_error * nis_rmdir_3_svc (nis_name *, struct svc_req *) __THROW;
|
||||
#define NIS_UPDKEYS 24
|
||||
extern nis_error * nis_updkeys_3 (nis_name *, CLIENT *) __THROW;
|
||||
extern nis_error * nis_updkeys_3_svc (nis_name *, struct svc_req *) __THROW;
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* ! _RPCSVC_NIS_H */
|
||||
474
openflow/usr/include/rpcsvc/nis.x
Normal file
474
openflow/usr/include/rpcsvc/nis.x
Normal file
@@ -0,0 +1,474 @@
|
||||
%/*
|
||||
% * Copyright (c) 2010, Oracle America, 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.
|
||||
% */
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%/*
|
||||
% * nis.h
|
||||
% *
|
||||
% * This file is the main include file for NIS clients. It contains
|
||||
% * both the client library function defines and the various data
|
||||
% * structures used by the NIS service. It includes the file nis_tags.h
|
||||
% * which defines the tag values. This allows the tags to change without
|
||||
% * having to change the nis.x file.
|
||||
% *
|
||||
% * NOTE : DO NOT EDIT THIS FILE! It is automatically generated when
|
||||
% * rpcgen is run on the nis.x file. Note that there is a
|
||||
% * simple sed script to remove some unneeded lines. (See the
|
||||
% * Makefile target nis.h)
|
||||
% *
|
||||
% */
|
||||
%#include <rpcsvc/nis_tags.h>
|
||||
#endif
|
||||
|
||||
/* This gets stuffed into the source files. */
|
||||
#if RPC_HDR
|
||||
%#include <rpc/xdr.h>
|
||||
#endif
|
||||
|
||||
/* Include the RPC Language description of NIS objects */
|
||||
#include "nis_object.x"
|
||||
|
||||
/* Errors that can be returned by the service */
|
||||
enum nis_error {
|
||||
NIS_SUCCESS = 0, /* A-ok, let's rock n roll */
|
||||
NIS_S_SUCCESS = 1, /* Name found (maybe) */
|
||||
NIS_NOTFOUND = 2, /* Name definitely not found */
|
||||
NIS_S_NOTFOUND = 3, /* Name maybe not found */
|
||||
NIS_CACHEEXPIRED = 4, /* Name exists but cache out of date */
|
||||
NIS_NAMEUNREACHABLE = 5, /* Can't get there from here */
|
||||
NIS_UNKNOWNOBJ = 6, /* Object type is bogus */
|
||||
NIS_TRYAGAIN = 7, /* I'm busy, call back */
|
||||
NIS_SYSTEMERROR = 8, /* Generic system error */
|
||||
NIS_CHAINBROKEN = 9, /* First/Next warning */
|
||||
NIS_PERMISSION = 10, /* Not enough permission to access */
|
||||
NIS_NOTOWNER = 11, /* You don't own it, sorry */
|
||||
NIS_NOT_ME = 12, /* I don't serve this name */
|
||||
NIS_NOMEMORY = 13, /* Outta VM! Help! */
|
||||
NIS_NAMEEXISTS = 14, /* Can't create over another name */
|
||||
NIS_NOTMASTER = 15, /* I'm justa secondaray, don't ask me */
|
||||
NIS_INVALIDOBJ = 16, /* Object is broken somehow */
|
||||
NIS_BADNAME = 17, /* Unparsable name */
|
||||
NIS_NOCALLBACK = 18, /* Couldn't talk to call back proc */
|
||||
NIS_CBRESULTS = 19, /* Results being called back to you */
|
||||
NIS_NOSUCHNAME = 20, /* Name unknown */
|
||||
NIS_NOTUNIQUE = 21, /* Value is not uniques (entry) */
|
||||
NIS_IBMODERROR = 22, /* Inf. Base. Modify error. */
|
||||
NIS_NOSUCHTABLE = 23, /* Name for table was wrong */
|
||||
NIS_TYPEMISMATCH = 24, /* Entry and table type mismatch */
|
||||
NIS_LINKNAMEERROR = 25, /* Link points to bogus name */
|
||||
NIS_PARTIAL = 26, /* Partial success, found table */
|
||||
NIS_TOOMANYATTRS = 27, /* Too many attributes */
|
||||
NIS_RPCERROR = 28, /* RPC error encountered */
|
||||
NIS_BADATTRIBUTE = 29, /* Bad or invalid attribute */
|
||||
NIS_NOTSEARCHABLE = 30, /* Non-searchable object searched */
|
||||
NIS_CBERROR = 31, /* Error during callback (svc crash) */
|
||||
NIS_FOREIGNNS = 32, /* Foreign Namespace */
|
||||
NIS_BADOBJECT = 33, /* Malformed object structure */
|
||||
NIS_NOTSAMEOBJ = 34, /* Object swapped during deletion */
|
||||
NIS_MODFAIL = 35, /* Failure during a Modify. */
|
||||
NIS_BADREQUEST = 36, /* Illegal query for table */
|
||||
NIS_NOTEMPTY = 37, /* Attempt to remove a non-empty tbl */
|
||||
NIS_COLDSTART_ERR = 38, /* Error accesing the cold start file */
|
||||
NIS_RESYNC = 39, /* Transaction log too far out of date */
|
||||
NIS_FAIL = 40, /* NIS operation failed. */
|
||||
NIS_UNAVAIL = 41, /* NIS+ service is unavailable (client) */
|
||||
NIS_RES2BIG = 42, /* NIS+ result too big for datagram */
|
||||
NIS_SRVAUTH = 43, /* NIS+ server wasn't authenticated. */
|
||||
NIS_CLNTAUTH = 44, /* NIS+ Client wasn't authenticated. */
|
||||
NIS_NOFILESPACE = 45, /* NIS+ server ran out of disk space */
|
||||
NIS_NOPROC = 46, /* NIS+ server couldn't create new proc */
|
||||
NIS_DUMPLATER = 47 /* NIS+ server already has dump child */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Structure definitions for the parameters and results of the actual
|
||||
* NIS RPC calls.
|
||||
*
|
||||
* This is the standard result (in the protocol) of most of the nis
|
||||
* requests.
|
||||
*/
|
||||
|
||||
struct nis_result {
|
||||
nis_error status; /* Status of the response */
|
||||
nis_object objects<>; /* objects found */
|
||||
netobj cookie; /* Cookie Data */
|
||||
uint32_t zticks; /* server ticks */
|
||||
uint32_t dticks; /* DBM ticks. */
|
||||
uint32_t aticks; /* Cache (accel) ticks */
|
||||
uint32_t cticks; /* Client ticks */
|
||||
};
|
||||
|
||||
/*
|
||||
* A Name Service request
|
||||
* This request is used to access the name space, ns_name is the name
|
||||
* of the object within the namespace and the object is it's value, for
|
||||
* add/modify, a copy of the original for remove.
|
||||
*/
|
||||
|
||||
struct ns_request {
|
||||
nis_name ns_name; /* Name in the NIS name space */
|
||||
nis_object ns_object<1>; /* Optional Object (add/remove) */
|
||||
};
|
||||
|
||||
/*
|
||||
* An information base request
|
||||
* This request includes the NIS name of the table we wish to search, the
|
||||
* search criteria in the form of attribute/value pairs and an optional
|
||||
* callback program number. If the callback program number is provided
|
||||
* the server will send back objects one at a time, otherwise it will
|
||||
* return them all in the response.
|
||||
*/
|
||||
|
||||
struct ib_request {
|
||||
nis_name ibr_name; /* The name of the Table */
|
||||
nis_attr ibr_srch<>; /* The search critereia */
|
||||
uint32_t ibr_flags; /* Optional flags */
|
||||
nis_object ibr_obj<1>; /* optional object (add/modify) */
|
||||
nis_server ibr_cbhost<1>; /* Optional callback info */
|
||||
u_int ibr_bufsize; /* Optional first/next bufsize */
|
||||
netobj ibr_cookie; /* The first/next cookie */
|
||||
};
|
||||
|
||||
/*
|
||||
* This argument to the PING call notifies the replicas that something in
|
||||
* a directory has changed and this is it's timestamp. The replica will use
|
||||
* the timestamp to determine if its resync operation was successful.
|
||||
*/
|
||||
struct ping_args {
|
||||
nis_name dir; /* Directory that had the change */
|
||||
uint32_t stamp; /* timestamp of the transaction */
|
||||
};
|
||||
|
||||
/*
|
||||
* These are the type of entries that are stored in the transaction log,
|
||||
* note that modifications will appear as two entries, for names, they have
|
||||
* a "OLD" entry followed by a "NEW" entry. For entries in tables, there
|
||||
* is a remove followed by an add. It is done this way so that we can read
|
||||
* the log backwards to back out transactions and forwards to propogate
|
||||
* updated.
|
||||
*/
|
||||
enum log_entry_t {
|
||||
LOG_NOP = 0,
|
||||
ADD_NAME = 1, /* Name Added to name space */
|
||||
REM_NAME = 2, /* Name removed from name space */
|
||||
MOD_NAME_OLD = 3, /* Name was modified in the name space */
|
||||
MOD_NAME_NEW = 4, /* Name was modified in the name space */
|
||||
ADD_IBASE = 5, /* Entry added to information base */
|
||||
REM_IBASE = 6, /* Entry removed from information base */
|
||||
MOD_IBASE = 7, /* Entry was modified in information base */
|
||||
UPD_STAMP = 8 /* Update timestamp (used as fenceposts) */
|
||||
};
|
||||
|
||||
/*
|
||||
* This result is returned from the name service when it is requested to
|
||||
* dump logged entries from its transaction log. Information base updates
|
||||
* will have the name of the information base in the le_name field and
|
||||
* a canonical set of attribute/value pairs to fully specify the entry's
|
||||
* 'name'.
|
||||
*/
|
||||
struct log_entry {
|
||||
uint32_t le_time; /* Time in seconds */
|
||||
log_entry_t le_type; /* Type of log entry */
|
||||
nis_name le_princp; /* Principal making the change */
|
||||
nis_name le_name; /* Name of table/dir involved */
|
||||
nis_attr le_attrs<>; /* List of AV pairs. */
|
||||
nis_object le_object; /* Actual object value */
|
||||
};
|
||||
|
||||
struct log_result {
|
||||
nis_error lr_status; /* The status itself */
|
||||
netobj lr_cookie; /* Used by the dump callback */
|
||||
log_entry lr_entries<>; /* zero or more entries */
|
||||
};
|
||||
|
||||
struct cp_result {
|
||||
nis_error cp_status; /* Status of the checkpoint */
|
||||
uint32_t cp_zticks; /* Service 'ticks' */
|
||||
uint32_t cp_dticks; /* Database 'ticks' */
|
||||
};
|
||||
|
||||
/*
|
||||
* This structure defines a generic NIS tag list. The taglist contains
|
||||
* zero or tags, each of which is a type and a value. (u_int).
|
||||
* These are used to report statistics (see tag definitions below)
|
||||
* and to set or reset state variables.
|
||||
*/
|
||||
struct nis_tag {
|
||||
uint32_t tag_type; /* Statistic tag (may vary) */
|
||||
string tag_val<>; /* Statistic value may also vary */
|
||||
};
|
||||
|
||||
struct nis_taglist {
|
||||
nis_tag tags<>; /* List of tags */
|
||||
};
|
||||
|
||||
struct dump_args {
|
||||
nis_name da_dir; /* Directory to dump */
|
||||
uint32_t da_time; /* From this timestamp */
|
||||
nis_server da_cbhost<1>; /* Callback to use. */
|
||||
};
|
||||
|
||||
struct fd_args {
|
||||
nis_name dir_name; /* The directory we're looking for */
|
||||
nis_name requester; /* Host principal name for signature */
|
||||
};
|
||||
|
||||
struct fd_result {
|
||||
nis_error status; /* Status returned by function */
|
||||
nis_name source; /* Source of this answer */
|
||||
opaque dir_data<>; /* Directory Data (XDR'ed) */
|
||||
opaque signature<>; /* Signature of the source */
|
||||
};
|
||||
|
||||
%/*
|
||||
% * Structures used for server binding.
|
||||
% */
|
||||
struct nis_bound_endpoint {
|
||||
endpoint ep;
|
||||
int generation;
|
||||
int rank;
|
||||
uint32_t flags;
|
||||
int hostnum;
|
||||
int epnum;
|
||||
nis_name uaddr;
|
||||
endpoint cbep;
|
||||
};
|
||||
typedef struct nis_bound_endpoint nis_bound_endpoint;
|
||||
|
||||
struct nis_bound_directory {
|
||||
int generation;
|
||||
int min_rank; /* minimum rank of bound endpoints */
|
||||
int optimal_rank; /* best possible rank of all endpoints */
|
||||
directory_obj dobj;
|
||||
nis_bound_endpoint BEP<>;
|
||||
};
|
||||
typedef struct nis_bound_directory nis_bound_directory;
|
||||
%#define bep_len BEP.BEP_len
|
||||
%#define bep_val BEP.BEP_val
|
||||
|
||||
struct nis_active_endpoint {
|
||||
endpoint ep;
|
||||
nis_name hostname;
|
||||
int rank;
|
||||
int uaddr_generation;
|
||||
nis_name uaddr;
|
||||
int cbep_generation;
|
||||
endpoint cbep;
|
||||
};
|
||||
typedef struct nis_active_endpoint nis_active_endpoint;
|
||||
|
||||
%/* defines for nis_bound_endpoint.flags */
|
||||
%#define NIS_BOUND 0x1
|
||||
%#define NIS_TRANSIENT_ERRORS 0x2
|
||||
|
||||
program NIS_PROG {
|
||||
|
||||
/* RPC Language description of the NIS+ protocol */
|
||||
version NIS_VERSION {
|
||||
/* The name service functions */
|
||||
nis_result NIS_LOOKUP(ns_request) = 1;
|
||||
nis_result NIS_ADD(ns_request) = 2;
|
||||
nis_result NIS_MODIFY(ns_request) = 3;
|
||||
nis_result NIS_REMOVE(ns_request) = 4;
|
||||
|
||||
/* The information base functions */
|
||||
nis_result NIS_IBLIST(ib_request) = 5;
|
||||
nis_result NIS_IBADD(ib_request) = 6;
|
||||
nis_result NIS_IBMODIFY(ib_request) = 7;
|
||||
nis_result NIS_IBREMOVE(ib_request) = 8;
|
||||
nis_result NIS_IBFIRST(ib_request) = 9;
|
||||
nis_result NIS_IBNEXT(ib_request) = 10;
|
||||
|
||||
/* NIS Administrative functions */
|
||||
fd_result NIS_FINDDIRECTORY(fd_args) = 12;
|
||||
|
||||
/* If fetch and optionally reset statistics */
|
||||
nis_taglist NIS_STATUS(nis_taglist) = 14;
|
||||
|
||||
/* Dump changes to directory since time in da_time */
|
||||
log_result NIS_DUMPLOG(dump_args) = 15;
|
||||
|
||||
/* Dump contents of directory named */
|
||||
log_result NIS_DUMP(dump_args) = 16;
|
||||
|
||||
/* Check status of callback thread */
|
||||
bool NIS_CALLBACK(netobj) = 17;
|
||||
|
||||
/* Return last update time for named dir */
|
||||
uint32_t NIS_CPTIME(nis_name) = 18;
|
||||
|
||||
/* Checkpoint directory or table named */
|
||||
cp_result NIS_CHECKPOINT(nis_name) = 19;
|
||||
|
||||
/* Send 'status changed' ping to replicates */
|
||||
void NIS_PING(ping_args) = 20;
|
||||
|
||||
/* Modify server behaviour (such as debugging) */
|
||||
nis_taglist NIS_SERVSTATE(nis_taglist) = 21;
|
||||
|
||||
/* Create a Directory */
|
||||
nis_error NIS_MKDIR(nis_name) = 22;
|
||||
|
||||
/* Remove a Directory */
|
||||
nis_error NIS_RMDIR(nis_name) = 23;
|
||||
|
||||
/* Update public keys of a directory object */
|
||||
nis_error NIS_UPDKEYS(nis_name) = 24;
|
||||
} = 3;
|
||||
} = 100300;
|
||||
|
||||
/*
|
||||
* Included below are the defines that become part of nis.h,
|
||||
* they are technically not part of the protocol, but do define
|
||||
* key aspects of the implementation and are therefore useful
|
||||
* in building a conforming server or client.
|
||||
*/
|
||||
#if RPC_HDR
|
||||
%/*
|
||||
% * Generic "hash" datastructures, used by all types of hashed data.
|
||||
% */
|
||||
%struct nis_hash_data {
|
||||
% nis_name name; /* NIS name of hashed item */
|
||||
% int keychain; /* It's hash key (for pop) */
|
||||
% struct nis_hash_data *next; /* Hash collision pointer */
|
||||
% struct nis_hash_data *prv_item; /* A serial, doubly linked list */
|
||||
% struct nis_hash_data *nxt_item; /* of items in the hash table */
|
||||
%};
|
||||
%typedef struct nis_hash_data NIS_HASH_ITEM;
|
||||
%
|
||||
%struct nis_hash_table {
|
||||
% NIS_HASH_ITEM *keys[64]; /* A hash table of items */
|
||||
% NIS_HASH_ITEM *first; /* The first "item" in serial list */
|
||||
%};
|
||||
%typedef struct nis_hash_table NIS_HASH_TABLE;
|
||||
%
|
||||
%/* Structure for storing dynamically allocated static data */
|
||||
%struct nis_sdata {
|
||||
% void *buf; /* Memory allocation pointer */
|
||||
% u_int size; /* Buffer size */
|
||||
%};
|
||||
%
|
||||
%/* Generic client creating flags */
|
||||
%#define ZMH_VC 1
|
||||
%#define ZMH_DG 2
|
||||
%#define ZMH_AUTH 4
|
||||
%
|
||||
%/* Testing Access rights for objects */
|
||||
%
|
||||
%#define NIS_READ_ACC 1
|
||||
%#define NIS_MODIFY_ACC 2
|
||||
%#define NIS_CREATE_ACC 4
|
||||
%#define NIS_DESTROY_ACC 8
|
||||
%/* Test macros. a == access rights, m == desired rights. */
|
||||
%#define NIS_WORLD(a, m) (((a) & (m)) != 0)
|
||||
%#define NIS_GROUP(a, m) (((a) & ((m) << 8)) != 0)
|
||||
%#define NIS_OWNER(a, m) (((a) & ((m) << 16)) != 0)
|
||||
%#define NIS_NOBODY(a, m) (((a) & ((m) << 24)) != 0)
|
||||
%/*
|
||||
% * EOL Alert - The following non-prefixed test macros are
|
||||
% * here for backward compatability, and will be not be present
|
||||
% * in future releases - use the NIS_*() macros above.
|
||||
% */
|
||||
%#define WORLD(a, m) (((a) & (m)) != 0)
|
||||
%#define GROUP(a, m) (((a) & ((m) << 8)) != 0)
|
||||
%#define OWNER(a, m) (((a) & ((m) << 16)) != 0)
|
||||
%#define NOBODY(a, m) (((a) & ((m) << 24)) != 0)
|
||||
%
|
||||
%#define OATYPE(d, n) (((d)->do_armask.do_armask_val+n)->oa_otype)
|
||||
%#define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights)
|
||||
%#define WORLD_DEFAULT (NIS_READ_ACC)
|
||||
%#define GROUP_DEFAULT (NIS_READ_ACC << 8)
|
||||
%#define OWNER_DEFAULT ((NIS_READ_ACC +\
|
||||
NIS_MODIFY_ACC +\
|
||||
NIS_CREATE_ACC +\
|
||||
NIS_DESTROY_ACC) << 16)
|
||||
%#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT)
|
||||
%
|
||||
%/* Result manipulation defines ... */
|
||||
%#define NIS_RES_NUMOBJ(x) ((x)->objects.objects_len)
|
||||
%#define NIS_RES_OBJECT(x) ((x)->objects.objects_val)
|
||||
%#define NIS_RES_COOKIE(x) ((x)->cookie)
|
||||
%#define NIS_RES_STATUS(x) ((x)->status)
|
||||
%
|
||||
%/* These defines make getting at the variant part of the object easier. */
|
||||
%#define TA_data zo_data.objdata_u.ta_data
|
||||
%#define EN_data zo_data.objdata_u.en_data
|
||||
%#define DI_data zo_data.objdata_u.di_data
|
||||
%#define LI_data zo_data.objdata_u.li_data
|
||||
%#define GR_data zo_data.objdata_u.gr_data
|
||||
%
|
||||
%#define __type_of(o) ((o)->zo_data.zo_type)
|
||||
%
|
||||
%/* Declarations for the internal subroutines in nislib.c */
|
||||
%enum name_pos {SAME_NAME, HIGHER_NAME, LOWER_NAME, NOT_SEQUENTIAL, BAD_NAME};
|
||||
%typedef enum name_pos name_pos;
|
||||
%
|
||||
%/*
|
||||
% * Defines for getting at column data in entry objects. Because RPCGEN
|
||||
% * generates some rather wordy structures, we create some defines that
|
||||
% * collapse the needed keystrokes to access a particular value using
|
||||
% * these definitions they take an nis_object *, and an int and return
|
||||
% * a u_char * for Value, and an int for length.
|
||||
% */
|
||||
%#define ENTRY_VAL(obj, col) \
|
||||
% (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val
|
||||
%#define ENTRY_LEN(obj, col) \
|
||||
% (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len
|
||||
%
|
||||
%
|
||||
%
|
||||
%#ifdef __cplusplus
|
||||
%}
|
||||
%#endif
|
||||
%
|
||||
%/* Prototypes, and extern declarations for the NIS library functions. */
|
||||
%#include <rpcsvc/nislib.h>
|
||||
%#endif /* __NIS_RPCGEN_H */
|
||||
%/* EDIT_START */
|
||||
%
|
||||
%/*
|
||||
% * nis_3.h
|
||||
% *
|
||||
% * This file contains definitions that are only of interest to the actual
|
||||
% * service daemon and client stubs. Normal users of NIS will not include
|
||||
% * this file.
|
||||
% *
|
||||
% * NOTE : This include file is automatically created by a combination
|
||||
% * of rpcgen and sed. DO NOT EDIT IT, change the nis.x file instead
|
||||
% * and then remake this file.
|
||||
% */
|
||||
%#ifndef __nis_3_h
|
||||
%#define __nis_3_h
|
||||
%#ifdef __cplusplus
|
||||
%extern "C" {
|
||||
%#endif
|
||||
#endif
|
||||
72
openflow/usr/include/rpcsvc/nis_callback.h
Normal file
72
openflow/usr/include/rpcsvc/nis_callback.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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 _RPCSVC_NIS_CALLBACK_H
|
||||
#define _RPCSVC_NIS_CALLBACK_H 1
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
#include <rpcsvc/nis.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
typedef nis_object *obj_p;
|
||||
|
||||
struct cback_data {
|
||||
struct {
|
||||
u_int entries_len;
|
||||
obj_p *entries_val;
|
||||
} entries;
|
||||
};
|
||||
typedef struct cback_data cback_data;
|
||||
|
||||
#define CB_PROG 100302
|
||||
#define CB_VERS 1
|
||||
|
||||
#define CBPROC_RECEIVE 1
|
||||
extern bool_t * cbproc_receive_1 (cback_data *, CLIENT *) __THROW;
|
||||
extern bool_t * cbproc_receive_1_svc (cback_data *, struct svc_req *) __THROW;
|
||||
|
||||
#define CBPROC_FINISH 2
|
||||
extern void * cbproc_finish_1 (void *, CLIENT *) __THROW;
|
||||
extern void * cbproc_finish_1_svc (void *, struct svc_req *) __THROW;
|
||||
|
||||
#define CBPROC_ERROR 3
|
||||
extern void * cbproc_error_1 (nis_error *, CLIENT *) __THROW;
|
||||
extern void * cbproc_error_1_svc (nis_error *, struct svc_req *) __THROW;
|
||||
extern int cb_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t) __THROW;
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
extern bool_t xdr_obj_p (XDR *, obj_p*) __THROW;
|
||||
extern bool_t xdr_cback_data (XDR *, cback_data*) __THROW;
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_RPCVSC_NIS_CALLBACK_H */
|
||||
63
openflow/usr/include/rpcsvc/nis_callback.x
Normal file
63
openflow/usr/include/rpcsvc/nis_callback.x
Normal file
@@ -0,0 +1,63 @@
|
||||
%/*
|
||||
% * Copyright (c) 2010, Oracle America, 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.
|
||||
% */
|
||||
|
||||
/*
|
||||
* nis_callback.x
|
||||
*/
|
||||
|
||||
%#pragma ident "@(#)nis_callback.x 1.7 94/05/03"
|
||||
|
||||
/*
|
||||
* "@(#)zns_cback.x 1.2 90/09/10"
|
||||
*
|
||||
* RPCL description of the Callback Service.
|
||||
*/
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%#include <rpcsvc/nis.h>
|
||||
#endif
|
||||
#ifdef RPC_XDR
|
||||
%#include "nis_clnt.h"
|
||||
#endif
|
||||
|
||||
typedef nis_object *obj_p;
|
||||
|
||||
struct cback_data {
|
||||
obj_p entries<>; /* List of objects */
|
||||
};
|
||||
|
||||
program CB_PROG {
|
||||
version CB_VERS {
|
||||
bool CBPROC_RECEIVE(cback_data) = 1;
|
||||
void CBPROC_FINISH(void) = 2;
|
||||
void CBPROC_ERROR(nis_error) = 3;
|
||||
} = 1;
|
||||
} = 100302;
|
||||
328
openflow/usr/include/rpcsvc/nis_object.x
Normal file
328
openflow/usr/include/rpcsvc/nis_object.x
Normal file
@@ -0,0 +1,328 @@
|
||||
/*
|
||||
* nis_object.x
|
||||
*
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
|
||||
%#pragma ident "@(#)nis_object.x 1.12 97/11/19"
|
||||
|
||||
#if RPC_HDR
|
||||
%
|
||||
%#ifndef __nis_object_h
|
||||
%#define __nis_object_h
|
||||
%
|
||||
#endif
|
||||
/*
|
||||
* This file defines the format for a NIS object in RPC language.
|
||||
* It is included by the main .x file and the database access protocol
|
||||
* file. It is common because both of them need to deal with the same
|
||||
* type of object. Generating the actual code though is a bit messy because
|
||||
* the nis.x file and the nis_dba.x file will generate xdr routines to
|
||||
* encode/decode objects when only one set is needed. Such is life when
|
||||
* one is using rpcgen.
|
||||
*
|
||||
* Note, the protocol doesn't specify any limits on such things as
|
||||
* maximum name length, number of attributes, etc. These are enforced
|
||||
* by the database backend. When you hit them you will no. Also see
|
||||
* the db_getlimits() function for fetching the limit values.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Some manifest constants, chosen to maximize flexibility without
|
||||
* plugging the wire full of data.
|
||||
*/
|
||||
const NIS_MAXSTRINGLEN = 255;
|
||||
const NIS_MAXNAMELEN = 1024;
|
||||
const NIS_MAXATTRNAME = 32;
|
||||
const NIS_MAXATTRVAL = 2048;
|
||||
const NIS_MAXCOLUMNS = 64;
|
||||
const NIS_MAXATTR = 16;
|
||||
const NIS_MAXPATH = 1024;
|
||||
const NIS_MAXREPLICAS = 128;
|
||||
const NIS_MAXLINKS = 16;
|
||||
|
||||
const NIS_PK_NONE = 0; /* no public key (unix/sys auth) */
|
||||
const NIS_PK_DH = 1; /* Public key is Diffie-Hellman type */
|
||||
const NIS_PK_RSA = 2; /* Public key if RSA type */
|
||||
const NIS_PK_KERB = 3; /* Use kerberos style authentication */
|
||||
const NIS_PK_DHEXT = 4; /* Extended Diffie-Hellman for RPC-GSS */
|
||||
|
||||
/*
|
||||
* The fundamental name type of NIS. The name may consist of two parts,
|
||||
* the first being the fully qualified name, and the second being an
|
||||
* optional set of attribute/value pairs.
|
||||
*/
|
||||
struct nis_attr {
|
||||
string zattr_ndx<>; /* name of the index */
|
||||
opaque zattr_val<>; /* Value for the attribute. */
|
||||
};
|
||||
|
||||
typedef string nis_name<>; /* The NIS name itself. */
|
||||
|
||||
/* NIS object types are defined by the following enumeration. The numbers
|
||||
* they use are based on the following scheme :
|
||||
* 0 - 1023 are reserved for Sun,
|
||||
* 1024 - 2047 are defined to be private to a particular tree.
|
||||
* 2048 - 4095 are defined to be user defined.
|
||||
* 4096 - ... are reserved for future use.
|
||||
*
|
||||
* EOL Alert - The non-prefixed names are present for backward
|
||||
* compatability only, and will not exist in future releases. Use
|
||||
* the NIS_* names for future compatability.
|
||||
*/
|
||||
|
||||
enum zotypes {
|
||||
|
||||
BOGUS_OBJ = 0, /* Uninitialized object structure */
|
||||
NO_OBJ = 1, /* NULL object (no data) */
|
||||
DIRECTORY_OBJ = 2, /* Directory object describing domain */
|
||||
GROUP_OBJ = 3, /* Group object (a list of names) */
|
||||
TABLE_OBJ = 4, /* Table object (a database schema) */
|
||||
ENTRY_OBJ = 5, /* Entry object (a database record) */
|
||||
LINK_OBJ = 6, /* A name link. */
|
||||
PRIVATE_OBJ = 7, /* Private object (all opaque data) */
|
||||
|
||||
NIS_BOGUS_OBJ = 0, /* Uninitialized object structure */
|
||||
NIS_NO_OBJ = 1, /* NULL object (no data) */
|
||||
NIS_DIRECTORY_OBJ = 2, /* Directory object describing domain */
|
||||
NIS_GROUP_OBJ = 3, /* Group object (a list of names) */
|
||||
NIS_TABLE_OBJ = 4, /* Table object (a database schema) */
|
||||
NIS_ENTRY_OBJ = 5, /* Entry object (a database record) */
|
||||
NIS_LINK_OBJ = 6, /* A name link. */
|
||||
NIS_PRIVATE_OBJ = 7 /* Private object (all opaque data) */
|
||||
};
|
||||
|
||||
/*
|
||||
* The types of Name services NIS knows about. They are enumerated
|
||||
* here. The Binder code will use this type to determine if it has
|
||||
* a set of library routines that will access the indicated name service.
|
||||
*/
|
||||
enum nstype {
|
||||
UNKNOWN = 0,
|
||||
NIS = 1, /* Nis Plus Service */
|
||||
SUNYP = 2, /* Old NIS Service */
|
||||
IVY = 3, /* Nis Plus Plus Service */
|
||||
DNS = 4, /* Domain Name Service */
|
||||
X500 = 5, /* ISO/CCCIT X.500 Service */
|
||||
DNANS = 6, /* Digital DECNet Name Service */
|
||||
XCHS = 7, /* Xerox ClearingHouse Service */
|
||||
CDS= 8
|
||||
};
|
||||
|
||||
/*
|
||||
* DIRECTORY - The name service object. These objects identify other name
|
||||
* servers that are serving some portion of the name space. Each has a
|
||||
* type associated with it. The resolver library will note whether or not
|
||||
* is has the needed routines to access that type of service.
|
||||
* The oarmask structure defines an access rights mask on a per object
|
||||
* type basis for the name spaces. The only bits currently used are
|
||||
* create and destroy. By enabling or disabling these access rights for
|
||||
* a specific object type for a one of the accessor entities (owner,
|
||||
* group, world) the administrator can control what types of objects
|
||||
* may be freely added to the name space and which require the
|
||||
* administrator's approval.
|
||||
*/
|
||||
struct oar_mask {
|
||||
uint32_t oa_rights; /* Access rights mask */
|
||||
zotypes oa_otype; /* Object type */
|
||||
};
|
||||
|
||||
struct endpoint {
|
||||
string uaddr<>;
|
||||
string family<>; /* Transport family (INET, OSI, etc) */
|
||||
string proto<>; /* Protocol (TCP, UDP, CLNP, etc) */
|
||||
};
|
||||
|
||||
/*
|
||||
* Note: pkey is a netobj which is limited to 1024 bytes which limits the
|
||||
* keysize to 8192 bits. This is consider to be a reasonable limit for
|
||||
* the expected lifetime of this service.
|
||||
*/
|
||||
struct nis_server {
|
||||
nis_name name; /* Principal name of the server */
|
||||
endpoint ep<>; /* Universal addr(s) for server */
|
||||
uint32_t key_type; /* Public key type */
|
||||
netobj pkey; /* server's public key */
|
||||
};
|
||||
|
||||
struct directory_obj {
|
||||
nis_name do_name; /* Name of the directory being served */
|
||||
nstype do_type; /* one of NIS, DNS, IVY, YP, or X.500 */
|
||||
nis_server do_servers<>; /* <0> == Primary name server */
|
||||
uint32_t do_ttl; /* Time To Live (for caches) */
|
||||
oar_mask do_armask<>; /* Create/Destroy rights by object type */
|
||||
};
|
||||
|
||||
/*
|
||||
* ENTRY - This is one row of data from an information base.
|
||||
* The type value is used by the client library to convert the entry to
|
||||
* it's internal structure representation. The Table name is a back pointer
|
||||
* to the table where the entry is stored. This allows the client library
|
||||
* to determine where to send a request if the client wishes to change this
|
||||
* entry but got to it through a LINK rather than directly.
|
||||
* If the entry is a "standalone" entry then this field is void.
|
||||
*/
|
||||
const EN_BINARY = 1; /* Indicates value is binary data */
|
||||
const EN_CRYPT = 2; /* Indicates the value is encrypted */
|
||||
const EN_XDR = 4; /* Indicates the value is XDR encoded */
|
||||
const EN_MODIFIED = 8; /* Indicates entry is modified. */
|
||||
const EN_ASN1 = 64; /* Means contents use ASN.1 encoding */
|
||||
|
||||
struct entry_col {
|
||||
uint32_t ec_flags; /* Flags for this value */
|
||||
opaque ec_value<>; /* It's textual value */
|
||||
};
|
||||
|
||||
struct entry_obj {
|
||||
string en_type<>; /* Type of entry such as "passwd" */
|
||||
entry_col en_cols<>; /* Value for the entry */
|
||||
};
|
||||
|
||||
/*
|
||||
* GROUP - The group object contains a list of NIS principal names. Groups
|
||||
* are used to authorize principals. Each object has a set of access rights
|
||||
* for members of its group. Principal names in groups are in the form
|
||||
* name.directory and recursive groups are expressed as @groupname.directory
|
||||
*/
|
||||
struct group_obj {
|
||||
uint32_t gr_flags; /* Flags controlling group */
|
||||
nis_name gr_members<>; /* List of names in group */
|
||||
};
|
||||
|
||||
/*
|
||||
* LINK - This is the LINK object. It is quite similar to a symbolic link
|
||||
* in the UNIX filesystem. The attributes in the main object structure are
|
||||
* relative to the LINK data and not what it points to (like the file system)
|
||||
* "modify" privleges here indicate the right to modify what the link points
|
||||
* at and not to modify that actual object pointed to by the link.
|
||||
*/
|
||||
struct link_obj {
|
||||
zotypes li_rtype; /* Real type of the object */
|
||||
nis_attr li_attrs<>; /* Attribute/Values for tables */
|
||||
nis_name li_name; /* The object's real NIS name */
|
||||
};
|
||||
|
||||
/*
|
||||
* TABLE - This is the table object. It implements a simple
|
||||
* data base that applications and use for configuration or
|
||||
* administration purposes. The role of the table is to group together
|
||||
* a set of related entries. Tables are the simple database component
|
||||
* of NIS. Like many databases, tables are logically divided into columns
|
||||
* and rows. The columns are labeled with indexes and each ENTRY makes
|
||||
* up a row. Rows may be addressed within the table by selecting one
|
||||
* or more indexes, and values for those indexes. Each row which has
|
||||
* a value for the given index that matches the desired value is returned.
|
||||
* Within the definition of each column there is a flags variable, this
|
||||
* variable contains flags which determine whether or not the column is
|
||||
* searchable, contains binary data, and access rights for the entry objects
|
||||
* column value.
|
||||
*/
|
||||
|
||||
const TA_BINARY = 1; /* Means table data is binary */
|
||||
const TA_CRYPT = 2; /* Means value should be encrypted */
|
||||
const TA_XDR = 4; /* Means value is XDR encoded */
|
||||
const TA_SEARCHABLE = 8; /* Means this column is searchable */
|
||||
const TA_CASE = 16; /* Means this column is Case Sensitive */
|
||||
const TA_MODIFIED = 32; /* Means this columns attrs are modified*/
|
||||
const TA_ASN1 = 64; /* Means contents use ASN.1 encoding */
|
||||
|
||||
struct table_col {
|
||||
string tc_name<64>; /* Column Name */
|
||||
uint32_t tc_flags; /* control flags */
|
||||
uint32_t tc_rights; /* Access rights mask */
|
||||
};
|
||||
|
||||
struct table_obj {
|
||||
string ta_type<64>; /* Table type such as "passwd" */
|
||||
int ta_maxcol; /* Total number of columns */
|
||||
u_char ta_sep; /* Separator character */
|
||||
table_col ta_cols<>; /* The number of table indexes */
|
||||
string ta_path<>; /* A search path for this table */
|
||||
};
|
||||
|
||||
/*
|
||||
* This union joins together all of the currently known objects.
|
||||
*/
|
||||
union objdata switch (zotypes zo_type) {
|
||||
case NIS_DIRECTORY_OBJ :
|
||||
struct directory_obj di_data;
|
||||
case NIS_GROUP_OBJ :
|
||||
struct group_obj gr_data;
|
||||
case NIS_TABLE_OBJ :
|
||||
struct table_obj ta_data;
|
||||
case NIS_ENTRY_OBJ:
|
||||
struct entry_obj en_data;
|
||||
case NIS_LINK_OBJ :
|
||||
struct link_obj li_data;
|
||||
case NIS_PRIVATE_OBJ :
|
||||
opaque po_data<>;
|
||||
case NIS_NO_OBJ :
|
||||
void;
|
||||
case NIS_BOGUS_OBJ :
|
||||
void;
|
||||
default :
|
||||
void;
|
||||
};
|
||||
|
||||
/*
|
||||
* This is the basic NIS object data type. It consists of a generic part
|
||||
* which all objects contain, and a specialized part which varies depending
|
||||
* on the type of the object. All of the specialized sections have been
|
||||
* described above. You might have wondered why they all start with an
|
||||
* integer size, followed by the useful data. The answer is, when the
|
||||
* server doesn't recognize the type returned it treats it as opaque data.
|
||||
* And the definition for opaque data is {int size; char *data;}. In this
|
||||
* way, servers and utility routines that do not understand a given type
|
||||
* may still pass it around. One has to be careful in setting
|
||||
* this variable accurately, it must take into account such things as
|
||||
* XDR padding of structures etc. The best way to set it is to note one's
|
||||
* position in the XDR encoding stream, encode the structure, look at the
|
||||
* new position and calculate the size.
|
||||
*/
|
||||
struct nis_oid {
|
||||
uint32_t ctime; /* Time of objects creation */
|
||||
uint32_t mtime; /* Time of objects modification */
|
||||
};
|
||||
|
||||
struct nis_object {
|
||||
nis_oid zo_oid; /* object identity verifier. */
|
||||
nis_name zo_name; /* The NIS name for this object */
|
||||
nis_name zo_owner; /* NIS name of object owner. */
|
||||
nis_name zo_group; /* NIS name of access group. */
|
||||
nis_name zo_domain; /* The administrator for the object */
|
||||
uint32_t zo_access; /* Access rights (owner, group, world) */
|
||||
uint32_t zo_ttl; /* Object's time to live in seconds. */
|
||||
objdata zo_data; /* Data structure for this type */
|
||||
};
|
||||
#if RPC_HDR
|
||||
%
|
||||
%#endif /* if __nis_object_h */
|
||||
%
|
||||
#endif
|
||||
129
openflow/usr/include/rpcsvc/nis_tags.h
Normal file
129
openflow/usr/include/rpcsvc/nis_tags.h
Normal file
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* nis_tags.h
|
||||
*
|
||||
* This file contains the tags and statistics definitions. It is
|
||||
* automatically included by nis.h
|
||||
*/
|
||||
|
||||
#ifndef _RPCSVC_NIS_TAGS_H
|
||||
#define _RPCSVC_NIS_TAGS_H
|
||||
|
||||
#if 0
|
||||
#pragma ident "@(#)nis_tags.h 1.16 96/10/25"
|
||||
#endif
|
||||
/* from file: zns_tags.h 1.7 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define NIS_DIR "data"
|
||||
|
||||
/* Lookup and List function flags */
|
||||
#define FOLLOW_LINKS (1<<0) /* Follow link objects */
|
||||
#define FOLLOW_PATH (1<<1) /* Follow the path in a table */
|
||||
#define HARD_LOOKUP (1<<2) /* Block until successful */
|
||||
#define ALL_RESULTS (1<<3) /* Retrieve all results */
|
||||
#define NO_CACHE (1<<4) /* Do not return 'cached' results */
|
||||
#define MASTER_ONLY (1<<5) /* Get value only from master server */
|
||||
#define EXPAND_NAME (1<<6) /* Expand partitially qualified names */
|
||||
|
||||
/* Semantic modification for table operations flags */
|
||||
#define RETURN_RESULT (1<<7) /* Return resulting object to client */
|
||||
#define ADD_OVERWRITE (1<<8) /* Allow overwrites on ADD */
|
||||
#define REM_MULTIPLE (1<<9) /* Allow wildcard deletes */
|
||||
#define MOD_SAMEOBJ (1<<10) /* Check modified object before write */
|
||||
#define ADD_RESERVED (1<<11) /* Spare ADD semantic */
|
||||
#define REM_RESERVED (1<<12) /* Spare REM semantic */
|
||||
#define MOD_EXCLUSIVE (1<<13) /* Modify no overwrite on modified keys */
|
||||
|
||||
/* Lookup and List function flags (continued) */
|
||||
#define SOFT_LOOKUP (1<<14) /* The "old default" return on failure */
|
||||
|
||||
/* Transport specific modifications to the operation */
|
||||
#define USE_DGRAM (1<<16) /* Use a datagram transport */
|
||||
#define NO_AUTHINFO (1<<17) /* Don't bother attaching auth info */
|
||||
|
||||
/*
|
||||
* Declarations for "standard" NIS+ tags
|
||||
* State variable tags have values 0 - 2047
|
||||
* Statistic tags have values 2048 - 65535
|
||||
* User Tags have values >2^16
|
||||
*/
|
||||
#define TAG_DEBUG 1 /* set debug level */
|
||||
#define TAG_STATS 2 /* Enable/disable statistics */
|
||||
#define TAG_GCACHE 3 /* Flush the Group Cache */
|
||||
#define TAG_GCACHE_ALL TAG_GCACHE
|
||||
#define TAG_DCACHE 4 /* Flush the directory cache */
|
||||
#define TAG_DCACHE_ONE TAG_DCACHE
|
||||
#define TAG_OCACHE 5 /* Flush the Object Cache */
|
||||
#define TAG_SECURE 6 /* Set the security level */
|
||||
#define TAG_TCACHE_ONE 7 /* Flush the table cache */
|
||||
#define TAG_DCACHE_ALL 8 /* Flush entire directory cache */
|
||||
#define TAG_TCACHE_ALL 9 /* Flush entire table cache */
|
||||
#define TAG_GCACHE_ONE 10 /* Flush one group object */
|
||||
#define TAG_DCACHE_ONE_REFRESH 11 /* Flush and refresh one DO */
|
||||
#define TAG_READONLY 12 /* Set read only mode */
|
||||
#define TAG_READWRITE 14 /* Reset read-write mode */
|
||||
|
||||
#define TAG_OPSTATS 2048 /* NIS+ operations statistics */
|
||||
#define TAG_THREADS 2049 /* Child process/thread status */
|
||||
#define TAG_HEAP 2050 /* Heap usage statistics */
|
||||
#define TAG_UPDATES 2051 /* Updates to this service */
|
||||
#define TAG_VISIBLE 2052 /* First update that isn't replicated */
|
||||
#define TAG_S_DCACHE 2053 /* Directory cache statistics */
|
||||
#define TAG_S_OCACHE 2054 /* Object cache statistics */
|
||||
#define TAG_S_GCACHE 2055 /* Group cache statistics */
|
||||
#define TAG_S_STORAGE 2056 /* Group cache statistics */
|
||||
#define TAG_UPTIME 2057 /* Time that server has been up */
|
||||
#define TAG_DIRLIST 2058 /* Dir served by this server */
|
||||
#define TAG_NISCOMPAT 2059 /* Whether supports NIS compat mode */
|
||||
#define TAG_DNSFORWARDING 2060 /* Whether DNS forwarding supported */
|
||||
#define TAG_SECURITY_LEVEL 2061 /* Security level of the server */
|
||||
#define TAG_ROOTSERVER 2062 /* Whether root server */
|
||||
|
||||
/*
|
||||
* Declarations for the Group object flags. Currently
|
||||
* there are only 3.
|
||||
*/
|
||||
#define IMPMEM_GROUPS 1 /* Implicit Membership allowed */
|
||||
#define RECURS_GROUPS 2 /* Recursive Groups allowed */
|
||||
#define NEGMEM_GROUPS 4 /* Negative Groups allowed */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _RPCSVC_NIS_TAGS_H */
|
||||
286
openflow/usr/include/rpcsvc/nislib.h
Normal file
286
openflow/usr/include/rpcsvc/nislib.h
Normal file
@@ -0,0 +1,286 @@
|
||||
/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef __RPCSVC_NISLIB_H__
|
||||
#define __RPCSVC_NISLIB_H__
|
||||
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
typedef const char *const_nis_name;
|
||||
|
||||
/* nis_names: These functions are used to locate and manipulate all NIS+
|
||||
* objects except the NIS+ entry objects.
|
||||
*
|
||||
* nis_lookup (name, flags) resolves a NIS+ name and returns a copy of
|
||||
* that object from a NIS+ server.
|
||||
* const nis_name name: name of the object to be resolved
|
||||
* unsigned int flags: logically ORing zero or more flags (FOLLOW_LINKS,
|
||||
* HARD_LOOKUP, [NO_CACHE], MASTER_ONLY, EXPAND_NAME)
|
||||
*
|
||||
* nis_add (name, obj) adds objects to the NIS+ namespace.
|
||||
* const nis_name name: fully qualified NIS+ name.
|
||||
* const nis_object *obj: object members zo_name and zo_domain will be
|
||||
* constructed from name.
|
||||
*
|
||||
* nis_remove (name, obj) removes objects from the NIS+ namespace.
|
||||
* const nis_name name: fully qualified NIS+ name.
|
||||
* const nis_object *obj: if not NULL, it is assumed to point to a copy
|
||||
* of the object being removed. In this case, if
|
||||
* the object on the server does not have the same
|
||||
* object identifier as the object being passed,
|
||||
* the operation will fail with the NIS_NOTSAMEOBJ
|
||||
* error.
|
||||
*
|
||||
* nis_modify (name, obj) can change specific attributes of an object
|
||||
* that already exists in the namespace.
|
||||
*/
|
||||
extern nis_result *nis_lookup (const_nis_name name, unsigned int flags)
|
||||
__THROW;
|
||||
extern nis_result *nis_add (const_nis_name name, const nis_object *obj)
|
||||
__THROW;
|
||||
extern nis_result *nis_remove (const_nis_name name,
|
||||
const nis_object *obj) __THROW;
|
||||
extern nis_result *nis_modify (const_nis_name name,
|
||||
const nis_object *obj) __THROW;
|
||||
|
||||
/* nis_tables: These functions are used to search and modify NIS+ tables.
|
||||
*
|
||||
* nis_list (table_name, flags, callback(table_name, obj, userdata), userdata)
|
||||
* search a table in the NIS+ namespace.
|
||||
* const nis_name table_name: indexed name ([xx=yy],table.dir)
|
||||
* unsigned int flags: logically ORing one or more flags (FOLLOW_LINKS,
|
||||
* [FOLLOW_PATH], HARD_LOOKUP, [ALL_RESULTS], [NO_CACHE],
|
||||
* MASTER_ONLY, EXPAND_NAME, RETURN_RESULT)
|
||||
* callback(): callback is an optional pointer to a function that will
|
||||
* process the ENTRY type objects that are returned from the
|
||||
* search. If this pointer is NULL, then all entries that match
|
||||
* the search criteria are returned in the nis_result structure,
|
||||
* otherwise this function will be called once for each
|
||||
* entry returned.
|
||||
* void *userdata: passed to callback function along with the returned
|
||||
* entry object.
|
||||
*
|
||||
* nis_add_entry (table_name, obj, flags) will add the NIS+ object to the
|
||||
* NIS+ table_name.
|
||||
* const nis_name table_name
|
||||
* const nis_object *obj
|
||||
* unsigned int flags: 0, ADD_OVERWRITE, RETURN_RESULT
|
||||
*
|
||||
* nis_modify_entry (name, obj, flags) modifies an object identified by name.
|
||||
* const nis_name name: object identifier
|
||||
* const nis_object *obj: should point to an entry with the EN_MODIFIED
|
||||
* flag set in each column that contains new
|
||||
* information.
|
||||
* unsigned int flags: 0, MOD_SAMEOBJ, RETURN_RESULT
|
||||
*
|
||||
* nis_remove_entry (table_name, obj, flags) removes a set of entries
|
||||
* identified by table_name from the table.
|
||||
* const nis_name table_name: indexed NIS+ name
|
||||
* const nis_object *obj: if obj is non-null, it is presumed to point to
|
||||
* a cached copy of the entry. When the removal is
|
||||
* attempted, and the object that would be removed
|
||||
* is not the same as the cached object pointed to
|
||||
* by object then the operation will fail with an
|
||||
* NIS_NOTSAMEOBJ error
|
||||
* unsigned int flags: 0, REM_MULTIPLE
|
||||
*
|
||||
* nis_first_entry (table_name) fetches entries from a table one at a time.
|
||||
* const nis_name table_name
|
||||
*
|
||||
* nis_next_entry (table_name, cookie) retrieves the "next" entry from a
|
||||
* table specified by table_name.
|
||||
* const nis_name table_name:
|
||||
* const netobj *cookie: The value of cookie from the nis_result structure
|
||||
* form the previous call.
|
||||
*/
|
||||
extern nis_result *nis_list (const_nis_name __name, unsigned int __flags,
|
||||
int (*__callback)(const_nis_name __table_name,
|
||||
const nis_object *__obj,
|
||||
const void *__userdata),
|
||||
const void *__userdata) __THROW;
|
||||
extern nis_result *nis_add_entry (const_nis_name __table_name,
|
||||
const nis_object *__obj,
|
||||
unsigned int __flags) __THROW;
|
||||
extern nis_result *nis_modify_entry (const_nis_name __name,
|
||||
const nis_object *__obj,
|
||||
unsigned int __flags) __THROW;
|
||||
extern nis_result *nis_remove_entry (const_nis_name __table_name,
|
||||
const nis_object *__obj,
|
||||
unsigned int __flags) __THROW;
|
||||
extern nis_result *nis_first_entry (const_nis_name __table_name) __THROW;
|
||||
extern nis_result *nis_next_entry (const_nis_name __table_name,
|
||||
const netobj *__cookie) __THROW;
|
||||
/*
|
||||
** nis_server
|
||||
*/
|
||||
extern nis_error nis_mkdir (const_nis_name __dirname,
|
||||
const nis_server *__machine) __THROW;
|
||||
extern nis_error nis_rmdir (const_nis_name __dirname,
|
||||
const nis_server *__machine) __THROW;
|
||||
extern nis_error nis_servstate (const nis_server *__machine,
|
||||
const nis_tag *__tags, int __numtags,
|
||||
nis_tag **__result) __THROW;
|
||||
extern nis_error nis_stats (const nis_server *__machine,
|
||||
const nis_tag *__tags, int __numtags,
|
||||
nis_tag **__result) __THROW;
|
||||
extern void nis_freetags (nis_tag *__tags, int __numtags) __THROW;
|
||||
extern nis_server **nis_getservlist (const_nis_name __dirname) __THROW;
|
||||
extern void nis_freeservlist (nis_server **__machines) __THROW;
|
||||
|
||||
/*
|
||||
** nis_subr
|
||||
*/
|
||||
extern nis_name nis_leaf_of (const_nis_name __name) __THROW;
|
||||
extern nis_name nis_leaf_of_r (const_nis_name __name, char *__buffer,
|
||||
size_t __buflen) __THROW;
|
||||
extern nis_name nis_name_of (const_nis_name __name) __THROW;
|
||||
extern nis_name nis_name_of_r (const_nis_name __name, char *__buffer,
|
||||
size_t __buflen) __THROW;
|
||||
extern nis_name nis_domain_of (const_nis_name __name) __THROW;
|
||||
extern nis_name nis_domain_of_r (const_nis_name __name, char *__buffer,
|
||||
size_t __buflen) __THROW;
|
||||
extern nis_name *nis_getnames (const_nis_name __name) __THROW;
|
||||
extern void nis_freenames (nis_name *__namelist) __THROW;
|
||||
extern name_pos nis_dir_cmp (const_nis_name __n1, const_nis_name __n2) __THROW;
|
||||
extern nis_object *nis_clone_object (const nis_object *__src,
|
||||
nis_object *__dest) __THROW;
|
||||
extern void nis_destroy_object (nis_object *__obj) __THROW;
|
||||
extern void nis_print_object (const nis_object *__obj) __THROW;
|
||||
|
||||
/*
|
||||
** nis_local_names
|
||||
*/
|
||||
extern nis_name nis_local_group (void) __THROW;
|
||||
extern nis_name nis_local_directory (void) __THROW;
|
||||
extern nis_name nis_local_principal (void) __THROW;
|
||||
extern nis_name nis_local_host (void) __THROW;
|
||||
|
||||
/*
|
||||
** nis_error
|
||||
*/
|
||||
extern const char *nis_sperrno (const nis_error __status) __THROW;
|
||||
extern void nis_perror (const nis_error __status, const char *__label) __THROW;
|
||||
extern void nis_lerror (const nis_error __status, const char *__label) __THROW;
|
||||
extern char *nis_sperror (const nis_error status, const char *__label) __THROW;
|
||||
extern char *nis_sperror_r (const nis_error __status, const char *__label,
|
||||
char *__buffer, size_t __buflen) __THROW;
|
||||
/*
|
||||
** nis_groups
|
||||
*/
|
||||
extern bool_t nis_ismember (const_nis_name __principal,
|
||||
const_nis_name __group) __THROW;
|
||||
extern nis_error nis_addmember (const_nis_name __member,
|
||||
const_nis_name __group) __THROW;
|
||||
extern nis_error nis_removemember (const_nis_name __member,
|
||||
const_nis_name __group) __THROW;
|
||||
extern nis_error nis_creategroup (const_nis_name __group,
|
||||
unsigned int __flags) __THROW;
|
||||
extern nis_error nis_destroygroup (const_nis_name __group) __THROW;
|
||||
extern void nis_print_group_entry (const_nis_name __group) __THROW;
|
||||
extern nis_error nis_verifygroup (const_nis_name __group) __THROW;
|
||||
|
||||
/*
|
||||
** nis_ping
|
||||
*/
|
||||
extern void nis_ping (const_nis_name __dirname, uint32_t __utime,
|
||||
const nis_object *__dirobj) __THROW;
|
||||
extern nis_result *nis_checkpoint (const_nis_name __dirname) __THROW;
|
||||
|
||||
/*
|
||||
** nis_print (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!)
|
||||
*/
|
||||
extern void nis_print_result (const nis_result *__result) __THROW;
|
||||
extern void nis_print_rights (unsigned int __rights) __THROW;
|
||||
extern void nis_print_directory (const directory_obj *__dirobj) __THROW;
|
||||
extern void nis_print_group (const group_obj *__grpobj) __THROW;
|
||||
extern void nis_print_table (const table_obj *__tblobj) __THROW;
|
||||
extern void nis_print_link (const link_obj *__lnkobj) __THROW;
|
||||
extern void nis_print_entry (const entry_obj *__enobj) __THROW;
|
||||
|
||||
/*
|
||||
** nis_file (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!)
|
||||
*/
|
||||
extern directory_obj *readColdStartFile (void) __THROW;
|
||||
extern bool_t writeColdStartFile (const directory_obj *__dirobj) __THROW;
|
||||
extern nis_object *nis_read_obj (const char *__obj) __THROW;
|
||||
extern bool_t nis_write_obj (const char *__file, const nis_object *__obj) __THROW;
|
||||
|
||||
/*
|
||||
** nis_clone - (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!)
|
||||
*/
|
||||
extern directory_obj *nis_clone_directory (const directory_obj *__src,
|
||||
directory_obj *__dest) __THROW;
|
||||
extern nis_result *nis_clone_result (const nis_result *__src,
|
||||
nis_result *__dest) __THROW;
|
||||
|
||||
/* nis_free - nis_freeresult */
|
||||
extern void nis_freeresult (nis_result *__result) __THROW;
|
||||
/* (XXX THE FOLLOWING ARE INTERNAL FUNCTIONS, SHOULD NOT BE USED !!) */
|
||||
extern void nis_free_request (ib_request *__req) __THROW;
|
||||
extern void nis_free_directory (directory_obj *__dirobj) __THROW;
|
||||
extern void nis_free_object (nis_object *__obj) __THROW;
|
||||
|
||||
/* (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!) */
|
||||
extern nis_name __nis_default_owner (char *) __THROW;
|
||||
extern nis_name __nis_default_group (char *) __THROW;
|
||||
extern uint32_t __nis_default_ttl (char *) __THROW;
|
||||
extern unsigned int __nis_default_access (char *, unsigned int) __THROW;
|
||||
extern fd_result *__nis_finddirectory (directory_obj *, const_nis_name) __THROW;
|
||||
extern void __free_fdresult (fd_result *) __THROW;
|
||||
extern uint32_t __nis_hash (const void *__keyarg, size_t __len) __THROW;
|
||||
|
||||
/* NIS+ cache locking */
|
||||
extern int __nis_lock_cache (void) __THROW;
|
||||
extern int __nis_unlock_cache (void) __THROW;
|
||||
|
||||
/* (XXX INTERNAL FUNCTIONS, ONLY FOR rpc.nisd AND glibc !!) */
|
||||
#if defined (NIS_INTERNAL) || defined (_LIBC)
|
||||
|
||||
struct dir_binding
|
||||
{
|
||||
CLIENT *clnt; /* RPC CLIENT handle */
|
||||
nis_server *server_val; /* List of servers */
|
||||
unsigned int server_len; /* # of servers */
|
||||
unsigned int server_used; /* Which server we are bind in the moment ? */
|
||||
unsigned int current_ep; /* Which endpoint of the server are in use? */
|
||||
unsigned int trys; /* How many server have we tried ? */
|
||||
unsigned int class; /* From which class is server_val ? */
|
||||
bool_t master_only; /* Is only binded to the master */
|
||||
bool_t use_auth; /* Do we use AUTH ? */
|
||||
bool_t use_udp; /* Do we use UDP ? */
|
||||
struct sockaddr_in addr; /* Server's IP address */
|
||||
int socket; /* Server's local socket */
|
||||
};
|
||||
typedef struct dir_binding dir_binding;
|
||||
|
||||
extern nis_error __nisbind_create (dir_binding *, const nis_server *,
|
||||
unsigned int, unsigned int, unsigned int,
|
||||
unsigned int) __THROW;
|
||||
extern nis_error __nisbind_connect (dir_binding *) __THROW;
|
||||
extern nis_error __nisbind_next (dir_binding *) __THROW;
|
||||
extern void __nisbind_destroy (dir_binding *) __THROW;
|
||||
extern nis_error __nisfind_server (const_nis_name, int, directory_obj **,
|
||||
dir_binding *, unsigned int) __THROW;
|
||||
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* __RPCSVC_NISLIB_H__ */
|
||||
330
openflow/usr/include/rpcsvc/nlm_prot.h
Normal file
330
openflow/usr/include/rpcsvc/nlm_prot.h
Normal file
@@ -0,0 +1,330 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _NLM_PROT_H_RPCGEN
|
||||
#define _NLM_PROT_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LM_MAXSTRLEN 1024
|
||||
#define MAXNAMELEN LM_MAXSTRLEN+1
|
||||
|
||||
enum nlm_stats {
|
||||
nlm_granted = 0,
|
||||
nlm_denied = 1,
|
||||
nlm_denied_nolocks = 2,
|
||||
nlm_blocked = 3,
|
||||
nlm_denied_grace_period = 4,
|
||||
};
|
||||
typedef enum nlm_stats nlm_stats;
|
||||
|
||||
struct nlm_holder {
|
||||
bool_t exclusive;
|
||||
int svid;
|
||||
netobj oh;
|
||||
u_int l_offset;
|
||||
u_int l_len;
|
||||
};
|
||||
typedef struct nlm_holder nlm_holder;
|
||||
|
||||
struct nlm_testrply {
|
||||
nlm_stats stat;
|
||||
union {
|
||||
struct nlm_holder holder;
|
||||
} nlm_testrply_u;
|
||||
};
|
||||
typedef struct nlm_testrply nlm_testrply;
|
||||
|
||||
struct nlm_stat {
|
||||
nlm_stats stat;
|
||||
};
|
||||
typedef struct nlm_stat nlm_stat;
|
||||
|
||||
struct nlm_res {
|
||||
netobj cookie;
|
||||
nlm_stat stat;
|
||||
};
|
||||
typedef struct nlm_res nlm_res;
|
||||
|
||||
struct nlm_testres {
|
||||
netobj cookie;
|
||||
nlm_testrply stat;
|
||||
};
|
||||
typedef struct nlm_testres nlm_testres;
|
||||
|
||||
struct nlm_lock {
|
||||
char *caller_name;
|
||||
netobj fh;
|
||||
netobj oh;
|
||||
int svid;
|
||||
u_int l_offset;
|
||||
u_int l_len;
|
||||
};
|
||||
typedef struct nlm_lock nlm_lock;
|
||||
|
||||
struct nlm_lockargs {
|
||||
netobj cookie;
|
||||
bool_t block;
|
||||
bool_t exclusive;
|
||||
struct nlm_lock alock;
|
||||
bool_t reclaim;
|
||||
int state;
|
||||
};
|
||||
typedef struct nlm_lockargs nlm_lockargs;
|
||||
|
||||
struct nlm_cancargs {
|
||||
netobj cookie;
|
||||
bool_t block;
|
||||
bool_t exclusive;
|
||||
struct nlm_lock alock;
|
||||
};
|
||||
typedef struct nlm_cancargs nlm_cancargs;
|
||||
|
||||
struct nlm_testargs {
|
||||
netobj cookie;
|
||||
bool_t exclusive;
|
||||
struct nlm_lock alock;
|
||||
};
|
||||
typedef struct nlm_testargs nlm_testargs;
|
||||
|
||||
struct nlm_unlockargs {
|
||||
netobj cookie;
|
||||
struct nlm_lock alock;
|
||||
};
|
||||
typedef struct nlm_unlockargs nlm_unlockargs;
|
||||
/*
|
||||
* The following enums are actually bit encoded for efficient
|
||||
* boolean algebra.... DON'T change them.....
|
||||
*/
|
||||
|
||||
enum fsh_mode {
|
||||
fsm_DN = 0,
|
||||
fsm_DR = 1,
|
||||
fsm_DW = 2,
|
||||
fsm_DRW = 3,
|
||||
};
|
||||
typedef enum fsh_mode fsh_mode;
|
||||
|
||||
enum fsh_access {
|
||||
fsa_NONE = 0,
|
||||
fsa_R = 1,
|
||||
fsa_W = 2,
|
||||
fsa_RW = 3,
|
||||
};
|
||||
typedef enum fsh_access fsh_access;
|
||||
|
||||
struct nlm_share {
|
||||
char *caller_name;
|
||||
netobj fh;
|
||||
netobj oh;
|
||||
fsh_mode mode;
|
||||
fsh_access access;
|
||||
};
|
||||
typedef struct nlm_share nlm_share;
|
||||
|
||||
struct nlm_shareargs {
|
||||
netobj cookie;
|
||||
nlm_share share;
|
||||
bool_t reclaim;
|
||||
};
|
||||
typedef struct nlm_shareargs nlm_shareargs;
|
||||
|
||||
struct nlm_shareres {
|
||||
netobj cookie;
|
||||
nlm_stats stat;
|
||||
int sequence;
|
||||
};
|
||||
typedef struct nlm_shareres nlm_shareres;
|
||||
|
||||
struct nlm_notify {
|
||||
char *name;
|
||||
long state;
|
||||
};
|
||||
typedef struct nlm_notify nlm_notify;
|
||||
|
||||
#define NLM_PROG 100021
|
||||
#define NLM_VERS 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define NLM_TEST 1
|
||||
extern nlm_testres * nlm_test_1(struct nlm_testargs *, CLIENT *);
|
||||
extern nlm_testres * nlm_test_1_svc(struct nlm_testargs *, struct svc_req *);
|
||||
#define NLM_LOCK 2
|
||||
extern nlm_res * nlm_lock_1(struct nlm_lockargs *, CLIENT *);
|
||||
extern nlm_res * nlm_lock_1_svc(struct nlm_lockargs *, struct svc_req *);
|
||||
#define NLM_CANCEL 3
|
||||
extern nlm_res * nlm_cancel_1(struct nlm_cancargs *, CLIENT *);
|
||||
extern nlm_res * nlm_cancel_1_svc(struct nlm_cancargs *, struct svc_req *);
|
||||
#define NLM_UNLOCK 4
|
||||
extern nlm_res * nlm_unlock_1(struct nlm_unlockargs *, CLIENT *);
|
||||
extern nlm_res * nlm_unlock_1_svc(struct nlm_unlockargs *, struct svc_req *);
|
||||
#define NLM_GRANTED 5
|
||||
extern nlm_res * nlm_granted_1(struct nlm_testargs *, CLIENT *);
|
||||
extern nlm_res * nlm_granted_1_svc(struct nlm_testargs *, struct svc_req *);
|
||||
#define NLM_TEST_MSG 6
|
||||
extern void * nlm_test_msg_1(struct nlm_testargs *, CLIENT *);
|
||||
extern void * nlm_test_msg_1_svc(struct nlm_testargs *, struct svc_req *);
|
||||
#define NLM_LOCK_MSG 7
|
||||
extern void * nlm_lock_msg_1(struct nlm_lockargs *, CLIENT *);
|
||||
extern void * nlm_lock_msg_1_svc(struct nlm_lockargs *, struct svc_req *);
|
||||
#define NLM_CANCEL_MSG 8
|
||||
extern void * nlm_cancel_msg_1(struct nlm_cancargs *, CLIENT *);
|
||||
extern void * nlm_cancel_msg_1_svc(struct nlm_cancargs *, struct svc_req *);
|
||||
#define NLM_UNLOCK_MSG 9
|
||||
extern void * nlm_unlock_msg_1(struct nlm_unlockargs *, CLIENT *);
|
||||
extern void * nlm_unlock_msg_1_svc(struct nlm_unlockargs *, struct svc_req *);
|
||||
#define NLM_GRANTED_MSG 10
|
||||
extern void * nlm_granted_msg_1(struct nlm_testargs *, CLIENT *);
|
||||
extern void * nlm_granted_msg_1_svc(struct nlm_testargs *, struct svc_req *);
|
||||
#define NLM_TEST_RES 11
|
||||
extern void * nlm_test_res_1(nlm_testres *, CLIENT *);
|
||||
extern void * nlm_test_res_1_svc(nlm_testres *, struct svc_req *);
|
||||
#define NLM_LOCK_RES 12
|
||||
extern void * nlm_lock_res_1(nlm_res *, CLIENT *);
|
||||
extern void * nlm_lock_res_1_svc(nlm_res *, struct svc_req *);
|
||||
#define NLM_CANCEL_RES 13
|
||||
extern void * nlm_cancel_res_1(nlm_res *, CLIENT *);
|
||||
extern void * nlm_cancel_res_1_svc(nlm_res *, struct svc_req *);
|
||||
#define NLM_UNLOCK_RES 14
|
||||
extern void * nlm_unlock_res_1(nlm_res *, CLIENT *);
|
||||
extern void * nlm_unlock_res_1_svc(nlm_res *, struct svc_req *);
|
||||
#define NLM_GRANTED_RES 15
|
||||
extern void * nlm_granted_res_1(nlm_res *, CLIENT *);
|
||||
extern void * nlm_granted_res_1_svc(nlm_res *, struct svc_req *);
|
||||
extern int nlm_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define NLM_TEST 1
|
||||
extern nlm_testres * nlm_test_1();
|
||||
extern nlm_testres * nlm_test_1_svc();
|
||||
#define NLM_LOCK 2
|
||||
extern nlm_res * nlm_lock_1();
|
||||
extern nlm_res * nlm_lock_1_svc();
|
||||
#define NLM_CANCEL 3
|
||||
extern nlm_res * nlm_cancel_1();
|
||||
extern nlm_res * nlm_cancel_1_svc();
|
||||
#define NLM_UNLOCK 4
|
||||
extern nlm_res * nlm_unlock_1();
|
||||
extern nlm_res * nlm_unlock_1_svc();
|
||||
#define NLM_GRANTED 5
|
||||
extern nlm_res * nlm_granted_1();
|
||||
extern nlm_res * nlm_granted_1_svc();
|
||||
#define NLM_TEST_MSG 6
|
||||
extern void * nlm_test_msg_1();
|
||||
extern void * nlm_test_msg_1_svc();
|
||||
#define NLM_LOCK_MSG 7
|
||||
extern void * nlm_lock_msg_1();
|
||||
extern void * nlm_lock_msg_1_svc();
|
||||
#define NLM_CANCEL_MSG 8
|
||||
extern void * nlm_cancel_msg_1();
|
||||
extern void * nlm_cancel_msg_1_svc();
|
||||
#define NLM_UNLOCK_MSG 9
|
||||
extern void * nlm_unlock_msg_1();
|
||||
extern void * nlm_unlock_msg_1_svc();
|
||||
#define NLM_GRANTED_MSG 10
|
||||
extern void * nlm_granted_msg_1();
|
||||
extern void * nlm_granted_msg_1_svc();
|
||||
#define NLM_TEST_RES 11
|
||||
extern void * nlm_test_res_1();
|
||||
extern void * nlm_test_res_1_svc();
|
||||
#define NLM_LOCK_RES 12
|
||||
extern void * nlm_lock_res_1();
|
||||
extern void * nlm_lock_res_1_svc();
|
||||
#define NLM_CANCEL_RES 13
|
||||
extern void * nlm_cancel_res_1();
|
||||
extern void * nlm_cancel_res_1_svc();
|
||||
#define NLM_UNLOCK_RES 14
|
||||
extern void * nlm_unlock_res_1();
|
||||
extern void * nlm_unlock_res_1_svc();
|
||||
#define NLM_GRANTED_RES 15
|
||||
extern void * nlm_granted_res_1();
|
||||
extern void * nlm_granted_res_1_svc();
|
||||
extern int nlm_prog_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
#define NLM_VERSX 3
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define NLM_SHARE 20
|
||||
extern nlm_shareres * nlm_share_3(nlm_shareargs *, CLIENT *);
|
||||
extern nlm_shareres * nlm_share_3_svc(nlm_shareargs *, struct svc_req *);
|
||||
#define NLM_UNSHARE 21
|
||||
extern nlm_shareres * nlm_unshare_3(nlm_shareargs *, CLIENT *);
|
||||
extern nlm_shareres * nlm_unshare_3_svc(nlm_shareargs *, struct svc_req *);
|
||||
#define NLM_NM_LOCK 22
|
||||
extern nlm_res * nlm_nm_lock_3(nlm_lockargs *, CLIENT *);
|
||||
extern nlm_res * nlm_nm_lock_3_svc(nlm_lockargs *, struct svc_req *);
|
||||
#define NLM_FREE_ALL 23
|
||||
extern void * nlm_free_all_3(nlm_notify *, CLIENT *);
|
||||
extern void * nlm_free_all_3_svc(nlm_notify *, struct svc_req *);
|
||||
extern int nlm_prog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define NLM_SHARE 20
|
||||
extern nlm_shareres * nlm_share_3();
|
||||
extern nlm_shareres * nlm_share_3_svc();
|
||||
#define NLM_UNSHARE 21
|
||||
extern nlm_shareres * nlm_unshare_3();
|
||||
extern nlm_shareres * nlm_unshare_3_svc();
|
||||
#define NLM_NM_LOCK 22
|
||||
extern nlm_res * nlm_nm_lock_3();
|
||||
extern nlm_res * nlm_nm_lock_3_svc();
|
||||
#define NLM_FREE_ALL 23
|
||||
extern void * nlm_free_all_3();
|
||||
extern void * nlm_free_all_3_svc();
|
||||
extern int nlm_prog_3_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_nlm_stats (XDR *, nlm_stats*);
|
||||
extern bool_t xdr_nlm_holder (XDR *, nlm_holder*);
|
||||
extern bool_t xdr_nlm_testrply (XDR *, nlm_testrply*);
|
||||
extern bool_t xdr_nlm_stat (XDR *, nlm_stat*);
|
||||
extern bool_t xdr_nlm_res (XDR *, nlm_res*);
|
||||
extern bool_t xdr_nlm_testres (XDR *, nlm_testres*);
|
||||
extern bool_t xdr_nlm_lock (XDR *, nlm_lock*);
|
||||
extern bool_t xdr_nlm_lockargs (XDR *, nlm_lockargs*);
|
||||
extern bool_t xdr_nlm_cancargs (XDR *, nlm_cancargs*);
|
||||
extern bool_t xdr_nlm_testargs (XDR *, nlm_testargs*);
|
||||
extern bool_t xdr_nlm_unlockargs (XDR *, nlm_unlockargs*);
|
||||
extern bool_t xdr_fsh_mode (XDR *, fsh_mode*);
|
||||
extern bool_t xdr_fsh_access (XDR *, fsh_access*);
|
||||
extern bool_t xdr_nlm_share (XDR *, nlm_share*);
|
||||
extern bool_t xdr_nlm_shareargs (XDR *, nlm_shareargs*);
|
||||
extern bool_t xdr_nlm_shareres (XDR *, nlm_shareres*);
|
||||
extern bool_t xdr_nlm_notify (XDR *, nlm_notify*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_nlm_stats ();
|
||||
extern bool_t xdr_nlm_holder ();
|
||||
extern bool_t xdr_nlm_testrply ();
|
||||
extern bool_t xdr_nlm_stat ();
|
||||
extern bool_t xdr_nlm_res ();
|
||||
extern bool_t xdr_nlm_testres ();
|
||||
extern bool_t xdr_nlm_lock ();
|
||||
extern bool_t xdr_nlm_lockargs ();
|
||||
extern bool_t xdr_nlm_cancargs ();
|
||||
extern bool_t xdr_nlm_testargs ();
|
||||
extern bool_t xdr_nlm_unlockargs ();
|
||||
extern bool_t xdr_fsh_mode ();
|
||||
extern bool_t xdr_fsh_access ();
|
||||
extern bool_t xdr_nlm_share ();
|
||||
extern bool_t xdr_nlm_shareargs ();
|
||||
extern bool_t xdr_nlm_shareres ();
|
||||
extern bool_t xdr_nlm_notify ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_NLM_PROT_H_RPCGEN */
|
||||
203
openflow/usr/include/rpcsvc/nlm_prot.x
Normal file
203
openflow/usr/include/rpcsvc/nlm_prot.x
Normal file
@@ -0,0 +1,203 @@
|
||||
/* @(#)nlm_prot.x 2.1 88/08/01 4.0 RPCSRC */
|
||||
|
||||
/*
|
||||
* Network lock manager protocol definition
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*
|
||||
* protocol used between local lock manager and remote lock manager
|
||||
*/
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%#define LM_MAXSTRLEN 1024
|
||||
%#define MAXNAMELEN LM_MAXSTRLEN+1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* status of a call to the lock manager
|
||||
*/
|
||||
enum nlm_stats {
|
||||
nlm_granted = 0,
|
||||
nlm_denied = 1,
|
||||
nlm_denied_nolocks = 2,
|
||||
nlm_blocked = 3,
|
||||
nlm_denied_grace_period = 4
|
||||
};
|
||||
|
||||
struct nlm_holder {
|
||||
bool exclusive;
|
||||
int svid;
|
||||
netobj oh;
|
||||
unsigned l_offset;
|
||||
unsigned l_len;
|
||||
};
|
||||
|
||||
union nlm_testrply switch (nlm_stats stat) {
|
||||
case nlm_denied:
|
||||
struct nlm_holder holder;
|
||||
default:
|
||||
void;
|
||||
};
|
||||
|
||||
struct nlm_stat {
|
||||
nlm_stats stat;
|
||||
};
|
||||
|
||||
struct nlm_res {
|
||||
netobj cookie;
|
||||
nlm_stat stat;
|
||||
};
|
||||
|
||||
struct nlm_testres {
|
||||
netobj cookie;
|
||||
nlm_testrply stat;
|
||||
};
|
||||
|
||||
struct nlm_lock {
|
||||
string caller_name<LM_MAXSTRLEN>;
|
||||
netobj fh; /* identify a file */
|
||||
netobj oh; /* identify owner of a lock */
|
||||
int svid; /* generated from pid for svid */
|
||||
unsigned l_offset;
|
||||
unsigned l_len;
|
||||
};
|
||||
|
||||
struct nlm_lockargs {
|
||||
netobj cookie;
|
||||
bool block;
|
||||
bool exclusive;
|
||||
struct nlm_lock alock;
|
||||
bool reclaim; /* used for recovering locks */
|
||||
int state; /* specify local status monitor state */
|
||||
};
|
||||
|
||||
struct nlm_cancargs {
|
||||
netobj cookie;
|
||||
bool block;
|
||||
bool exclusive;
|
||||
struct nlm_lock alock;
|
||||
};
|
||||
|
||||
struct nlm_testargs {
|
||||
netobj cookie;
|
||||
bool exclusive;
|
||||
struct nlm_lock alock;
|
||||
};
|
||||
|
||||
struct nlm_unlockargs {
|
||||
netobj cookie;
|
||||
struct nlm_lock alock;
|
||||
};
|
||||
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%/*
|
||||
% * The following enums are actually bit encoded for efficient
|
||||
% * boolean algebra.... DON'T change them.....
|
||||
% */
|
||||
#endif
|
||||
enum fsh_mode {
|
||||
fsm_DN = 0, /* deny none */
|
||||
fsm_DR = 1, /* deny read */
|
||||
fsm_DW = 2, /* deny write */
|
||||
fsm_DRW = 3 /* deny read/write */
|
||||
};
|
||||
|
||||
enum fsh_access {
|
||||
fsa_NONE = 0, /* for completeness */
|
||||
fsa_R = 1, /* read only */
|
||||
fsa_W = 2, /* write only */
|
||||
fsa_RW = 3 /* read/write */
|
||||
};
|
||||
|
||||
struct nlm_share {
|
||||
string caller_name<LM_MAXSTRLEN>;
|
||||
netobj fh;
|
||||
netobj oh;
|
||||
fsh_mode mode;
|
||||
fsh_access access;
|
||||
};
|
||||
|
||||
struct nlm_shareargs {
|
||||
netobj cookie;
|
||||
nlm_share share;
|
||||
bool reclaim;
|
||||
};
|
||||
|
||||
struct nlm_shareres {
|
||||
netobj cookie;
|
||||
nlm_stats stat;
|
||||
int sequence;
|
||||
};
|
||||
|
||||
struct nlm_notify {
|
||||
string name<MAXNAMELEN>;
|
||||
long state;
|
||||
};
|
||||
|
||||
/*
|
||||
* Over-the-wire protocol used between the network lock managers
|
||||
*/
|
||||
|
||||
program NLM_PROG {
|
||||
version NLM_VERS {
|
||||
|
||||
nlm_testres NLM_TEST(struct nlm_testargs) = 1;
|
||||
|
||||
nlm_res NLM_LOCK(struct nlm_lockargs) = 2;
|
||||
|
||||
nlm_res NLM_CANCEL(struct nlm_cancargs) = 3;
|
||||
nlm_res NLM_UNLOCK(struct nlm_unlockargs) = 4;
|
||||
|
||||
/*
|
||||
* remote lock manager call-back to grant lock
|
||||
*/
|
||||
nlm_res NLM_GRANTED(struct nlm_testargs)= 5;
|
||||
/*
|
||||
* message passing style of requesting lock
|
||||
*/
|
||||
void NLM_TEST_MSG(struct nlm_testargs) = 6;
|
||||
void NLM_LOCK_MSG(struct nlm_lockargs) = 7;
|
||||
void NLM_CANCEL_MSG(struct nlm_cancargs) =8;
|
||||
void NLM_UNLOCK_MSG(struct nlm_unlockargs) = 9;
|
||||
void NLM_GRANTED_MSG(struct nlm_testargs) = 10;
|
||||
void NLM_TEST_RES(nlm_testres) = 11;
|
||||
void NLM_LOCK_RES(nlm_res) = 12;
|
||||
void NLM_CANCEL_RES(nlm_res) = 13;
|
||||
void NLM_UNLOCK_RES(nlm_res) = 14;
|
||||
void NLM_GRANTED_RES(nlm_res) = 15;
|
||||
} = 1;
|
||||
|
||||
version NLM_VERSX {
|
||||
nlm_shareres NLM_SHARE(nlm_shareargs) = 20;
|
||||
nlm_shareres NLM_UNSHARE(nlm_shareargs) = 21;
|
||||
nlm_res NLM_NM_LOCK(nlm_lockargs) = 22;
|
||||
void NLM_FREE_ALL(nlm_notify) = 23;
|
||||
} = 3;
|
||||
|
||||
} = 100021;
|
||||
227
openflow/usr/include/rpcsvc/rex.h
Normal file
227
openflow/usr/include/rpcsvc/rex.h
Normal file
@@ -0,0 +1,227 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _REX_H_RPCGEN
|
||||
#define _REX_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define STRINGSIZE 1024
|
||||
|
||||
typedef char *rexstring;
|
||||
#define SIGINT 2
|
||||
#define REX_INTERACTIVE 1
|
||||
|
||||
struct rex_start {
|
||||
struct {
|
||||
u_int rst_cmd_len;
|
||||
rexstring *rst_cmd_val;
|
||||
} rst_cmd;
|
||||
rexstring rst_host;
|
||||
rexstring rst_fsname;
|
||||
rexstring rst_dirwithin;
|
||||
struct {
|
||||
u_int rst_env_len;
|
||||
rexstring *rst_env_val;
|
||||
} rst_env;
|
||||
u_int rst_port0;
|
||||
u_int rst_port1;
|
||||
u_int rst_port2;
|
||||
u_int rst_flags;
|
||||
};
|
||||
typedef struct rex_start rex_start;
|
||||
|
||||
struct rex_result {
|
||||
int rlt_stat;
|
||||
rexstring rlt_message;
|
||||
};
|
||||
typedef struct rex_result rex_result;
|
||||
|
||||
struct sgttyb {
|
||||
u_int four;
|
||||
char chars[4];
|
||||
u_int flags;
|
||||
};
|
||||
typedef struct sgttyb sgttyb;
|
||||
#define B0 0
|
||||
#define B50 1
|
||||
#define B75 2
|
||||
#define B110 3
|
||||
#define B134 4
|
||||
#define B150 5
|
||||
#define B200 6
|
||||
#define B300 7
|
||||
#define B600 8
|
||||
#define B1200 9
|
||||
#define B1800 10
|
||||
#define B2400 11
|
||||
#define B4800 12
|
||||
#define B9600 13
|
||||
#define B19200 14
|
||||
#define B38400 15
|
||||
#define TANDEM 0x00000001
|
||||
#define CBREAK 0x00000002
|
||||
#define LCASE 0x00000004
|
||||
#define ECHO 0x00000008
|
||||
#define CRMOD 0x00000010
|
||||
#define RAW 0x00000020
|
||||
#define ODDP 0x00000040
|
||||
#define EVENP 0x00000080
|
||||
#define ANYP 0x000000c0
|
||||
#define NLDELAY 0x00000300
|
||||
#define NL0 0x00000000
|
||||
#define NL1 0x00000100
|
||||
#define NL2 0x00000200
|
||||
#define NL3 0x00000300
|
||||
#define TBDELAY 0x00000c00
|
||||
#define TAB0 0x00000000
|
||||
#define TAB1 0x00000400
|
||||
#define TAB2 0x00000800
|
||||
#define XTABS 0x00000c00
|
||||
#define CRDELAY 0x00003000
|
||||
#define CR0 0x00000000
|
||||
#define CR1 0x00001000
|
||||
#define CR2 0x00002000
|
||||
#define CR3 0x00003000
|
||||
#define VTDELAY 0x00004000
|
||||
#define FF0 0x00000000
|
||||
#define FF1 0x00004000
|
||||
#define BSDELAY 0x00008000
|
||||
#define BS0 0x00000000
|
||||
#define BS1 0x00008000
|
||||
#define CRTBS 0x00010000
|
||||
#define PRTERA 0x00020000
|
||||
#define CRTERA 0x00040000
|
||||
#define TILDE 0x00080000
|
||||
#define MDMBUF 0x00100000
|
||||
#define LITOUT 0x00200000
|
||||
#define TOSTOP 0x00400000
|
||||
#define FLUSHO 0x00800000
|
||||
#define NOHANG 0x01000000
|
||||
#define L001000 0x02000000
|
||||
#define CRTKIL 0x04000000
|
||||
#define PASS8 0x08000000
|
||||
#define CTLECH 0x10000000
|
||||
#define PENDIN 0x20000000
|
||||
#define DECCTQ 0x40000000
|
||||
#define NOFLSH 0x80000000
|
||||
|
||||
struct tchars {
|
||||
u_int six;
|
||||
char chars[6];
|
||||
};
|
||||
typedef struct tchars tchars;
|
||||
|
||||
struct ltchars {
|
||||
u_int six;
|
||||
char chars[6];
|
||||
u_int mode;
|
||||
};
|
||||
typedef struct ltchars ltchars;
|
||||
|
||||
struct rex_ttysize {
|
||||
int ts_lines;
|
||||
int ts_cols;
|
||||
};
|
||||
typedef struct rex_ttysize rex_ttysize;
|
||||
|
||||
struct rex_ttymode {
|
||||
sgttyb basic;
|
||||
tchars more;
|
||||
ltchars yetmore;
|
||||
u_int andmore;
|
||||
};
|
||||
typedef struct rex_ttymode rex_ttymode;
|
||||
#define LCRTBS 0x0001
|
||||
#define LPRTERA 0x0002
|
||||
#define LCRTERA 0x0004
|
||||
#define LTILDE 0x0008
|
||||
#define LMDMBUF 0x0010
|
||||
#define LLITOUT 0x0020
|
||||
#define LTOSTOP 0x0040
|
||||
#define LFLUSHO 0x0080
|
||||
#define LNOHANG 0x0100
|
||||
#define LL001000 0x0200
|
||||
#define LCRTKIL 0x0400
|
||||
#define LPASS8 0x0800
|
||||
#define LCTLECH 0x1000
|
||||
#define LPENDIN 0x2000
|
||||
#define LDECCTQ 0x4000
|
||||
#define LNOFLSH 0x8000
|
||||
|
||||
#define REXPROG 100017
|
||||
#define REXVERS 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define REXPROC_START 1
|
||||
extern rex_result * rexproc_start_1(rex_start *, CLIENT *);
|
||||
extern rex_result * rexproc_start_1_svc(rex_start *, struct svc_req *);
|
||||
#define REXPROC_WAIT 2
|
||||
extern rex_result * rexproc_wait_1(void *, CLIENT *);
|
||||
extern rex_result * rexproc_wait_1_svc(void *, struct svc_req *);
|
||||
#define REXPROC_MODES 3
|
||||
extern void * rexproc_modes_1(rex_ttymode *, CLIENT *);
|
||||
extern void * rexproc_modes_1_svc(rex_ttymode *, struct svc_req *);
|
||||
#define REXPROC_WINCH 4
|
||||
extern void * rexproc_winch_1(rex_ttysize *, CLIENT *);
|
||||
extern void * rexproc_winch_1_svc(rex_ttysize *, struct svc_req *);
|
||||
#define REXPROC_SIGNAL 5
|
||||
extern void * rexproc_signal_1(int *, CLIENT *);
|
||||
extern void * rexproc_signal_1_svc(int *, struct svc_req *);
|
||||
extern int rexprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define REXPROC_START 1
|
||||
extern rex_result * rexproc_start_1();
|
||||
extern rex_result * rexproc_start_1_svc();
|
||||
#define REXPROC_WAIT 2
|
||||
extern rex_result * rexproc_wait_1();
|
||||
extern rex_result * rexproc_wait_1_svc();
|
||||
#define REXPROC_MODES 3
|
||||
extern void * rexproc_modes_1();
|
||||
extern void * rexproc_modes_1_svc();
|
||||
#define REXPROC_WINCH 4
|
||||
extern void * rexproc_winch_1();
|
||||
extern void * rexproc_winch_1_svc();
|
||||
#define REXPROC_SIGNAL 5
|
||||
extern void * rexproc_signal_1();
|
||||
extern void * rexproc_signal_1_svc();
|
||||
extern int rexprog_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_rexstring (XDR *, rexstring*);
|
||||
extern bool_t xdr_rex_start (XDR *, rex_start*);
|
||||
extern bool_t xdr_rex_result (XDR *, rex_result*);
|
||||
extern bool_t xdr_sgttyb (XDR *, sgttyb*);
|
||||
extern bool_t xdr_tchars (XDR *, tchars*);
|
||||
extern bool_t xdr_ltchars (XDR *, ltchars*);
|
||||
extern bool_t xdr_rex_ttysize (XDR *, rex_ttysize*);
|
||||
extern bool_t xdr_rex_ttymode (XDR *, rex_ttymode*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_rexstring ();
|
||||
extern bool_t xdr_rex_start ();
|
||||
extern bool_t xdr_rex_result ();
|
||||
extern bool_t xdr_sgttyb ();
|
||||
extern bool_t xdr_tchars ();
|
||||
extern bool_t xdr_ltchars ();
|
||||
extern bool_t xdr_rex_ttysize ();
|
||||
extern bool_t xdr_rex_ttymode ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_REX_H_RPCGEN */
|
||||
229
openflow/usr/include/rpcsvc/rex.x
Normal file
229
openflow/usr/include/rpcsvc/rex.x
Normal file
@@ -0,0 +1,229 @@
|
||||
/* @(#)rex.x 2.1 88/08/01 4.0 RPCSRC */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Remote execution (rex) protocol specification
|
||||
*/
|
||||
|
||||
const STRINGSIZE = 1024;
|
||||
typedef string rexstring<1024>;
|
||||
|
||||
/*
|
||||
* values to pass to REXPROC_SIGNAL
|
||||
*/
|
||||
const SIGINT = 2; /* interrupt */
|
||||
|
||||
/*
|
||||
* Values for rst_flags, below
|
||||
*/
|
||||
const REX_INTERACTIVE = 1; /* interactive mode */
|
||||
|
||||
struct rex_start {
|
||||
rexstring rst_cmd<>; /* list of command and args */
|
||||
rexstring rst_host; /* working directory host name */
|
||||
rexstring rst_fsname; /* working directory file system name */
|
||||
rexstring rst_dirwithin;/* working directory within file system */
|
||||
rexstring rst_env<>; /* list of environment */
|
||||
unsigned int rst_port0; /* port for stdin */
|
||||
unsigned int rst_port1; /* port for stdout */
|
||||
unsigned int rst_port2; /* port for stderr */
|
||||
unsigned int rst_flags; /* options - see const above */
|
||||
};
|
||||
|
||||
struct rex_result {
|
||||
int rlt_stat; /* integer status code */
|
||||
rexstring rlt_message; /* string message for human consumption */
|
||||
};
|
||||
|
||||
|
||||
struct sgttyb {
|
||||
unsigned four; /* always equals 4 */
|
||||
opaque chars[4];
|
||||
/* chars[0] == input speed */
|
||||
/* chars[1] == output speed */
|
||||
/* chars[2] == kill character */
|
||||
/* chars[3] == erase character */
|
||||
unsigned flags;
|
||||
};
|
||||
/* values for speeds above (baud rates) */
|
||||
const B0 = 0;
|
||||
const B50 = 1;
|
||||
const B75 = 2;
|
||||
const B110 = 3;
|
||||
const B134 = 4;
|
||||
const B150 = 5;
|
||||
const B200 = 6;
|
||||
const B300 = 7;
|
||||
const B600 = 8;
|
||||
const B1200 = 9;
|
||||
const B1800 = 10;
|
||||
const B2400 = 11;
|
||||
const B4800 = 12;
|
||||
const B9600 = 13;
|
||||
const B19200 = 14;
|
||||
const B38400 = 15;
|
||||
|
||||
/* values for flags above */
|
||||
const TANDEM = 0x00000001; /* send stopc on out q full */
|
||||
const CBREAK = 0x00000002; /* half-cooked mode */
|
||||
const LCASE = 0x00000004; /* simulate lower case */
|
||||
const ECHO = 0x00000008; /* echo input */
|
||||
const CRMOD = 0x00000010; /* map \r to \r\n on output */
|
||||
const RAW = 0x00000020; /* no i/o processing */
|
||||
const ODDP = 0x00000040; /* get/send odd parity */
|
||||
const EVENP = 0x00000080; /* get/send even parity */
|
||||
const ANYP = 0x000000c0; /* get any parity/send none */
|
||||
const NLDELAY = 0x00000300; /* \n delay */
|
||||
const NL0 = 0x00000000;
|
||||
const NL1 = 0x00000100; /* tty 37 */
|
||||
const NL2 = 0x00000200; /* vt05 */
|
||||
const NL3 = 0x00000300;
|
||||
const TBDELAY = 0x00000c00; /* horizontal tab delay */
|
||||
const TAB0 = 0x00000000;
|
||||
const TAB1 = 0x00000400; /* tty 37 */
|
||||
const TAB2 = 0x00000800;
|
||||
const XTABS = 0x00000c00; /* expand tabs on output */
|
||||
const CRDELAY = 0x00003000; /* \r delay */
|
||||
const CR0 = 0x00000000;
|
||||
const CR1 = 0x00001000; /* tn 300 */
|
||||
const CR2 = 0x00002000; /* tty 37 */
|
||||
const CR3 = 0x00003000; /* concept 100 */
|
||||
const VTDELAY = 0x00004000; /* vertical tab delay */
|
||||
const FF0 = 0x00000000;
|
||||
const FF1 = 0x00004000; /* tty 37 */
|
||||
const BSDELAY = 0x00008000; /* \b delay */
|
||||
const BS0 = 0x00000000;
|
||||
const BS1 = 0x00008000;
|
||||
const CRTBS = 0x00010000; /* do backspacing for crt */
|
||||
const PRTERA = 0x00020000; /* \ ... / erase */
|
||||
const CRTERA = 0x00040000; /* " \b " to wipe out char */
|
||||
const TILDE = 0x00080000; /* hazeltine tilde kludge */
|
||||
const MDMBUF = 0x00100000; /* start/stop output on carrier intr */
|
||||
const LITOUT = 0x00200000; /* literal output */
|
||||
const TOSTOP = 0x00400000; /* SIGTTOU on background output */
|
||||
const FLUSHO = 0x00800000; /* flush output to terminal */
|
||||
const NOHANG = 0x01000000; /* no SIGHUP on carrier drop */
|
||||
const L001000 = 0x02000000;
|
||||
const CRTKIL = 0x04000000; /* kill line with " \b " */
|
||||
const PASS8 = 0x08000000;
|
||||
const CTLECH = 0x10000000; /* echo control chars as ^X */
|
||||
const PENDIN = 0x20000000; /* tp->t_rawq needs reread */
|
||||
const DECCTQ = 0x40000000; /* only ^Q starts after ^S */
|
||||
const NOFLSH = 0x80000000; /* no output flush on signal */
|
||||
|
||||
struct tchars {
|
||||
unsigned six; /* always equals 6 */
|
||||
opaque chars[6];
|
||||
/* chars[0] == interrupt char */
|
||||
/* chars[1] == quit char */
|
||||
/* chars[2] == start output char */
|
||||
/* chars[3] == stop output char */
|
||||
/* chars[4] == end-of-file char */
|
||||
/* chars[5] == input delimiter (like nl) */
|
||||
};
|
||||
|
||||
struct ltchars {
|
||||
unsigned six; /* always equals 6 */
|
||||
opaque chars[6];
|
||||
/* chars[0] == stop process signal */
|
||||
/* chars[1] == delayed stop process signal */
|
||||
/* chars[2] == reprint line */
|
||||
/* chars[3] == flush output */
|
||||
/* chars[4] == word erase */
|
||||
/* chars[5] == literal next character */
|
||||
unsigned mode;
|
||||
};
|
||||
|
||||
struct rex_ttysize {
|
||||
int ts_lines;
|
||||
int ts_cols;
|
||||
};
|
||||
|
||||
struct rex_ttymode {
|
||||
sgttyb basic; /* standard unix tty flags */
|
||||
tchars more; /* interrupt, kill characters, etc. */
|
||||
ltchars yetmore; /* special Berkeley characters */
|
||||
unsigned andmore; /* and Berkeley modes */
|
||||
};
|
||||
|
||||
/* values for andmore above */
|
||||
const LCRTBS = 0x0001; /* do backspacing for crt */
|
||||
const LPRTERA = 0x0002; /* \ ... / erase */
|
||||
const LCRTERA = 0x0004; /* " \b " to wipe out char */
|
||||
const LTILDE = 0x0008; /* hazeltine tilde kludge */
|
||||
const LMDMBUF = 0x0010; /* start/stop output on carrier intr */
|
||||
const LLITOUT = 0x0020; /* literal output */
|
||||
const LTOSTOP = 0x0040; /* SIGTTOU on background output */
|
||||
const LFLUSHO = 0x0080; /* flush output to terminal */
|
||||
const LNOHANG = 0x0100; /* no SIGHUP on carrier drop */
|
||||
const LL001000 = 0x0200;
|
||||
const LCRTKIL = 0x0400; /* kill line with " \b " */
|
||||
const LPASS8 = 0x0800;
|
||||
const LCTLECH = 0x1000; /* echo control chars as ^X */
|
||||
const LPENDIN = 0x2000; /* needs reread */
|
||||
const LDECCTQ = 0x4000; /* only ^Q starts after ^S */
|
||||
const LNOFLSH = 0x8000; /* no output flush on signal */
|
||||
|
||||
program REXPROG {
|
||||
version REXVERS {
|
||||
|
||||
/*
|
||||
* Start remote execution
|
||||
*/
|
||||
rex_result
|
||||
REXPROC_START(rex_start) = 1;
|
||||
|
||||
/*
|
||||
* Wait for remote execution to terminate
|
||||
*/
|
||||
rex_result
|
||||
REXPROC_WAIT(void) = 2;
|
||||
|
||||
/*
|
||||
* Send tty modes
|
||||
*/
|
||||
void
|
||||
REXPROC_MODES(rex_ttymode) = 3;
|
||||
|
||||
/*
|
||||
* Send window size change
|
||||
*/
|
||||
void
|
||||
REXPROC_WINCH(rex_ttysize) = 4;
|
||||
|
||||
/*
|
||||
* Send other signal
|
||||
*/
|
||||
void
|
||||
REXPROC_SIGNAL(int) = 5;
|
||||
} = 1;
|
||||
} = 100017;
|
||||
95
openflow/usr/include/rpcsvc/rquota.h
Normal file
95
openflow/usr/include/rpcsvc/rquota.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _RQUOTA_H_RPCGEN
|
||||
#define _RQUOTA_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RQ_PATHLEN 1024
|
||||
|
||||
struct getquota_args {
|
||||
char *gqa_pathp;
|
||||
int gqa_uid;
|
||||
};
|
||||
typedef struct getquota_args getquota_args;
|
||||
|
||||
struct rquota {
|
||||
int rq_bsize;
|
||||
bool_t rq_active;
|
||||
u_int rq_bhardlimit;
|
||||
u_int rq_bsoftlimit;
|
||||
u_int rq_curblocks;
|
||||
u_int rq_fhardlimit;
|
||||
u_int rq_fsoftlimit;
|
||||
u_int rq_curfiles;
|
||||
u_int rq_btimeleft;
|
||||
u_int rq_ftimeleft;
|
||||
};
|
||||
typedef struct rquota rquota;
|
||||
|
||||
enum gqr_status {
|
||||
Q_OK = 1,
|
||||
Q_NOQUOTA = 2,
|
||||
Q_EPERM = 3,
|
||||
};
|
||||
typedef enum gqr_status gqr_status;
|
||||
|
||||
struct getquota_rslt {
|
||||
gqr_status status;
|
||||
union {
|
||||
rquota gqr_rquota;
|
||||
} getquota_rslt_u;
|
||||
};
|
||||
typedef struct getquota_rslt getquota_rslt;
|
||||
|
||||
#define RQUOTAPROG 100011
|
||||
#define RQUOTAVERS 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define RQUOTAPROC_GETQUOTA 1
|
||||
extern getquota_rslt * rquotaproc_getquota_1(getquota_args *, CLIENT *);
|
||||
extern getquota_rslt * rquotaproc_getquota_1_svc(getquota_args *, struct svc_req *);
|
||||
#define RQUOTAPROC_GETACTIVEQUOTA 2
|
||||
extern getquota_rslt * rquotaproc_getactivequota_1(getquota_args *, CLIENT *);
|
||||
extern getquota_rslt * rquotaproc_getactivequota_1_svc(getquota_args *, struct svc_req *);
|
||||
extern int rquotaprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define RQUOTAPROC_GETQUOTA 1
|
||||
extern getquota_rslt * rquotaproc_getquota_1();
|
||||
extern getquota_rslt * rquotaproc_getquota_1_svc();
|
||||
#define RQUOTAPROC_GETACTIVEQUOTA 2
|
||||
extern getquota_rslt * rquotaproc_getactivequota_1();
|
||||
extern getquota_rslt * rquotaproc_getactivequota_1_svc();
|
||||
extern int rquotaprog_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_getquota_args (XDR *, getquota_args*);
|
||||
extern bool_t xdr_rquota (XDR *, rquota*);
|
||||
extern bool_t xdr_gqr_status (XDR *, gqr_status*);
|
||||
extern bool_t xdr_getquota_rslt (XDR *, getquota_rslt*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_getquota_args ();
|
||||
extern bool_t xdr_rquota ();
|
||||
extern bool_t xdr_gqr_status ();
|
||||
extern bool_t xdr_getquota_rslt ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RQUOTA_H_RPCGEN */
|
||||
61
openflow/usr/include/rpcsvc/rquota.x
Normal file
61
openflow/usr/include/rpcsvc/rquota.x
Normal file
@@ -0,0 +1,61 @@
|
||||
/* @(#)rquota.x 2.1 88/08/01 4.0 RPCSRC */
|
||||
/* @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro */
|
||||
|
||||
/*
|
||||
* Remote quota protocol
|
||||
* Requires unix authentication
|
||||
*/
|
||||
|
||||
const RQ_PATHLEN = 1024;
|
||||
|
||||
struct getquota_args {
|
||||
string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
|
||||
int gqa_uid; /* inquire about quota for uid */
|
||||
};
|
||||
|
||||
/*
|
||||
* remote quota structure
|
||||
*/
|
||||
struct rquota {
|
||||
int rq_bsize; /* block size for block counts */
|
||||
bool rq_active; /* indicates whether quota is active */
|
||||
unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */
|
||||
unsigned int rq_bsoftlimit; /* preferred limit on disk blks */
|
||||
unsigned int rq_curblocks; /* current block count */
|
||||
unsigned int rq_fhardlimit; /* absolute limit on allocated files */
|
||||
unsigned int rq_fsoftlimit; /* preferred file limit */
|
||||
unsigned int rq_curfiles; /* current # allocated files */
|
||||
unsigned int rq_btimeleft; /* time left for excessive disk use */
|
||||
unsigned int rq_ftimeleft; /* time left for excessive files */
|
||||
};
|
||||
|
||||
enum gqr_status {
|
||||
Q_OK = 1, /* quota returned */
|
||||
Q_NOQUOTA = 2, /* noquota for uid */
|
||||
Q_EPERM = 3 /* no permission to access quota */
|
||||
};
|
||||
|
||||
union getquota_rslt switch (gqr_status status) {
|
||||
case Q_OK:
|
||||
rquota gqr_rquota; /* valid if status == Q_OK */
|
||||
case Q_NOQUOTA:
|
||||
void;
|
||||
case Q_EPERM:
|
||||
void;
|
||||
};
|
||||
|
||||
program RQUOTAPROG {
|
||||
version RQUOTAVERS {
|
||||
/*
|
||||
* Get all quotas
|
||||
*/
|
||||
getquota_rslt
|
||||
RQUOTAPROC_GETQUOTA(getquota_args) = 1;
|
||||
|
||||
/*
|
||||
* Get active quotas only
|
||||
*/
|
||||
getquota_rslt
|
||||
RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2;
|
||||
} = 1;
|
||||
} = 100011;
|
||||
162
openflow/usr/include/rpcsvc/rstat.h
Normal file
162
openflow/usr/include/rpcsvc/rstat.h
Normal file
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _RSTAT_H_RPCGEN
|
||||
#define _RSTAT_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef FSCALE
|
||||
/*
|
||||
* Scale factor for scaled integers used to count load averages.
|
||||
*/
|
||||
#define FSHIFT 8 /* bits to right of fixed binary point */
|
||||
#define FSCALE (1<<FSHIFT)
|
||||
|
||||
#endif /* ndef FSCALE */
|
||||
#define CPUSTATES 4
|
||||
#define DK_NDRIVE 4
|
||||
|
||||
struct rstat_timeval {
|
||||
u_int tv_sec;
|
||||
u_int tv_usec;
|
||||
};
|
||||
typedef struct rstat_timeval rstat_timeval;
|
||||
|
||||
struct statstime {
|
||||
int cp_time[CPUSTATES];
|
||||
int dk_xfer[DK_NDRIVE];
|
||||
u_int v_pgpgin;
|
||||
u_int v_pgpgout;
|
||||
u_int v_pswpin;
|
||||
u_int v_pswpout;
|
||||
u_int v_intr;
|
||||
int if_ipackets;
|
||||
int if_ierrors;
|
||||
int if_oerrors;
|
||||
int if_collisions;
|
||||
u_int v_swtch;
|
||||
int avenrun[3];
|
||||
rstat_timeval boottime;
|
||||
rstat_timeval curtime;
|
||||
int if_opackets;
|
||||
};
|
||||
typedef struct statstime statstime;
|
||||
|
||||
struct statsswtch {
|
||||
int cp_time[CPUSTATES];
|
||||
int dk_xfer[DK_NDRIVE];
|
||||
u_int v_pgpgin;
|
||||
u_int v_pgpgout;
|
||||
u_int v_pswpin;
|
||||
u_int v_pswpout;
|
||||
u_int v_intr;
|
||||
int if_ipackets;
|
||||
int if_ierrors;
|
||||
int if_oerrors;
|
||||
int if_collisions;
|
||||
u_int v_swtch;
|
||||
u_int avenrun[3];
|
||||
rstat_timeval boottime;
|
||||
int if_opackets;
|
||||
};
|
||||
typedef struct statsswtch statsswtch;
|
||||
|
||||
struct stats {
|
||||
int cp_time[CPUSTATES];
|
||||
int dk_xfer[DK_NDRIVE];
|
||||
u_int v_pgpgin;
|
||||
u_int v_pgpgout;
|
||||
u_int v_pswpin;
|
||||
u_int v_pswpout;
|
||||
u_int v_intr;
|
||||
int if_ipackets;
|
||||
int if_ierrors;
|
||||
int if_oerrors;
|
||||
int if_collisions;
|
||||
int if_opackets;
|
||||
};
|
||||
typedef struct stats stats;
|
||||
|
||||
#define RSTATPROG 100001
|
||||
#define RSTATVERS_TIME 3
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define RSTATPROC_STATS 1
|
||||
extern statstime * rstatproc_stats_3(void *, CLIENT *);
|
||||
extern statstime * rstatproc_stats_3_svc(void *, struct svc_req *);
|
||||
#define RSTATPROC_HAVEDISK 2
|
||||
extern u_int * rstatproc_havedisk_3(void *, CLIENT *);
|
||||
extern u_int * rstatproc_havedisk_3_svc(void *, struct svc_req *);
|
||||
extern int rstatprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define RSTATPROC_STATS 1
|
||||
extern statstime * rstatproc_stats_3();
|
||||
extern statstime * rstatproc_stats_3_svc();
|
||||
#define RSTATPROC_HAVEDISK 2
|
||||
extern u_int * rstatproc_havedisk_3();
|
||||
extern u_int * rstatproc_havedisk_3_svc();
|
||||
extern int rstatprog_3_freeresult ();
|
||||
#endif /* K&R C */
|
||||
#define RSTATVERS_SWTCH 2
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern statsswtch * rstatproc_stats_2(void *, CLIENT *);
|
||||
extern statsswtch * rstatproc_stats_2_svc(void *, struct svc_req *);
|
||||
extern u_int * rstatproc_havedisk_2(void *, CLIENT *);
|
||||
extern u_int * rstatproc_havedisk_2_svc(void *, struct svc_req *);
|
||||
extern int rstatprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
extern statsswtch * rstatproc_stats_2();
|
||||
extern statsswtch * rstatproc_stats_2_svc();
|
||||
extern u_int * rstatproc_havedisk_2();
|
||||
extern u_int * rstatproc_havedisk_2_svc();
|
||||
extern int rstatprog_2_freeresult ();
|
||||
#endif /* K&R C */
|
||||
#define RSTATVERS_ORIG 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern stats * rstatproc_stats_1(void *, CLIENT *);
|
||||
extern stats * rstatproc_stats_1_svc(void *, struct svc_req *);
|
||||
extern u_int * rstatproc_havedisk_1(void *, CLIENT *);
|
||||
extern u_int * rstatproc_havedisk_1_svc(void *, struct svc_req *);
|
||||
extern int rstatprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
extern stats * rstatproc_stats_1();
|
||||
extern stats * rstatproc_stats_1_svc();
|
||||
extern u_int * rstatproc_havedisk_1();
|
||||
extern u_int * rstatproc_havedisk_1_svc();
|
||||
extern int rstatprog_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_rstat_timeval (XDR *, rstat_timeval*);
|
||||
extern bool_t xdr_statstime (XDR *, statstime*);
|
||||
extern bool_t xdr_statsswtch (XDR *, statsswtch*);
|
||||
extern bool_t xdr_stats (XDR *, stats*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_rstat_timeval ();
|
||||
extern bool_t xdr_statstime ();
|
||||
extern bool_t xdr_statsswtch ();
|
||||
extern bool_t xdr_stats ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RSTAT_H_RPCGEN */
|
||||
145
openflow/usr/include/rpcsvc/rstat.x
Normal file
145
openflow/usr/include/rpcsvc/rstat.x
Normal file
@@ -0,0 +1,145 @@
|
||||
/* @(#)rstat.x 2.2 88/08/01 4.0 RPCSRC */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Gather statistics on remote machines
|
||||
*/
|
||||
|
||||
#ifdef RPC_HDR
|
||||
|
||||
%#ifndef FSCALE
|
||||
%/*
|
||||
% * Scale factor for scaled integers used to count load averages.
|
||||
% */
|
||||
%#define FSHIFT 8 /* bits to right of fixed binary point */
|
||||
%#define FSCALE (1<<FSHIFT)
|
||||
%
|
||||
%#endif /* ndef FSCALE */
|
||||
|
||||
#endif /* def RPC_HDR */
|
||||
|
||||
const CPUSTATES = 4;
|
||||
const DK_NDRIVE = 4;
|
||||
|
||||
/*
|
||||
* GMT since 0:00, January 1, 1970
|
||||
*/
|
||||
struct rstat_timeval {
|
||||
unsigned int tv_sec; /* seconds */
|
||||
unsigned int tv_usec; /* and microseconds */
|
||||
};
|
||||
|
||||
struct statstime { /* RSTATVERS_TIME */
|
||||
int cp_time[CPUSTATES];
|
||||
int dk_xfer[DK_NDRIVE];
|
||||
unsigned int v_pgpgin; /* these are cumulative sum */
|
||||
unsigned int v_pgpgout;
|
||||
unsigned int v_pswpin;
|
||||
unsigned int v_pswpout;
|
||||
unsigned int v_intr;
|
||||
int if_ipackets;
|
||||
int if_ierrors;
|
||||
int if_oerrors;
|
||||
int if_collisions;
|
||||
unsigned int v_swtch;
|
||||
int avenrun[3]; /* scaled by FSCALE */
|
||||
rstat_timeval boottime;
|
||||
rstat_timeval curtime;
|
||||
int if_opackets;
|
||||
};
|
||||
|
||||
struct statsswtch { /* RSTATVERS_SWTCH */
|
||||
int cp_time[CPUSTATES];
|
||||
int dk_xfer[DK_NDRIVE];
|
||||
unsigned int v_pgpgin; /* these are cumulative sum */
|
||||
unsigned int v_pgpgout;
|
||||
unsigned int v_pswpin;
|
||||
unsigned int v_pswpout;
|
||||
unsigned int v_intr;
|
||||
int if_ipackets;
|
||||
int if_ierrors;
|
||||
int if_oerrors;
|
||||
int if_collisions;
|
||||
unsigned int v_swtch;
|
||||
unsigned int avenrun[3];/* scaled by FSCALE */
|
||||
rstat_timeval boottime;
|
||||
int if_opackets;
|
||||
};
|
||||
|
||||
struct stats { /* RSTATVERS_ORIG */
|
||||
int cp_time[CPUSTATES];
|
||||
int dk_xfer[DK_NDRIVE];
|
||||
unsigned int v_pgpgin; /* these are cumulative sum */
|
||||
unsigned int v_pgpgout;
|
||||
unsigned int v_pswpin;
|
||||
unsigned int v_pswpout;
|
||||
unsigned int v_intr;
|
||||
int if_ipackets;
|
||||
int if_ierrors;
|
||||
int if_oerrors;
|
||||
int if_collisions;
|
||||
int if_opackets;
|
||||
};
|
||||
|
||||
|
||||
program RSTATPROG {
|
||||
/*
|
||||
* Newest version includes current time and context switching info
|
||||
*/
|
||||
version RSTATVERS_TIME {
|
||||
statstime
|
||||
RSTATPROC_STATS(void) = 1;
|
||||
|
||||
unsigned int
|
||||
RSTATPROC_HAVEDISK(void) = 2;
|
||||
} = 3;
|
||||
/*
|
||||
* Does not have current time
|
||||
*/
|
||||
version RSTATVERS_SWTCH {
|
||||
statsswtch
|
||||
RSTATPROC_STATS(void) = 1;
|
||||
|
||||
unsigned int
|
||||
RSTATPROC_HAVEDISK(void) = 2;
|
||||
} = 2;
|
||||
/*
|
||||
* Old version has no info about current time or context switching
|
||||
*/
|
||||
version RSTATVERS_ORIG {
|
||||
stats
|
||||
RSTATPROC_STATS(void) = 1;
|
||||
|
||||
unsigned int
|
||||
RSTATPROC_HAVEDISK(void) = 2;
|
||||
} = 1;
|
||||
} = 100001;
|
||||
147
openflow/usr/include/rpcsvc/rusers.h
Normal file
147
openflow/usr/include/rpcsvc/rusers.h
Normal file
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _RUSERS_H_RPCGEN
|
||||
#define _RUSERS_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Find out about remote users
|
||||
*/
|
||||
#define RUSERS_MAXUSERLEN 32
|
||||
#define RUSERS_MAXLINELEN 32
|
||||
#define RUSERS_MAXHOSTLEN 257
|
||||
|
||||
struct rusers_utmp {
|
||||
char *ut_user;
|
||||
char *ut_line;
|
||||
char *ut_host;
|
||||
int ut_type;
|
||||
int ut_time;
|
||||
u_int ut_idle;
|
||||
};
|
||||
typedef struct rusers_utmp rusers_utmp;
|
||||
|
||||
typedef struct {
|
||||
u_int utmp_array_len;
|
||||
rusers_utmp *utmp_array_val;
|
||||
} utmp_array;
|
||||
|
||||
/*
|
||||
* Values for ut_type field above.
|
||||
*/
|
||||
#define RUSERS_EMPTY 0
|
||||
#define RUSERS_RUN_LVL 1
|
||||
#define RUSERS_BOOT_TIME 2
|
||||
#define RUSERS_OLD_TIME 3
|
||||
#define RUSERS_NEW_TIME 4
|
||||
#define RUSERS_INIT_PROCESS 5
|
||||
#define RUSERS_LOGIN_PROCESS 6
|
||||
#define RUSERS_USER_PROCESS 7
|
||||
#define RUSERS_DEAD_PROCESS 8
|
||||
#define RUSERS_ACCOUNTING 9
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rpc/xdr.h>
|
||||
|
||||
/*
|
||||
* The following structures are used by version 2 of the rusersd protocol.
|
||||
* They were not developed with rpcgen, so they do not appear as RPCL.
|
||||
*/
|
||||
|
||||
#define RUSERSVERS_IDLE 2
|
||||
#define RUSERSVERS 3 /* current version */
|
||||
#define MAXUSERS 100
|
||||
|
||||
/*
|
||||
* This is the structure used in version 2 of the rusersd RPC service.
|
||||
* It corresponds to the utmp structure for BSD systems.
|
||||
*/
|
||||
struct ru_utmp {
|
||||
char ut_line[8]; /* tty name */
|
||||
char ut_name[8]; /* user id */
|
||||
char ut_host[16]; /* host name, if remote */
|
||||
long int ut_time; /* time on */
|
||||
};
|
||||
|
||||
struct utmparr {
|
||||
struct ru_utmp **uta_arr;
|
||||
int uta_cnt;
|
||||
};
|
||||
typedef struct utmparr utmparr;
|
||||
|
||||
extern bool_t xdr_utmparr (XDR *xdrs, struct utmparr *objp) __THROW;
|
||||
|
||||
struct utmpidle {
|
||||
struct ru_utmp ui_utmp;
|
||||
unsigned int ui_idle;
|
||||
};
|
||||
|
||||
struct utmpidlearr {
|
||||
struct utmpidle **uia_arr;
|
||||
int uia_cnt;
|
||||
};
|
||||
|
||||
extern bool_t xdr_utmpidlearr (XDR *xdrs, struct utmpidlearr *objp) __THROW;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define RUSERSPROG 100002
|
||||
#define RUSERSVERS_3 3
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define RUSERSPROC_NUM 1
|
||||
extern int * rusersproc_num_3(void *, CLIENT *);
|
||||
extern int * rusersproc_num_3_svc(void *, struct svc_req *);
|
||||
#define RUSERSPROC_NAMES 2
|
||||
extern utmp_array * rusersproc_names_3(void *, CLIENT *);
|
||||
extern utmp_array * rusersproc_names_3_svc(void *, struct svc_req *);
|
||||
#define RUSERSPROC_ALLNAMES 3
|
||||
extern utmp_array * rusersproc_allnames_3(void *, CLIENT *);
|
||||
extern utmp_array * rusersproc_allnames_3_svc(void *, struct svc_req *);
|
||||
extern int rusersprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define RUSERSPROC_NUM 1
|
||||
extern int * rusersproc_num_3();
|
||||
extern int * rusersproc_num_3_svc();
|
||||
#define RUSERSPROC_NAMES 2
|
||||
extern utmp_array * rusersproc_names_3();
|
||||
extern utmp_array * rusersproc_names_3_svc();
|
||||
#define RUSERSPROC_ALLNAMES 3
|
||||
extern utmp_array * rusersproc_allnames_3();
|
||||
extern utmp_array * rusersproc_allnames_3_svc();
|
||||
extern int rusersprog_3_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_rusers_utmp (XDR *, rusers_utmp*);
|
||||
extern bool_t xdr_utmp_array (XDR *, utmp_array*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_rusers_utmp ();
|
||||
extern bool_t xdr_utmp_array ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RUSERS_H_RPCGEN */
|
||||
228
openflow/usr/include/rpcsvc/rusers.x
Normal file
228
openflow/usr/include/rpcsvc/rusers.x
Normal file
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
%/*
|
||||
% * Find out about remote users
|
||||
% */
|
||||
|
||||
const RUSERS_MAXUSERLEN = 32;
|
||||
const RUSERS_MAXLINELEN = 32;
|
||||
const RUSERS_MAXHOSTLEN = 257;
|
||||
|
||||
struct rusers_utmp {
|
||||
string ut_user<RUSERS_MAXUSERLEN>; /* aka ut_name */
|
||||
string ut_line<RUSERS_MAXLINELEN>; /* device */
|
||||
string ut_host<RUSERS_MAXHOSTLEN>; /* host user logged on from */
|
||||
int ut_type; /* type of entry */
|
||||
int ut_time; /* time entry was made */
|
||||
unsigned int ut_idle; /* minutes idle */
|
||||
};
|
||||
|
||||
typedef rusers_utmp utmp_array<>;
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%
|
||||
%/*
|
||||
% * Values for ut_type field above.
|
||||
% */
|
||||
#endif
|
||||
const RUSERS_EMPTY = 0;
|
||||
const RUSERS_RUN_LVL = 1;
|
||||
const RUSERS_BOOT_TIME = 2;
|
||||
const RUSERS_OLD_TIME = 3;
|
||||
const RUSERS_NEW_TIME = 4;
|
||||
const RUSERS_INIT_PROCESS = 5;
|
||||
const RUSERS_LOGIN_PROCESS = 6;
|
||||
const RUSERS_USER_PROCESS = 7;
|
||||
const RUSERS_DEAD_PROCESS = 8;
|
||||
const RUSERS_ACCOUNTING = 9;
|
||||
|
||||
program RUSERSPROG {
|
||||
|
||||
version RUSERSVERS_3 {
|
||||
int
|
||||
RUSERSPROC_NUM(void) = 1;
|
||||
|
||||
utmp_array
|
||||
RUSERSPROC_NAMES(void) = 2;
|
||||
|
||||
utmp_array
|
||||
RUSERSPROC_ALLNAMES(void) = 3;
|
||||
} = 3;
|
||||
|
||||
} = 100002;
|
||||
|
||||
#ifdef RPC_HDR
|
||||
%
|
||||
%
|
||||
%#ifdef __cplusplus
|
||||
%extern "C" {
|
||||
%#endif
|
||||
%
|
||||
%#include <rpc/xdr.h>
|
||||
%
|
||||
%/*
|
||||
% * The following structures are used by version 2 of the rusersd protocol.
|
||||
% * They were not developed with rpcgen, so they do not appear as RPCL.
|
||||
% */
|
||||
%
|
||||
%#define RUSERSVERS_IDLE 2
|
||||
%#define RUSERSVERS 3 /* current version */
|
||||
%#define MAXUSERS 100
|
||||
%
|
||||
%/*
|
||||
% * This is the structure used in version 2 of the rusersd RPC service.
|
||||
% * It corresponds to the utmp structure for BSD systems.
|
||||
% */
|
||||
%struct ru_utmp {
|
||||
% char ut_line[8]; /* tty name */
|
||||
% char ut_name[8]; /* user id */
|
||||
% char ut_host[16]; /* host name, if remote */
|
||||
% long int ut_time; /* time on */
|
||||
%};
|
||||
%
|
||||
%struct utmparr {
|
||||
% struct ru_utmp **uta_arr;
|
||||
% int uta_cnt;
|
||||
%};
|
||||
%typedef struct utmparr utmparr;
|
||||
%
|
||||
%extern bool_t xdr_utmparr (XDR *xdrs, struct utmparr *objp) __THROW;
|
||||
%
|
||||
%struct utmpidle {
|
||||
% struct ru_utmp ui_utmp;
|
||||
% unsigned int ui_idle;
|
||||
%};
|
||||
%
|
||||
%struct utmpidlearr {
|
||||
% struct utmpidle **uia_arr;
|
||||
% int uia_cnt;
|
||||
%};
|
||||
%
|
||||
%extern bool_t xdr_utmpidlearr (XDR *xdrs, struct utmpidlearr *objp) __THROW;
|
||||
%
|
||||
%#ifdef __cplusplus
|
||||
%}
|
||||
%#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef RPC_XDR
|
||||
%bool_t xdr_utmp (XDR *xdrs, struct ru_utmp *objp);
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmp (XDR *xdrs, struct ru_utmp *objp)
|
||||
%{
|
||||
% /* Since the fields are char foo [xxx], we should not free them. */
|
||||
% if (xdrs->x_op != XDR_FREE)
|
||||
% {
|
||||
% char *ptr;
|
||||
% unsigned int size;
|
||||
% ptr = objp->ut_line;
|
||||
% size = sizeof (objp->ut_line);
|
||||
% if (!xdr_bytes (xdrs, &ptr, &size, size)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% ptr = objp->ut_name;
|
||||
% size = sizeof (objp->ut_name);
|
||||
% if (!xdr_bytes (xdrs, &ptr, &size, size)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% ptr = objp->ut_host;
|
||||
% size = sizeof (objp->ut_host);
|
||||
% if (!xdr_bytes (xdrs, &ptr, &size, size)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% }
|
||||
% if (!xdr_long(xdrs, &objp->ut_time)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t xdr_utmpptr(XDR *xdrs, struct ru_utmp **objpp);
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpptr (XDR *xdrs, struct ru_utmp **objpp)
|
||||
%{
|
||||
% if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct ru_utmp),
|
||||
% (xdrproc_t) xdr_utmp)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmparr (XDR *xdrs, struct utmparr *objp)
|
||||
%{
|
||||
% if (!xdr_array(xdrs, (char **)&objp->uta_arr, (u_int *)&objp->uta_cnt,
|
||||
% MAXUSERS, sizeof(struct ru_utmp *),
|
||||
% (xdrproc_t) xdr_utmpptr)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t xdr_utmpidle(XDR *xdrs, struct utmpidle *objp);
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpidle (XDR *xdrs, struct utmpidle *objp)
|
||||
%{
|
||||
% if (!xdr_utmp(xdrs, &objp->ui_utmp)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% if (!xdr_u_int(xdrs, &objp->ui_idle)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t xdr_utmpidleptr(XDR *xdrs, struct utmpidle **objp);
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpidleptr (XDR *xdrs, struct utmpidle **objpp)
|
||||
%{
|
||||
% if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct utmpidle),
|
||||
% (xdrproc_t) xdr_utmpidle)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
%
|
||||
%bool_t
|
||||
%xdr_utmpidlearr (XDR *xdrs, struct utmpidlearr *objp)
|
||||
%{
|
||||
% if (!xdr_array(xdrs, (char **)&objp->uia_arr, (u_int *)&objp->uia_cnt,
|
||||
% MAXUSERS, sizeof(struct utmpidle *),
|
||||
% (xdrproc_t) xdr_utmpidleptr)) {
|
||||
% return (FALSE);
|
||||
% }
|
||||
% return (TRUE);
|
||||
%}
|
||||
#endif
|
||||
135
openflow/usr/include/rpcsvc/sm_inter.h
Normal file
135
openflow/usr/include/rpcsvc/sm_inter.h
Normal file
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _SM_INTER_H_RPCGEN
|
||||
#define _SM_INTER_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SM_MAXSTRLEN 1024
|
||||
|
||||
struct sm_name {
|
||||
char *mon_name;
|
||||
};
|
||||
typedef struct sm_name sm_name;
|
||||
|
||||
struct my_id {
|
||||
char *my_name;
|
||||
int my_prog;
|
||||
int my_vers;
|
||||
int my_proc;
|
||||
};
|
||||
typedef struct my_id my_id;
|
||||
|
||||
struct mon_id {
|
||||
char *mon_name;
|
||||
struct my_id my_id;
|
||||
};
|
||||
typedef struct mon_id mon_id;
|
||||
|
||||
struct mon {
|
||||
struct mon_id mon_id;
|
||||
char priv[16];
|
||||
};
|
||||
typedef struct mon mon;
|
||||
|
||||
struct sm_stat {
|
||||
int state;
|
||||
};
|
||||
typedef struct sm_stat sm_stat;
|
||||
|
||||
enum res {
|
||||
stat_succ = 0,
|
||||
stat_fail = 1,
|
||||
};
|
||||
typedef enum res res;
|
||||
|
||||
struct sm_stat_res {
|
||||
res res_stat;
|
||||
int state;
|
||||
};
|
||||
typedef struct sm_stat_res sm_stat_res;
|
||||
|
||||
struct status {
|
||||
char *mon_name;
|
||||
int state;
|
||||
char priv[16];
|
||||
};
|
||||
typedef struct status status;
|
||||
|
||||
#define SM_PROG 100024
|
||||
#define SM_VERS 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define SM_STAT 1
|
||||
extern struct sm_stat_res * sm_stat_1(struct sm_name *, CLIENT *);
|
||||
extern struct sm_stat_res * sm_stat_1_svc(struct sm_name *, struct svc_req *);
|
||||
#define SM_MON 2
|
||||
extern struct sm_stat_res * sm_mon_1(struct mon *, CLIENT *);
|
||||
extern struct sm_stat_res * sm_mon_1_svc(struct mon *, struct svc_req *);
|
||||
#define SM_UNMON 3
|
||||
extern struct sm_stat * sm_unmon_1(struct mon_id *, CLIENT *);
|
||||
extern struct sm_stat * sm_unmon_1_svc(struct mon_id *, struct svc_req *);
|
||||
#define SM_UNMON_ALL 4
|
||||
extern struct sm_stat * sm_unmon_all_1(struct my_id *, CLIENT *);
|
||||
extern struct sm_stat * sm_unmon_all_1_svc(struct my_id *, struct svc_req *);
|
||||
#define SM_SIMU_CRASH 5
|
||||
extern void * sm_simu_crash_1(void *, CLIENT *);
|
||||
extern void * sm_simu_crash_1_svc(void *, struct svc_req *);
|
||||
extern int sm_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define SM_STAT 1
|
||||
extern struct sm_stat_res * sm_stat_1();
|
||||
extern struct sm_stat_res * sm_stat_1_svc();
|
||||
#define SM_MON 2
|
||||
extern struct sm_stat_res * sm_mon_1();
|
||||
extern struct sm_stat_res * sm_mon_1_svc();
|
||||
#define SM_UNMON 3
|
||||
extern struct sm_stat * sm_unmon_1();
|
||||
extern struct sm_stat * sm_unmon_1_svc();
|
||||
#define SM_UNMON_ALL 4
|
||||
extern struct sm_stat * sm_unmon_all_1();
|
||||
extern struct sm_stat * sm_unmon_all_1_svc();
|
||||
#define SM_SIMU_CRASH 5
|
||||
extern void * sm_simu_crash_1();
|
||||
extern void * sm_simu_crash_1_svc();
|
||||
extern int sm_prog_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_sm_name (XDR *, sm_name*);
|
||||
extern bool_t xdr_my_id (XDR *, my_id*);
|
||||
extern bool_t xdr_mon_id (XDR *, mon_id*);
|
||||
extern bool_t xdr_mon (XDR *, mon*);
|
||||
extern bool_t xdr_sm_stat (XDR *, sm_stat*);
|
||||
extern bool_t xdr_res (XDR *, res*);
|
||||
extern bool_t xdr_sm_stat_res (XDR *, sm_stat_res*);
|
||||
extern bool_t xdr_status (XDR *, status*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_sm_name ();
|
||||
extern bool_t xdr_my_id ();
|
||||
extern bool_t xdr_mon_id ();
|
||||
extern bool_t xdr_mon ();
|
||||
extern bool_t xdr_sm_stat ();
|
||||
extern bool_t xdr_res ();
|
||||
extern bool_t xdr_sm_stat_res ();
|
||||
extern bool_t xdr_status ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_SM_INTER_H_RPCGEN */
|
||||
110
openflow/usr/include/rpcsvc/sm_inter.x
Normal file
110
openflow/usr/include/rpcsvc/sm_inter.x
Normal file
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Status monitor protocol specification
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
|
||||
|
||||
program SM_PROG {
|
||||
version SM_VERS {
|
||||
/* res_stat = stat_succ if status monitor agrees to monitor */
|
||||
/* res_stat = stat_fail if status monitor cannot monitor */
|
||||
/* if res_stat == stat_succ, state = state number of site sm_name */
|
||||
struct sm_stat_res SM_STAT(struct sm_name) = 1;
|
||||
|
||||
/* res_stat = stat_succ if status monitor agrees to monitor */
|
||||
/* res_stat = stat_fail if status monitor cannot monitor */
|
||||
/* stat consists of state number of local site */
|
||||
struct sm_stat_res SM_MON(struct mon) = 2;
|
||||
|
||||
/* stat consists of state number of local site */
|
||||
struct sm_stat SM_UNMON(struct mon_id) = 3;
|
||||
|
||||
/* stat consists of state number of local site */
|
||||
struct sm_stat SM_UNMON_ALL(struct my_id) = 4;
|
||||
|
||||
void SM_SIMU_CRASH(void) = 5;
|
||||
|
||||
} = 1;
|
||||
} = 100024;
|
||||
|
||||
const SM_MAXSTRLEN = 1024;
|
||||
|
||||
struct sm_name {
|
||||
string mon_name<SM_MAXSTRLEN>;
|
||||
};
|
||||
|
||||
struct my_id {
|
||||
string my_name<SM_MAXSTRLEN>; /* name of the site initiating the monitoring request*/
|
||||
int my_prog; /* rpc program # of the requesting process */
|
||||
int my_vers; /* rpc version # of the requesting process */
|
||||
int my_proc; /* rpc procedure # of the requesting process */
|
||||
};
|
||||
|
||||
struct mon_id {
|
||||
string mon_name<SM_MAXSTRLEN>; /* name of the site to be monitored */
|
||||
struct my_id my_id;
|
||||
};
|
||||
|
||||
|
||||
struct mon{
|
||||
struct mon_id mon_id;
|
||||
opaque priv[16]; /* private information to store at monitor for requesting process */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* state # of status monitor monotonically increases each time
|
||||
* status of the site changes:
|
||||
* an even number (>= 0) indicates the site is down and
|
||||
* an odd number (> 0) indicates the site is up;
|
||||
*/
|
||||
struct sm_stat {
|
||||
int state; /* state # of status monitor */
|
||||
};
|
||||
|
||||
enum res {
|
||||
stat_succ = 0, /* status monitor agrees to monitor */
|
||||
stat_fail = 1 /* status monitor cannot monitor */
|
||||
};
|
||||
|
||||
struct sm_stat_res {
|
||||
res res_stat;
|
||||
int state;
|
||||
};
|
||||
|
||||
/*
|
||||
* structure of the status message sent back by the status monitor
|
||||
* when monitor site status changes
|
||||
*/
|
||||
struct status {
|
||||
string mon_name<SM_MAXSTRLEN>;
|
||||
int state;
|
||||
opaque priv[16]; /* stored private information */
|
||||
};
|
||||
81
openflow/usr/include/rpcsvc/spray.h
Normal file
81
openflow/usr/include/rpcsvc/spray.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _SPRAY_H_RPCGEN
|
||||
#define _SPRAY_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SPRAYMAX 8845
|
||||
|
||||
struct spraytimeval {
|
||||
u_int sec;
|
||||
u_int usec;
|
||||
};
|
||||
typedef struct spraytimeval spraytimeval;
|
||||
|
||||
struct spraycumul {
|
||||
u_int counter;
|
||||
spraytimeval clock;
|
||||
};
|
||||
typedef struct spraycumul spraycumul;
|
||||
|
||||
typedef struct {
|
||||
u_int sprayarr_len;
|
||||
char *sprayarr_val;
|
||||
} sprayarr;
|
||||
|
||||
#define SPRAYPROG 100012
|
||||
#define SPRAYVERS 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define SPRAYPROC_SPRAY 1
|
||||
extern void * sprayproc_spray_1(sprayarr *, CLIENT *);
|
||||
extern void * sprayproc_spray_1_svc(sprayarr *, struct svc_req *);
|
||||
#define SPRAYPROC_GET 2
|
||||
extern spraycumul * sprayproc_get_1(void *, CLIENT *);
|
||||
extern spraycumul * sprayproc_get_1_svc(void *, struct svc_req *);
|
||||
#define SPRAYPROC_CLEAR 3
|
||||
extern void * sprayproc_clear_1(void *, CLIENT *);
|
||||
extern void * sprayproc_clear_1_svc(void *, struct svc_req *);
|
||||
extern int sprayprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define SPRAYPROC_SPRAY 1
|
||||
extern void * sprayproc_spray_1();
|
||||
extern void * sprayproc_spray_1_svc();
|
||||
#define SPRAYPROC_GET 2
|
||||
extern spraycumul * sprayproc_get_1();
|
||||
extern spraycumul * sprayproc_get_1_svc();
|
||||
#define SPRAYPROC_CLEAR 3
|
||||
extern void * sprayproc_clear_1();
|
||||
extern void * sprayproc_clear_1_svc();
|
||||
extern int sprayprog_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_spraytimeval (XDR *, spraytimeval*);
|
||||
extern bool_t xdr_spraycumul (XDR *, spraycumul*);
|
||||
extern bool_t xdr_sprayarr (XDR *, sprayarr*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_spraytimeval ();
|
||||
extern bool_t xdr_spraycumul ();
|
||||
extern bool_t xdr_sprayarr ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_SPRAY_H_RPCGEN */
|
||||
84
openflow/usr/include/rpcsvc/spray.x
Normal file
84
openflow/usr/include/rpcsvc/spray.x
Normal file
@@ -0,0 +1,84 @@
|
||||
/* @(#)spray.x 2.1 88/08/01 4.0 RPCSRC */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Spray a server with packets
|
||||
* Useful for testing flakiness of network interfaces
|
||||
*/
|
||||
|
||||
const SPRAYMAX = 8845; /* max amount can spray */
|
||||
|
||||
/*
|
||||
* GMT since 0:00, 1 January 1970
|
||||
*/
|
||||
struct spraytimeval {
|
||||
unsigned int sec;
|
||||
unsigned int usec;
|
||||
};
|
||||
|
||||
/*
|
||||
* spray statistics
|
||||
*/
|
||||
struct spraycumul {
|
||||
unsigned int counter;
|
||||
spraytimeval clock;
|
||||
};
|
||||
|
||||
/*
|
||||
* spray data
|
||||
*/
|
||||
typedef opaque sprayarr<SPRAYMAX>;
|
||||
|
||||
program SPRAYPROG {
|
||||
version SPRAYVERS {
|
||||
/*
|
||||
* Just throw away the data and increment the counter
|
||||
* This call never returns, so the client should always
|
||||
* time it out.
|
||||
*/
|
||||
void
|
||||
SPRAYPROC_SPRAY(sprayarr) = 1;
|
||||
|
||||
/*
|
||||
* Get the value of the counter and elapsed time since
|
||||
* last CLEAR.
|
||||
*/
|
||||
spraycumul
|
||||
SPRAYPROC_GET(void) = 2;
|
||||
|
||||
/*
|
||||
* Clear the counter and reset the elapsed time
|
||||
*/
|
||||
void
|
||||
SPRAYPROC_CLEAR(void) = 3;
|
||||
} = 1;
|
||||
} = 100012;
|
||||
339
openflow/usr/include/rpcsvc/yp.h
Normal file
339
openflow/usr/include/rpcsvc/yp.h
Normal file
@@ -0,0 +1,339 @@
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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 __RPCSVC_YP_H__
|
||||
#define __RPCSVC_YP_H__
|
||||
|
||||
#include <features.h>
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
#define YPMAXRECORD 1024
|
||||
#define YPMAXDOMAIN 64
|
||||
#define YPMAXMAP 64
|
||||
#define YPMAXPEER 64
|
||||
|
||||
enum ypstat {
|
||||
YP_TRUE = 1,
|
||||
YP_NOMORE = 2,
|
||||
YP_FALSE = 0,
|
||||
YP_NOMAP = -1,
|
||||
YP_NODOM = -2,
|
||||
YP_NOKEY = -3,
|
||||
YP_BADOP = -4,
|
||||
YP_BADDB = -5,
|
||||
YP_YPERR = -6,
|
||||
YP_BADARGS = -7,
|
||||
YP_VERS = -8,
|
||||
};
|
||||
typedef enum ypstat ypstat;
|
||||
|
||||
enum ypxfrstat {
|
||||
YPXFR_SUCC = 1,
|
||||
YPXFR_AGE = 2,
|
||||
YPXFR_NOMAP = -1,
|
||||
YPXFR_NODOM = -2,
|
||||
YPXFR_RSRC = -3,
|
||||
YPXFR_RPC = -4,
|
||||
YPXFR_MADDR = -5,
|
||||
YPXFR_YPERR = -6,
|
||||
YPXFR_BADARGS = -7,
|
||||
YPXFR_DBM = -8,
|
||||
YPXFR_FILE = -9,
|
||||
YPXFR_SKEW = -10,
|
||||
YPXFR_CLEAR = -11,
|
||||
YPXFR_FORCE = -12,
|
||||
YPXFR_XFRERR = -13,
|
||||
YPXFR_REFUSED = -14,
|
||||
};
|
||||
typedef enum ypxfrstat ypxfrstat;
|
||||
|
||||
typedef char *domainname;
|
||||
typedef char *mapname;
|
||||
typedef char *peername;
|
||||
|
||||
typedef struct {
|
||||
u_int keydat_len;
|
||||
char *keydat_val;
|
||||
} keydat;
|
||||
|
||||
typedef struct {
|
||||
u_int valdat_len;
|
||||
char *valdat_val;
|
||||
} valdat;
|
||||
|
||||
struct ypmap_parms {
|
||||
domainname domain;
|
||||
mapname map;
|
||||
u_int ordernum;
|
||||
peername peer;
|
||||
};
|
||||
typedef struct ypmap_parms ypmap_parms;
|
||||
|
||||
struct ypreq_key {
|
||||
domainname domain;
|
||||
mapname map;
|
||||
keydat key;
|
||||
};
|
||||
typedef struct ypreq_key ypreq_key;
|
||||
|
||||
struct ypreq_nokey {
|
||||
domainname domain;
|
||||
mapname map;
|
||||
};
|
||||
typedef struct ypreq_nokey ypreq_nokey;
|
||||
|
||||
struct ypreq_xfr {
|
||||
ypmap_parms map_parms;
|
||||
u_int transid;
|
||||
u_int prog;
|
||||
u_int port;
|
||||
};
|
||||
typedef struct ypreq_xfr ypreq_xfr;
|
||||
|
||||
struct ypresp_val {
|
||||
ypstat stat;
|
||||
valdat val;
|
||||
};
|
||||
typedef struct ypresp_val ypresp_val;
|
||||
|
||||
struct ypresp_key_val {
|
||||
ypstat stat;
|
||||
#ifdef STUPID_SUN_BUG
|
||||
/* This is the form as distributed by Sun. But even the Sun NIS
|
||||
servers expect the values in the other order. So their
|
||||
implementation somehow must change the order internally. We
|
||||
don't want to follow this bad example since the user should be
|
||||
able to use rpcgen on this file. */
|
||||
keydat key;
|
||||
valdat val;
|
||||
#else
|
||||
valdat val;
|
||||
keydat key;
|
||||
#endif
|
||||
};
|
||||
typedef struct ypresp_key_val ypresp_key_val;
|
||||
|
||||
struct ypresp_master {
|
||||
ypstat stat;
|
||||
peername peer;
|
||||
};
|
||||
typedef struct ypresp_master ypresp_master;
|
||||
|
||||
struct ypresp_order {
|
||||
ypstat stat;
|
||||
u_int ordernum;
|
||||
};
|
||||
typedef struct ypresp_order ypresp_order;
|
||||
|
||||
struct ypresp_all {
|
||||
bool_t more;
|
||||
union {
|
||||
ypresp_key_val val;
|
||||
} ypresp_all_u;
|
||||
};
|
||||
typedef struct ypresp_all ypresp_all;
|
||||
|
||||
struct ypresp_xfr {
|
||||
u_int transid;
|
||||
ypxfrstat xfrstat;
|
||||
};
|
||||
typedef struct ypresp_xfr ypresp_xfr;
|
||||
|
||||
struct ypmaplist {
|
||||
mapname map;
|
||||
struct ypmaplist *next;
|
||||
};
|
||||
typedef struct ypmaplist ypmaplist;
|
||||
|
||||
struct ypresp_maplist {
|
||||
ypstat stat;
|
||||
ypmaplist *maps;
|
||||
};
|
||||
typedef struct ypresp_maplist ypresp_maplist;
|
||||
|
||||
enum yppush_status {
|
||||
YPPUSH_SUCC = 1,
|
||||
YPPUSH_AGE = 2,
|
||||
YPPUSH_NOMAP = -1,
|
||||
YPPUSH_NODOM = -2,
|
||||
YPPUSH_RSRC = -3,
|
||||
YPPUSH_RPC = -4,
|
||||
YPPUSH_MADDR = -5,
|
||||
YPPUSH_YPERR = -6,
|
||||
YPPUSH_BADARGS = -7,
|
||||
YPPUSH_DBM = -8,
|
||||
YPPUSH_FILE = -9,
|
||||
YPPUSH_SKEW = -10,
|
||||
YPPUSH_CLEAR = -11,
|
||||
YPPUSH_FORCE = -12,
|
||||
YPPUSH_XFRERR = -13,
|
||||
YPPUSH_REFUSED = -14,
|
||||
};
|
||||
typedef enum yppush_status yppush_status;
|
||||
|
||||
struct yppushresp_xfr {
|
||||
u_int transid;
|
||||
yppush_status status;
|
||||
};
|
||||
typedef struct yppushresp_xfr yppushresp_xfr;
|
||||
|
||||
enum ypbind_resptype {
|
||||
YPBIND_SUCC_VAL = 1,
|
||||
YPBIND_FAIL_VAL = 2,
|
||||
};
|
||||
typedef enum ypbind_resptype ypbind_resptype;
|
||||
|
||||
struct ypbind_binding {
|
||||
char ypbind_binding_addr[4];
|
||||
char ypbind_binding_port[2];
|
||||
};
|
||||
typedef struct ypbind_binding ypbind_binding;
|
||||
|
||||
struct ypbind_resp {
|
||||
ypbind_resptype ypbind_status;
|
||||
union {
|
||||
u_int ypbind_error;
|
||||
ypbind_binding ypbind_bindinfo;
|
||||
} ypbind_resp_u;
|
||||
};
|
||||
typedef struct ypbind_resp ypbind_resp;
|
||||
|
||||
#define YPBIND_ERR_ERR 1
|
||||
#define YPBIND_ERR_NOSERV 2
|
||||
#define YPBIND_ERR_RESC 3
|
||||
|
||||
struct ypbind_setdom {
|
||||
domainname ypsetdom_domain;
|
||||
ypbind_binding ypsetdom_binding;
|
||||
u_int ypsetdom_vers;
|
||||
};
|
||||
typedef struct ypbind_setdom ypbind_setdom;
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define YPPROG 100004
|
||||
#define YPVERS 2
|
||||
|
||||
#define YPPROC_NULL 0
|
||||
extern void *ypproc_null_2 (void *, CLIENT *);
|
||||
extern void *ypproc_null_2_svc (void *, struct svc_req *);
|
||||
#define YPPROC_DOMAIN 1
|
||||
extern bool_t *ypproc_domain_2 (domainname *, CLIENT *);
|
||||
extern bool_t *ypproc_domain_2_svc (domainname *, struct svc_req *);
|
||||
#define YPPROC_DOMAIN_NONACK 2
|
||||
extern bool_t *ypproc_domain_nonack_2 (domainname *, CLIENT *);
|
||||
extern bool_t *ypproc_domain_nonack_2_svc (domainname *, struct svc_req *);
|
||||
#define YPPROC_MATCH 3
|
||||
extern ypresp_val *ypproc_match_2 (ypreq_key *, CLIENT *);
|
||||
extern ypresp_val *ypproc_match_2_svc (ypreq_key *, struct svc_req *);
|
||||
#define YPPROC_FIRST 4
|
||||
extern ypresp_key_val *ypproc_first_2 (ypreq_key *, CLIENT *);
|
||||
extern ypresp_key_val *ypproc_first_2_svc (ypreq_key *, struct svc_req *);
|
||||
#define YPPROC_NEXT 5
|
||||
extern ypresp_key_val *ypproc_next_2 (ypreq_key *, CLIENT *);
|
||||
extern ypresp_key_val *ypproc_next_2_svc (ypreq_key *, struct svc_req *);
|
||||
#define YPPROC_XFR 6
|
||||
extern ypresp_xfr *ypproc_xfr_2 (ypreq_xfr *, CLIENT *);
|
||||
extern ypresp_xfr *ypproc_xfr_2_svc (ypreq_xfr *, struct svc_req *);
|
||||
#define YPPROC_CLEAR 7
|
||||
extern void *ypproc_clear_2 (void *, CLIENT *);
|
||||
extern void *ypproc_clear_2_svc (void *, struct svc_req *);
|
||||
#define YPPROC_ALL 8
|
||||
extern ypresp_all *ypproc_all_2 (ypreq_nokey *, CLIENT *);
|
||||
extern ypresp_all *ypproc_all_2_svc (ypreq_nokey *, struct svc_req *);
|
||||
#define YPPROC_MASTER 9
|
||||
extern ypresp_master *ypproc_master_2 (ypreq_nokey *, CLIENT *);
|
||||
extern ypresp_master *ypproc_master_2_svc (ypreq_nokey *, struct svc_req *);
|
||||
#define YPPROC_ORDER 10
|
||||
extern ypresp_order *ypproc_order_2 (ypreq_nokey *, CLIENT *);
|
||||
extern ypresp_order *ypproc_order_2_svc (ypreq_nokey *, struct svc_req *);
|
||||
#define YPPROC_MAPLIST 11
|
||||
extern ypresp_maplist *ypproc_maplist_2 (domainname *, CLIENT *);
|
||||
extern ypresp_maplist *ypproc_maplist_2_svc (domainname *, struct svc_req *);
|
||||
extern int ypprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
|
||||
#define YPPUSH_XFRRESPPROG (0x40000000)
|
||||
#define YPPUSH_XFRRESPVERS 1
|
||||
|
||||
#define YPPUSHPROC_NULL 0
|
||||
extern void *yppushproc_null_1 (void *, CLIENT *);
|
||||
extern void *yppushproc_null_1_svc (void *, struct svc_req *);
|
||||
#define YPPUSHPROC_XFRRESP 1
|
||||
extern void *yppushproc_xfrresp_1 (yppushresp_xfr *, CLIENT *);
|
||||
extern void *yppushproc_xfrresp_1_svc (yppushresp_xfr *, struct svc_req *);
|
||||
extern int yppush_xfrrespprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
|
||||
#define YPBINDPROG 100007
|
||||
#define YPBINDVERS 2
|
||||
|
||||
#define YPBINDPROC_NULL 0
|
||||
extern void *ypbindproc_null_2 (void *, CLIENT *);
|
||||
extern void *ypbindproc_null_2_svc (void *, struct svc_req *);
|
||||
#define YPBINDPROC_DOMAIN 1
|
||||
extern ypbind_resp *ypbindproc_domain_2 (domainname *, CLIENT *);
|
||||
extern ypbind_resp *ypbindproc_domain_2_svc (domainname *, struct svc_req *);
|
||||
#define YPBINDPROC_SETDOM 2
|
||||
extern void *ypbindproc_setdom_2 (ypbind_setdom *, CLIENT *);
|
||||
extern void *ypbindproc_setdom_2_svc (ypbind_setdom *, struct svc_req *);
|
||||
extern int ypbindprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
|
||||
extern bool_t xdr_ypstat (XDR *, ypstat*);
|
||||
extern bool_t xdr_ypxfrstat (XDR *, ypxfrstat*);
|
||||
extern bool_t xdr_domainname (XDR *, domainname*);
|
||||
extern bool_t xdr_mapname (XDR *, mapname*);
|
||||
extern bool_t xdr_peername (XDR *, peername*);
|
||||
extern bool_t xdr_keydat (XDR *, keydat*);
|
||||
extern bool_t xdr_valdat (XDR *, valdat*);
|
||||
extern bool_t xdr_ypmap_parms (XDR *, ypmap_parms*);
|
||||
extern bool_t xdr_ypreq_key (XDR *, ypreq_key*);
|
||||
extern bool_t xdr_ypreq_nokey (XDR *, ypreq_nokey*);
|
||||
extern bool_t xdr_ypreq_xfr (XDR *, ypreq_xfr*);
|
||||
extern bool_t xdr_ypresp_val (XDR *, ypresp_val*);
|
||||
extern bool_t xdr_ypresp_key_val (XDR *, ypresp_key_val*);
|
||||
extern bool_t xdr_ypresp_master (XDR *, ypresp_master*);
|
||||
extern bool_t xdr_ypresp_order (XDR *, ypresp_order*);
|
||||
extern bool_t xdr_ypresp_all (XDR *, ypresp_all*);
|
||||
extern bool_t xdr_ypresp_xfr (XDR *, ypresp_xfr*);
|
||||
extern bool_t xdr_ypmaplist (XDR *, ypmaplist*);
|
||||
extern bool_t xdr_ypresp_maplist (XDR *, ypresp_maplist*);
|
||||
extern bool_t xdr_yppush_status (XDR *, yppush_status*);
|
||||
extern bool_t xdr_yppushresp_xfr (XDR *, yppushresp_xfr*);
|
||||
extern bool_t xdr_ypbind_resptype (XDR *, ypbind_resptype*);
|
||||
extern bool_t xdr_ypbind_binding (XDR *, ypbind_binding*);
|
||||
extern bool_t xdr_ypbind_resp (XDR *, ypbind_resp*);
|
||||
extern bool_t xdr_ypbind_setdom (XDR *, ypbind_setdom*);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !__RPCSVC_YP_H__ */
|
||||
311
openflow/usr/include/rpcsvc/yp.x
Normal file
311
openflow/usr/include/rpcsvc/yp.x
Normal file
@@ -0,0 +1,311 @@
|
||||
/* @(#)yp.x 2.1 88/08/01 4.0 RPCSRC */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Protocol description file for the Yellow Pages Service
|
||||
*/
|
||||
|
||||
const YPMAXRECORD = 1024;
|
||||
const YPMAXDOMAIN = 64;
|
||||
const YPMAXMAP = 64;
|
||||
const YPMAXPEER = 64;
|
||||
|
||||
|
||||
enum ypstat {
|
||||
YP_TRUE = 1,
|
||||
YP_NOMORE = 2,
|
||||
YP_FALSE = 0,
|
||||
YP_NOMAP = -1,
|
||||
YP_NODOM = -2,
|
||||
YP_NOKEY = -3,
|
||||
YP_BADOP = -4,
|
||||
YP_BADDB = -5,
|
||||
YP_YPERR = -6,
|
||||
YP_BADARGS = -7,
|
||||
YP_VERS = -8
|
||||
};
|
||||
|
||||
|
||||
enum ypxfrstat {
|
||||
YPXFR_SUCC = 1,
|
||||
YPXFR_AGE = 2,
|
||||
YPXFR_NOMAP = -1,
|
||||
YPXFR_NODOM = -2,
|
||||
YPXFR_RSRC = -3,
|
||||
YPXFR_RPC = -4,
|
||||
YPXFR_MADDR = -5,
|
||||
YPXFR_YPERR = -6,
|
||||
YPXFR_BADARGS = -7,
|
||||
YPXFR_DBM = -8,
|
||||
YPXFR_FILE = -9,
|
||||
YPXFR_SKEW = -10,
|
||||
YPXFR_CLEAR = -11,
|
||||
YPXFR_FORCE = -12,
|
||||
YPXFR_XFRERR = -13,
|
||||
YPXFR_REFUSED = -14
|
||||
};
|
||||
|
||||
|
||||
typedef string domainname<YPMAXDOMAIN>;
|
||||
typedef string mapname<YPMAXMAP>;
|
||||
typedef string peername<YPMAXPEER>;
|
||||
typedef opaque keydat<YPMAXRECORD>;
|
||||
typedef opaque valdat<YPMAXRECORD>;
|
||||
|
||||
|
||||
struct ypmap_parms {
|
||||
domainname domain;
|
||||
mapname map;
|
||||
unsigned int ordernum;
|
||||
peername peer;
|
||||
};
|
||||
|
||||
struct ypreq_key {
|
||||
domainname domain;
|
||||
mapname map;
|
||||
keydat key;
|
||||
};
|
||||
|
||||
struct ypreq_nokey {
|
||||
domainname domain;
|
||||
mapname map;
|
||||
};
|
||||
|
||||
struct ypreq_xfr {
|
||||
ypmap_parms map_parms;
|
||||
unsigned int transid;
|
||||
unsigned int prog;
|
||||
unsigned int port;
|
||||
};
|
||||
|
||||
|
||||
struct ypresp_val {
|
||||
ypstat stat;
|
||||
valdat val;
|
||||
};
|
||||
|
||||
struct ypresp_key_val {
|
||||
ypstat stat;
|
||||
#ifdef STUPID_SUN_BUG
|
||||
/* This is the form as distributed by Sun. But even the Sun NIS
|
||||
servers expect the values in the other order. So their
|
||||
implementation somehow must change the order internally. We
|
||||
don't want to follow this bad example since the user should be
|
||||
able to use rpcgen on this file. */
|
||||
keydat key;
|
||||
valdat val;
|
||||
#else
|
||||
valdat val;
|
||||
keydat key;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
struct ypresp_master {
|
||||
ypstat stat;
|
||||
peername peer;
|
||||
};
|
||||
|
||||
struct ypresp_order {
|
||||
ypstat stat;
|
||||
unsigned int ordernum;
|
||||
};
|
||||
|
||||
union ypresp_all switch (bool more) {
|
||||
case TRUE:
|
||||
ypresp_key_val val;
|
||||
case FALSE:
|
||||
void;
|
||||
};
|
||||
|
||||
struct ypresp_xfr {
|
||||
unsigned int transid;
|
||||
ypxfrstat xfrstat;
|
||||
};
|
||||
|
||||
struct ypmaplist {
|
||||
mapname map;
|
||||
ypmaplist *next;
|
||||
};
|
||||
|
||||
struct ypresp_maplist {
|
||||
ypstat stat;
|
||||
ypmaplist *maps;
|
||||
};
|
||||
|
||||
enum yppush_status {
|
||||
YPPUSH_SUCC = 1, /* Success */
|
||||
YPPUSH_AGE = 2, /* Master's version not newer */
|
||||
YPPUSH_NOMAP = -1, /* Can't find server for map */
|
||||
YPPUSH_NODOM = -2, /* Domain not supported */
|
||||
YPPUSH_RSRC = -3, /* Local resource alloc failure */
|
||||
YPPUSH_RPC = -4, /* RPC failure talking to server */
|
||||
YPPUSH_MADDR = -5, /* Can't get master address */
|
||||
YPPUSH_YPERR = -6, /* YP server/map db error */
|
||||
YPPUSH_BADARGS = -7, /* Request arguments bad */
|
||||
YPPUSH_DBM = -8, /* Local dbm operation failed */
|
||||
YPPUSH_FILE = -9, /* Local file I/O operation failed */
|
||||
YPPUSH_SKEW = -10, /* Map version skew during transfer */
|
||||
YPPUSH_CLEAR = -11, /* Can't send "Clear" req to local ypserv */
|
||||
YPPUSH_FORCE = -12, /* No local order number in map use -f flag. */
|
||||
YPPUSH_XFRERR = -13, /* ypxfr error */
|
||||
YPPUSH_REFUSED = -14 /* Transfer request refused by ypserv */
|
||||
};
|
||||
|
||||
struct yppushresp_xfr {
|
||||
unsigned transid;
|
||||
yppush_status status;
|
||||
};
|
||||
|
||||
/*
|
||||
* Response structure and overall result status codes. Success and failure
|
||||
* represent two separate response message types.
|
||||
*/
|
||||
|
||||
enum ypbind_resptype {
|
||||
YPBIND_SUCC_VAL = 1,
|
||||
YPBIND_FAIL_VAL = 2
|
||||
};
|
||||
|
||||
struct ypbind_binding {
|
||||
opaque ypbind_binding_addr[4]; /* In network order */
|
||||
opaque ypbind_binding_port[2]; /* In network order */
|
||||
};
|
||||
|
||||
union ypbind_resp switch (ypbind_resptype ypbind_status) {
|
||||
case YPBIND_FAIL_VAL:
|
||||
unsigned ypbind_error;
|
||||
case YPBIND_SUCC_VAL:
|
||||
ypbind_binding ypbind_bindinfo;
|
||||
};
|
||||
|
||||
/* Detailed failure reason codes for response field ypbind_error*/
|
||||
|
||||
const YPBIND_ERR_ERR = 1; /* Internal error */
|
||||
const YPBIND_ERR_NOSERV = 2; /* No bound server for passed domain */
|
||||
const YPBIND_ERR_RESC = 3; /* System resource allocation failure */
|
||||
|
||||
|
||||
/*
|
||||
* Request data structure for ypbind "Set domain" procedure.
|
||||
*/
|
||||
struct ypbind_setdom {
|
||||
domainname ypsetdom_domain;
|
||||
ypbind_binding ypsetdom_binding;
|
||||
unsigned ypsetdom_vers;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* YP access protocol
|
||||
*/
|
||||
program YPPROG {
|
||||
version YPVERS {
|
||||
void
|
||||
YPPROC_NULL(void) = 0;
|
||||
|
||||
bool
|
||||
YPPROC_DOMAIN(domainname) = 1;
|
||||
|
||||
bool
|
||||
YPPROC_DOMAIN_NONACK(domainname) = 2;
|
||||
|
||||
ypresp_val
|
||||
YPPROC_MATCH(ypreq_key) = 3;
|
||||
|
||||
ypresp_key_val
|
||||
YPPROC_FIRST(ypreq_key) = 4;
|
||||
|
||||
ypresp_key_val
|
||||
YPPROC_NEXT(ypreq_key) = 5;
|
||||
|
||||
ypresp_xfr
|
||||
YPPROC_XFR(ypreq_xfr) = 6;
|
||||
|
||||
void
|
||||
YPPROC_CLEAR(void) = 7;
|
||||
|
||||
ypresp_all
|
||||
YPPROC_ALL(ypreq_nokey) = 8;
|
||||
|
||||
ypresp_master
|
||||
YPPROC_MASTER(ypreq_nokey) = 9;
|
||||
|
||||
ypresp_order
|
||||
YPPROC_ORDER(ypreq_nokey) = 10;
|
||||
|
||||
ypresp_maplist
|
||||
YPPROC_MAPLIST(domainname) = 11;
|
||||
} = 2;
|
||||
} = 100004;
|
||||
|
||||
|
||||
/*
|
||||
* YPPUSHPROC_XFRRESP is the callback routine for result of YPPROC_XFR
|
||||
*/
|
||||
program YPPUSH_XFRRESPPROG {
|
||||
version YPPUSH_XFRRESPVERS {
|
||||
void
|
||||
YPPUSHPROC_NULL(void) = 0;
|
||||
|
||||
#ifdef STUPID_SUN_BUG
|
||||
/* This is the form as distributed by Sun. But even
|
||||
the Sun NIS servers expect the values in the other
|
||||
order. So their implementation somehow must change
|
||||
the order internally. We don't want to follow this
|
||||
bad example since the user should be able to use
|
||||
rpcgen on this file. */
|
||||
yppushresp_xfr
|
||||
YPPUSHPROC_XFRRESP(void) = 1;
|
||||
#else
|
||||
void
|
||||
YPPUSHPROC_XFRRESP(yppushresp_xfr) = 1;
|
||||
#endif
|
||||
} = 1;
|
||||
} = 0x40000000; /* transient: could be anything up to 0x5fffffff */
|
||||
|
||||
/*
|
||||
* YP binding protocol
|
||||
*/
|
||||
program YPBINDPROG {
|
||||
version YPBINDVERS {
|
||||
void
|
||||
YPBINDPROC_NULL(void) = 0;
|
||||
|
||||
ypbind_resp
|
||||
YPBINDPROC_DOMAIN(domainname) = 1;
|
||||
|
||||
void
|
||||
YPBINDPROC_SETDOM(ypbind_setdom) = 2;
|
||||
} = 2;
|
||||
} = 100007;
|
||||
366
openflow/usr/include/rpcsvc/yp_prot.h
Normal file
366
openflow/usr/include/rpcsvc/yp_prot.h
Normal file
@@ -0,0 +1,366 @@
|
||||
/*
|
||||
* This file contains symbols and structures defining the rpc protocol
|
||||
* between the NIS clients and the NIS servers. The servers
|
||||
* are the NIS database servers, and the NIS binders.
|
||||
*/
|
||||
|
||||
#ifndef _RPCSVC_YP_PROT_H
|
||||
#define _RPCSVC_YP_PROT_H
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
#include <rpcsvc/ypclnt.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/*
|
||||
* The following procedures are supported by the protocol:
|
||||
*
|
||||
* YPPROC_NULL() returns () takes nothing, returns nothing. This indicates
|
||||
* that the NIS server is alive.
|
||||
*
|
||||
* YPPROC_DOMAIN (char *) returns (bool_t) TRUE. Indicates that the
|
||||
* responding NIS server does serve the named domain; FALSE indicates no
|
||||
* support.
|
||||
*
|
||||
* YPPROC_DOMAIN_NONACK (char *) returns (TRUE) if the NIS server does serve
|
||||
* the named domain, otherwise does not return. Used in the broadcast case.
|
||||
*
|
||||
* YPPROC_MATCH (struct ypreq_key) returns (struct ypresp_val). Returns the
|
||||
* right-hand value for a passed left-hand key, within a named map and
|
||||
* domain.
|
||||
*
|
||||
* YPPROC_FIRST (struct ypreq_nokey) returns (struct ypresp_key_val).
|
||||
* Returns the first key-value pair from a named domain and map.
|
||||
*
|
||||
* YPPROC_NEXT (struct ypreq_key) returns (struct ypresp_key_val). Returns
|
||||
* the key-value pair following a passed key-value pair within a named
|
||||
* domain and map.
|
||||
*
|
||||
* YPPROC_XFR (struct ypreq_xfr) returns nothing. Indicates to a server that
|
||||
* a map should be updated.
|
||||
*
|
||||
* YPPROC_CLEAR takes nothing, returns nothing. Instructs a NIS server to
|
||||
* close the current map, so that old versions of the disk file don't get
|
||||
* held open.
|
||||
*
|
||||
* YPPROC_ALL (struct ypreq_nokey), returns
|
||||
* union switch (bool_t more) {
|
||||
* TRUE: (struct ypresp_key_val);
|
||||
* FALSE: (struct) {};
|
||||
* }
|
||||
*
|
||||
* YPPROC_MASTER (struct ypreq_nokey), returns (ypresp_master)
|
||||
*
|
||||
* YPPROC_ORDER (struct ypreq_nokey), returns (ypresp_order)
|
||||
*
|
||||
* YPPROC_MAPLIST (char *), returns (struct ypmaplist *)
|
||||
*/
|
||||
|
||||
/* Program and version symbols, magic numbers */
|
||||
|
||||
#define YPPROG 100004
|
||||
#define YPVERS 2
|
||||
#define YPVERS_ORIG 1
|
||||
#define YPMAXRECORD 1024
|
||||
#define YPMAXDOMAIN 64 /* XXX orig. yp_prot.h defines 256 */
|
||||
#define YPMAXMAP 64
|
||||
#define YPMAXPEER 64 /* XXX orig. yp_prot.h defines 256 */
|
||||
|
||||
/* byte size of a large NIS packet */
|
||||
#define YPMSGSZ 1600
|
||||
|
||||
typedef struct {
|
||||
u_int keydat_len;
|
||||
char *keydat_val;
|
||||
} keydat_t;
|
||||
|
||||
typedef struct {
|
||||
u_int valdat_len;
|
||||
char *valdat_val;
|
||||
} valdat_t;
|
||||
|
||||
struct ypmap_parms {
|
||||
char *domain; /* Null string means not available */
|
||||
char *map; /* Null string means not available */
|
||||
unsigned int ordernum; /* 0 means not available */
|
||||
char *owner; /* Null string means not available */
|
||||
};
|
||||
|
||||
/*
|
||||
* Request parameter structures
|
||||
*/
|
||||
|
||||
struct ypreq_key {
|
||||
const char *domain;
|
||||
const char *map;
|
||||
keydat_t keydat;
|
||||
};
|
||||
|
||||
struct ypreq_nokey {
|
||||
char *domain;
|
||||
char *map;
|
||||
};
|
||||
|
||||
struct ypreq_xfr {
|
||||
struct ypmap_parms map_parms;
|
||||
u_int transid;
|
||||
u_int proto;
|
||||
u_int port;
|
||||
};
|
||||
|
||||
#define ypxfr_domain map_parms.domain
|
||||
#define ypxfr_map map_parms.map
|
||||
#define ypxfr_ordernum map_parms.ordernum
|
||||
#define ypxfr_owner map_parms.owner
|
||||
|
||||
/* Return status values */
|
||||
|
||||
enum ypstat {
|
||||
YP_TRUE = 1, /* General purpose success code */
|
||||
#define YP_TRUE YP_TRUE
|
||||
YP_NOMORE = 2, /* No more entries in map */
|
||||
#define YP_NOMORE YP_NOMORE
|
||||
YP_FALSE = 0, /* General purpose failure code */
|
||||
#define YP_FALSE YP_FALSE
|
||||
YP_NOMAP = -1, /* No such map in domain */
|
||||
#define YP_NOMAP YP_NOMAP
|
||||
YP_NODOM = -2, /* Domain not supported */
|
||||
#define YP_NODOM YP_NODOM
|
||||
YP_NOKEY = -3, /* No such key in map */
|
||||
#define YP_NOKEY YP_NOKEY
|
||||
YP_BADOP = -4, /* Invalid operation */
|
||||
#define YP_BADOP YP_BADOP
|
||||
YP_BADDB = -5, /* Server data base is bad */
|
||||
#define YP_BADDB YP_BADDB
|
||||
YP_YPERR = -6, /* NIS server error */
|
||||
#define YP_YPERR YP_YPERR
|
||||
YP_BADARGS = -7, /* Request arguments bad */
|
||||
#define YP_BADARGS YP_BADARGS
|
||||
YP_VERS = -8, /* NIS server version mismatch - server can't supply
|
||||
requested service. */
|
||||
#define YP_VERS YP_VERS
|
||||
};
|
||||
|
||||
/*
|
||||
* Response parameter structures
|
||||
*/
|
||||
|
||||
typedef enum ypstat ypstat;
|
||||
|
||||
struct ypresp_val {
|
||||
ypstat status;
|
||||
valdat_t valdat;
|
||||
};
|
||||
|
||||
struct ypresp_key_val {
|
||||
ypstat status;
|
||||
#ifdef STUPID_SUN_BUG
|
||||
/* This is the form as distributed by Sun. But even the Sun NIS
|
||||
servers expect the values in the other order. So their
|
||||
implementation somehow must change the order internally. We
|
||||
don't want to follow this bad example since the user should be
|
||||
able to use rpcgen on this file. */
|
||||
keydat_t keydat;
|
||||
valdat_t valdat;
|
||||
#else
|
||||
valdat_t valdat;
|
||||
keydat_t keydat;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct ypresp_master {
|
||||
ypstat status;
|
||||
char *master;
|
||||
};
|
||||
|
||||
struct ypresp_order {
|
||||
ypstat status;
|
||||
u_int ordernum;
|
||||
};
|
||||
|
||||
struct ypmaplist {
|
||||
char *map;
|
||||
#define ypml_name map
|
||||
struct ypmaplist *next;
|
||||
#define ypml_next next
|
||||
};
|
||||
|
||||
struct ypresp_maplist {
|
||||
ypstat status;
|
||||
struct ypmaplist *list;
|
||||
};
|
||||
|
||||
/*
|
||||
* Procedure symbols. YPPROC_NULL, YPPROC_DOMAIN, and YPPROC_DOMAIN_NONACK
|
||||
* must keep the same values (0, 1, and 2) that they had in the first version
|
||||
* of the protocol.
|
||||
*/
|
||||
|
||||
#define YPPROC_NULL 0
|
||||
#define YPPROC_DOMAIN 1
|
||||
#define YPPROC_DOMAIN_NONACK 2
|
||||
#define YPPROC_MATCH 3
|
||||
#define YPPROC_FIRST 4
|
||||
#define YPPROC_NEXT 5
|
||||
#define YPPROC_XFR 6
|
||||
#define YPPROC_CLEAR 7
|
||||
#define YPPROC_ALL 8
|
||||
#define YPPROC_MASTER 9
|
||||
#define YPPROC_ORDER 10
|
||||
#define YPPROC_MAPLIST 11
|
||||
#define YPPROC_NEWXFR 12
|
||||
|
||||
/*
|
||||
* Protocol between clients and NIS binder servers
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following procedures are supported by the protocol:
|
||||
*
|
||||
* YPBINDPROC_NULL() returns ()
|
||||
* takes nothing, returns nothing
|
||||
*
|
||||
* YPBINDPROC_DOMAIN takes (char *) returns (struct ypbind_resp)
|
||||
*
|
||||
* YPBINDPROC_SETDOM takes (struct ypbind_setdom) returns nothing
|
||||
*/
|
||||
|
||||
/* Program and version symbols, magic numbers */
|
||||
|
||||
#define YPBINDPROG 100007
|
||||
#define YPBINDVERS 2
|
||||
#define YPBINDVERS_ORIG 1
|
||||
|
||||
/* Procedure symbols */
|
||||
|
||||
#define YPBINDPROC_NULL 0
|
||||
#define YPBINDPROC_DOMAIN 1
|
||||
#define YPBINDPROC_SETDOM 2
|
||||
/*
|
||||
* Response structure and overall result status codes. Success and failure
|
||||
* represent two separate response message types.
|
||||
*/
|
||||
|
||||
enum ypbind_resptype {YPBIND_SUCC_VAL = 1, YPBIND_FAIL_VAL = 2};
|
||||
|
||||
struct ypbind_binding {
|
||||
struct in_addr ypbind_binding_addr; /* In network order */
|
||||
unsigned short int ypbind_binding_port; /* In network order */
|
||||
};
|
||||
|
||||
struct ypbind_resp {
|
||||
enum ypbind_resptype ypbind_status;
|
||||
union {
|
||||
u_int ypbind_error;
|
||||
struct ypbind_binding ypbind_bindinfo;
|
||||
} ypbind_respbody;
|
||||
};
|
||||
|
||||
|
||||
/* Detailed failure reason codes for response field ypbind_error*/
|
||||
|
||||
#define YPBIND_ERR_ERR 1 /* Internal error */
|
||||
#define YPBIND_ERR_NOSERV 2 /* No bound server for passed domain */
|
||||
#define YPBIND_ERR_RESC 3 /* System resource allocation failure */
|
||||
|
||||
/*
|
||||
* Request data structure for ypbind "Set domain" procedure.
|
||||
*/
|
||||
struct ypbind_setdom {
|
||||
char *ypsetdom_domain;
|
||||
struct ypbind_binding ypsetdom_binding;
|
||||
u_int ypsetdom_vers;
|
||||
};
|
||||
#define ypsetdom_addr ypsetdom_binding.ypbind_binding_addr
|
||||
#define ypsetdom_port ypsetdom_binding.ypbind_binding_port
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
#define YPPUSHVERS 1
|
||||
#define YPPUSHVERS_ORIG 1
|
||||
|
||||
/* Procedure symbols */
|
||||
|
||||
#define YPPUSHPROC_NULL 0
|
||||
#define YPPUSHPROC_XFRRESP 1
|
||||
|
||||
/* Status values for yppushresp_xfr.status */
|
||||
|
||||
enum yppush_status {
|
||||
YPPUSH_SUCC = 1, /* Success */
|
||||
#define YPPUSH_SUCC YPPUSH_SUCC
|
||||
YPPUSH_AGE = 2, /* Master's version not newer */
|
||||
#define YPPUSH_AGE YPPUSH_AGE
|
||||
YPPUSH_NOMAP = -1, /* Can't find server for map */
|
||||
#define YPPUSH_NOMAP YPPUSH_NOMAP
|
||||
YPPUSH_NODOM = -2, /* Domain not supported */
|
||||
#define YPPUSH_NODOM YPPUSH_NODOM
|
||||
YPPUSH_RSRC = -3, /* Local resouce alloc failure */
|
||||
#define YPPUSH_RSRC YPPUSH_RSRC
|
||||
YPPUSH_RPC = -4, /* RPC failure talking to server */
|
||||
#define YPPUSH_RPC YPPUSH_RPC
|
||||
YPPUSH_MADDR = -5, /* Can't get master address */
|
||||
#define YPPUSH_MADDR YPPUSH_MADDR
|
||||
YPPUSH_YPERR = -6, /* NIS server/map db error */
|
||||
#define YPPUSH_YPERR YPPUSH_YPERR
|
||||
YPPUSH_BADARGS = -7, /* Request arguments bad */
|
||||
#define YPPUSH_BADARGS YPPUSH_BADARGS
|
||||
YPPUSH_DBM = -8, /* Local dbm operation failed */
|
||||
#define YPPUSH_DBM YPPUSH_DBM
|
||||
YPPUSH_FILE = -9, /* Local file I/O operation failed */
|
||||
#define YPPUSH_FILE YPPUSH_FILE
|
||||
YPPUSH_SKEW = -10, /* Map version skew during transfer */
|
||||
#define YPPUSH_SKEW YPPUSH_SKEW
|
||||
YPPUSH_CLEAR = -11, /* Can't send "Clear" req to local ypserv */
|
||||
#define YPPUSH_CLEAR YPPUSH_CLEAR
|
||||
YPPUSH_FORCE = -12, /* No local order number in map - use -f flag*/
|
||||
#define YPPUSH_FORCE YPPUSH_FORCE
|
||||
YPPUSH_XFRERR = -13, /* ypxfr error */
|
||||
#define YPPUSH_XFRERR YPPUSH_XFRERR
|
||||
YPPUSH_REFUSED = -14, /* Transfer request refused by ypserv */
|
||||
#define YPPUSH_REFUSED YPPUSH_REFUSED
|
||||
YPPUSH_NOALIAS = -15 /* Alias not found for map or domain */
|
||||
#define YPPUSH_NOALIAS YPPUSH_NOALIAS
|
||||
};
|
||||
typedef enum yppush_status yppush_status;
|
||||
|
||||
struct yppushresp_xfr {
|
||||
u_int transid;
|
||||
yppush_status status;
|
||||
};
|
||||
|
||||
struct ypresp_all {
|
||||
bool_t more;
|
||||
union {
|
||||
struct ypresp_key_val val;
|
||||
} ypresp_all_u;
|
||||
};
|
||||
|
||||
extern bool_t xdr_ypreq_key (XDR *__xdrs, struct ypreq_key * __objp);
|
||||
extern bool_t xdr_ypreq_nokey (XDR *__xdrs, struct ypreq_nokey * __objp);
|
||||
extern bool_t xdr_ypreq_xfr (XDR *__xdrs, struct ypreq_xfr * __objp);
|
||||
extern bool_t xdr_ypresp_val (XDR *__xdrs, struct ypresp_val * __objp);
|
||||
extern bool_t xdr_ypresp_key_val (XDR *__xdrs, struct ypresp_key_val * __objp);
|
||||
extern bool_t xdr_ypbind_resp (XDR *__xdrs, struct ypbind_resp * __objp);
|
||||
extern bool_t xdr_ypbind_setdom (XDR *__xdrs, struct ypbind_setdom * __objp);
|
||||
extern bool_t xdr_ypmap_parms (XDR *__xdrs, struct ypmap_parms * __objp);
|
||||
extern bool_t xdr_yppushresp_xfr (XDR *__xdrs, struct yppushresp_xfr * __objp);
|
||||
extern bool_t xdr_ypresp_order (XDR *__xdrs, struct ypresp_order * __objp);
|
||||
extern bool_t xdr_ypresp_master (XDR *__xdrs, struct ypresp_master * __objp);
|
||||
extern bool_t xdr_ypall (XDR *__xdrs, struct ypall_callback * __objp);
|
||||
extern bool_t xdr_ypresp_maplist (XDR *__xdrs, struct ypresp_maplist * __objp);
|
||||
extern bool_t xdr_ypbind_binding (XDR *__xdrs, struct ypbind_binding * __objp);
|
||||
extern bool_t xdr_ypbind_resptype (XDR *__xdrs, enum ypbind_resptype * __objp);
|
||||
extern bool_t xdr_ypstat (XDR *__xdrs, enum ypbind_resptype * __objp);
|
||||
extern bool_t xdr_ypresp_all (XDR *__xdrs, struct ypresp_all * __objp);
|
||||
extern bool_t xdr_domainname (XDR *__xdrs, char ** __objp);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _RPCSVC_YP_PROT_H */
|
||||
88
openflow/usr/include/rpcsvc/ypclnt.h
Normal file
88
openflow/usr/include/rpcsvc/ypclnt.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
#ifndef __RPCSVC_YPCLNT_H__
|
||||
#define __RPCSVC_YPCLNT_H__
|
||||
|
||||
#include <features.h>
|
||||
|
||||
/* Some defines */
|
||||
#define YPERR_SUCCESS 0 /* There is no error */
|
||||
#define YPERR_BADARGS 1 /* Args to function are bad */
|
||||
#define YPERR_RPC 2 /* RPC failure */
|
||||
#define YPERR_DOMAIN 3 /* Can't bind to a server with this domain */
|
||||
#define YPERR_MAP 4 /* No such map in server's domain */
|
||||
#define YPERR_KEY 5 /* No such key in map */
|
||||
#define YPERR_YPERR 6 /* Internal yp server or client error */
|
||||
#define YPERR_RESRC 7 /* Local resource allocation failure */
|
||||
#define YPERR_NOMORE 8 /* No more records in map database */
|
||||
#define YPERR_PMAP 9 /* Can't communicate with portmapper */
|
||||
#define YPERR_YPBIND 10 /* Can't communicate with ypbind */
|
||||
#define YPERR_YPSERV 11 /* Can't communicate with ypserv */
|
||||
#define YPERR_NODOM 12 /* Local domain name not set */
|
||||
#define YPERR_BADDB 13 /* yp data base is bad */
|
||||
#define YPERR_VERS 14 /* YP version mismatch */
|
||||
#define YPERR_ACCESS 15 /* Access violation */
|
||||
#define YPERR_BUSY 16 /* Database is busy */
|
||||
|
||||
/* Types of update operations */
|
||||
#define YPOP_CHANGE 1 /* Change, do not add */
|
||||
#define YPOP_INSERT 2 /* Add, do not change */
|
||||
#define YPOP_DELETE 3 /* Delete this entry */
|
||||
#define YPOP_STORE 4 /* Add, or change */
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* struct ypall_callback * is the arg which must be passed to yp_all. */
|
||||
struct ypall_callback
|
||||
{
|
||||
int (*foreach) (int __status, char *__key, int __keylen,
|
||||
char *__val, int __vallen, char *__data);
|
||||
char *data;
|
||||
};
|
||||
|
||||
/* External NIS client function references. */
|
||||
extern int yp_bind (const char *) __THROW;
|
||||
extern void yp_unbind (const char *) __THROW;
|
||||
extern int yp_get_default_domain (char **) __THROW;
|
||||
extern int yp_match (const char *, const char *, const char *,
|
||||
const int, char **, int *) __THROW;
|
||||
extern int yp_first (const char *, const char *, char **,
|
||||
int *, char **, int *) __THROW;
|
||||
extern int yp_next (const char *, const char *, const char *,
|
||||
const int, char **, int *, char **, int *) __THROW;
|
||||
extern int yp_master (const char *, const char *, char **) __THROW;
|
||||
extern int yp_order (const char *, const char *, unsigned int *) __THROW;
|
||||
extern int yp_all (const char *, const char *,
|
||||
const struct ypall_callback *) __THROW;
|
||||
extern const char *yperr_string (const int) __THROW;
|
||||
extern const char *ypbinderr_string (const int) __THROW;
|
||||
extern int ypprot_err (const int) __THROW;
|
||||
extern int yp_update (char *, char *, unsigned int, char *,
|
||||
int, char *, int) __THROW;
|
||||
#if 0
|
||||
extern int yp_maplist (const char *, struct ypmaplist **) __THROW;
|
||||
#endif
|
||||
|
||||
/* This functions exists only under BSD and Linux systems. */
|
||||
extern int __yp_check (char **) __THROW;
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* __RPCSVC_YPCLNT_H__ */
|
||||
66
openflow/usr/include/rpcsvc/yppasswd.h
Normal file
66
openflow/usr/include/rpcsvc/yppasswd.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _YPPASSWD_H_RPCGEN
|
||||
#define _YPPASSWD_H_RPCGEN
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
struct passwd {
|
||||
char *pw_name;
|
||||
char *pw_passwd;
|
||||
int pw_uid;
|
||||
int pw_gid;
|
||||
char *pw_gecos;
|
||||
char *pw_dir;
|
||||
char *pw_shell;
|
||||
};
|
||||
typedef struct passwd passwd;
|
||||
|
||||
struct yppasswd {
|
||||
char *oldpass;
|
||||
passwd newpw;
|
||||
};
|
||||
typedef struct yppasswd yppasswd;
|
||||
|
||||
#define YPPASSWDPROG 100009
|
||||
#define YPPASSWDVERS 1
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define YPPASSWDPROC_UPDATE 1
|
||||
extern int * yppasswdproc_update_1(yppasswd *, CLIENT *);
|
||||
extern int * yppasswdproc_update_1_svc(yppasswd *, struct svc_req *);
|
||||
extern int yppasswdprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
||||
|
||||
#else /* K&R C */
|
||||
#define YPPASSWDPROC_UPDATE 1
|
||||
extern int * yppasswdproc_update_1();
|
||||
extern int * yppasswdproc_update_1_svc();
|
||||
extern int yppasswdprog_1_freeresult ();
|
||||
#endif /* K&R C */
|
||||
|
||||
/* the xdr functions */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_passwd (XDR *, passwd*);
|
||||
extern bool_t xdr_yppasswd (XDR *, yppasswd*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_passwd ();
|
||||
extern bool_t xdr_yppasswd ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_YPPASSWD_H_RPCGEN */
|
||||
61
openflow/usr/include/rpcsvc/yppasswd.x
Normal file
61
openflow/usr/include/rpcsvc/yppasswd.x
Normal file
@@ -0,0 +1,61 @@
|
||||
/* @(#)yppasswd.x 2.1 88/08/01 4.0 RPCSRC */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* YP password update protocol
|
||||
* Requires unix authentication
|
||||
*/
|
||||
program YPPASSWDPROG {
|
||||
version YPPASSWDVERS {
|
||||
/*
|
||||
* Update my passwd entry
|
||||
*/
|
||||
int
|
||||
YPPASSWDPROC_UPDATE(yppasswd) = 1;
|
||||
} = 1;
|
||||
} = 100009;
|
||||
|
||||
|
||||
struct passwd {
|
||||
string pw_name<>; /* username */
|
||||
string pw_passwd<>; /* encrypted password */
|
||||
int pw_uid; /* user id */
|
||||
int pw_gid; /* group id */
|
||||
string pw_gecos<>; /* in real life name */
|
||||
string pw_dir<>; /* home directory */
|
||||
string pw_shell<>; /* default shell */
|
||||
};
|
||||
|
||||
struct yppasswd {
|
||||
string oldpass<>; /* unencrypted old password */
|
||||
passwd newpw; /* new passwd entry */
|
||||
};
|
||||
88
openflow/usr/include/rpcsvc/ypupd.h
Normal file
88
openflow/usr/include/rpcsvc/ypupd.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, 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.
|
||||
*/
|
||||
/* from @(#)ypupdate_prot.x 1.3 91/03/11 TIRPC 1.0 */
|
||||
|
||||
#ifndef __RPCSVC_YPUPD_H__
|
||||
#define __RPCSVC_YPUPD_H__
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
#define MAXMAPNAMELEN 255
|
||||
#define MAXYPDATALEN 1023
|
||||
#define MAXERRMSGLEN 255
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
typedef struct {
|
||||
u_int yp_buf_len;
|
||||
char *yp_buf_val;
|
||||
} yp_buf;
|
||||
|
||||
extern bool_t xdr_yp_buf (XDR *, yp_buf*);
|
||||
|
||||
struct ypupdate_args {
|
||||
char *mapname;
|
||||
yp_buf key;
|
||||
yp_buf datum;
|
||||
};
|
||||
typedef struct ypupdate_args ypupdate_args;
|
||||
|
||||
extern bool_t xdr_ypupdate_args (XDR *, ypupdate_args*);
|
||||
|
||||
struct ypdelete_args {
|
||||
char *mapname;
|
||||
yp_buf key;
|
||||
};
|
||||
typedef struct ypdelete_args ypdelete_args;
|
||||
|
||||
extern bool_t xdr_ypdelete_args (XDR *, ypdelete_args*);
|
||||
|
||||
#define YPU_PROG 100028
|
||||
#define YPU_VERS 1
|
||||
|
||||
#define YPU_CHANGE 1
|
||||
extern u_int * ypu_change_1 (ypupdate_args *, CLIENT *);
|
||||
extern u_int * ypu_change_1_svc (ypupdate_args *, struct svc_req *);
|
||||
#define YPU_INSERT 2
|
||||
extern u_int * ypu_insert_1 (ypupdate_args *, CLIENT *);
|
||||
extern u_int * ypu_insert_1_svc (ypupdate_args *, struct svc_req *);
|
||||
#define YPU_DELETE 3
|
||||
extern u_int * ypu_delete_1 (ypdelete_args *, CLIENT *);
|
||||
extern u_int * ypu_delete_1_svc (ypdelete_args *, struct svc_req *);
|
||||
#define YPU_STORE 4
|
||||
extern u_int * ypu_store_1 (ypupdate_args *, CLIENT *);
|
||||
extern u_int * ypu_store_1_svc (ypupdate_args *, struct svc_req *);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !__RPCSVC_YPUPD_H__ */
|
||||
Reference in New Issue
Block a user