From: Ronnie Sahlberg Date: Tue, 18 Mar 2014 04:29:32 +0000 (-0700) Subject: PORTMAP: Rename pmap3_getaddr_result to pmap3_string_result X-Git-Tag: upstream/1.9.6^2~61 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=24f45c5452ec03fd45098c1eb5ee6bc023b86049;p=deb_libnfs.git PORTMAP: Rename pmap3_getaddr_result to pmap3_string_result --- diff --git a/examples/portmap-client.c b/examples/portmap-client.c index c9cde39..487cbed 100644 --- a/examples/portmap-client.c +++ b/examples/portmap-client.c @@ -108,7 +108,7 @@ void pmap3_dump_cb(struct rpc_context *rpc, int status, void *data, void *privat void pmap3_getaddr_cb(struct rpc_context *rpc, int status, void *data, void *private_data) { struct client *client = private_data; - struct pmap3_getaddr_result *gar = data; + struct pmap3_string_result *gar = data; if (status == RPC_STATUS_ERROR) { printf("PORTMAP3/GETADDR call failed with \"%s\"\n", (char *)data); diff --git a/include/nfsc/libnfs-raw.h b/include/nfsc/libnfs-raw.h index ce419ff..3ba9de3 100644 --- a/include/nfsc/libnfs-raw.h +++ b/include/nfsc/libnfs-raw.h @@ -280,7 +280,7 @@ EXTERN int rpc_pmap3_unset_async(struct rpc_context *rpc, struct pmap3_mapping * * * When the callback is invoked, status indicates the result: * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. - * data is struct pmap3_getaddr_result. + * data is struct pmap3_string_result. * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. * data is the error string. * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. @@ -360,7 +360,7 @@ EXTERN int rpc_pmap3_uaddr2taddr_async(struct rpc_context *rpc, char *uaddr, rpc * * When the callback is invoked, status indicates the result: * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. - * data is a struct pmap3_getaddr_result *. + * data is a struct pmap3_string_result *. * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. * data is the error string. * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. diff --git a/lib/libnfs.c b/lib/libnfs.c index 88751a7..30c3757 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -465,7 +465,7 @@ static void rpc_connect_program_4_cb(struct rpc_context *rpc, int status, void * static void rpc_connect_program_3_cb(struct rpc_context *rpc, int status, void *command_data, void *private_data) { struct rpc_cb_data *data = private_data; - struct pmap3_getaddr_result *gar; + struct pmap3_string_result *gar; uint32_t rpc_port = 0; unsigned char *ptr; diff --git a/portmap/libnfs-raw-portmap.c b/portmap/libnfs-raw-portmap.c index 293b0a1..1afcd63 100644 --- a/portmap/libnfs-raw-portmap.c +++ b/portmap/libnfs-raw-portmap.c @@ -156,7 +156,7 @@ zdr_pmap2_dump_result (ZDR *zdrs, pmap2_dump_result *objp) } bool_t -zdr_pmap3_getaddr_result (ZDR *zdrs, pmap3_getaddr_result *objp) +zdr_pmap3_string_result (ZDR *zdrs, pmap3_string_result *objp) { register int32_t *buf; buf = NULL; diff --git a/portmap/libnfs-raw-portmap.h b/portmap/libnfs-raw-portmap.h index bc94871..ae0d067 100644 --- a/portmap/libnfs-raw-portmap.h +++ b/portmap/libnfs-raw-portmap.h @@ -54,10 +54,10 @@ struct pmap2_dump_result { }; typedef struct pmap2_dump_result pmap2_dump_result; -struct pmap3_getaddr_result { +struct pmap3_string_result { char *addr; }; -typedef struct pmap3_getaddr_result pmap3_getaddr_result; +typedef struct pmap3_string_result pmap3_string_result; struct pmap3_mapping { u_int prog; @@ -166,8 +166,8 @@ extern bool_t * pmap3_set_3_svc(pmap3_mapping *, struct svc_req *); extern bool_t * pmap3_unset_3(pmap3_mapping *, CLIENT *); extern bool_t * pmap3_unset_3_svc(pmap3_mapping *, struct svc_req *); #define PMAP3_GETADDR 3 -extern pmap3_getaddr_result * pmap3_getaddr_3(pmap3_mapping *, CLIENT *); -extern pmap3_getaddr_result * pmap3_getaddr_3_svc(pmap3_mapping *, struct svc_req *); +extern pmap3_string_result * pmap3_getaddr_3(pmap3_mapping *, CLIENT *); +extern pmap3_string_result * pmap3_getaddr_3_svc(pmap3_mapping *, struct svc_req *); #define PMAP3_DUMP 4 extern pmap3_dump_result * pmap3_dump_3(void *, CLIENT *); extern pmap3_dump_result * pmap3_dump_3_svc(void *, struct svc_req *); @@ -181,8 +181,8 @@ extern u_int * pmap3_gettime_3_svc(void *, struct svc_req *); extern pmap3_netbuf * pmap3_uaddr2taddr_3(char **, CLIENT *); extern pmap3_netbuf * pmap3_uaddr2taddr_3_svc(char **, struct svc_req *); #define PMAP3_TADDR2UADDR 8 -extern struct pmap3_getaddr_result * pmap3_taddr2uaddr_3(pmap3_netbuf *, CLIENT *); -extern struct pmap3_getaddr_result * pmap3_taddr2uaddr_3_svc(pmap3_netbuf *, struct svc_req *); +extern struct pmap3_string_result * pmap3_taddr2uaddr_3(pmap3_netbuf *, CLIENT *); +extern struct pmap3_string_result * pmap3_taddr2uaddr_3_svc(pmap3_netbuf *, struct svc_req *); extern int pmap_program_3_freeresult (SVCXPRT *, zdrproc_t, caddr_t); #else /* K&R C */ @@ -196,8 +196,8 @@ extern bool_t * pmap3_set_3_svc(); extern bool_t * pmap3_unset_3(); extern bool_t * pmap3_unset_3_svc(); #define PMAP3_GETADDR 3 -extern pmap3_getaddr_result * pmap3_getaddr_3(); -extern pmap3_getaddr_result * pmap3_getaddr_3_svc(); +extern pmap3_string_result * pmap3_getaddr_3(); +extern pmap3_string_result * pmap3_getaddr_3_svc(); #define PMAP3_DUMP 4 extern pmap3_dump_result * pmap3_dump_3(); extern pmap3_dump_result * pmap3_dump_3_svc(); @@ -211,8 +211,8 @@ extern u_int * pmap3_gettime_3_svc(); extern pmap3_netbuf * pmap3_uaddr2taddr_3(); extern pmap3_netbuf * pmap3_uaddr2taddr_3_svc(); #define PMAP3_TADDR2UADDR 8 -extern struct pmap3_getaddr_result * pmap3_taddr2uaddr_3(); -extern struct pmap3_getaddr_result * pmap3_taddr2uaddr_3_svc(); +extern struct pmap3_string_result * pmap3_taddr2uaddr_3(); +extern struct pmap3_string_result * pmap3_taddr2uaddr_3_svc(); extern int pmap_program_3_freeresult (); #endif /* K&R C */ @@ -224,7 +224,7 @@ extern bool_t zdr_pmap2_call_args (ZDR *, pmap2_call_args*); extern bool_t zdr_pmap2_call_result (ZDR *, pmap2_call_result*); extern bool_t zdr_pmap2_mapping_list (ZDR *, pmap2_mapping_list*); extern bool_t zdr_pmap2_dump_result (ZDR *, pmap2_dump_result*); -extern bool_t zdr_pmap3_getaddr_result (ZDR *, pmap3_getaddr_result*); +extern bool_t zdr_pmap3_string_result (ZDR *, pmap3_string_result*); extern bool_t zdr_pmap3_mapping (ZDR *, pmap3_mapping*); extern bool_t zdr_pmap3_mapping_list (ZDR *, pmap3_mapping_list*); extern bool_t zdr_pmap3_dump_result (ZDR *, pmap3_dump_result*); @@ -238,7 +238,7 @@ extern bool_t zdr_pmap2_call_args (); extern bool_t zdr_pmap2_call_result (); extern bool_t zdr_pmap2_mapping_list (); extern bool_t zdr_pmap2_dump_result (); -extern bool_t zdr_pmap3_getaddr_result (); +extern bool_t zdr_pmap3_string_result (); extern bool_t zdr_pmap3_mapping (); extern bool_t zdr_pmap3_mapping_list (); extern bool_t zdr_pmap3_dump_result (); diff --git a/portmap/portmap.c b/portmap/portmap.c index 2e9f653..9b0e0f6 100644 --- a/portmap/portmap.c +++ b/portmap/portmap.c @@ -263,7 +263,7 @@ int rpc_pmap3_getaddr_async(struct rpc_context *rpc, struct pmap3_mapping *map, { struct rpc_pdu *pdu; - pdu = rpc_allocate_pdu(rpc, PMAP_PROGRAM, PMAP_V3, PMAP3_GETADDR, cb, private_data, (zdrproc_t)zdr_pmap3_getaddr_result, sizeof(pmap3_getaddr_result)); + pdu = rpc_allocate_pdu(rpc, PMAP_PROGRAM, PMAP_V3, PMAP3_GETADDR, cb, private_data, (zdrproc_t)zdr_pmap3_string_result, sizeof(pmap3_string_result)); if (pdu == NULL) { rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for PORTMAP3/GETADDR call"); return -1; @@ -381,7 +381,7 @@ int rpc_pmap3_taddr2uaddr_async(struct rpc_context *rpc, struct pmap3_netbuf *nb { struct rpc_pdu *pdu; - pdu = rpc_allocate_pdu(rpc, PMAP_PROGRAM, PMAP_V3, PMAP3_TADDR2UADDR, cb, private_data, (zdrproc_t)zdr_pmap3_getaddr_result, sizeof(pmap3_getaddr_result)); + pdu = rpc_allocate_pdu(rpc, PMAP_PROGRAM, PMAP_V3, PMAP3_TADDR2UADDR, cb, private_data, (zdrproc_t)zdr_pmap3_string_result, sizeof(pmap3_string_result)); if (pdu == NULL) { rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for PORTMAP3/TADDR2UADDR call"); return -1; diff --git a/portmap/portmap.x b/portmap/portmap.x index 1572505..6f4bc39 100644 --- a/portmap/portmap.x +++ b/portmap/portmap.x @@ -32,7 +32,7 @@ struct pmap2_dump_result { struct pmap2_mapping_list *list; }; -struct pmap3_getaddr_result { +struct pmap3_string_result { string addr<>; }; @@ -100,7 +100,7 @@ program PMAP_PROGRAM { bool PMAP3_UNSET(pmap3_mapping) = 2; - pmap3_getaddr_result + pmap3_string_result PMAP3_GETADDR(pmap3_mapping) = 3; pmap3_dump_result @@ -115,7 +115,7 @@ program PMAP_PROGRAM { pmap3_netbuf PMAP3_UADDR2TADDR(string) = 7; - struct pmap3_getaddr_result + struct pmap3_string_result PMAP3_TADDR2UADDR(pmap3_netbuf) = 8; } = 3; } = 100000;