iPXE
|
SUN ONC RPC protocol. More...
Go to the source code of this file.
Data Structures | |
struct | portmap_getport_reply |
A PORTMAP GETPORT reply. More... | |
Macros | |
#define | PORTMAP_PORT 111 |
PORTMAP default port. More... | |
#define | ONCRPC_PORTMAP 100000 |
PORTMAP protocol number. More... | |
#define | PORTMAP_VERS 2 |
PORTMAP version. More... | |
#define | PORTMAP_PROTO_TCP 6 |
TCP protocol number. More... | |
#define | PORTMAP_PROTO_UDP 17 |
UDB protocol number. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | portmap_init_session (struct oncrpc_session *session, struct oncrpc_cred *credential) |
Prepare an ONC RPC session to be used as a PORTMAP session. More... | |
int | portmap_getport (struct interface *intf, struct oncrpc_session *session, uint32_t prog, uint32_t vers, uint32_t proto) |
Send a GETPORT request. More... | |
int | portmap_get_getport_reply (struct portmap_getport_reply *getport_reply, struct oncrpc_reply *reply) |
Parse a GETPORT reply. More... | |
SUN ONC RPC protocol.
Definition in file portmap.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Prepare an ONC RPC session to be used as a PORTMAP session.
session | ONC RPC session |
credential | ONC RPC credential |
The credential parameter must not be NULL, use 'oncrpc_auth_none' if you don't want a particular scheme to be used.
Definition at line 50 of file portmap.h.
References oncrpc_auth_none, oncrpc_init_session(), ONCRPC_PORTMAP, and PORTMAP_VERS.
Referenced by nfs_open().
int portmap_getport | ( | struct interface * | intf, |
struct oncrpc_session * | session, | ||
uint32_t | prog, | ||
uint32_t | vers, | ||
uint32_t | proto | ||
) |
Send a GETPORT request.
intf | Interface to send the request on |
session | ONC RPC session |
prog | ONC RPC program number |
vers | ONC RPC rogram version number |
proto | Protocol (TCP or UDP) |
rc | Return status code |
Definition at line 59 of file portmap.c.
References oncrpc_call(), ONCRPC_FIELD, ONCRPC_FIELD_END, and PORTMAP_GETPORT.
Referenced by nfs_pm_step().
int portmap_get_getport_reply | ( | struct portmap_getport_reply * | getport_reply, |
struct oncrpc_reply * | reply | ||
) |
Parse a GETPORT reply.
getport_reply | A structure where the data will be saved |
reply | The ONC RPC reply to get data from |
rc | Return status code |
Definition at line 80 of file portmap.c.
References oncrpc_reply::data, EINVAL, oncrpc_iob_get_int, and portmap_getport_reply::port.
Referenced by nfs_pm_deliver().