Deleted Added
full compact
rpc.prog.ms (219055) rpc.prog.ms (226436)
1.\"
2.\" Must use -- tbl and pic -- with this one
3.\"
4.\" @(#)rpc.prog.ms 2.3 88/08/11 4.0 RPCSRC
1.\"
2.\" Must use -- tbl and pic -- with this one
3.\"
4.\" @(#)rpc.prog.ms 2.3 88/08/11 4.0 RPCSRC
5.\" $FreeBSD: head/share/doc/psd/23.rpc/rpc.prog.ms 219055 2011-02-26 12:50:28Z brucec $
5.\" $FreeBSD: head/share/doc/psd/23.rpc/rpc.prog.ms 226436 2011-10-16 14:30:28Z eadler $
6.\"
7.de BT
8.if \\n%=1 .tl ''- % -''
9..
10.nr OF 0
11.ND
12.\" prevent excess underlining in nroff
13.if n .fp 2 R

--- 298 unchanged lines hidden (view full) ---

312has a version number, so when a minor change is made to a
313remote service (adding a new procedure, for example), a new
314program number doesn't have to be assigned. When you want
315to call a procedure to find the number of remote users, you
316look up the appropriate program, version and procedure numbers
317in a manual, just as you look up the name of a memory allocator
318when you want to allocate memory.
319.LP
6.\"
7.de BT
8.if \\n%=1 .tl ''- % -''
9..
10.nr OF 0
11.ND
12.\" prevent excess underlining in nroff
13.if n .fp 2 R

--- 298 unchanged lines hidden (view full) ---

312has a version number, so when a minor change is made to a
313remote service (adding a new procedure, for example), a new
314program number doesn't have to be assigned. When you want
315to call a procedure to find the number of remote users, you
316look up the appropriate program, version and procedure numbers
317in a manual, just as you look up the name of a memory allocator
318when you want to allocate memory.
319.LP
320The simplest way of making remote procedure calls is with the the RPC
320The simplest way of making remote procedure calls is with the RPC
321library routine
322.I callrpc()
323It has eight parameters. The first is the name of the remote server
324machine. The next three parameters are the program, version, and procedure
325numbers\(emtogether they identify the procedure to be called.
326The fifth and sixth parameters are an XDR filter and an argument to
327be encoded and passed to the remote procedure.
328The final two parameters are a filter for decoding the results

--- 771 unchanged lines hidden (view full) ---

1100 */
1101.ft CW
1102svc_freeargs(transp, xdr_chararr2, &arrptr);
1103.DE
1104Note that, after being used, the character array can be freed with
1105.I svc_freeargs()
1106.I svc_freeargs()
1107will not attempt to free any memory if the variable indicating it
321library routine
322.I callrpc()
323It has eight parameters. The first is the name of the remote server
324machine. The next three parameters are the program, version, and procedure
325numbers\(emtogether they identify the procedure to be called.
326The fifth and sixth parameters are an XDR filter and an argument to
327be encoded and passed to the remote procedure.
328The final two parameters are a filter for decoding the results

--- 771 unchanged lines hidden (view full) ---

1100 */
1101.ft CW
1102svc_freeargs(transp, xdr_chararr2, &arrptr);
1103.DE
1104Note that, after being used, the character array can be freed with
1105.I svc_freeargs()
1106.I svc_freeargs()
1107will not attempt to free any memory if the variable indicating it
1108is NULL. For example, in the the routine
1108is NULL. For example, in the routine
1109.I xdr_finalexample (),
1110given earlier, if
1111.I finalp->string
1112was NULL, then it would not be freed. The same is true for
1113.I finalp->simplep .
1114.LP
1115To summarize, each XDR routine is responsible
1116for serializing, deserializing, and freeing memory.

--- 1570 unchanged lines hidden ---
1109.I xdr_finalexample (),
1110given earlier, if
1111.I finalp->string
1112was NULL, then it would not be freed. The same is true for
1113.I finalp->simplep .
1114.LP
1115To summarize, each XDR routine is responsible
1116for serializing, deserializing, and freeing memory.

--- 1570 unchanged lines hidden ---