English 中文(简体)
Is there a way to manipulate udp packets after an application sends it to a socket?
原标题:
  • 时间:2009-11-19 17:41:05
  •  标签:
  • sockets
  • udp

In other words, can I intercept those packets (possibly at the stack level) using a separate application, manipulate them and then send them to the destination the original application was trying to send them to?

问题回答

You can open socket with PF_PACKET protocol type, intercept all packets on the interface and send them directly.

Check out man 7 packet and man socket. I believe you ll need root rights to run such application.

Sniffing Bytes over the Network





相关问题
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 ...

热门标签