Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/rpcsvc/bootparam_prot.x is written in an unsupported language. File is not indexed.

0001 /* @(#)bootparam_prot.x 2.1 88/08/01 4.0 RPCSRC */
0002 
0003 /*
0004  * Copyright (c) 2010, Oracle America, Inc.
0005  * Redistribution and use in source and binary forms, with or without
0006  * modification, are permitted provided that the following conditions are
0007  * met:
0008  *
0009  *     * Redistributions of source code must retain the above copyright
0010  *       notice, this list of conditions and the following disclaimer.
0011  *     * Redistributions in binary form must reproduce the above
0012  *       copyright notice, this list of conditions and the following
0013  *       disclaimer in the documentation and/or other materials
0014  *       provided with the distribution.
0015  *     * Neither the name of the "Oracle America, Inc." nor the names of its
0016  *       contributors may be used to endorse or promote products derived
0017  *       from this software without specific prior written permission.
0018  *
0019  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0020  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0021  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
0022  *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
0023  *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
0024  *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
0025  *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
0026  *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0027  *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
0028  *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
0029  *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0030  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0031  */
0032 
0033 /*
0034  * RPC for bootparms service.
0035  * There are two procedures:
0036  *   WHOAMI takes a net address and returns a client name and also a
0037  *      likely net address for routing
0038  *   GETFILE takes a client name and file identifier and returns the
0039  *      server name, server net address and pathname for the file.
0040  *   file identifiers typically include root, swap, pub and dump
0041  */
0042 
0043 #ifdef RPC_HDR
0044 %#include <rpc/types.h>
0045 %#include <sys/time.h>
0046 %#include <sys/errno.h>
0047 %#include <nfs/nfs.h>
0048 #endif
0049 
0050 const MAX_MACHINE_NAME  = 255;
0051 const MAX_PATH_LEN      = 1024;
0052 const MAX_FILEID        = 32;
0053 const IP_ADDR_TYPE      = 1;
0054 
0055 typedef string  bp_machine_name_t<MAX_MACHINE_NAME>;
0056 typedef string  bp_path_t<MAX_PATH_LEN>;
0057 typedef string  bp_fileid_t<MAX_FILEID>;
0058 
0059 struct  ip_addr_t {
0060         char    net;
0061         char    host;
0062         char    lh;
0063         char    impno;
0064 };
0065 
0066 union bp_address switch (int address_type) {
0067         case IP_ADDR_TYPE:
0068                 ip_addr_t       ip_addr;
0069 };
0070 
0071 struct bp_whoami_arg {
0072         bp_address              client_address;
0073 };
0074 
0075 struct bp_whoami_res {
0076         bp_machine_name_t       client_name;
0077         bp_machine_name_t       domain_name;
0078         bp_address              router_address;
0079 };
0080 
0081 struct bp_getfile_arg {
0082         bp_machine_name_t       client_name;
0083         bp_fileid_t             file_id;
0084 };
0085 
0086 struct bp_getfile_res {
0087         bp_machine_name_t       server_name;
0088         bp_address              server_address;
0089         bp_path_t               server_path;
0090 };
0091 
0092 program BOOTPARAMPROG {
0093         version BOOTPARAMVERS {
0094                 bp_whoami_res   BOOTPARAMPROC_WHOAMI(bp_whoami_arg) = 1;
0095                 bp_getfile_res  BOOTPARAMPROC_GETFILE(bp_getfile_arg) = 2;
0096         } = 1;
0097 } = 100026;