|
OSAPI
0.29
Open System API
|
The machine management module. More...

Functions | |
| t_status | internal_cpu_amd_getFeatures (uint32_t featLevel, t_cpu_feature_list *p_list) |
| Obtain the AMD CPU available features/functions. More... | |
| t_status | internal_cpu_intel_getFeatures (uint32_t featLevel, t_cpu_feature_list *p_list) |
| Obtain the Intel CPU available features/functions. More... | |
| t_status | machine_module_supported (void) |
| Declares if the module is supported on the current implementation. More... | |
| t_status | machine_cpu_getArch (const char **arch) |
| Retrieve the target (compiled) CPU architecture. More... | |
| t_status | machine_cpu_getSummary (t_cpu_summary *summary) |
| Obtain summary information about machine CPUs. More... | |
| t_status | machine_cpu_getInfo (t_cpu *info) |
| Obtain information about a machine CPU. More... | |
| t_status | machine_cpu_isFeatureAvailable (const t_cpu *cpu, unsigned int fid, bool *available) |
| Retrieve a name that corresponds to a feature ID. More... | |
| t_status | machine_cpu_id (uint32_t op, uint32_t param, t_cpu_regs *regs) |
| Execute a CPUID machine instruction Provides raw access to the underline CPUID instruction. More... | |
| t_status | machine_cpu_getEndian (t_cpu_endian *endian) |
| Retrieve the endianess of a CPU architecture. More... | |
| t_status | machine_cpu_getEndianString (const char **endian) |
| Retrieve the string describing the endianess of a CPU architecture. More... | |
| t_status | machine_cpuVendor_getName (t_size nsize, char **name) |
| Retrieve the CPU Vendor name. More... | |
| t_status | machine_cpuVendor_getNameFromId (uint16_t id, const char **name) |
| Retrieve the CPU Vendor name form the Vendor ID. More... | |
| t_status | machine_cpuVendor_getIDFromName (const char *name, int *id) |
| Retrieve the CPU Vendor Identification from a Vendors name. More... | |
| t_status | machine_cpuFeature_supports (void) |
| Check if the OSAPI library or the CPU supports features. More... | |
| t_status | machine_cpuFeature_getAll (t_cpu_feature_list *list) |
| Retrieval all supported CPU features. More... | |
| t_status | machine_cpuFeature_isAvailable (const t_cpu_feature_list *list, unsigned int id, bool *available) |
| Check if a feature is available in the feature list. More... | |
| t_status | machine_cpuFeature_getName (unsigned int fid, const char **name) |
| Retrieve a name that corresponds to a feature ID. More... | |
| t_status | machine_cpuFeature_getDescription (unsigned int fid, const char **desc) |
| Retrieve a descroption that corresponds to a feature ID. More... | |
| t_status | machine_cpuFeature_count (const t_cpu_feature_list *list, t_size *nfeatures) |
| Count number of available features in list. More... | |
| t_status | machine_cpuFeature_getListName (const t_cpu_feature_list *features, t_list *list) |
| Retrieve a list containing pointers to Feature Names. More... | |
| t_status | machine_cpuFeature_getListDescription (const t_cpu_feature_list *features, t_list *list) |
| Retrieve a list containing pointers to Feature Descriptions. More... | |
| t_status | machine_device_getNumber (t_size *number) |
| Obtain the number of machine devices. More... | |
| t_status | machine_device_getList (t_list *devList) |
| Get a list of machine devices. More... | |
| t_status | machine_domain_getName (t_size maxlen, t_char *domainname) |
| Get the machine domain name. More... | |
| t_status | machine_domain_setName (t_char *domainname) |
| Set the machine domain name. More... | |
| t_status | machine_host_getName (t_size maxlen, t_char *hostname) |
| Obtain the machine hostname. More... | |
| t_status | machine_host_setName (t_char *hostname) |
| Set the machine hostname. More... | |
| t_status | machine_ip_getNumber (t_protocol selector, t_size *number) |
| Obtain the number of IPs for the given protocol. More... | |
| t_status | machine_ip_getList (t_protocol selector, t_size number, t_ip *list) |
| Retrieves a list containing the machine IPs. More... | |
| t_status | machine_virtual_is (bool *result) |
| Is this process running inside a Virtual machine? More... | |
| t_status | machine_virtual_getInfo (t_vm *vm) |
| Obtain information about a virtual machine. More... | |
| t_status | machine_virtual_getVendor (t_vm *vm, char **vendor) |
| Obtain information about a virtual machine. More... | |
The machine management module.
| t_status internal_cpu_amd_getFeatures | ( | uint32_t | featLevel, |
| t_cpu_feature_list * | p_list | ||
| ) |
Obtain the AMD CPU available features/functions.
| [in] | featLevel | - The maximum feature level supported by the CPU |
| [out] | p_list | - List of supported CPU features |
| t_status internal_cpu_intel_getFeatures | ( | uint32_t | featLevel, |
| t_cpu_feature_list * | p_list | ||
| ) |
Obtain the Intel CPU available features/functions.
| [in] | featLevel | - The maximum feature level supported by the CPU |
| [out] | p_list | - List of supported CPU features |

| t_status machine_cpu_getArch | ( | const char ** | arch | ) |
Retrieve the target (compiled) CPU architecture.
| [out] | arch | - Name of CPU Architecture |
| t_status machine_cpu_getEndian | ( | t_cpu_endian * | endian | ) |
Retrieve the endianess of a CPU architecture.
| [out] | endian | - Get the CPU endianess |

