监控网络流量 [英] Monitoring of network traffic

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

问题描述

我可以在Java上创建监视网络流量的程序吗?该程序必须控制从计算机程序(包括OS模块)到网络驱动程序再返回的所有网络流量.如果是,怎么办?

Can I create on Java monitoring program of network traffic? The program must control all network traffic which goes from computer program (including OS modules) to Network driver and back. If yes, How?

注意:

我不仅要监视流量,还希望对其进行控制.我想在Windows NT上实现这样的系统.单纯在Java上无法实现.如何在JNI的帮助下执行它?

I want not only to monitor traffic also to control it. I want to implement such system on windows NT. It cannot be fulfilled o purely on Java. How can I perform it with the help of JNI?

或者是另一个变体.我不熟悉Windows服务,但仍然如此.我将在C ++上编写程序并将其注册为Windows服务.然后,我从Java应用程序调用此服务(我不知道该怎么做)并请求网络流量.如果没有Java程序(或不请求流量),则在C ++程序部分将阻止所有流量.另一方面传输到该程序.可能是Java部分可以在Java服务器(Glass Fish,JBoss)上实现并工作.C ++部分将把流量传输到本地主机.

Or maybe another variant. I am not acquaint with windows services, but still. I will write a program on C++ and register it as windows service. Then I call from my Java application this service (I don't know how to do this) and request network traffic. On the C++ program part all the traffic will be blocked if there is no Java program (or it doesn't request traffic); on the other way transmitted to this program. May be the java part can be implemented and work on an Java server (Glass Fish, JBoss). The C++ part in turn will transmit traffic to localhost.

您如何看待这些方式?

推荐答案

监视网络流量" 时,则

When "monitoring of network traffic" then pcap, I'd say.

谷歌搜索"pcap java" 带给我的是第一次点击: jNetPcap .

Googling "pcap java" brought me that as first hit: jNetPcap.

没有测试它,但是pcap是本机C程序的标准解决方案.无法判断Java包装器是否不错,但至少它的网站看起来不错.;-)

Did not test it, but pcap is the standard solution for native C programs. Cannot tell if the Java wrapper is good, but at least its website looks nice. ;-)

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

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