iPXE
xen-compat.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  * xen-compat.h
00003  *
00004  * Guest OS interface to Xen.  Compatibility layer.
00005  *
00006  * Permission is hereby granted, free of charge, to any person obtaining a copy
00007  * of this software and associated documentation files (the "Software"), to
00008  * deal in the Software without restriction, including without limitation the
00009  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
00010  * sell copies of the Software, and to permit persons to whom the Software is
00011  * furnished to do so, subject to the following conditions:
00012  *
00013  * The above copyright notice and this permission notice shall be included in
00014  * all copies or substantial portions of the Software.
00015  *
00016  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00017  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00018  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00019  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00020  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00021  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00022  * DEALINGS IN THE SOFTWARE.
00023  *
00024  * Copyright (c) 2006, Christian Limpach
00025  */
00026 
00027 #ifndef __XEN_PUBLIC_XEN_COMPAT_H__
00028 #define __XEN_PUBLIC_XEN_COMPAT_H__
00029 
00030 FILE_LICENCE ( MIT );
00031 
00032 #define __XEN_LATEST_INTERFACE_VERSION__ 0x00040400
00033 
00034 #if defined(__XEN__) || defined(__XEN_TOOLS__)
00035 /* Xen is built with matching headers and implements the latest interface. */
00036 #define __XEN_INTERFACE_VERSION__ __XEN_LATEST_INTERFACE_VERSION__
00037 #elif !defined(__XEN_INTERFACE_VERSION__)
00038 /* Guests which do not specify a version get the legacy interface. */
00039 #define __XEN_INTERFACE_VERSION__ 0x00000000
00040 #endif
00041 
00042 #if __XEN_INTERFACE_VERSION__ > __XEN_LATEST_INTERFACE_VERSION__
00043 #error "These header files do not support the requested interface version."
00044 #endif
00045 
00046 #endif /* __XEN_PUBLIC_XEN_COMPAT_H__ */