#include "smbios/config/auto_link.hpp"
#include <stdio.h>
Go to the source code of this file.
Defines | |
#define | SMBIOSEXCEPTION 0x01 |
#define | SMBIOSPARSEEXCEPTION 0x02 |
#define | SMBIOSITEMDATAOUTOFBOUNDS 0x03 |
#define | SMBIOSITEMSTRINGUNAVAILABLE 0x04 |
#define | SMBIOSPERMISSIONEXCEPTION 0x05 |
#define | SMBIOSPARAMETEREXCEPTION 0x06 |
#define | INTERNALERROR 0x07 |
#define | NOTIMPLEMENTED 0x08 |
Functions | |
const char * | SMBIOSGetLibraryVersionString () |
Return a string representing the version of the libsmbios library. | |
int | SMBIOSGetDellSystemId () |
Return the Dell System ID Byte or Word. | |
const char * | SMBIOSGetSystemName () |
Return a buffer containing the System Name. | |
const char * | SMBIOSGetBiosVersion () |
Return a buffer containing the BIOS version string. | |
const char * | SMBIOSGetAssetTag () |
Returns the 10 character Dell Asset Tag. | |
const char * | SMBIOSGetServiceTag () |
Returns the 5 or 7 character Dell Service Tag. | |
void | SMBIOSFreeMemory (const char *) |
Free memory allocated by libsmbios. | |
const char * | SMBIOSGetSysInfoErrorString () |
int | SMBIOSHasBootToUp () |
int | SMBIOSGetBootToUp () |
void | SMBIOSSetBootToUp (int state) |
int | SMBIOSHasNvramStateBytes () |
int | SMBIOSGetNvramStateBytes (int user) |
void | SMBIOSSetNvramStateBytes (int value, int user) |
void | SMBIOSMapAsciiTo_en_US_ScanCode (char *outputScanCodeBuf, const char *inputAsciiBuf, size_t outputBufSize) |
int | SMBIOSGetSmiPasswordCoding () |
int | SMBIOSIsDellSystem () |
const char * | SMBIOSGetVendorName () |
int | SMBIOSSetServiceTag (const char *password, const char *newTag, size_t len) |
Set the 5 or 7 character Dell Service Tag. | |
int | SMBIOSSetAssetTag (const char *password, const char *newTag, size_t len) |
Set the Dell Asset Tag. |
#define INTERNALERROR 0x07 |
Definition at line 35 of file SystemInfo.h.
#define NOTIMPLEMENTED 0x08 |
Definition at line 36 of file SystemInfo.h.
#define SMBIOSEXCEPTION 0x01 |
Definition at line 29 of file SystemInfo.h.
#define SMBIOSITEMDATAOUTOFBOUNDS 0x03 |
Definition at line 31 of file SystemInfo.h.
#define SMBIOSITEMSTRINGUNAVAILABLE 0x04 |
Definition at line 32 of file SystemInfo.h.
#define SMBIOSPARAMETEREXCEPTION 0x06 |
Definition at line 34 of file SystemInfo.h.
#define SMBIOSPARSEEXCEPTION 0x02 |
Definition at line 30 of file SystemInfo.h.
#define SMBIOSPERMISSIONEXCEPTION 0x05 |
Definition at line 33 of file SystemInfo.h.
void SMBIOSFreeMemory | ( | const char * | ) |
Free memory allocated by libsmbios.
This function must be called to free memory for any function that allocates memory on behalf of its caller.
Definition at line 207 of file System.cpp.
Referenced by safeConvertToString(), and testPlatform::testSystemInfo().
const char* SMBIOSGetAssetTag | ( | ) |
Returns the 10 character Dell Asset Tag.
Allocates a buffer on behalf of the caller. Caller must use the freeMemory() function call to free this memory when finished.
Definition at line 568 of file System.cpp.
References _, stripString(), and SysInfoException.
Referenced by testPlatform::testAssetTag(), and testPlatform::testSystemInfo().
const char* SMBIOSGetBiosVersion | ( | ) |
Return a buffer containing the BIOS version string.
Allocates a buffer on behalf of the caller. Caller must use the freeMemory() function call to free this memory when finished.
Definition at line 783 of file System.cpp.
References _, stripString(), and SysInfoException.
Referenced by testPlatform::testBiosVersion(), and testPlatform::testSystemInfo().
int SMBIOSGetBootToUp | ( | ) |
Definition at line 1077 of file System.cpp.
References upBootHelper().
Referenced by testPlatform::testUpBoot().
int SMBIOSGetDellSystemId | ( | ) |
Return the Dell System ID Byte or Word.
The Dell System ID is a unique number allocated to each Dell System (server, desktop, workstation, or laptop) that uniquely identifies that system within Dell's product line.
Definition at line 198 of file IdByte.cpp.
References _, and SysInfoException.
Referenced by couldBeDiamond(), testPlatform::testIdByte(), and testPlatform::testSystemInfo().
const char* SMBIOSGetLibraryVersionString | ( | ) |
Return a string representing the version of the libsmbios library.
Returns the current version of the SMBIOS library as a string
Definition at line 201 of file System.cpp.
References LIBSMBIOS_RELEASE_VERSION.
Referenced by testStandalone::testLibraryVersion().
int SMBIOSGetNvramStateBytes | ( | int | user | ) |
Definition at line 870 of file System.cpp.
References _, TokenTableFactory::getFactory(), TokenTableFactory::getSingleton(), NvramByte1_Token, NvramByte2_Token, and SysInfoException.
Referenced by testPlatform::testStateBytes().
const char* SMBIOSGetServiceTag | ( | ) |
Returns the 5 or 7 character Dell Service Tag.
Allocates a buffer on behalf of the caller. Caller must use the freeMemory() function call to free this memory when finished.
Definition at line 356 of file System.cpp.
References _, DCOUT, stripString(), and SysInfoException.
Referenced by testPlatform::testServiceTag(), testPlatform::testServiceTagWriting(), and testPlatform::testSystemInfo().
int SMBIOSGetSmiPasswordCoding | ( | ) |
returns password coding used in SMI calls 0 == unknown 1 == scan code 2 == ascii
Definition at line 1091 of file System.cpp.
References smi::getPasswordFormat().
const char* SMBIOSGetSysInfoErrorString | ( | ) |
This function returns the string error message raised by any of the SystemInfo functions
Definition at line 25 of file SysInfoError.cpp.
References SysInfoException.
const char* SMBIOSGetSystemName | ( | ) |
Return a buffer containing the System Name.
Allocates a buffer on behalf of the caller. Caller must use the freeMemory() function call to free this memory when finished.
Definition at line 706 of file System.cpp.
References _, stripString(), and SysInfoException.
Referenced by testPlatform::testSystemInfo(), and testPlatform::testSystemName().
const char* SMBIOSGetVendorName | ( | ) |
Allocates a buffer on behalf of the caller. Caller must use the freeMemory() function call to free this memory when finished.
Definition at line 812 of file System.cpp.
References _, getStringFromTable(), stripString(), SysInfoException, smbios::System_Information, and System_Information_Manufacturer_Offset.
Referenced by testPlatform::testSystemInfo().
int SMBIOSHasBootToUp | ( | ) |
Definition at line 1072 of file System.cpp.
References upBootHelper().
Referenced by testPlatform::testUpBoot().
int SMBIOSHasNvramStateBytes | ( | ) |
Definition at line 834 of file System.cpp.
References _, TokenTableFactory::getFactory(), TokenTableFactory::getSingleton(), NvramByte1_Token, NvramByte2_Token, and SysInfoException.
Referenced by testPlatform::testStateBytes().
int SMBIOSIsDellSystem | ( | ) |
Returns 0 if the system is not a Dell, 1 if it is.
Definition at line 127 of file SystemDetect.cpp.
References _, DellDetectionFunctions, and SysInfoException.
Referenced by testPlatform::testIsDell(), and testPlatform::testSystemInfo().
void SMBIOSMapAsciiTo_en_US_ScanCode | ( | char * | outputScanCodeBuf, | |
const char * | inputAsciiBuf, | |||
size_t | outputBufSize | |||
) |
Copies chars from inputbuf to outputbuf, changing to scan-codes from ascii. buffers must be pre-allocated.
Definition at line 296 of file ascii2enUS_scancode.cpp.
References ascMap.
int SMBIOSSetAssetTag | ( | const char * | password, | |
const char * | newTag, | |||
size_t | len | |||
) |
Set the Dell Asset Tag.
The Dell Asset Tag is displayed in BIOS and is also contained in SMBIOS. This tag can generally be up to 10 chars long. There are SMI and CMOS methods to set this tag. At present, only CMOS access method is implemented in libsmbios. This works across all Dell hardware that the author is aware of.
User of the system can use this field to store any user-defined data. Dell BIOS/support/etc does not utilize this value.
Definition at line 660 of file System.cpp.
References _, biosPassword, and SysInfoException.
Referenced by testPlatform::testAssetTag().
void SMBIOSSetBootToUp | ( | int | state | ) |
Definition at line 1084 of file System.cpp.
References upBootHelper().
Referenced by testPlatform::testUpBoot().
void SMBIOSSetNvramStateBytes | ( | int | value, | |
int | user | |||
) |
Definition at line 923 of file System.cpp.
References _, TokenTableFactory::getFactory(), TokenTableFactory::getSingleton(), NvramByte1_Token, NvramByte2_Token, and SysInfoException.
Referenced by testPlatform::testStateBytes().
int SMBIOSSetServiceTag | ( | const char * | password, | |
const char * | newTag, | |||
size_t | len | |||
) |
Set the 5 or 7 character Dell Service Tag.
The Dell Asset Tag is displayed in BIOS and is also contained in SMBIOS. This tag can generally be up to 7 chars long. There are SMI and CMOS methods to set this tag. At present, only CMOS access method is implemented in libsmbios. This works across all Dell hardware that the author is aware of.
WARNING! The Dell Service Tag is very closely tied into the Dell support system. This tag should not be changed except under direction from Dell support.
Definition at line 466 of file System.cpp.
References _, biosPassword, and SysInfoException.
Referenced by testPlatform::testServiceTagWriting().