2018-10-15 01:46:07 +08:00
|
|
|
/*
|
2021-03-08 18:19:04 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2018-10-15 01:46:07 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
*/
|
2011-10-08 22:50:08 +08:00
|
|
|
#ifndef __RPC_PMAP_PROT_H__
|
|
|
|
#define __RPC_PMAP_PROT_H__
|
|
|
|
|
|
|
|
#include <rpc/xdr.h>
|
|
|
|
|
|
|
|
/* The following procedures are supported by the protocol:
|
|
|
|
*
|
|
|
|
* PMAPPROC_NULL() returns ()
|
2021-03-08 18:19:04 +08:00
|
|
|
* takes nothing, returns nothing
|
2011-10-08 22:50:08 +08:00
|
|
|
*
|
|
|
|
* PMAPPROC_SET(struct pmap) returns (bool_t)
|
2021-03-08 18:19:04 +08:00
|
|
|
* TRUE is success, FALSE is failure. Registers the tuple
|
|
|
|
* [prog, vers, prot, port].
|
2011-10-08 22:50:08 +08:00
|
|
|
*
|
|
|
|
* PMAPPROC_UNSET(struct pmap) returns (bool_t)
|
2021-03-08 18:19:04 +08:00
|
|
|
* TRUE is success, FALSE is failure. Un-registers pair
|
|
|
|
* [prog, vers]. prot and port are ignored.
|
2011-10-08 22:50:08 +08:00
|
|
|
*
|
|
|
|
* PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
|
2021-03-08 18:19:04 +08:00
|
|
|
* 0 is failure. Otherwise returns the port number where the pair
|
|
|
|
* [prog, vers] is registered. It may lie!
|
2011-10-08 22:50:08 +08:00
|
|
|
*
|
|
|
|
* PMAPPROC_DUMP() RETURNS (struct pmaplist *)
|
|
|
|
*
|
|
|
|
* PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
|
2021-03-08 18:19:04 +08:00
|
|
|
* RETURNS (port, string<>);
|
2011-10-08 22:50:08 +08:00
|
|
|
* usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
|
2021-03-08 18:19:04 +08:00
|
|
|
* Calls the procedure on the local machine. If it is not registered,
|
|
|
|
* this procedure is quite; ie it does not return error information!!!
|
|
|
|
* This procedure only is supported on rpc/udp and calls via
|
|
|
|
* rpc/udp. This routine only passes null authentication parameters.
|
|
|
|
* This file has no interface to xdr routines for PMAPPROC_CALLIT.
|
2011-10-08 22:50:08 +08:00
|
|
|
*
|
|
|
|
* The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
|
|
|
|
*/
|
|
|
|
|
2021-03-08 18:19:04 +08:00
|
|
|
#define PMAPPORT ((unsigned short)111)
|
|
|
|
#define PMAPPROG ((unsigned long)100000)
|
|
|
|
#define PMAPVERS ((unsigned long)2)
|
|
|
|
#define PMAPVERS_PROTO ((unsigned long)2)
|
|
|
|
#define PMAPVERS_ORIG ((unsigned long)1)
|
|
|
|
#define PMAPPROC_NULL ((unsigned long)0)
|
|
|
|
#define PMAPPROC_SET ((unsigned long)1)
|
|
|
|
#define PMAPPROC_UNSET ((unsigned long)2)
|
|
|
|
#define PMAPPROC_GETPORT ((unsigned long)3)
|
|
|
|
#define PMAPPROC_DUMP ((unsigned long)4)
|
|
|
|
#define PMAPPROC_CALLIT ((unsigned long)5)
|
2011-10-08 22:50:08 +08:00
|
|
|
|
|
|
|
struct pmap {
|
2021-03-08 18:19:04 +08:00
|
|
|
long unsigned pm_prog;
|
|
|
|
long unsigned pm_vers;
|
|
|
|
long unsigned pm_prot;
|
|
|
|
long unsigned pm_port;
|
2011-10-08 22:50:08 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs);
|
|
|
|
|
|
|
|
#endif
|