libipq Packet queuing Question
Hello,
Would anyone be able to help me with my libipq development, I'm really stuck.
I'm trying to create a QoS app for Linux and I'm using a number of simple FIFO queues (just using arrays) to queue the packets before they are dispatched in the required order.
The problem I am having is, apart from my basic knowledge of c, is that you cant queue a pointer. So when you receive the pointer from the method ipq_packet_msg_t *m, this cant be queued (e.g. if you queue packets 1,2,3 they will be dispatched 1,1,1).
I have tried dereferencing the *m pointer but this doesn't give you a copy of the packet it actually seems to give you a blank packet.
Has anyone designed any packet queuing applications or know of any examples which could point me in the right direction.
Thank you in advance for your help,
Duncan Godfrey
Quoted 6 lines · Duncan Godfrey
Hello,
Would anyone be able to help me with my libipq development, I'm really stuck.
Hi,
You may have a look at nufw (http://www.nufw.org) code which does intensive use of libipq. Have specially a look in the src/nufw directory which contains libipq related code.
Doxygen version of one of the file :
http://www.nufw.org/doxygen/packetsrv_8c.html
Quoted 29 lines
I'm trying to create a QoS app for Linux and I'm using a number of simple FIFO queues (just using arrays) to queue the packets before they are dispatched in the required order.
The problem I am having is, apart from my basic knowledge of c, is that you cant queue a pointer. So when you receive the pointer from the method
ipq_packet_msg_t*m, this cant be queued (e.g. if you queue packets 1,2,3 they will be dispatched 1,1,1).I have tried dereferencing the *m pointer but this doesn't give you a copy of the packet it actually seems to give you a blank packet.
Has anyone designed any packet queuing applications or know of any examples which could point me in the right direction.
Thank you in advance for your help,
Duncan Godfrey