Skip Menu |
 

This queue is for tickets about the Net-LibNIDS CPAN distribution.

Report information
The Basics
Id: 82767
Status: resolved
Priority: 0/
Queue: Net-LibNIDS

People
Owner: david [...] edeca.net
Requestors: chas.tomlin [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.12



Subject: exposing nids_discard
Date: Wed, 16 Jan 2013 20:12:51 +0000
To: bug-Net-LibNIDS [...] rt.cpan.org
From: Chas Tomlin <chas.tomlin [...] gmail.com>
Download (untitled) / with headers
text/plain 244b
Hi, Thank you very much for the excellent Net::LibNIDS module. I was wondering if it would be possible to expose the nids_discard() function from the library? This would be very helpful to be able to control the TCP data buffer. Thanks Chas
Download (untitled) / with headers
text/plain 652b
Can you try the version I have uploaded to https://github.com/edeca/Net- LibNIDS ? The code here now implements nids_discard, which you can call like: Net::LibNIDS::nids_discard($stream, 123); This appears to work with the small testcase (5.t) but I have not exhaustively tested at this stage. This could potentially be an object function in Net::LibNIDS::tcp_stream instead, so you call the same in the same way as: sub collector { my $stream = shift; if($stream->state == Net::LibNIDS::NIDS_DATA()) { $stream->discard(123); } } Let me know what you think, I will fiddle with the XS if you think the 2nd method is better.
Subject: Re: [rt.cpan.org #82767] exposing nids_discard
Date: Mon, 21 Jan 2013 10:24:46 +0000
To: bug-Net-LibNIDS [...] rt.cpan.org
From: Chas Tomlin <chas.tomlin [...] gmail.com>
Download (untitled) / with headers
text/plain 897b
Thank you for the fast response! That works well for me. Chas On Fri, Jan 18, 2013 at 6:43 PM, David via RT <bug-Net-LibNIDS@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=82767 > > > Can you try the version I have uploaded to https://github.com/edeca/Net- > LibNIDS ? > > The code here now implements nids_discard, which you can call like: > > Net::LibNIDS::nids_discard($stream, 123); > > This appears to work with the small testcase (5.t) but I have not > exhaustively tested at this stage. > > This could potentially be an object function in Net::LibNIDS::tcp_stream > instead, so you call the same in the same way as: > > sub collector { > my $stream = shift; > > if($stream->state == Net::LibNIDS::NIDS_DATA()) { > $stream->discard(123); > } > } > > Let me know what you think, I will fiddle with the XS if you think the > 2nd method is better.
Download (untitled) / with headers
text/plain 401b
Hi, Before I work on your other ticket could you please check out the new commit at https://github.com/edeca/Net- LibNIDS/commit/462a80d81b5d3f760e810f282337507819b82148 ? I think this is a more appropriate way of calling nids_discard from within the callback function (nids_discard is not useful anywhere else, therefore should not be global). Check 5.t for an example of how to call it. David
Subject: Re: [rt.cpan.org #82767] exposing nids_discard
Date: Mon, 11 Feb 2013 15:42:25 +0000
To: bug-Net-LibNIDS [...] rt.cpan.org
From: Chas Tomlin <chas.tomlin [...] gmail.com>
Download (untitled) / with headers
text/plain 643b
Yep that works well for me too, thank you for working on this! Thanks Chas On Thu, Jan 31, 2013 at 9:47 PM, David via RT <bug-Net-LibNIDS@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=82767 > > > Hi, > > Before I work on your other ticket could you please check out the new > commit at https://github.com/edeca/Net- > LibNIDS/commit/462a80d81b5d3f760e810f282337507819b82148 ? > > I think this is a more appropriate way of calling nids_discard from within > the callback function (nids_discard is not useful anywhere else, therefore > should not be global). > > Check 5.t for an example of how to call it. > > David
Download (untitled) / with headers
text/plain 281b
This was resolved last year but I did not issue an updated module on CPAN. Version 0.12 has now been released which includes the previous patches. See commit at https://github.com/edeca/Net-LibNIDS/commit/462a80d81b5d3f760e810f282337507819b82148 and test 5.t in the distribution.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.