ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

main.c
Go to the documentation of this file.
00001 /*
00002  * COPYRIGHT:   See COPYING in the top level directory
00003  * PROJECT:     ReactOS NDIS library
00004  * FILE:        ndis/main.c
00005  * PURPOSE:     Driver entry point
00006  * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
00007  *              Vizzini (vizzini@plasmic.com)
00008  * REVISIONS:
00009  *   CSH 01/08-2000 Created
00010  *   20 Aug 2003 Vizzini - NDIS4/5 revisions
00011  *   3  Oct 2003 Vizzini - formatting and minor bugfixing
00012  */
00013 
00014 #include "ndissys.h"
00015 
00016 
00017 #if DBG
00018 
00019 /* See debug.h for debug/trace constants */
00020 ULONG DebugTraceLevel = MIN_TRACE;
00021 
00022 #endif /* DBG */
00023 
00024 LONG CancelId;
00025 
00026 
00027 VOID NTAPI MainUnload(
00028     PDRIVER_OBJECT DriverObject)
00029 /*
00030  * FUNCTION: Unloads the driver
00031  * ARGUMENTS:
00032  *     DriverObject = Pointer to driver object created by the system
00033  */
00034 {
00035   NDIS_DbgPrint(MAX_TRACE, ("Leaving.\n"));
00036 }
00037 
00038 
00039 NTSTATUS
00040 NTAPI
00041 DriverEntry(
00042     PDRIVER_OBJECT DriverObject,
00043     PUNICODE_STRING RegistryPath)
00044 /*
00045  * FUNCTION: Main driver entry point
00046  * ARGUMENTS:
00047  *     DriverObject = Pointer to a driver object for this driver
00048  *     RegistryPath = Registry node for configuration parameters
00049  * RETURNS:
00050  *     Status of driver initialization
00051  */
00052 {
00053   NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
00054 
00055   InitializeListHead(&ProtocolListHead);
00056   KeInitializeSpinLock(&ProtocolListLock);
00057 
00058   InitializeListHead(&MiniportListHead);
00059   KeInitializeSpinLock(&MiniportListLock);
00060 
00061   InitializeListHead(&AdapterListHead);
00062   KeInitializeSpinLock(&AdapterListLock);
00063 
00064   DriverObject->DriverUnload = MainUnload;
00065 
00066   CancelId = 0;
00067 
00068   return STATUS_SUCCESS;
00069 }
00070 
00071 
00072 /*
00073  * @implemented
00074  */
00075 VOID
00076 _cdecl
00077 NdisWriteErrorLogEntry(
00078     IN  NDIS_HANDLE     NdisAdapterHandle,
00079     IN  NDIS_ERROR_CODE ErrorCode,
00080     IN  ULONG           NumberOfErrorValues,
00081     ...)
00082 /*
00083  * FUNCTION: Write a syslog error
00084  * ARGUMENTS:
00085  *     NdisAdapterHandle:  Handle passed into MiniportInitialize
00086  *     ErrorCode:  32-bit error code to be logged
00087  *     NumberOfErrorValues: number of errors to log
00088  *     Variable: list of log items
00089  * NOTES:
00090  *     - THIS IS >CDECL<
00091  *     - This needs to be fixed to do var args
00092  *     - FIXME - this needs to be properly implemented once we have an event log
00093  */
00094 {
00095   NDIS_DbgPrint(MIN_TRACE, ("ERROR: ErrorCode 0x%x\n", ErrorCode));
00096   /* ASSERT(0); */
00097 }
00098 
00099 
00100 /*
00101  * @implemented
00102  */
00103 NDIS_STATUS
00104 EXPORT
00105 NdisWriteEventLogEntry(
00106     IN  PVOID       LogHandle,
00107     IN  NDIS_STATUS EventCode,
00108     IN  ULONG       UniqueEventValue,
00109     IN  USHORT      NumStrings,
00110     IN  PVOID       StringsList OPTIONAL,
00111     IN  ULONG       DataSize,
00112     IN  PVOID       Data        OPTIONAL)
00113 /*
00114  * FUNCTION: Log an event in the system event log
00115  * ARGUMENTS:
00116  *     LogHandle: pointer to the driver object of the protocol logging the event
00117  *     EventCode: NDIS_STATUS_XXX describing the event
00118  *     UniqueEventValue: identifiees this instance of the error value
00119  *     NumStrings: number of strings in StringList
00120  *     StringList: list of strings to log
00121  *     DataSize: number of bytes in Data
00122  *     Data: binary dump data to help analyzing the event
00123  * NOTES:
00124  *     - NTAPI, not CDECL like WriteError...
00125  *     - FIXME Needs to use the real log interface, once there is one
00126  */
00127 {
00128   /*
00129    * just returning true until we have an event log
00130    */
00131   NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
00132   return NDIS_STATUS_SUCCESS;
00133 }
00134 
00135 /* EOF */
00136 

Generated on Sun May 27 2012 04:16:44 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.