| 1 | 30 | unneback | USING RPC/XDR ON RTEMS
 | 
      
         | 2 |  |  | ======================
 | 
      
         | 3 |  |  | For the most part, programmers using RPC/XDR routines on RTEMS
 | 
      
         | 4 |  |  | can proceed as if they were to be using a POSIX/UNIX system.
 | 
      
         | 5 |  |  | The only significant changes are those to start the portmapper
 | 
      
         | 6 |  |  | and to allow use of RPC/XDR by multiple threads.
 | 
      
         | 7 |  |  |  
 | 
      
         | 8 |  |  | Starting the portmapper
 | 
      
         | 9 |  |  | =======================
 | 
      
         | 10 |  |  | The SUN portmapper program has been modified to run as an RTEMS
 | 
      
         | 11 |  |  | task.  Applications which need the portmapper can start this
 | 
      
         | 12 |  |  | task by calling:
 | 
      
         | 13 |  |  |         int rtems_rpc_start_portmapper (int priority);
 | 
      
         | 14 |  |  | The return value is an RTEMS status code.
 | 
      
         | 15 |  |  |  
 | 
      
         | 16 |  |  | Multi-threaded operation
 | 
      
         | 17 |  |  | ========================
 | 
      
         | 18 |  |  | The RPC/XDR package has been modified to allow for multiple RTEMS
 | 
      
         | 19 |  |  | tasks to use RPC/XDR routines.  If more than one task is to call
 | 
      
         | 20 |  |  | an RPC/XDR routine, the additional tasks must call:
 | 
      
         | 21 |  |  |         int rtems_rpc_task_init(void);
 | 
      
         | 22 |  |  | before calling any RPC/XDR routines.  For example, the portmapper
 | 
      
         | 23 |  |  | calls this routine since the portmapper uses RPC/XDR routines in
 | 
      
         | 24 |  |  | a separate thread.
 | 
      
         | 25 |  |  | The return value is an RTEMS status code.
 | 
      
         | 26 |  |  |  
 | 
      
         | 27 |  |  |  
 | 
      
         | 28 |  |  | Porting Notes
 | 
      
         | 29 |  |  | =============
 | 
      
         | 30 |  |  | Most of the FreeBSD rpc library ports to RTEMS with little
 | 
      
         | 31 |  |  | or no modification beyond that required to provide for operation
 | 
      
         | 32 |  |  | in a multitasking environment.  Multitasking operation was
 | 
      
         | 33 |  |  | provided by moving all `static persistence' variables into
 | 
      
         | 34 |  |  | a single structure and using an RTEMS task variable to point
 | 
      
         | 35 |  |  | to that structure.
 | 
      
         | 36 |  |  |  
 | 
      
         | 37 |  |  | Some of the library, however, has not made it into the RTEMS
 | 
      
         | 38 |  |  | implementation.  FreeBSD source files which have been left out include:
 | 
      
         | 39 |  |  | - Files which provide RPC to the AF_UNIX address family:
 | 
      
         | 40 |  |  |         clnt_unix.c
 | 
      
         | 41 |  |  |         svc_unix.c
 | 
      
         | 42 |  |  |   An `ifndef __rtems__' was added to clnt_generic.c because clnt_unix.c
 | 
      
         | 43 |  |  |   was omitted.
 | 
      
         | 44 |  |  | - Files which need NIS:
 | 
      
         | 45 |  |  |         auth_time.c
 | 
      
         | 46 |  |  | - Files which provide DES authentication:
 | 
      
         | 47 |  |  |         auth_des.c
 | 
      
         | 48 |  |  |         authdes_prot.c
 | 
      
         | 49 |  |  |         crypt_client.c
 | 
      
         | 50 |  |  |         des_crypt.c
 | 
      
         | 51 |  |  |         des_soft.c
 | 
      
         | 52 |  |  |         getpublickey.c
 | 
      
         | 53 |  |  |         key_call.c
 | 
      
         | 54 |  |  |         key_prot_xdr.c
 | 
      
         | 55 |  |  |         svc_auth_des.c
 | 
      
         | 56 |  |  |  
 | 
      
         | 57 |  |  | The FreeBSD xdr source compiles and runs on RTEMS without modification.
 | 
      
         | 58 |  |  |  
 | 
      
         | 59 |  |  | The original source was obtained from:
 | 
      
         | 60 |  |  |         ftp://ftp.FreeBSD.org/pub/FreeBSD/
 | 
      
         | 61 |  |  |                         branches/4.0-stable/src/lib/libc/rpc
 | 
      
         | 62 |  |  |                         branches/4.0-stable/src/lib/libc/xdr
 | 
      
         | 63 |  |  |                         branches/4.0-stable/src/include/rpc
 | 
      
         | 64 |  |  |                         branches/4.0-stable/src/include/rpcsvc
 |