home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lvmtlk12.zip / doc / lvmapi4.INF (.txt) < prev   
OS/2 Help File  |  2002-06-04  |  13KB  |  517 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. LVM Internal Types (lvm_type.h) ΓòÉΓòÉΓòÉ
  3.  
  4. Module: lvm_type.h
  5.  
  6. Description 
  7.  
  8. This module defines basic types used in the declaration of disk structures.  It 
  9. also defines data structures used for LVM "plugins". 
  10.  
  11. Most of the contents of this module are used by LVM internally, or when 
  12. creating extensions to LVM, and are not typically useful to the application 
  13. programmer. 
  14.  
  15. Header files included by lvm_type.h: 
  16.  
  17.  lvm_gbls.h     INTEGER16, INTEGER32, INTEGER, CARDINAL16, CARDINAL32, 
  18.                 CARDINAL, REAL32, REAL64, BYTE, BOOLEAN, TRUE, FALSE, ADDRESS 
  19.  
  20.  lvm_list.h     (Internal usage only) 
  21.  
  22.  
  23. ΓòÉΓòÉΓòÉ 1.1. Constants ΓòÉΓòÉΓòÉ
  24.  
  25. This section describes constants defined in lvm_type.h. 
  26.  
  27. The following define sets the maximum number of LVM classes for which 
  28. structures and storage will be reserved. 
  29.  
  30. #define MAXIMUM_LVM_CLASSES   3
  31.  
  32. #define MAXIMUM_LVM_INTERFACE_TYPES  3
  33.  
  34. The following define the default help indicies which must be supported by the 
  35. Help_Panel function.  NOTE:  Index values from 0 to 100 are reserved by LVM. 
  36. The Plugin may, for its own use, use any values above 100. 
  37.  
  38. #define HELP_PLUGIN_DESCRIPTION    0
  39.  
  40. The following define the maximum length of the names which can be used to 
  41. represent a feature in LVM.  The maximum name length for a feature is 30 
  42. characters plus the trailing NULL character.  For command line parsing, though, 
  43. a shorter name is preferable!  Thus, the "short" name for a feature will be 
  44. limited to 10 characters plus the trailing NULL character.  The "short" name 
  45. will be used for command line purposes, while the regular name will be used by 
  46. all other interfaces. 
  47.  
  48. #define MAX_FEATURE_NAME_LENGTH        31
  49. #define MAX_FEATURE_SHORT_NAME_LENGTH  11
  50. #define MAX_OEM_INFO_LENGTH           255
  51.  
  52. The following defines the TAG value used to identify an item of type 
  53. Feature_ID_Data in a DLIST. 
  54.  
  55. #define FEATURE_ID_DATA_TAG 354385972
  56.  
  57. #define LVM_TOKEN_TAG    28387473
  58.  
  59.  
  60. ΓòÉΓòÉΓòÉ 1.2. Type definitions ΓòÉΓòÉΓòÉ
  61.  
  62. This section describes typedef statements from lvm_type.h. 
  63.  
  64.  
  65. ΓòÉΓòÉΓòÉ 1.2.1. Disk structure types ΓòÉΓòÉΓòÉ
  66.  
  67. The following types are used in the declaration of disk structures. Disk 
  68. structures have a defined size and internal structure which must be matched 
  69. exactly. 
  70.  
  71.  
  72. ΓòÉΓòÉΓòÉ 1.2.1.1. QuadWord ΓòÉΓòÉΓòÉ
  73.  
  74. 8 bytes. 
  75.  
  76. #ifdef LONG_LONG_SUPPORTED
  77.  
  78. typedef long long QuadWord;
  79.  
  80. #else
  81.  
  82. typedef struct _QuadWord {
  83.     unsigned long  High32Bits;
  84.     unsigned long  Low32Bits;
  85. } QuadWord;
  86.  
  87. #endif
  88.  
  89.  
  90. ΓòÉΓòÉΓòÉ 1.2.1.2. DoubleWord ΓòÉΓòÉΓòÉ
  91.  
  92. 4 bytes. 
  93.  
  94. typedef unsigned long DoubleWord;
  95.  
  96.  
  97. ΓòÉΓòÉΓòÉ 1.2.1.3. Word ΓòÉΓòÉΓòÉ
  98.  
  99. 2 bytes. 
  100.  
  101. typedef short unsigned int Word;
  102.  
  103.  
  104. ΓòÉΓòÉΓòÉ 1.2.1.4. Byte ΓòÉΓòÉΓòÉ
  105.  
  106. 1 byte. 
  107.  
  108. typedef unsigned char Byte;
  109.  
  110.  
  111. ΓòÉΓòÉΓòÉ 1.2.1.5. Other types ΓòÉΓòÉΓòÉ
  112.  
  113. The following types are used internally by LVM. 
  114.  
  115. Define a Partition Sector Number.  A Partition Sector Number is relative to the 
  116. start of a partition.  The first sector in a partition is PSN 0. 
  117.  
  118. typedef unsigned long PSN;
  119.  
  120. Define a Logical Sector Number.  A Logical Sector Number is relative to the 
  121. start of a volume.  The first sector in a volume is LSN 0. 
  122.  
  123. typedef unsigned long LSN;
  124.  
  125. Define a Logical Block Address.  A Logical Block Address is relative to the 
  126. start of a physical device - a disk drive.  The first sector on a disk drive is 
  127. LBA 0. 
  128.  
  129. typedef unsigned long LBA;
  130.  
  131.  
  132. ΓòÉΓòÉΓòÉ 1.2.2. Data structures ΓòÉΓòÉΓòÉ
  133.  
  134. These data structures are used in defining LVM Plugins. 
  135.  
  136.  
  137. ΓòÉΓòÉΓòÉ 1.2.2.1. LVM_Classes ΓòÉΓòÉΓòÉ
  138.  
  139. The following enum defines the various LVM classes to which a "feature" may 
  140. belong.  An LVM Plugin is used to implement a "feature", so "plugin" and 
  141. "feature" are really synonyms. 
  142.  
  143. typedef enum _LVM_Classes {
  144.     Partition_Class,
  145.     Aggregate_Class,
  146.     Volume_Class
  147. } LVM_Classes;
  148.  
  149.  
  150. ΓòÉΓòÉΓòÉ 1.2.2.2. LVM_Class_Attributes ΓòÉΓòÉΓòÉ
  151.  
  152. An LVM plugin may belong to one or more classes.  For each class to which it 
  153. belongs, certain attributes must be defined.  This structure tracks those 
  154. attributes for a class. 
  155.  
  156. typedef struct _LVM_Class_Attributes {
  157.     BOOLEAN      ClassMember;
  158.     BOOLEAN      GlobalExclusive;
  159.     BOOLEAN      TopExclusive;
  160.     BOOLEAN      BottomExclusive;
  161.     BOOLEAN      ClassExclusive;
  162.     CARDINAL32   Weight_Factor;
  163. } LVM_Class_Attributes;
  164.  
  165.  
  166. ΓòÉΓòÉΓòÉ 1.2.2.3. LVM_Interface_Types ΓòÉΓòÉΓòÉ
  167.  
  168. The following enum specifies the interface types that LVM supports, and hence 
  169. any plugin must support. 
  170.  
  171. typedef enum _LVM_Interface_Types {
  172.     PM_Interface,
  173.     VIO_Interface,
  174.     Java_Interface,
  175. } LVM_Interface_Types;
  176.  
  177. MAXIMUM_LVM_INTERFACE_TYPES is defined under 'Constants'. 
  178.  
  179.  
  180. ΓòÉΓòÉΓòÉ 1.2.2.4. Interface support structures ΓòÉΓòÉΓòÉ
  181.  
  182. The following structures define what functions must be supported for each 
  183. interface type. 
  184.  
  185. typedef struct _LVM_OS2_Native_Support {
  186.     void (* _System Create_and_Configure) ( CARDINAL32 ID,
  187.                                             ADDRESS InputBuffer,
  188.                                             CARDINAL32 InputBufferSize,
  189.                                             ADDRESS * OutputBuffer,
  190.                                             CARDINAL32 * OutputBufferSize,
  191.                                             CARDINAL32 * Error_Code );
  192.     void (* _System Display_Status) ( ADDRESS Volume_Handle,
  193.                                       CARDINAL32 * Error_Code );
  194.     void (* _System Control_Panel) ( ADDRESS Volume_Handle,
  195.                                      CARDINAL32 * Error_Code );
  196.     void (* _System Help_Panel) ( CARDINAL32 Help_Index,
  197.                                   CARDINAL32 * Error_Code );
  198. } LVM_OS2_Native_Support;
  199.  
  200.  
  201. typedef struct _LVM_Interface_Support {
  202.     BOOLEAN Interface_Supported;
  203.     union {
  204.         char *                  Java_Interface_Class;
  205.         LVM_OS2_Native_Support  VIO_PM_Calls;
  206.     };
  207. } LVM_Interface_Support;
  208.  
  209.  
  210. ΓòÉΓòÉΓòÉ 1.2.2.5. Feature_ID_Data ΓòÉΓòÉΓòÉ
  211.  
  212. The following definitions are used to control and access the various "features" 
  213. available through the LVM Engine, such as Drive Linking and BBR. 
  214.  
  215. typedef struct _Feature_ID_Data {
  216.     char                   Name[ MAX_FEATURE_NAME_LENGTH ];
  217.     char                   Short_Name[ MAX_FEATURE_SHORT_NAME_LENGTH ];
  218.     char                   OEM_Info[ MAX_OEM_INFO_LENGTH ];
  219.     CARDINAL32             ID;
  220.     CARDINAL32             Major_Version_Number;
  221.     CARDINAL32             Minor_Version_Number;
  222.     CARDINAL32             LVM_Major_Version_Number;
  223.     CARDINAL32             LVM_Minor_Version_Number;
  224.     LVM_Classes            Preferred_Class;
  225.     LVM_Class_Attributes   ClassData[ MAXIMUM_LVM_CLASSES ];
  226.     LVM_Interface_Support  Interface_Support[ MAXIMUM_LVM_INTERFACE_TYPES ];
  227. } Feature_ID_Data;
  228.  
  229.  
  230. ΓòÉΓòÉΓòÉ 1.2.2.6. Token definitions ΓòÉΓòÉΓòÉ
  231.  
  232. The following definitions are used for command line processing.  As the command 
  233. line is processed, the command line is first broken up into tokens. Each token 
  234. has a "characterization", which indicates what the token is thought to be. 
  235.  
  236. typedef enum {
  237.     LVM_AcceptableCharsStr,
  238.     LVM_All,
  239.     LVM_BestFit,
  240.     LVM_BootDOS,
  241.     LVM_BootOS2,
  242.     LVM_Bootable,
  243.     LVM_CR,
  244.     LVM_CRI,
  245.     LVM_Compatibility,
  246.     LVM_Drive,
  247.     LVM_Existing,
  248.     LVM_Expand,
  249.     LVM_FS,
  250.     LVM_FirstFit,
  251.     LVM_Freespace,
  252.     LVM_FromEnd,
  253.     LVM_FromLargest,
  254.     LVM_FromSmallest,
  255.     LVM_FromStart,
  256.     LVM_LVM,
  257.     LVM_LastFit,
  258.     LVM_Logical,
  259.     LVM_New,
  260.     LVM_NoBoot,
  261.     LVM_NonBootable,
  262.     LVM_NotBootable,
  263.     LVM_Partition,
  264.     LVM_Primary,
  265.     LVM_RB,
  266.     LVM_Size,
  267.     LVM_Unusable,
  268.     LVM_Unused,
  269.     LVM_Volume,
  270.     LVM_Volumes,
  271.     LVM_Comma,
  272.     LVM_Number,
  273.     LVM_Colon,
  274.     LVM_Space,
  275.     LVM_Tab,
  276.     LVM_MultiSpace,
  277.     LVM_MultiTab,
  278.     LVM_String,
  279.     LVM_FileNameStr,
  280.     LVM_SemiColon,
  281.     LVM_Eof,
  282.     LVM_Separator,
  283.     LVM_Open_Paren,
  284.     LVM_Close_Paren,
  285.     LVM_Open_Bracket,
  286.     LVM_Close_Bracket,
  287.     LVM_Open_Brace,
  288.     LVM_Close_Brace,
  289.     LVM_EQ_Sign,
  290.     LVM_Bootmgr,
  291.     LVM_Create,
  292.     LVM_Delete,
  293.     LVM_DriveLetter,
  294.     LVM_File,
  295.     LVM_Hide,
  296.     LVM_Install,
  297.     LVM_NewMBR,
  298.     LVM_Query,
  299.     LVM_RediscoverPRM,
  300.     LVM_SetName,
  301.     LVM_SetStartable,
  302.     LVM_SI,
  303.     LVM_SlashSize,
  304.     LVM_StartLog
  305. } Token_Characterizations;
  306.  
  307.  
  308. typedef struct _LVM_Token{
  309.     char *                   TokenText;
  310.     Token_Characterizations  TokenType;
  311.     CARDINAL32               Position;
  312. } LVM_Token;
  313.  
  314.  
  315. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  316.  
  317. For "features" which must operate on a partition level - i.e. Bad Block 
  318. Relocation. 
  319.  
  320.  
  321. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  322.  
  323. For "features" which combine partitions into a single logical entity - i.e. 
  324. Drive Linking. 
  325.  
  326.  
  327. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  328.  
  329. For "features" which operate best on a volume level - i.e. encryption, 
  330. mirroring etc. 
  331.  
  332.  
  333. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  334.  
  335. TRUE if a member of this class, FALSE otherwise. 
  336.  
  337.  
  338. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  339.  
  340. TRUE if this plugin can not work with any other plugin - i.e. it must be the 
  341. only "feature" on the volume, besides the built in feature of BBR. 
  342.  
  343.  
  344. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  345.  
  346. TRUE if this plugin must be the topmost plugin in this class. 
  347.  
  348.  
  349. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  350.  
  351. TRUE if this plugin must be the bottommost plugin in this class. 
  352.  
  353.  
  354. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  355.  
  356. TRUE if this plugin will not work with any other plugin in this class. 
  357.  
  358.  
  359. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  360.  
  361. A value between 1 and 100 which is used to guide the LVM interfaces when 
  362. attempting to establish a default ordering for plugins within this class.  A 
  363. value of 1 indicates that this plugin wants to be as close to the bottom of the 
  364. plugins in this class as possible.  A value of 100 means that this plugin wants 
  365. to be as close to being the topmost plugin in this class as possible.  This 
  366. value is only used if none of the "exclusive" flags are set. 
  367.  
  368.  
  369. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  370.  
  371. LVM.EXE is a VIO app. since it is used during install, and during recovery 
  372. scenarios where PM/Java may not be available. 
  373.  
  374.  
  375. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  376.  
  377. The LVM GUI is written in Java. 
  378.  
  379.  
  380. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  381.  
  382. Native OS/2 
  383.  
  384.  
  385. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  386.  
  387. Native OS/2 
  388.  
  389.  
  390. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  391.  
  392. Native OS/2 
  393.  
  394.  
  395. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  396.  
  397. Native OS/2 
  398.  
  399.  
  400. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  401.  
  402. Java 
  403.  
  404.  
  405. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  406.  
  407. VIO/PM 
  408.  
  409.  
  410. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  411.  
  412. Feature Name, for use in menus and command line parsing. 
  413.  
  414.  
  415. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  416.  
  417. The name/code used to represent this feature during command line parsing. 
  418.  
  419.  
  420. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  421.  
  422. Name and copyright info. of the manufacturer, i.e. IBM, Vinca, etc. 
  423.  
  424.  
  425. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  426.  
  427. Numeric Feature ID. 
  428.  
  429.  
  430. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  431.  
  432. The version number of this feature. 
  433.  
  434.  
  435. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  436.  
  437. The version number of this feature. 
  438.  
  439.  
  440. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  441.  
  442. The version of LVM that this feature was designed to work with. 
  443.  
  444.  
  445. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  446.  
  447. The version of LVM that this feature was designed to work with. 
  448.  
  449.  
  450. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  451.  
  452. The class from which this "feature" prefers to be chosen.  Encryption can be 
  453. performed at the partition level or the volume level, and may therefore belong 
  454. to both the Partition_Class and the Volume_Class.  However, it is preferrable 
  455. for it to be used on the volume level instead of at the partition level.  Thus, 
  456. its perferred class would be the Volume_Class, but it would still be a member 
  457. of both the Volume_Class and the Partition_Class. 
  458.  
  459.  
  460. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  461.  
  462. The attributes for each of the LVM classes that this "feature" is in. 
  463.  
  464.  
  465. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  466.  
  467. The functions and classes for each of the video modes that LVM can run it. 
  468.  
  469.  
  470. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  471.  
  472.  
  473.  
  474. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  475.  
  476.  
  477.  
  478. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  479.  
  480.  
  481.  
  482. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  483.  
  484.  
  485.  
  486. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  487.  
  488.  
  489.  
  490. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  491.  
  492.  
  493.  
  494. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  495.  
  496.  
  497.  
  498. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  499.  
  500. The actual text of the token. 
  501.  
  502.  
  503. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  504.  
  505. What the token is thought to be. 
  506.  
  507.  
  508. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  509.  
  510. The position of the first character of the token on the command line.