English 中文(简体)
pcap - 浏览和接收同一计算机中的ud
原标题:pcap - streaming and receiving udp in the same computer

To explain what I would like to get, here s an example. Let s say, we have a PC with one NIC. It has single IP address 172.16.0.1. Using VLC, we start a udp stream to 172.16.0.1:1234, then launch another copy of VLC and connect to udp://@172.16.0.1:1234. Now we ll see our video streaming.

如果你开刀,你将看到包裹从172.16.0.1: some_random_port to 172.16.0.1:1234 on loopback。 我国的NIC中没有任何疏漏。

我想做的是,像VLC所做的那样,将计算机输入和接收。 但是,主要问题是,花cap只能是一根真正的装置,它会背弃。

能否解决这一问题?

P.S. I m 采用Windows和WinPcap,不同于Loplin版本,可以发送包装单。

问题回答

如果你只是要寄送和接收UDP的包裹,那么我就建议使用定期的Winsock的袖珍片,就像你在UN*X上使用定期的袖珍片一样;使用WinPcap要求你重新实施IP和UDP,and。 t 允许你向视窗(或至少是某些版本的UN*X)下同一机器上的另一张电话。

如果你想要<>监视<>。 很遗憾,WinPcap乘坐的是寄出和从NDIS接收的包装箱(其司机pl子进入NDIS)的交通工具,而从一台机器上发的包装单到同一机器上的另一张。

(说明,BTW, that libpcap can sent Packets on-030 and *BSD and MacOS X and Solaris and Data/Tru64 UNIX, for example, and have been can do so for several years; original texts of libpcap don t support it, but the texts available for the past years can be. 然而,根据我的第1段,使用校准机发送和接收这些专业单位的定期光盘是不明智的,就像将WinPcap用于这一目的在Windows上毫无意义一样。





相关问题
Failure scenarios for reliable UDP?

What could be good list of failure scenaros for testing a reliable UDP layer? I have thought of the below cases: Drop Data packets Drop ACK, NAK Packets Send packets in out of sequence. Drop intial ...

C windows sendto()

I am trying to send over UDP using the following code, but i m getting strange results. if((sendto(newSocket, sendBuf, totalLength, 0, (SOCKADDR *)&sendAddr, sizeof(sendAddr)) == bytesSent) &...

General sockets UDP programming question

I have an FPGA device with which my code needs to talk. The protocol is as follows: I send a single non-zero byte (UDP) to turn on a feature. The FPGA board then begins spewing data on the port ...

Twisted Spread suitable for multiplayer racing sim?

Do you think that Twisted Spread may be suitable (in terms of performance) for a multiplayer racing simulator? The rest of the application is based on Python-Ogre. Can Perspective Broker run upon (...

Ruby UDP server/client test fails

I am trying to setup a simple UDP client and server using Ruby. The code looks like this: require socket.so class UDPServer def initialize(port) @port = port end def start @socket = ...

Should I use (non-blocking) NIO for UDP?

According to this post, UDP just doesn t block. Are there any advantage using the (non-blocking) NIO API for UDP? Or should I just use the easier "traditional" io API?

Connecting to a Source game server in VB.NET

I m developing an application that detects Source-based games running on the LAN. Following up on the specifications provided by Valve, I have it narrowed down to exactly what I want: making a UDP ...

热门标签