summaryrefslogtreecommitdiff
path: root/ccan/nfs/rpc/portmap.h
blob: 0cd7091e8b71f7d6d3499704f89e7fdaa47180ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/* Licensed under GPLv3+ - see LICENSE file for details */
/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#ifndef _PORTMAP_H_RPCGEN
#define _PORTMAP_H_RPCGEN

#include <rpc/rpc.h>


#ifdef __cplusplus
extern "C" {
#endif

#define PMAP_PORT 111

struct mapping {
	u_int prog;
	u_int vers;
	u_int prot;
	u_int port;
};
typedef struct mapping mapping;

struct call_args {
	u_int prog;
	u_int vers;
	u_int proc;
	struct {
		u_int args_len;
		char *args_val;
	} args;
};
typedef struct call_args call_args;

#define PMAP_PROGRAM 100000
#define PMAP_V2 2

#if defined(__STDC__) || defined(__cplusplus)
#define PMAP_NULL 0
extern  void * pmap_null_2(void *, CLIENT *);
extern  void * pmap_null_2_svc(void *, struct svc_req *);
#define PMAP_SET 1
extern  bool_t * pmap_set_2(mapping *, CLIENT *);
extern  bool_t * pmap_set_2_svc(mapping *, struct svc_req *);
#define PMAP_UNSET 2
extern  bool_t * pmap_unset_2(mapping *, CLIENT *);
extern  bool_t * pmap_unset_2_svc(mapping *, struct svc_req *);
#define PMAP_GETPORT 3
extern  u_int * pmap_getport_2(mapping *, CLIENT *);
extern  u_int * pmap_getport_2_svc(mapping *, struct svc_req *);
extern int pmap_program_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);

#else /* K&R C */
#define PMAP_NULL 0
extern  void * pmap_null_2();
extern  void * pmap_null_2_svc();
#define PMAP_SET 1
extern  bool_t * pmap_set_2();
extern  bool_t * pmap_set_2_svc();
#define PMAP_UNSET 2
extern  bool_t * pmap_unset_2();
extern  bool_t * pmap_unset_2_svc();
#define PMAP_GETPORT 3
extern  u_int * pmap_getport_2();
extern  u_int * pmap_getport_2_svc();
extern int pmap_program_2_freeresult ();
#endif /* K&R C */

/* the xdr functions */

#if defined(__STDC__) || defined(__cplusplus)
extern  bool_t xdr_mapping (XDR *, mapping*);
extern  bool_t xdr_call_args (XDR *, call_args*);

#else /* K&R C */
extern bool_t xdr_mapping ();
extern bool_t xdr_call_args ();

#endif /* K&R C */

#ifdef __cplusplus
}
#endif

#endif /* !_PORTMAP_H_RPCGEN */