| t_status machine_cpu_getEndianString | ( | const char ** | endian | ) |
Retrieve the string describing the endianess of a CPU architecture.
| [out] | endian | - Get the CPU endianess string |
Obtain information about a machine CPU.
| [out] | info | - CPU information |
| t_status machine_cpu_getSummary | ( | t_cpu_summary * | summary | ) |
Obtain summary information about machine CPUs.
| [out] | summary | - Machine CPU summary information |

| t_status machine_cpu_id | ( | uint32_t | op, |
| uint32_t | param, | ||
| t_cpu_regs * | regs | ||
| ) |
Execute a CPUID machine instruction Provides raw access to the underline CPUID instruction.
| [in] | op | - Specific operation to execute |
| [in] | param | - Parameter to the operation (If none, set it to 0) |
| [out] | regs | - List of CPU registers (machine architecture dependent) |
Retrieve a name that corresponds to a feature ID.
| [in] | cpu | - Machine CPU information |
| [in] | fid | - Feature ID |
| [out] | available | - True if available. False otherwise (Only if call is successful) |
| t_status machine_cpuFeature_count | ( | const t_cpu_feature_list * | list, |
| t_size * | nfeatures | ||
| ) |
Count number of available features in list.
| [in] | list | - A list of features |
| [out] | nfeatures | - Number of features found in list |
| t_status machine_cpuFeature_getAll | ( | t_cpu_feature_list * | list | ) |
Retrieval all supported CPU features.
| [out] | list | - A list to contain the CPU supported features |

| t_status machine_cpuFeature_getDescription | ( | unsigned int | fid, |
| const char ** | desc | ||
| ) |
Retrieve a descroption that corresponds to a feature ID.
| [in] | fid | - Item identifier |
| [out] | desc | - Feature description |
| t_status machine_cpuFeature_getListDescription | ( | const t_cpu_feature_list * | features, |
| t_list * | list | ||
| ) |
Retrieve a list containing pointers to Feature Descriptions.
| [in] | features | - The feature list |
| [out] | list | - A list of pointers to feature descriptions |
| t_status machine_cpuFeature_getListName | ( | const t_cpu_feature_list * | features, |
| t_list * | list | ||
| ) |
Retrieve a list containing pointers to Feature Names.
| [in] | features | - The feature list |
| [out] | list | - A list of pointers to feature names |
| t_status machine_cpuFeature_getName | ( | unsigned int | fid, |
| const char ** | name | ||
| ) |
Retrieve a name that corresponds to a feature ID.
| [in] | fid | - Feature ID |
| [out] | name | - Name of feature |
| t_status machine_cpuFeature_isAvailable | ( | const t_cpu_feature_list * | list, |
| unsigned int | id, | ||
| bool * | available | ||
| ) |
Check if a feature is available in the feature list.
| [in] | list | - List of available CPU features |
| [in] | id | - Feature ID |
| [out] | available | - True if available. False otherwise (Only if call is successful) |
| t_status machine_cpuFeature_supports | ( | void | ) |
Check if the OSAPI library or the CPU supports features.
| t_status machine_cpuVendor_getIDFromName | ( | const char * | name, |
| int * | id | ||
| ) |
Retrieve the CPU Vendor Identification from a Vendors name.
| [in] | name | - The Vendor name |
| [out] | id | - The Vendor ID |

Retrieve the CPU Vendor name.
| [in] | nsize | - The size of the buffer where the name will be stored |
| [out] | name | - The Vendor name |
| t_status machine_cpuVendor_getNameFromId | ( | uint16_t | id, |
| const char ** | name | ||
| ) |
Retrieve the CPU Vendor name form the Vendor ID.
| [in] | id | - The Vendor ID |
| [out] | name | - The Vendor name |
Get a list of machine devices.
| [out] | devList | - Device List |
Obtain the number of machine devices.
| [out] | number | - The count of devices reported by the OS |
Get the machine domain name.
| [in] | maxlen | - The size of C-String |
| [out] | domainname | - The name of the machine domain |
Set the machine domain name.
| [in] | domainname | - New domain name |
Obtain the machine hostname.
| [in] | maxlen | - The size of C-String |
| [out] | hostname | - The name of the machine |
Set the machine hostname.
| [in] | hostname | - New hostname |
| t_status machine_ip_getList | ( | t_protocol | selector, |
| t_size | number, | ||
| t_ip * | list | ||
| ) |
Retrieves a list containing the machine IPs.
| [in] | selector | - The IP protocol (IPv4/6 or all) |
| [in] | number | - The maximum size of the IP List |
| [out] | list | - The machine IPs |
| t_status machine_ip_getNumber | ( | t_protocol | selector, |
| t_size * | number | ||
| ) |
Obtain the number of IPs for the given protocol.
| [in] | selector | - The IP protocol (IPv4/6 or all) |
| [out] | number | - Number of machine IPs matching the selector |
| t_status machine_module_supported | ( | void | ) |
Declares if the module is supported on the current implementation.
Obtain information about a virtual machine.
| [out] | vm | - Virtual machine information |
Obtain information about a virtual machine.
| [in] | vm | - Virtual machine information |
| [out] | vendor | - The VM provider |
| t_status machine_virtual_is | ( | bool * | result | ) |
Is this process running inside a Virtual machine?
| [out] | result | - True if running in a VM. False otherwise. |