Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

88 lines
1.8 KiB

// Copyright (c) 2001 Microsoft Corporation
//
// File: NetworkAdapterConfig.h
//
// Synopsis: Declares a NetworkAdapterConfig
// This object has the knowledge for installing
// using WMI to retrieve network adapter information
//
// History: 02/16/2001 JeffJon Created
#ifndef __CYS_NETWORKADAPTERCONFIG_H
#define __CYS_NETWORKADAPTERCONFIG_H
#include "NetworkInterface.h"
class NetworkAdapterConfig
{
public:
// Constructor
NetworkAdapterConfig();
// Destructor
~NetworkAdapterConfig();
// Initializer
HRESULT
Initialize();
// Pulic methods
unsigned int
GetNICCount() const;
NetworkInterface*
GetNIC(unsigned int nicIndex);
NetworkInterface*
GetNICFromName(
const String& name,
bool& found);
bool
IsInitialized() const { return initialized; }
void
SetLocalNIC(
const NetworkInterface& nic,
bool setInRegistry = false);
void
SetLocalNIC(
String guid,
bool setInRegistry = false);
NetworkInterface*
GetLocalNIC();
unsigned int
FindNIC(const String& guid, bool& found) const;
protected:
void
AddInterface(NetworkInterface* newInterface);
private:
void
SetLocalNICInRegistry(const NetworkInterface& nic);
bool initialized;
unsigned int nicCount;
int localNICIndex;
typedef
std::vector<
NetworkInterface*,
Burnslib::Heap::Allocator<NetworkInterface*> >
NetworkInterfaceContainer;
NetworkInterfaceContainer networkInterfaceContainer;
};
#endif // __CYS_NETWORKADAPTERCONFIG_H