rxgen: add *TranslateOpcode functions to XDR code
authorFelix Frank <Felix.Frank@Alumni.TU-Berlin.de>
Fri, 12 Nov 2010 23:10:31 +0000 (00:10 +0100)
committerDerrick Brashear <shadow@dementia.org>
Fri, 19 Nov 2010 22:54:11 +0000 (14:54 -0800)
commit5c77a6ca2460c3e79125a614037824db35480905
treed691343dd039b9115ae82f9bd3d9d7a0508efef2
parentd37679f4fdb1b10284046c05d2c7b110b37a4120
rxgen: add *TranslateOpcode functions to XDR code

Administrative commands and server binaries can benefit from the
ability to translate RPC OpCode numbers to proper function names.

For this purpose, rxgen now emits the function

char *PKGTranslateOpCode(int)

where PKG is replaced by the respective package prefix.

The function is generated in the exact same way that ExecuteRequest is.
This way, the right optimization (array storage vs. generated case
statement) according to the respective sparseness of OpCodes in the
different RX packages is maintained.

Change-Id: Ib083597c0841f50518afd2b159b98c0447e13da0
Reviewed-on: http://gerrit.openafs.org/3305
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/rxgen/rpc_main.c
src/rxgen/rpc_parse.c