📄 globals.h
字号:
#ifndef _NET_MONITOR_KERNEL_GLOBALS_H_
#define _NET_MONITOR_KERNEL_GLOBALS_H_
#include "define.h"
/**
* 注意:本动态连接库所有程序只能处理一张网卡,并没有关于多张网卡的做错误处理
*/
// Function name : GetAdapterMAC
// Description : 得到网卡的物理地址,这里只能处理有一块网卡的情况
// Return type : bool
// Argument : UCHAR addr[6]
extern "C" __declspec(dllexport) bool GetAdapterMAC(UCHAR addr[6]);
// Function name : GetAdapterNum
// Description : 得到本机网卡的个数
// Return type : UCHAR
extern "C" __declspec(dllexport) UCHAR GetAdapterNum();
// Function name : ResetAdapter
// Description : Reset 一张LAN网卡
// Return type : void
extern "C" __declspec(dllexport) void ResetAdapter();
// Function name : SetAdapterReceiveAll
// Description : 设置网卡可以接收所有IP的数据(混杂模式)
// Return type : void
extern "C" __declspec(dllexport) bool SetAdapterReceiveAll();
// Function name : ReceiveAdapter
// Description : 接收数据
// Return type : int
// Argument : byte * buf
// Argument : int len
extern "C" __declspec(dllexport) int ReceiveAdapter(byte * buf,int len);
// Function name : GetHostName
// Description : 通过IP地址得到机器名
// Return type : int 机器名字符串长度
// Argument : char * addr ip地址
// Argument : char * name 机器名
extern "C" __declspec(dllexport) int GetHostName(char * addr,char * name);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -