netdev
[Top] [All Lists]

new ioctl for UDP socket - need help

To: <netdev@xxxxxxxxxxx>, <davem@xxxxxxxxxx>, <kuznet@xxxxxxxxxxxxx>, <pekkas@xxxxxxxxxx>, <jmorris@xxxxxxxxxxxxxxxx>, <yoshfuji@xxxxxxxxxxxxxx>, <kaber@xxxxxxxxxxxx>, <linux-net@xxxxxxxxxxxxxxx>, <robert.olsson@xxxxxxxxx>
Subject: new ioctl for UDP socket - need help
From: "Bosnjak Zoran ITWEP" <Bosnjak@xxxxxxxxxxx>
Date: Mon, 13 Dec 2004 16:26:47 +0100
Sender: netdev-bounce@xxxxxxxxxxx
Thread-index: AcThKCkF2bEWHOeWQAW/RMBvJ4lHlw==
Thread-topic: new ioctl for UDP socket - need help
Hello all,
I have changed the UDP packet handler to be able to count packets in fastest 
possible manner. The best idea for me was to intercept the packet just before 
sending it to user space. As I am not interested in actual packets I just get 
the counters from the socket periodicly. The most important is packet loss 
counter which is calculated from sequence number (first byte in each packet's 
payload).

You can see this add-on like the opposite site for PKTGEN which is already part 
of the kernel.

But here is the problem:
I have to introduce new ioctl numbers for the socket, to:
- be able to put the socket in 'counting' mode
- get the counters from the socket to the application
... and I don't know how to do it.
At the moment (to see it works) I just put some dummy ioctl numbers into the 
code. Inside the patch (see attachment) there is also an example and short 
documentation.

Can someone please help me introduce new ioctl numbers for UDP sockets corectly.

best regards,
Zoran Bosnjak
 <<udp_patch-linux-2.4.27>>  <<udp_patch-linux-2.6.9>> 

Attachment: udp_patch-linux-2.4.27
Description: udp_patch-linux-2.4.27

Attachment: udp_patch-linux-2.6.9
Description: udp_patch-linux-2.6.9

<Prev in Thread] Current Thread [Next in Thread>
  • new ioctl for UDP socket - need help, Bosnjak Zoran ITWEP <=