libsmbios_c library
smi.h
Go to the documentation of this file.
1// vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:
2/*
3 * Copyright (C) 2005 Dell Inc.
4 * by Michael Brown <Michael_E_Brown@dell.com>
5 * Licensed under the Open Software License version 2.1
6 *
7 * Alternatively, you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published
9 * by the Free Software Foundation; either version 2 of the License,
10 * or (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 * See the GNU General Public License for more details.
16 */
17
18#ifndef C_OBJ_SMI_H
19#define C_OBJ_SMI_H
20
21// include smbios_c/compat.h first
22#include "smbios_c/compat.h"
23#include "smbios_c/types.h"
24
26
27#define DELL_SMI_DEFAULTS 0x0000
28#define DELL_SMI_GET_SINGLETON 0x0001
29#define DELL_SMI_GET_NEW 0x0002
30#define DELL_SMI_UNIT_TEST_MODE 0x0004
31#define DELL_SMI_NO_ERR_CLEAR 0x0008
32
33struct dell_smi_obj;
34
35// construct
36LIBSMBIOS_C_DLL_SPEC struct dell_smi_obj *dell_smi_factory(int flags, ...);
37
38// destruct
39LIBSMBIOS_C_DLL_SPEC void dell_smi_obj_free(struct dell_smi_obj *);
40
41LIBSMBIOS_C_DLL_SPEC const char *dell_smi_obj_strerror(struct dell_smi_obj *);
42
43LIBSMBIOS_C_DLL_SPEC void dell_smi_obj_set_class(struct dell_smi_obj *, u16 );
44LIBSMBIOS_C_DLL_SPEC void dell_smi_obj_set_select(struct dell_smi_obj *, u16 );
45LIBSMBIOS_C_DLL_SPEC void dell_smi_obj_set_arg(struct dell_smi_obj *, u8 argno, u32 value);
46LIBSMBIOS_C_DLL_SPEC u32 dell_smi_obj_get_res(struct dell_smi_obj *, u8 argno);
47LIBSMBIOS_C_DLL_SPEC u8 *dell_smi_obj_make_buffer_frombios_auto(struct dell_smi_obj *, u8 argno, size_t size);
48LIBSMBIOS_C_DLL_SPEC u8 *dell_smi_obj_make_buffer_frombios_withheader(struct dell_smi_obj *, u8 argno, size_t size);
50LIBSMBIOS_C_DLL_SPEC u8 *dell_smi_obj_make_buffer_tobios(struct dell_smi_obj *, u8 argno, size_t size);
51LIBSMBIOS_C_DLL_SPEC int dell_smi_obj_execute(struct dell_smi_obj *);
52
54
55#endif /* C_SMI_H */
#define LIBSMBIOS_C_DLL_SPEC
Definition compat.h:48
#define EXTERN_C_BEGIN
Definition compat.h:55
#define EXTERN_C_END
Definition compat.h:56
LIBSMBIOS_C_DLL_SPEC void dell_smi_obj_set_select(struct dell_smi_obj *, u16)
LIBSMBIOS_C_DLL_SPEC void dell_smi_obj_set_class(struct dell_smi_obj *, u16)
LIBSMBIOS_C_DLL_SPEC u8 * dell_smi_obj_make_buffer_frombios_withheader(struct dell_smi_obj *, u8 argno, size_t size)
LIBSMBIOS_C_DLL_SPEC int dell_smi_obj_execute(struct dell_smi_obj *)
LIBSMBIOS_C_DLL_SPEC struct dell_smi_obj * dell_smi_factory(int flags,...)
LIBSMBIOS_C_DLL_SPEC const char * dell_smi_obj_strerror(struct dell_smi_obj *)
LIBSMBIOS_C_DLL_SPEC u32 dell_smi_obj_get_res(struct dell_smi_obj *, u8 argno)
LIBSMBIOS_C_DLL_SPEC void dell_smi_obj_set_arg(struct dell_smi_obj *, u8 argno, u32 value)
LIBSMBIOS_C_DLL_SPEC void dell_smi_obj_free(struct dell_smi_obj *)
LIBSMBIOS_C_DLL_SPEC u8 * dell_smi_obj_make_buffer_tobios(struct dell_smi_obj *, u8 argno, size_t size)
LIBSMBIOS_C_DLL_SPEC u8 * dell_smi_obj_make_buffer_frombios_withoutheader(struct dell_smi_obj *, u8 argno, size_t size)
LIBSMBIOS_C_DLL_SPEC u8 * dell_smi_obj_make_buffer_frombios_auto(struct dell_smi_obj *, u8 argno, size_t size)
unsigned int u32
Definition types.h:37
unsigned short u16
Definition types.h:33
unsigned char u8
Definition types.h:29