rpcgen compiler
rpcgen – c square.x
square_svc.c => server stub and skelethon
– main => registration / housekeeping
– square_prog.i
=> inernal code, request parsing, arg marshaling
=> -1 == version1
– square_proc_l_svc => actual procedure: must be impl by developer
Summarizing RPC Developement
From .x => header, stubs…
Developer
-server code
impl of square proc_1_svc
– client side
call squareproc_1()
rpcgen-C square.x => not thread safe!
y = squareproc_1 (&x, client_handle)
RPC daemon == portmapper
./sbin/portmap (need sudo privileges)
Query with rpcinfo -p
./usr/sbin/rpcinfo -p
program id, version, protocol(tcp, udp)
socket port number, service name…