docs: add a prebuilt manpage to the distribution
[deb_libnfs.git] / portmap / libnfs-raw-portmap.c
index 967b126a8cb0e5408e7037b0f1f991f9f6639199..1afcd63d375c8e34c4cae4cb64ad6c47d54069fd 100644 (file)
@@ -155,6 +155,17 @@ zdr_pmap2_dump_result (ZDR *zdrs, pmap2_dump_result *objp)
        return TRUE;
 }
 
+bool_t
+zdr_pmap3_string_result (ZDR *zdrs, pmap3_string_result *objp)
+{
+       register int32_t *buf;
+       buf = NULL;
+
+        if (!zdr_string (zdrs, &objp->addr, ~0))
+                return FALSE;
+       return TRUE;
+}
+
 bool_t
 zdr_pmap3_mapping (ZDR *zdrs, pmap3_mapping *objp)
 {
@@ -197,3 +208,85 @@ zdr_pmap3_dump_result (ZDR *zdrs, pmap3_dump_result *objp)
                 return FALSE;
        return TRUE;
 }
+
+bool_t
+zdr_pmap3_call_args (ZDR *zdrs, pmap3_call_args *objp)
+{
+       register int32_t *buf;
+       buf = NULL;
+
+
+       if (zdrs->x_op == ZDR_ENCODE) {
+               buf = ZDR_INLINE (zdrs, 3 * BYTES_PER_ZDR_UNIT);
+               if (buf == NULL) {
+                        if (!zdr_u_int (zdrs, &objp->prog))
+                                return FALSE;
+                        if (!zdr_u_int (zdrs, &objp->vers))
+                                return FALSE;
+                        if (!zdr_u_int (zdrs, &objp->proc))
+                                return FALSE;
+
+               } else {
+               IZDR_PUT_U_LONG(buf, objp->prog);
+               IZDR_PUT_U_LONG(buf, objp->vers);
+               IZDR_PUT_U_LONG(buf, objp->proc);
+               }
+                if (!zdr_bytes (zdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
+                        return FALSE;
+               return TRUE;
+       } else if (zdrs->x_op == ZDR_DECODE) {
+               buf = ZDR_INLINE (zdrs, 3 * BYTES_PER_ZDR_UNIT);
+               if (buf == NULL) {
+                        if (!zdr_u_int (zdrs, &objp->prog))
+                                return FALSE;
+                        if (!zdr_u_int (zdrs, &objp->vers))
+                                return FALSE;
+                        if (!zdr_u_int (zdrs, &objp->proc))
+                                return FALSE;
+
+               } else {
+               objp->prog = IZDR_GET_U_LONG(buf);
+               objp->vers = IZDR_GET_U_LONG(buf);
+               objp->proc = IZDR_GET_U_LONG(buf);
+               }
+                if (!zdr_bytes (zdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
+                        return FALSE;
+        return TRUE;
+       }
+
+        if (!zdr_u_int (zdrs, &objp->prog))
+                return FALSE;
+        if (!zdr_u_int (zdrs, &objp->vers))
+                return FALSE;
+        if (!zdr_u_int (zdrs, &objp->proc))
+                return FALSE;
+        if (!zdr_bytes (zdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
+                return FALSE;
+       return TRUE;
+}
+
+bool_t
+zdr_pmap3_call_result (ZDR *zdrs, pmap3_call_result *objp)
+{
+       register int32_t *buf;
+       buf = NULL;
+
+        if (!zdr_u_int (zdrs, &objp->port))
+                return FALSE;
+        if (!zdr_bytes (zdrs, (char **)&objp->res.res_val, (u_int *) &objp->res.res_len, ~0))
+                return FALSE;
+       return TRUE;
+}
+
+bool_t
+zdr_pmap3_netbuf (ZDR *zdrs, pmap3_netbuf *objp)
+{
+       register int32_t *buf;
+       buf = NULL;
+
+        if (!zdr_u_int (zdrs, &objp->maxlen))
+                return FALSE;
+        if (!zdr_bytes (zdrs, (char **)&objp->buf.buf_val, (u_int *) &objp->buf.buf_len, ~0))
+                return FALSE;
+       return TRUE;
+}