zcrypt_pcixcc.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * linux/drivers/s390/crypto/zcrypt_pcixcc.h
  3. *
  4. * zcrypt 2.1.0
  5. *
  6. * Copyright (C) 2001, 2006 IBM Corporation
  7. * Author(s): Robert Burroughs
  8. * Eric Rossman (edrossma@us.ibm.com)
  9. *
  10. * Hotplug & misc device support: Jochen Roehrig (roehrig@de.ibm.com)
  11. * Major cleanup & driver split: Martin Schwidefsky <schwidefsky@de.ibm.com>
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation; either version 2, or (at your option)
  16. * any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26. */
  27. #ifndef _ZCRYPT_PCIXCC_H_
  28. #define _ZCRYPT_PCIXCC_H_
  29. /**
  30. * CPRBX
  31. * Note that all shorts and ints are big-endian.
  32. * All pointer fields are 16 bytes long, and mean nothing.
  33. *
  34. * A request CPRB is followed by a request_parameter_block.
  35. *
  36. * The request (or reply) parameter block is organized thus:
  37. * function code
  38. * VUD block
  39. * key block
  40. */
  41. struct CPRBX {
  42. unsigned short cprb_len; /* CPRB length 220 */
  43. unsigned char cprb_ver_id; /* CPRB version id. 0x02 */
  44. unsigned char pad_000[3]; /* Alignment pad bytes */
  45. unsigned char func_id[2]; /* function id 0x5432 */
  46. unsigned char cprb_flags[4]; /* Flags */
  47. unsigned int req_parml; /* request parameter buffer len */
  48. unsigned int req_datal; /* request data buffer */
  49. unsigned int rpl_msgbl; /* reply message block length */
  50. unsigned int rpld_parml; /* replied parameter block len */
  51. unsigned int rpl_datal; /* reply data block len */
  52. unsigned int rpld_datal; /* replied data block len */
  53. unsigned int req_extbl; /* request extension block len */
  54. unsigned char pad_001[4]; /* reserved */
  55. unsigned int rpld_extbl; /* replied extension block len */
  56. unsigned char req_parmb[16]; /* request parm block 'address' */
  57. unsigned char req_datab[16]; /* request data block 'address' */
  58. unsigned char rpl_parmb[16]; /* reply parm block 'address' */
  59. unsigned char rpl_datab[16]; /* reply data block 'address' */
  60. unsigned char req_extb[16]; /* request extension block 'addr'*/
  61. unsigned char rpl_extb[16]; /* reply extension block 'addres'*/
  62. unsigned short ccp_rtcode; /* server return code */
  63. unsigned short ccp_rscode; /* server reason code */
  64. unsigned int mac_data_len; /* Mac Data Length */
  65. unsigned char logon_id[8]; /* Logon Identifier */
  66. unsigned char mac_value[8]; /* Mac Value */
  67. unsigned char mac_content_flgs;/* Mac content flag byte */
  68. unsigned char pad_002; /* Alignment */
  69. unsigned short domain; /* Domain */
  70. unsigned char pad_003[12]; /* Domain masks */
  71. unsigned char pad_004[36]; /* reserved */
  72. } __attribute__((packed));
  73. int zcrypt_pcixcc_init(void);
  74. void zcrypt_pcixcc_exit(void);
  75. #endif /* _ZCRYPT_PCIXCC_H_ */