c - Understanding XDR specification to create a *.x file -


I am looking through many websites on the Internet and really want to know that we X for the RPC file . C to create equivalent work in the file *. In the X file

  program ADD_PROG {version ADD_VERS {int ADD (intpair) = 1, I visited each site to use the following types of specification. } = 1; } = 0x23451111; Therefore, to understand practically, I have obtained an open-source project known as ganglia and uses RPCGN to produce the equivalent C source code () and C header file (). $ [Rohit @ Ganglia-Server RPC] $ 24-RV-RW [Rohit] Ganglia-Server RPC $ rpcgen -C gm_protocol.x [Rohit @ Ganglia-Server RPC] -R-1 1 Rohit Rohit 5786 28 October 17:52 GM_PROTOTAL H-R-R-R-1-Rohit Rohit 3485 28 Oct. 15:04 GM_Prootrol.XRRRR-1 Rohit Rohit 8213 28 Oct 17:52 gm_protocol_xdr.c  

I have learned, which I have learned and understood, in any GMC RP.C. The code is not shown as, but it can also generate many functions in the file gm_protocol_xdr.c

It is very convinced that I do not understand XDR specifications because either I have consulted the wrong sources or they are old. I could not find any tutorials that explain the way to generate functions (though I have got specificity to generate straight, angles, union, etc.).

Please help to know these specifications.

  program STRLEN {version STRLENVERS {int strlen (string) = 1; } = 1; } = 117;  

Specification is a part of program RPCL but XDR is the language. If someone puts it above the specifications in the test.x file and runs it using rpcgen -C test.x , then it is / she only

< Blockquote> will receive

test.h, test_svc.c, test_clnt.c

If no one needs a server or client stubs and only the XDR encoder and decoder functions If required, in each specification file gm_protocol.x , enum, struct, union, etc. will be available in their equivalent C based declarations in gm_protocol.h . Will be generated and their respective XDR encoder and decoder functions will be generated in gm_protocol_xdr.c , which is the case referred to in the question.

Running rpcgen -a gm_protocol.x gm_protocol_svc will generate and gm_protocol_clnt.c without any function.

Below are some XDR specifications:

Enter image details here

Check Old SUN Doc


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -