new ioctl for UDP socket - need help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux