| 1 | /*	$NetBSD: krpc.h,v 1.10 2024/12/07 02:05:55 riastradh Exp $	*/ |
| 2 | |
| 3 | #ifndef _NFS_KRPC_H_ |
| 4 | #define	_NFS_KRPC_H_ |
| 5 | |
| 6 | #include <sys/cdefs.h> |
| 7 | |
| 8 | #ifdef _KERNEL |
| 9 | |
| 10 | int krpc_call(struct sockaddr_in *sin, |
| 11 | 	u_int prog, u_int vers, u_int func, |
| 12 | 	struct mbuf **data, struct mbuf **from, struct lwp *l); |
| 13 | |
| 14 | int krpc_portmap(struct sockaddr_in *sin, |
| 15 | 	u_int prog, u_int vers, u_int proto, u_int16_t *portp, |
| 16 | 	struct lwp *l); |
| 17 | |
| 18 | struct mbuf *xdr_string_encode(char *str, int len); |
| 19 | struct mbuf *xdr_string_decode(struct mbuf *m, char *str, int *len_p); |
| 20 | struct mbuf *xdr_inaddr_encode(struct in_addr *ia); |
| 21 | struct mbuf *xdr_inaddr_decode(struct mbuf *m, struct in_addr *ia); |
| 22 | |
| 23 | #endif /* _KERNEL */ |
| 24 | |
| 25 | /* |
| 26 | * RPC definitions for the portmapper |
| 27 | */ |
| 28 | #define	PMAPPORT		111 |
| 29 | #define	PMAPPROG		100000 |
| 30 | #define	PMAPVERS		2 |
| 31 | #define	PMAPPROC_NULL		0 |
| 32 | #define	PMAPPROC_SET		1 |
| 33 | #define	PMAPPROC_UNSET		2 |
| 34 | #define	PMAPPROC_GETPORT	3 |
| 35 | #define	PMAPPROC_DUMP		4 |
| 36 | #define	PMAPPROC_CALLIT		5 |
| 37 | |
| 38 | /* |
| 39 | * RPC definitions for bootparamd |
| 40 | */ |
| 41 | #define	BOOTPARAM_PROG		100026 |
| 42 | #define	BOOTPARAM_VERS		1 |
| 43 | #define BOOTPARAM_WHOAMI	1 |
| 44 | #define BOOTPARAM_GETFILE	2 |
| 45 | |
| 46 | #endif	/* _NFS_KRPC_H_ */ |