* RE: Userspace queuing
2004-06-28 7:17 ` Muhammad R. Sami
@ 2004-06-28 9:45 ` Henrik Nordstrom
2004-06-28 16:43 ` Nigel Kukard
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: Henrik Nordstrom @ 2004-06-28 9:45 UTC (permalink / raw)
To: Muhammad R. Sami; +Cc: Netfilter List
On Mon, 28 Jun 2004, Muhammad R. Sami wrote:
> Thanks Henrik for your help, I have 2 questions, first of all I could not
> find anyway to extract and read packet payload through libipq, I know it has
> a function to do so but how to use it (any examples??)
See the very extensive documentation included in libipq.
> and secondly is there any implementation of priority queues (multiple
> FIFOs) at userspace using libipq.
Not that I know of, but I thougt this was what you wanted to implement
yourself..
What is it actually that you want to do?
Regards
Henrik
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Userspace queuing
2004-06-28 7:17 ` Muhammad R. Sami
2004-06-28 9:45 ` Henrik Nordstrom
@ 2004-06-28 16:43 ` Nigel Kukard
2004-06-28 16:45 ` Ulysses Almeida
2004-06-28 17:16 ` Ulysses Almeida
3 siblings, 0 replies; 12+ messages in thread
From: Nigel Kukard @ 2004-06-28 16:43 UTC (permalink / raw)
To: Muhammad R. Sami; +Cc: 'Henrik Nordstrom', Netfilter List
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
check project www.freshmeat.net/projects/bwmtools
it uses multiple userpace queues to prioritize and limit traffic based
on certain criteria.
On Mon, Jun 28, 2004 at 10:17:21AM +0300, Muhammad R. Sami wrote:
> Thanks Henrik for your help, I have 2 questions, first of all I could not
> find anyway to extract and read packet payload through libipq, I know it has
> a function to do so but how to use it (any examples??) and secondly is there
> any implementation of priority queues (multiple FIFOs) at userspace using
> libipq. If you can help me on these, I would be thankful.
> Regards,
>
>
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Userspace queuing
2004-06-28 7:17 ` Muhammad R. Sami
2004-06-28 9:45 ` Henrik Nordstrom
2004-06-28 16:43 ` Nigel Kukard
@ 2004-06-28 16:45 ` Ulysses Almeida
2004-06-28 17:16 ` Ulysses Almeida
3 siblings, 0 replies; 12+ messages in thread
From: Ulysses Almeida @ 2004-06-28 16:45 UTC (permalink / raw)
To: Muhammad R. Sami; +Cc: 'Henrik Nordstrom', Netfilter List
Hi there,
I just wrote a libipq tutorial, tring to explain how to use it to
handle packets on user-space. It's on brazilian portuguese, but there's
a section named libipq By Example, with an example src, that could be
self explainatory. The example is a mix code with man pages example
and examples I find on lipipq cvs.
Some time, if someone thinks it's useful, I can translate it to
english, with my awful english.
Best regards.
On Mon, Jun 28, 2004 at 10:17:21AM +0300, Muhammad R. Sami wrote:
> Thanks Henrik for your help, I have 2 questions, first of all I could not
> find anyway to extract and read packet payload through libipq, I know it has
> a function to do so but how to use it (any examples??) and secondly is there
> any implementation of priority queues (multiple FIFOs) at userspace using
> libipq. If you can help me on these, I would be thankful.
> Regards,
>
>
>
--
.~. Ulysses Almeida
/ V \ munky@maluco.com.br
/ ( ) \ Seja livre, use GNU/Linux!
^^-^^
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Userspace queuing
2004-06-28 7:17 ` Muhammad R. Sami
` (2 preceding siblings ...)
2004-06-28 16:45 ` Ulysses Almeida
@ 2004-06-28 17:16 ` Ulysses Almeida
2004-06-29 9:08 ` Fallucchi Antonio
2004-06-29 9:18 ` Muhammad R. Sami
3 siblings, 2 replies; 12+ messages in thread
From: Ulysses Almeida @ 2004-06-28 17:16 UTC (permalink / raw)
To: Muhammad R. Sami; +Cc: Netfilter List
Sorry, I forgot the link http://www.glug.ucdb.br/~ulysses/libipq.html
Regards
On Mon, Jun 28, 2004 at 10:17:21AM +0300, Muhammad R. Sami wrote:
> Thanks Henrik for your help, I have 2 questions, first of all I could not
> find anyway to extract and read packet payload through libipq, I know it has
> a function to do so but how to use it (any examples??) and secondly is there
> any implementation of priority queues (multiple FIFOs) at userspace using
> libipq. If you can help me on these, I would be thankful.
> Regards,
>
>
>
--
.~. Ulysses Almeida
/ V \ munky@maluco.com.br
/ ( ) \ Seja livre, use GNU/Linux!
^^-^^
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Userspace queuing
2004-06-28 17:16 ` Ulysses Almeida
@ 2004-06-29 9:08 ` Fallucchi Antonio
2004-06-29 9:18 ` Muhammad R. Sami
1 sibling, 0 replies; 12+ messages in thread
From: Fallucchi Antonio @ 2004-06-29 9:08 UTC (permalink / raw)
To: netfilter-devel
hi,
i use libipq and "QUEUE" for read the SYN pachet sent from local
application...
now I must REDIRECT all packet (width nat) to a local service (proxy).
I have configure the netfilter:
*nat
:PREROUTING ACCEPT [4:240]
:POSTROUTING ACCEPT [22:1306]
:OUTPUT ACCEPT [18:1066]
-A OUTPUT -d ! 127.0.0.1 -p tcp -m tcp --dport 80 ! --tcp-flags SYN SYN
-j DNAT --to-destination 127.0.0.1:80
-A OUTPUT -d ! 127.0.0.1 -p tcp -m tcp --dport 80 --tcp-flags SYN SYN -j
QUEUE
COMMIT
or
*nat
:PREROUTING ACCEPT [4:240]
:POSTROUTING ACCEPT [22:1306]
:OUTPUT ACCEPT [18:1066]
-A OUTPUT -d ! 127.0.0.1 -p tcp -m tcp --dport 80 --tcp-flags SYN SYN -j
QUEUE
-A OUTPUT -d ! 127.0.0.1 -p tcp -m tcp --dport 80 ! --tcp-flags SYN SYN
-j DNAT --to-destination 127.0.0.1:80
COMMIT
in all the solution the packets bypass the nat rule..
there is other solution ??
Ulysses Almeida wrote:
>Sorry, I forgot the link http://www.glug.ucdb.br/~ulysses/libipq.html
>
> Regards
>
>On Mon, Jun 28, 2004 at 10:17:21AM +0300, Muhammad R. Sami wrote:
>
>
>>Thanks Henrik for your help, I have 2 questions, first of all I could not
>>find anyway to extract and read packet payload through libipq, I know it has
>>a function to do so but how to use it (any examples??) and secondly is there
>>any implementation of priority queues (multiple FIFOs) at userspace using
>>libipq. If you can help me on these, I would be thankful.
>>Regards,
>>
>>
>>
>>
>>
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Userspace queuing
2004-06-28 17:16 ` Ulysses Almeida
2004-06-29 9:08 ` Fallucchi Antonio
@ 2004-06-29 9:18 ` Muhammad R. Sami
1 sibling, 0 replies; 12+ messages in thread
From: Muhammad R. Sami @ 2004-06-29 9:18 UTC (permalink / raw)
To: 'Ulysses Almeida'; +Cc: 'Netfilter List'
What I understand from the examples is that I have to create my own
structure for my packet's application header. And then extract the payload
using this approach:
ipq_packet_msg_t *m = ipq_get_packet(buf);
struct iphdr *iph = ((struct iphdr *)m->payload);
where struct iphdr will be struct "myhdr"
and then decide queuing policy according to what I get.
Am I on the right track?
Regards,
-----Original Message-----
From: Ulysses Almeida [mailto:munky@maluco.com.br]
Sent: Monday, June 28, 2004 8:16 PM
To: Muhammad R. Sami
Cc: Netfilter List
Subject: Re: Userspace queuing
Sorry, I forgot the link http://www.glug.ucdb.br/~ulysses/libipq.html
Regards
On Mon, Jun 28, 2004 at 10:17:21AM +0300, Muhammad R. Sami wrote:
> Thanks Henrik for your help, I have 2 questions, first of all I could not
> find anyway to extract and read packet payload through libipq, I know it
has
> a function to do so but how to use it (any examples??) and secondly is
there
> any implementation of priority queues (multiple FIFOs) at userspace using
> libipq. If you can help me on these, I would be thankful.
> Regards,
>
>
>
--
.~. Ulysses Almeida
/ V \ munky@maluco.com.br
/ ( ) \ Seja livre, use GNU/Linux!
^^-^^
^ permalink raw reply [flat|nested] 12+ messages in thread