This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Dave, Yes, your rpcgen(1) utility creates a "protocol/ldm_svc.c" file that won't play well with the rest of the LDM code. I've attached a "protocol/ldm_svc.c" file that might work for you. Please substitute it for yours, try rebuilding, and let me know. Hopefully, this won't be a problem in the next release. > Steve, > > Attached. > > — Dave > > *************************************************************** > * Dr. Dave Dempsey, Chair | ^ ___ \|/ * > * Dept. of Earth & Climate Sciences | ) ^ /||_||\ —-0—- * > * San Francisco State University | ) ) / ||_|| \ /|\ * > * 1600 Holloway Ave. | ) ) / ||_|| \ * > * San Francisco, CA 94132 | ) ) / ||_|| \ ^ * > * | ) ) ) ||_|| \ * > * Phone: (415) 338-7716 | ) ) )~~||~||~~~~~\~~ * > * FAX: (415) 338-7705 | ) ) ) ) ~ ~ ~ ~ ~ ~ * > * Email: address@hidden | ) ) ) ) ) ~ ~ ~ ~ * > *************************************************************** Regards, Steve Emmerson Ticket Details =================== Ticket ID: PXK-681085 Department: Support LDM Priority: Normal Status: Closed
#include "config.h" /* * Please do not edit this file. * It was generated using rpcgen. */ #include "ldm.h" #include <stdio.h> #include <stdlib.h> #include <rpc/pmap_clnt.h> #include <string.h> #include <memory.h> #include <sys/socket.h> #include <netinet/in.h> #ifndef SIG_PF #define SIG_PF void(*)(int) #endif void ldmprog_6(struct svc_req *rqstp, register SVCXPRT *transp) { union { feedpar_t feedme_6_arg; prod_class_t notifyme_6_arg; u_int is_alive_6_arg; prod_class_t hiya_6_arg; prod_info notification_6_arg; product hereis_6_arg; comingsoon_args comingsoon_6_arg; datapkt blkdata_6_arg; } argument; char *result; xdrproc_t _xdr_argument, _xdr_result; char *(*local)(char *, struct svc_req *); switch (rqstp->rq_proc) { case NULLPROC: (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL); return; case FEEDME: _xdr_argument = (xdrproc_t) xdr_feedpar_t; _xdr_result = (xdrproc_t) xdr_fornme_reply_t; local = (char *(*)(char *, struct svc_req *)) feedme_6_svc; break; case NOTIFYME: _xdr_argument = (xdrproc_t) xdr_prod_class_t; _xdr_result = (xdrproc_t) xdr_fornme_reply_t; local = (char *(*)(char *, struct svc_req *)) notifyme_6_svc; break; case IS_ALIVE: _xdr_argument = (xdrproc_t) xdr_u_int; _xdr_result = (xdrproc_t) xdr_bool; local = (char *(*)(char *, struct svc_req *)) is_alive_6_svc; break; case HIYA: _xdr_argument = (xdrproc_t) xdr_prod_class_t; _xdr_result = (xdrproc_t) xdr_hiya_reply_t; local = (char *(*)(char *, struct svc_req *)) hiya_6_svc; break; case NOTIFICATION: _xdr_argument = (xdrproc_t) xdr_prod_info; _xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) notification_6_svc; break; case HEREIS: _xdr_argument = (xdrproc_t) xdr_product; _xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) hereis_6_svc; break; case COMINGSOON: _xdr_argument = (xdrproc_t) xdr_comingsoon_args; _xdr_result = (xdrproc_t) xdr_comingsoon_reply_t; local = (char *(*)(char *, struct svc_req *)) comingsoon_6_svc; break; case BLKDATA: _xdr_argument = (xdrproc_t) xdr_datapkt; _xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) blkdata_6_svc; break; default: svcerr_noproc (transp); return; } memset ((char *)&argument, 0, sizeof (argument)); if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { svcerr_decode (transp); return; } result = (*local)((char *)&argument, rqstp); if (result != NULL && !svc_sendreply(transp, (xdrproc_t) _xdr_result, result)) { svcerr_systemerr (transp); } if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { fprintf (stderr, "%s", "unable to free arguments"); exit (1); } return; } void ldmprog_7(struct svc_req *rqstp, register SVCXPRT *transp) { union { feedtypet subscribe_7_arg; McastProdIndex request_product_7_arg; BacklogSpec request_backlog_7_arg; MissedProduct deliver_missed_product_7_arg; McastProdIndex no_such_product_7_arg; product deliver_backlog_product_7_arg; } argument; char *result; xdrproc_t _xdr_argument, _xdr_result; char *(*local)(char *, struct svc_req *); switch (rqstp->rq_proc) { case NULLPROC: (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL); return; case SUBSCRIBE: _xdr_argument = (xdrproc_t) xdr_feedtypet; _xdr_result = (xdrproc_t) xdr_SubscriptionReply; local = (char *(*)(char *, struct svc_req *)) subscribe_7_svc; break; case REQUEST_PRODUCT: _xdr_argument = (xdrproc_t) xdr_McastProdIndex; _xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) request_product_7_svc; break; case REQUEST_BACKLOG: _xdr_argument = (xdrproc_t) xdr_BacklogSpec; _xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) request_backlog_7_svc; break; case TEST_CONNECTION: _xdr_argument = (xdrproc_t) xdr_void; _xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) test_connection_7_svc; break; case DELIVER_MISSED_PRODUCT: _xdr_argument = (xdrproc_t) xdr_MissedProduct; _xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) deliver_missed_product_7_svc; break; case NO_SUCH_PRODUCT: _xdr_argument = (xdrproc_t) xdr_McastProdIndex; _xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) no_such_product_7_svc; break; case DELIVER_BACKLOG_PRODUCT: _xdr_argument = (xdrproc_t) xdr_product; _xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) deliver_backlog_product_7_svc; break; case END_BACKLOG: _xdr_argument = (xdrproc_t) xdr_void; _xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) end_backlog_7_svc; break; default: svcerr_noproc (transp); return; } memset ((char *)&argument, 0, sizeof (argument)); if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { svcerr_decode (transp); return; } result = (*local)((char *)&argument, rqstp); if (result != NULL && !svc_sendreply(transp, (xdrproc_t) _xdr_result, result)) { svcerr_systemerr (transp); } if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { fprintf (stderr, "%s", "unable to free arguments"); exit (1); } return; }