使用C程序监控网络流量 [英] Monitoring network traffic with a C program

查看:115
本文介绍了使用C程序监控网络流量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想知道如何监控网络流量,就像在wireshark中一样。

我用Google搜索了大部分内容答案是,使用像winpcap这样的库。

但我不想使用这种方法。我想知道一个人必须做些什么来监控核心网络流量,以及c / c ++。

我是否必须使用NIC的驱动程序或者是否有我遗漏的东西。



谢谢。

解决方案

即使你不想使用 winpcap 你可以看看它是如何工作的。



您可以在 https://www.winpcap下载资源。 org / devel.htm [ ^ ]。有关驱动程序内部的说明,请访问 http://www.winpcap.org/docs/docs_412/ html / group__NPF.html [ ^ ]。

Hi all,

I was wondering how i would monitor network traffic, like in wireshark.
I have googled and most of the answers are, to use a library like winpcap.
But i dont want to use this method. I want to know what exactly one must do to be able to monitor network traffic at the core, and also with c/c++.
Do I have to use the NIC's driver or is there something I am missing.

Thanks.

解决方案

Even if you don't want to use winpcap you can have a look on how it works.

You can download the sources at
https://www.winpcap.org/devel.htm[^]. A description about the driver internals can be found at http://www.winpcap.org/docs/docs_412/html/group__NPF.html[^].


这篇关于使用C程序监控网络流量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