nic_device.cpp

来自「一个非常漂亮的802.1x客户端源代码」· C++ 代码 · 共 43 行

CPP
43
字号
// NIC_Device.cpp: implementation of the NIC_Device class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Mento Supplicant.h"
#include "NIC_Device.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

NIC_Device::NIC_Device(CString SName, pcap_t* PHandle,
					   CString SDescription, CString SIP, byte BIP[4])
{
	m_sName = SName;
	m_pHandle = PHandle;
	m_sDescription = SDescription;
	m_sIP = SIP;
	m_pNext = NULL;
	for ( int i=0 ; i<4 ; i++ )
		m_bIP[i] = BIP[i];
}

NIC_Device::~NIC_Device()
{
	if ( m_pNext )
		delete m_pNext;
}

void NIC_Device::AddNext(NIC_Device *PNextNIC)
{
	if ( m_pNext == NULL )
		m_pNext = PNextNIC;
	else
		m_pNext->AddNext( PNextNIC );
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?