apps/tca_admin/libs/gateway_prot_xdr.c
changeset 0 2b3e5ec03512
equal deleted inserted replaced
-1:000000000000 0:2b3e5ec03512
       
     1 /*
       
     2  *    Copyright 2006 Intel Corporation
       
     3  * 
       
     4  *    Licensed under the Apache License, Version 2.0 (the "License");
       
     5  *    you may not use this file except in compliance with the License.
       
     6  *    You may obtain a copy of the License at
       
     7  * 
       
     8  *        http://www.apache.org/licenses/LICENSE-2.0
       
     9  * 
       
    10  *    Unless required by applicable law or agreed to in writing, software
       
    11  *    distributed under the License is distributed on an "AS IS" BASIS,
       
    12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    13  *    See the License for the specific language governing permissions and
       
    14  *    limitations under the License.
       
    15  */
       
    16 
       
    17 /*
       
    18  * Please do not edit this file.
       
    19  * It was generated using rpcgen.
       
    20  */
       
    21 
       
    22 #ifdef HAVE_CONFIG_H
       
    23 #  include <dtn-config.h>
       
    24 #endif
       
    25 
       
    26 #include "gateway_prot.h"
       
    27 
       
    28 bool_t
       
    29 xdr_bamboo_stat (XDR *xdrs, bamboo_stat *objp)
       
    30 {
       
    31 // LIANG
       
    32 //	register int32_t *buf;
       
    33 
       
    34 	 if (!xdr_enum (xdrs, (enum_t *) objp))
       
    35 		 return FALSE;
       
    36 	return TRUE;
       
    37 }
       
    38 
       
    39 bool_t
       
    40 xdr_bamboo_key (XDR *xdrs, bamboo_key objp)
       
    41 {
       
    42 // LIANG
       
    43 //	register int32_t *buf;
       
    44 
       
    45 	 if (!xdr_opaque (xdrs, objp, 20))
       
    46 		 return FALSE;
       
    47 	return TRUE;
       
    48 }
       
    49 
       
    50 bool_t
       
    51 xdr_bamboo_value (XDR *xdrs, bamboo_value *objp)
       
    52 {
       
    53 // LIANG
       
    54 //	register int32_t *buf;
       
    55 
       
    56 	 if (!xdr_bytes (xdrs, (char **)&objp->bamboo_value_val, (u_int *) &objp->bamboo_value_len, 1024))
       
    57 		 return FALSE;
       
    58 	return TRUE;
       
    59 }
       
    60 
       
    61 bool_t
       
    62 xdr_bamboo_placemark (XDR *xdrs, bamboo_placemark *objp)
       
    63 {
       
    64 // LIANG
       
    65 //	register int32_t *buf;
       
    66 
       
    67 	 if (!xdr_bytes (xdrs, (char **)&objp->bamboo_placemark_val, (u_int *) &objp->bamboo_placemark_len, 100))
       
    68 		 return FALSE;
       
    69 	return TRUE;
       
    70 }
       
    71 
       
    72 bool_t
       
    73 xdr_bamboo_put_args (XDR *xdrs, bamboo_put_args *objp)
       
    74 {
       
    75 // LIANG
       
    76 //	register int32_t *buf;
       
    77 
       
    78 	 if (!xdr_string (xdrs, &objp->application, 255))
       
    79 		 return FALSE;
       
    80 	 if (!xdr_string (xdrs, &objp->client_library, 255))
       
    81 		 return FALSE;
       
    82 	 if (!xdr_bamboo_key (xdrs, objp->key))
       
    83 		 return FALSE;
       
    84 	 if (!xdr_bamboo_value (xdrs, &objp->value))
       
    85 		 return FALSE;
       
    86 	 if (!xdr_int (xdrs, &objp->ttl_sec))
       
    87 		 return FALSE;
       
    88 	return TRUE;
       
    89 }
       
    90 
       
    91 bool_t
       
    92 xdr_bamboo_get_args (XDR *xdrs, bamboo_get_args *objp)
       
    93 {
       
    94 // LIANG
       
    95 //	register int32_t *buf;
       
    96 
       
    97 	 if (!xdr_string (xdrs, &objp->application, 255))
       
    98 		 return FALSE;
       
    99 	 if (!xdr_string (xdrs, &objp->client_library, 255))
       
   100 		 return FALSE;
       
   101 	 if (!xdr_bamboo_key (xdrs, objp->key))
       
   102 		 return FALSE;
       
   103 	 if (!xdr_int (xdrs, &objp->maxvals))
       
   104 		 return FALSE;
       
   105 	 if (!xdr_bamboo_placemark (xdrs, &objp->placemark))
       
   106 		 return FALSE;
       
   107 	return TRUE;
       
   108 }
       
   109 
       
   110 bool_t
       
   111 xdr_bamboo_get_res (XDR *xdrs, bamboo_get_res *objp)
       
   112 {
       
   113 // LIANG
       
   114 //	register int32_t *buf;
       
   115 	u_int values_len_pass = objp->values.values_len;
       
   116         char* values_val_pass = (char*)objp->values.values_val;
       
   117 	 if (!xdr_array (xdrs, &values_val_pass, &values_len_pass, ~0,
       
   118 		sizeof (bamboo_value), (xdrproc_t) xdr_bamboo_value))
       
   119 		 return FALSE;
       
   120 	 if (!xdr_bamboo_placemark (xdrs, &objp->placemark))
       
   121 		 return FALSE;
       
   122 	return TRUE;
       
   123 }