⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stdafx.h

📁 pppoe client
💻 H
字号:

//**************************************************************************************
//	日期:	23:2:2004   
//	创建:	tiamo	
//	描述:	stdafx
//			here are some assumption,our driver will not be run at IRQL > DISPATCH_LEVEL
//			so that,even some functions can be run at IRQL > DISPATCH_LEVEL,we mark there
//			IRQL <= DISPATCH_LEVEL,you can check *.h file to see every functions's IRQL
//**************************************************************************************

#pragma once

extern "C"
{
	#define NDIS_TAPI_CURRENT_VERSION 0x00030000

	#include "ndis.h"
	#include "ndiswan.h"
	#include "ndistapi.h"
}

// ndis version
#define NDIS_MAJOR_VERSION						5
#define NDIS_MINOR_VERSION						0

// .....
#define ETH_ADDR_LEN							6
#define PPPOE_MIN_ETH_FRAME_SIZE				14
#define PPPOE_MAX_ETH_FRAME_SIZE				1514
#define PPP_HEADER_LEN							6
#define PPPOE_MAX_FRAME_SIZE					1500
#define PPPOE_WAN_MAX_FRAME_SIZE				(PPPOE_MAX_ETH_FRAME_SIZE - 32)
#define PPPOE_HEADER_LEN						(PPP_HEADER_LEN + PPPOE_MIN_ETH_FRAME_SIZE)
#define PPPOE_MAX_DATA_SIZE						(PPPOE_MAX_FRAME_SIZE - PPP_HEADER_LEN)
#define PPPOE_MAX_PADI_DATA_SIZE				(PPPOE_MAX_FRAME_SIZE - PPP_HEADER_LEN - 16)

// driver name,be used to debug print
#define DRIVER_NAME								"CoPPPoE"

// protocol name,must match the .inf file!
#define PROTOCOL_NAME							L"TcCoPPPoE"

// used to make a ULONG sig and memory tag
#define MAKE_SIG(a,b,c,d)						((d) << 24 | (c) << 16 | (b) << 8 | (a))

#define htons(h)								(((h & 0xff) << 8 )|((h & 0xff00) >> 8))
#define htonl(h)								(((h & 0xff) << 24)|((h & 0xff00) << 8)|((h & 0xff0000) >> 8)|((h & 0xff000000) >> 24))

#define ntohs(n)								(((n & 0xff) << 8 )|((n & 0xff00) >> 8))
#define ntohl(n)								(((n & 0xff) << 24)|((n & 0xff00) << 8)|((n & 0xff0000) >> 8)|((n & 0xff000000) >> 24))

// for debug routine
#include "debug.h"

// for memory routine
#include "memory.h"

// for packet
#include "packet.h"

// for timer
#include "timer.h"

// for workitem
#include "workitem.h"

// for main
#include "main.h"

// for miniport
#include "miniport.h"

// for call manager
#include "callmgr.h"

// for protocol
#include "protocol.h"

// for pppoe packet
#include "pppoepkt.h"

// for pppoe fsm
#include "pppoefsm.h"

// for channel
#include "channel.h"

// for adapter
#include "adapter.h"

// for bind
//#include "bind.h"

⌨️ 快捷键说明

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