6 Appendix A: Full SunRPC IDL

This IDL section excludes the following procedures, which need to be coded separately because the IDL is unable to describe the returned data types. Sample code for the required structure definitions and encode/decode routines can be found in section 7.

Version 1

  • DUMPALLMAPS_PROC (procedure 4)

  • DUMPALLMAPSEX_PROC (procedure 6)

Version 2

  • DUMPALLMAPS_PROC (procedure 4)

  • DUMPALLMAPSEX_PROC (procedure 6)

  • DUMPALLMAPSW_PROC (procedure 10)

  • DUMPALLMAPSEXW_PROC (procedure 11)

     const MAXNAMELEN = 128;
     const MAXNAMELENx2 = 256;
     const MAXLINELEN = 256;
     const MAXLINELENx2 = 512;
     const MAXGIDS = 32;
     const MAXSIDLEN = 72;
      
     typedef opaque MapSvrMBCSNameString<MAXNAMELEN>;
     typedef opaque MapSvrUnicodeNameString<MAXNAMELENx2>;
     typedef opaque MapSvrMBCSWindowsNameString<MAXLINELEN>;
     typedef opaque MapSvrUnicodeWindowsNameString<MAXLINELENx2>;
     typedef opaque MapSvrMBCSMapString<MAXLINELEN>;
     typedef opaque MapSvrUnicodeMapString<MAXLINELENx2>;
      
     struct unix_account {
         long SearchOption;
         long Reserved;
         long ID;
         MapSvrMBCSNameString UnixAccountName;
     };
      
     struct unix_accountW {
         long SearchOption;
         long Reserved;
         long ID;
         MapSvrUnicodeNameString UnixAccountName;
     };
      
     struct unix_user_auth {
         MapSvrMBCSNameString UnixUserAccountName;
         MapSvrMBCSNameString UnixUserAccountPassword;
     };
      
     struct unix_user_authW {
         MapSvrUnicodeNameString UnixUserAccountName;
         MapSvrUnicodeNameString UnixUserAccountPassword;
     };
      
     struct windows_creds {
         long Status;
         long Reserved;
         MapSvrMBCSWindowsNameString WindowsAccountName;
     };
      
     struct windows_credsW {
         long Status;
         long Reserved;
         MapSvrUnicodeWindowsNameString WindowsAccountName;
     };
      
     struct windows_account {
         MapSvrMBCSNameString WindowsAccountName;
     };
      
     struct windows_accountW {
         MapSvrUnicodeNameString WindowsAccountName;
     };
      
     struct unix_auth {
         MapSvrMBCSNameString UnixAccountPassword;
         long ID;
         long GIDArray<MAXGIDS>;
     };
      
     struct unix_authW {
         MapSvrUnicodeNameString UnixAccountPassword;
         long ID;
         long GIDArray<MAXGIDS>;
     };
      
     struct unix_creds {
         MapSvrMBCSNameString UnixAccountName;
         long ID;
         long GIDArray<MAXGIDS>;
     };
      
     struct unix_credsW {
         MapSvrUnicodeNameString UnixAccountName;
         long ID;
         long GIDArray<MAXGIDS>;
     };
      
     struct dump_map_req {
         long PrincipalType;
         long MapRecordIndex;
     };
      
     struct sequence_number {
         long CurrentVersionTokenLowPart;
         long CurrentVersionTokenHighPart;
     };
      
     struct mapping_record {
         MapSvrMBCSNameString WindowsAccountName;
         MapSvrMBCSNameString UnixAccountName;
         long ID;
     };
      
     struct sid {
         char SID<MAXSIDLEN>;
     };
      
     struct mapping_recordW {
         MapSvrUnicodeNameString WindowsAccountName;
         MapSvrUnicodeNameString UnixAccountName;
         long ID;
     };
      
     program MAPPROG {
         version MAPVERS_V1 {
             void 
             MAPPROC_NULL(void) = 0;
      
             windows_creds 
             GETWINDOWSCREDSFROMUNIXUSERNAME_PROC(unix_account)= 1;
      
             unix_creds
             GETUNIXCREDSFROMNTUSERNAME_PROC(windows_account) = 2;
      
             unix_auth
             AUTHUSINGUNIXCREDS_PROC(unix_user_auth) = 3;
      
             sequence_number
             GETCURRENTVERSIONTOKEN_PROC(sequence_number)  = 5;
      
             windows_creds 
             GETWINDOWSGROUPFROMUNIXGROUPNAME_PROC(unix_account)= 7;
      
             unix_creds
             GETUNIXCREDSFROMNTGROUPNAME_PROC(windows_account) = 8;
         } = 1;
     } = 351455;
      
     program MAPPROG {
         version MAPVERS_V2 {
      
             void 
             MAPPROC_NULL(void) = 0;
      
             windows_creds 
             GETWINDOWSCREDSFROMUNIXUSERNAME_PROC(unix_account)= 1;
      
             unix_creds
             GETUNIXCREDSFROMNTUSERNAME_PROC(windows_account)  = 2;
      
             unix_auth
             AUTHUSINGUNIXCREDS_PROC(unix_user_auth)   = 3;
      
             sequence_number
             GETCURRENTVERSIONTOKEN_PROC(sequence_number)  = 5;
      
             windows_creds
             GETWINDOWSGROUPFROMUNIXGROUPNAME_PROC(unix_account)= 7;
      
             unix_creds
             GETUNIXCREDSFROMNTGROUPNAME_PROC(windows_account) = 8;
      
             unix_creds
             GETUNIXCREDSFROMNTUSERSID_PROC(sid) = 9;
      
             windows_credsW 
             GETWINDOWSUSERFROMUNIXUSERNAMEW_PROC(unix_accountW)=12; 
      
             unix_credsW
             GETUNIXCREDSFROMNTUSERNAMEW_PROC(windows_accountW)= 13;
      
             unix_authW
             AUTHUSINGUNIXCREDSW_PROC(unix_user_authW) = 14;
      
             windows_credsW 
             GETWINDOWSGROUPFROMUNIXGROUPNAMEW_PROC(unix_accountW)= 15;
      
             unix_credsW
             GETUNIXCREDSFROMNTGROUPNAMEW_PROC(windows_accountW) = 16;
      
             unix_credsW
             GETUNIXCREDSFROMNTUSERSIDW_PROC(sid) = 17;
         } = 2;
     } = 351455;