SUPR0IdcClient.c revision e64031e20c39650a7bc902a3e1aba613b9415dee
2N/A * VirtualBox Support Driver - IDC Client Lib, Core. 2N/A * Copyright (C) 2008 Oracle Corporation 2N/A * This file is part of VirtualBox Open Source Edition (OSE), as 2N/A * you can redistribute it and/or modify it under the terms of the GNU 2N/A * General Public License (GPL) as published by the Free Software 2N/A * Foundation, in version 2 as it comes in the "COPYING" file of the 2N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 2N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 2N/A * The contents of this file may alternatively be used under the terms 2N/A * of the Common Development and Distribution License Version 1.0 2N/A * (CDDL) only, as it comes in the "COPYING.CDDL" file of the 2N/A * VirtualBox OSE distribution, in which case the provisions of the 2N/A * CDDL are applicable instead of those of the GPL. 2N/A * You may elect to license modified versions of this file under the 2N/A * terms and conditions of either the GPL or the CDDL or both. 2N/A/******************************************************************************* 2N/A*******************************************************************************/ 2N/A/******************************************************************************* 2N/A*******************************************************************************/ * Opens the IDC interface of the support driver. * This will perform basic version negotiations and fail if the * minmum requirements aren't met. * @returns VBox status code. * @param pHandle The handle structure (output). * @param uReqVersion The requested version. Pass 0 for default. * @param uMinVersion The minimum required version. Pass 0 for default. * @param puSessionVersion Where to store the session version. Optional. * @param puDriverVersion Where to store the session version. Optional. * @param puDriverRevision Where to store the SVN revision of the driver. Optional. * Validate and set failure return values. * Handle default version input and enforce minimum requirements made * The clients will pass defaults (0), and only in the case that some * special API feature was just added will they set an actual version. * So, this is the place where can easily enforce a minimum IDC version * on bugs and similar. It corresponds a bit to what SUPR3Init is * Setup the connect request packet and call the OS specific function. * We don't really trust anyone, make sure the returned * session and version values actually makes sense. * Closes a IDC connection established by SUPR0IdcOpen. * @returns VBox status code. * @param pHandle The IDC handle. * Catch closed handles and check that the session is valid. * Create the request and hand it to the OS specific code. * Get the SUPDRV session for the IDC connection. * This is for use with SUPDRV and component APIs that requires a valid * @returns The session handle on success, NULL if the IDC handle is invalid. * @param pHandle The IDC handle. * Looks up a IDC handle by session. * @returns The IDC handle on success, NULL on failure. * @param pSession The session to lookup.