iPXE
mlx_types_priv.h
Go to the documentation of this file.
00001 /*
00002  * types.h
00003  *
00004  *  Created on: Jan 18, 2015
00005  *      Author: maord
00006  */
00007 
00008 #ifndef A_MLXUTILS_INCLUDE_PUBLIC_TYPES_H_
00009 #define A_MLXUTILS_INCLUDE_PUBLIC_TYPES_H_
00010 #include <stdint.h>
00011 //#include <errno.h>
00012 #include <ipxe/pci.h>
00013 
00014 #define MLX_SUCCESS 0
00015 #define MLX_OUT_OF_RESOURCES (-1)
00016 //(-ENOMEM)
00017 #define MLX_INVALID_PARAMETER (-2)
00018 //(-EINVAL)
00019 #define MLX_UNSUPPORTED (-3)
00020 //(-ENOSYS)
00021 #define MLX_NOT_FOUND (-4)
00022 
00023 #define MLX_FAILED (-5)
00024 
00025 #undef TRUE
00026 #define TRUE    1
00027 #undef FALSE
00028 #define FALSE   !TRUE
00029 
00030 typedef int mlx_status;
00031 
00032 typedef uint8_t         mlx_uint8;
00033 typedef uint16_t        mlx_uint16;
00034 typedef uint32_t        mlx_uint32;
00035 typedef uint64_t        mlx_uint64;
00036 typedef unsigned long   mlx_uintn;
00037 
00038 typedef int8_t          mlx_int8;
00039 typedef int16_t         mlx_int16;;
00040 typedef int32_t         mlx_int32;
00041 typedef int64_t         mlx_int64;
00042 typedef uint8_t         mlx_boolean;
00043 
00044 typedef struct pci_device       mlx_pci;
00045 
00046 typedef size_t          mlx_size;
00047 
00048 typedef void            mlx_void;
00049 
00050 #define MAC_ADDR_LEN 6
00051 typedef unsigned long   mlx_physical_address;
00052 typedef union {
00053         struct {
00054                 uint32_t low;
00055                 uint32_t high;
00056         } __attribute__ (( packed ));
00057         uint8_t addr[MAC_ADDR_LEN];
00058 } mlx_mac_address;
00059 
00060 #endif /* A_MLXUTILS_INCLUDE_PUBLIC_TYPES_H_ */