So that the person adding one more xdr structure should be doing a '.x' file definition and be able to use the structure/procedure in code. Current plan is to have a script which will run 'rpcgen' on the .x file and make sure the '.[ch]' files are generated. So we will not need any changes in Makefile.
CHANGE: http://review.gluster.com/341 (Earlier:) merged in master by Anand Avati (avati)
First step is done. Please go through the commit msg of the patch : Earlier: step 1: copy the existing <xdr>.x files to /tmp step 2: generate '.[ch]' files using 'rpcgen <xdr>.x' step 3: check diff with the to the existing files, add only your part of changes back to the original file. (ignore other changes). step 4: there is another file to write wrapper functions to convert structures to/from XDR buffers, update it with your new structure. step 5: use these wrapper functions in the newly written procedures. step 6: commit :-| Now: step 1: update (mostly adding only) the <xdr>.x file step 2: run '<path-to-src>/extras/generate-xdr-files.sh <xdr>.x' command step 3: implement rpc procedure to handle the request/response. step 4: commit :-) --- In the next step, we should be removing the .[ch] files also from repository and build it on the fly on the machine where it is compiled. But that is next step, for which I will open another bug.