Home | History | Annotate | Download | only in src
      1 /* Copyright (c) 2011, The Linux Foundation. All rights reserved.
      2  *
      3  * Redistribution and use in source and binary forms, with or without
      4  * modification, are permitted provided that the following conditions are
      5  * met:
      6  *     * Redistributions of source code must retain the above copyright
      7  *       notice, this list of conditions and the following disclaimer.
      8  *     * Redistributions in binary form must reproduce the above
      9  *       copyright notice, this list of conditions and the following
     10  *       disclaimer in the documentation and/or other materials provided
     11  *       with the distribution.
     12  *     * Neither the name of The Linux Foundation nor the names of its
     13  *       contributors may be used to endorse or promote products derived
     14  *       from this software without specific prior written permission.
     15  *
     16  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
     17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
     19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
     20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
     23  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     24  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
     25  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
     26  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27  *
     28  */
     29 /*
     30  * Please do not edit this file.
     31  * It was generated using rpcgen.
     32  */
     33 
     34 #include "loc_api_rpcgen_cb_rpc.h"
     35 #include <stdio.h>
     36 #include <stdlib.h>
     37 #include <rpc/pmap_clnt.h>
     38 #include <string.h>
     39 #include <memory.h>
     40 #include <sys/socket.h>
     41 #include <netinet/in.h>
     42 
     43 #ifndef SIG_PF
     44 #define SIG_PF void(*)(int)
     45 #endif
     46 
     47 void
     48 loc_apicbprog_0x00050001(struct svc_req *rqstp, register SVCXPRT *transp)
     49 {
     50     union {
     51         rpc_loc_event_cb_f_type_args rpc_loc_event_cb_f_type_0x00050001_arg;
     52     } argument;
     53     union {
     54         rpc_loc_event_cb_f_type_rets rpc_loc_event_cb_f_type_0x00050001_res;
     55     } result;
     56     bool_t retval;
     57     xdrproc_t _xdr_argument, _xdr_result;
     58     bool_t (*local)(char *, void *, struct svc_req *);
     59 
     60     switch (rqstp->rq_proc) {
     61     case NULLPROC:
     62         (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
     63         return;
     64 
     65     case rpc_loc_event_cb_f_type:
     66         _xdr_argument = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_args;
     67         _xdr_result = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_rets;
     68         local = (bool_t (*) (char *, void *,  struct svc_req *))rpc_loc_event_cb_f_type_0x00050001_svc;
     69         break;
     70 
     71     default:
     72         svcerr_noproc (transp);
     73         return;
     74     }
     75     memset ((char *)&argument, 0, sizeof (argument));
     76     if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
     77         svcerr_decode (transp);
     78         return;
     79     }
     80     retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp);
     81     if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) {
     82         svcerr_systemerr (transp);
     83     }
     84     if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
     85         fprintf (stderr, "%s", "unable to free arguments");
     86         exit (1);
     87     }
     88     if (!loc_apicbprog_0x00050001_freeresult (transp, _xdr_result, (caddr_t) &result))
     89         fprintf (stderr, "%s", "unable to free results");
     90 
     91     return;
     92 }
     93 
     94 void
     95 loc_apicbprog_0x00050002(struct svc_req *rqstp, register SVCXPRT *transp)
     96 {
     97     union {
     98         int fill;
     99     } argument;
    100     union {
    101         int rpc_loc_api_cb_null_0x00050002_res;
    102     } result;
    103     bool_t retval;
    104     xdrproc_t _xdr_argument, _xdr_result;
    105     bool_t (*local)(char *, void *, struct svc_req *);
    106 
    107     switch (rqstp->rq_proc) {
    108     case NULLPROC:
    109         (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
    110         return;
    111 
    112     case rpc_loc_api_cb_null:
    113         _xdr_argument = (xdrproc_t) xdr_void;
    114         _xdr_result = (xdrproc_t) xdr_int;
    115         local = (bool_t (*) (char *, void *,  struct svc_req *))rpc_loc_api_cb_null_0x00050002_svc;
    116         break;
    117 
    118     default:
    119         svcerr_noproc (transp);
    120         return;
    121     }
    122     memset ((char *)&argument, 0, sizeof (argument));
    123     if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
    124         svcerr_decode (transp);
    125         return;
    126     }
    127     retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp);
    128     if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) {
    129         svcerr_systemerr (transp);
    130     }
    131     if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
    132         fprintf (stderr, "%s", "unable to free arguments");
    133         exit (1);
    134     }
    135     if (!loc_apicbprog_0x00050002_freeresult (transp, _xdr_result, (caddr_t) &result))
    136         fprintf (stderr, "%s", "unable to free results");
    137 
    138     return;
    139 }
    140 
    141 void
    142 loc_apicbprog_0x00050003(struct svc_req *rqstp, register SVCXPRT *transp)
    143 {
    144     union {
    145         int fill;
    146     } argument;
    147     union {
    148         int rpc_loc_api_cb_null_0x00050003_res;
    149     } result;
    150     bool_t retval;
    151     xdrproc_t _xdr_argument, _xdr_result;
    152     bool_t (*local)(char *, void *, struct svc_req *);
    153 
    154     switch (rqstp->rq_proc) {
    155     case NULLPROC:
    156         (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
    157         return;
    158 
    159     case rpc_loc_api_cb_null:
    160         _xdr_argument = (xdrproc_t) xdr_void;
    161         _xdr_result = (xdrproc_t) xdr_int;
    162         local = (bool_t (*) (char *, void *,  struct svc_req *))rpc_loc_api_cb_null_0x00050003_svc;
    163         break;
    164 
    165     default:
    166         svcerr_noproc (transp);
    167         return;
    168     }
    169     memset ((char *)&argument, 0, sizeof (argument));
    170     if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
    171         svcerr_decode (transp);
    172         return;
    173     }
    174     retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp);
    175     if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) {
    176         svcerr_systemerr (transp);
    177     }
    178     if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
    179         fprintf (stderr, "%s", "unable to free arguments");
    180         exit (1);
    181     }
    182     if (!loc_apicbprog_0x00050003_freeresult (transp, _xdr_result, (caddr_t) &result))
    183         fprintf (stderr, "%s", "unable to free results");
    184 
    185     return;
    186 }
    187 
    188 void
    189 loc_apicbprog_0x00050004(struct svc_req *rqstp, register SVCXPRT *transp)
    190 {
    191     union {
    192         int fill;
    193     } argument;
    194     union {
    195         int rpc_loc_api_cb_null_0x00050004_res;
    196     } result;
    197     bool_t retval;
    198     xdrproc_t _xdr_argument, _xdr_result;
    199     bool_t (*local)(char *, void *, struct svc_req *);
    200 
    201     switch (rqstp->rq_proc) {
    202     case NULLPROC:
    203         (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
    204         return;
    205 
    206     case rpc_loc_api_cb_null:
    207         _xdr_argument = (xdrproc_t) xdr_void;
    208         _xdr_result = (xdrproc_t) xdr_int;
    209         local = (bool_t (*) (char *, void *,  struct svc_req *))rpc_loc_api_cb_null_0x00050004_svc;
    210         break;
    211 
    212     default:
    213         svcerr_noproc (transp);
    214         return;
    215     }
    216     memset ((char *)&argument, 0, sizeof (argument));
    217     if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
    218         svcerr_decode (transp);
    219         return;
    220     }
    221     retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp);
    222     if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) {
    223         svcerr_systemerr (transp);
    224     }
    225     if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
    226         fprintf (stderr, "%s", "unable to free arguments");
    227         exit (1);
    228     }
    229     if (!loc_apicbprog_0x00050004_freeresult (transp, _xdr_result, (caddr_t) &result))
    230         fprintf (stderr, "%s", "unable to free results");
    231 
    232     return;
    233 }
    234 
    235 void
    236 loc_apicbprog_0x00050005(struct svc_req *rqstp, register SVCXPRT *transp)
    237 {
    238     union {
    239         int fill;
    240     } argument;
    241     union {
    242         int rpc_loc_api_cb_null_0x00050005_res;
    243     } result;
    244     bool_t retval;
    245     xdrproc_t _xdr_argument, _xdr_result;
    246     bool_t (*local)(char *, void *, struct svc_req *);
    247 
    248     switch (rqstp->rq_proc) {
    249     case NULLPROC:
    250         (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
    251         return;
    252 
    253     case rpc_loc_api_cb_null:
    254         _xdr_argument = (xdrproc_t) xdr_void;
    255         _xdr_result = (xdrproc_t) xdr_int;
    256         local = (bool_t (*) (char *, void *,  struct svc_req *))rpc_loc_api_cb_null_0x00050005_svc;
    257         break;
    258 
    259     default:
    260         svcerr_noproc (transp);
    261         return;
    262     }
    263     memset ((char *)&argument, 0, sizeof (argument));
    264     if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
    265         svcerr_decode (transp);
    266         return;
    267     }
    268     retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp);
    269     if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) {
    270         svcerr_systemerr (transp);
    271     }
    272     if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
    273         fprintf (stderr, "%s", "unable to free arguments");
    274         exit (1);
    275     }
    276     if (!loc_apicbprog_0x00050005_freeresult (transp, _xdr_result, (caddr_t) &result))
    277         fprintf (stderr, "%s", "unable to free results");
    278 
    279     return;
    280 }
    281 
    282 void
    283 loc_apicbprog_0x00050006(struct svc_req *rqstp, register SVCXPRT *transp)
    284 {
    285     union {
    286         int fill;
    287     } argument;
    288     union {
    289         int rpc_loc_api_cb_null_0x00050006_res;
    290     } result;
    291     bool_t retval;
    292     xdrproc_t _xdr_argument, _xdr_result;
    293     bool_t (*local)(char *, void *, struct svc_req *);
    294 
    295     switch (rqstp->rq_proc) {
    296     case NULLPROC:
    297         (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
    298         return;
    299 
    300     case rpc_loc_api_cb_null:
    301         _xdr_argument = (xdrproc_t) xdr_void;
    302         _xdr_result = (xdrproc_t) xdr_int;
    303         local = (bool_t (*) (char *, void *,  struct svc_req *))rpc_loc_api_cb_null_0x00050006_svc;
    304         break;
    305 
    306     default:
    307         svcerr_noproc (transp);
    308         return;
    309     }
    310     memset ((char *)&argument, 0, sizeof (argument));
    311     if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
    312         svcerr_decode (transp);
    313         return;
    314     }
    315     retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp);
    316     if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) {
    317         svcerr_systemerr (transp);
    318     }
    319     if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
    320         fprintf (stderr, "%s", "unable to free arguments");
    321         exit (1);
    322     }
    323     if (!loc_apicbprog_0x00050006_freeresult (transp, _xdr_result, (caddr_t) &result))
    324         fprintf (stderr, "%s", "unable to free results");
    325 
    326     return;
    327 }
    328