ipfw related (ipfw_insn_pipe structure)

From: roryg (npratsinis_at_cmu.edu)
Date: 02/11/04


Date: 11 Feb 2004 08:52:51 -0800

Hello guys,
I would like some help for a coding problem i have faced using
dummynet/ipfw. I am writing in C some functions for creating pipes,
queues, adding flows to queues etc. I face a problem when trying to
add a flow to an already existing queue (doing something like:
ipfw add queue 1 ip from any to any).
I am using getsockopt() with IP_FW_ADD to add my rule, and in order
to specify the queue in the ip_fw rule, i am using the ipfw_insn_pipe
structure. Its 2nd field is a void pointer pipe_ptr, which i have no
idea where it should point to.
I have checked at the source code of ip_fw2.c to see how it is handled
in there, but i didn't find anything.
Actually i have managed to make the addition of my rule to the chain
rule ("ipfw list" shows my entry), but it doesn't work (i guess because
i left pipe_ptr untouched).
So, do you have any idea how i should use pipe_ptr??
I would really appreciate some help.
Thanx in advance!
Nikos Pratsinis



Relevant Pages

  • Re: Thread Checking the Queue data in an infinite loop
    ... Yes I want to drain the Queue once I compelete the wait..Since the ... Remember also that the reader has to acquire the mutex. ... to my project has used Pipes which signal an event whenever there is ... Implicit in a "monitor" class is the locking of a mutex by every ...
    (microsoft.public.vc.mfc)
  • Re: dummynet dropping too many packets
    ... and so the queue is driven differently. ... you should check which pipes are dropping packets and whether ... 8664 output packets dropped due to no bufs, ... The packets intentionally dropped in dummynet because queues are full ...
    (freebsd-net)
  • Re: Thread Communication in C#
    ... If I use ManualResetEvent, I still need some way to pass data between the ... sure how to pass the reference to the queue to the sub thread at start. ... >> GetMessage. ... >> Pipes and GetMessage both did. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: dummynet = local taffic > 100ms - help!
    ... > My bad, HZ is 1000 will try queue lengts, but havent seen any packets ... Or just add a single rule at front of rules list to allow all traffic and ... repeat your tests - try and confirm that the problem is with the pipes ...
    (freebsd-net)
  • Re: Buffering in pipes
    ... > pipes to do what you want. ... > on queue empty. ... > the queue to transfer available buffer addresses and control messages. ... reinventing pipes using other forms of IPC, ...
    (comp.unix.programmer)