Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Basic Library #5

Open
5 tasks
watfordjc opened this issue Mar 29, 2022 · 0 comments
Open
5 tasks

Create a Basic Library #5

watfordjc opened this issue Mar 29, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@watfordjc
Copy link
Owner

watfordjc commented Mar 29, 2022

Feature Branch

Current feature branch for this issue: not created yet.

Progress

  • Create a C/C++ Windows DLL project within this solution/repository.
  • Implement the following Win32/LTO-Encryption-SPTI functions and export them.
    • HANDLE GetTapeDriveHandle(char* tapeDrivePath)
    • BOOL QueryPropertyForDevice(Handle deviceHandle, ...) (get device serial number, maybe make PSTORAGE_DEVICE_DESCRIPTOR an OUT parameter)
  • P/Invoke the functions in LTO-Encryption-Manager, call the functions, and append the serial number to the drive's name.

Background

LTO-Encryption-SPTI is currently a linear Win32 C application.

LTO-Encryption-Manager has now reached the point where it needs to use SPTI.

The goal of this issue is to implement the most basic functions as library functions, starting with opening a file descriptor for the tape drive, using a Win32 API to obtain the serial number and WWN/LUN, and then closing the file descriptor.

The Data Backups and Archiving Project contains this loosely related note:

Improve design of LTO-Encryption-SPTI

At the moment there is a lot of repetitive code, redundant code leftover from the template, and the code isn't that clean.
There is also a lot of debugging code and output and very little data being retained after it is queried.
The data in the SCSI VPDs, for example, are mostly burned into the drive's persistent non-volatile memory at the time of manufacture or during a firmware update.
Translate the SCSI pages into structured variables that can be referenced rather than doing the byte and bit stuff inline.

@watfordjc watfordjc added the enhancement New feature or request label Mar 29, 2022
@watfordjc watfordjc self-assigned this Mar 29, 2022
@watfordjc watfordjc removed their assignment Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant