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

Bug#564158: marked as done ([libmlpcap-ocaml-dev] Invalid payload in callback function when reading a trace with pcap_loop)



Your message dated Thu, 05 Jan 2012 10:35:55 +0100
with message-id <4F056EFB.9090505@dogguy.org>
and subject line Re: Bug#564158: [libmlpcap-ocaml-dev] Invalid payload in callback  function when reading a trace with pcap_loop
has caused the Debian Bug report #564158,
regarding [libmlpcap-ocaml-dev] Invalid payload in callback function when  reading a trace with pcap_loop
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
564158: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=564158
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package:libmlpcap-ocaml-dev
Version 0.9-13

I'm trying to read a trace obtained through wireshark.
I use pcap_loop to launch a callback function.
The call function is supposed to look like something similar to this: "let callback_process _ pkt_hdr pcap_payload = ...".
The type of pkt_hdr is PCAP.struct2.
The type of pcap_payload is string.

What is supposed to happen:
The field caplen of pkt_hdr is supposed to contain the number of bytes inside the captured packet. This works perfectly. The packet itself is supposed to be contained inside pcap_payload. The size of pcap_payload is supposed to be equal to caplen and the size of the packet captured.

What happens instead:
The size of pcap_payload is always -1. This means that we can never access to the data inside the packet.
I added an archive to this post with a simple example which show the problem.
To use this code once compiled with the three lines after, simply give a trace name as the first parameter.
ocamlfind ocamlopt -package pcap, -c packet_analyser.ml
ocamlfind ocamlopt -package pcap, -c main.ml
ocamlfind ocamlopt -package pcap, -linkpkg   -cclib -lutil  -o main    packet_analyser.cmx main.cmx

I have no idea of where does this problem comes from.

The installed system is Lenny 5.0.3.
uname -a gives me : Linux debian-a-johan 2.6.26-2-amd64 #1 SMP Thu Nov 5 02:23:12 UTC 2009 x86_64 GNU/Linux
dpkg -s libc6 | grep ^Version gives me: Version: 2.7-18

Attachment: CodeDemoForBugPayloadSize.tar.gz
Description: GNU Zip compressed data


--- End Message ---
--- Begin Message ---
On 08/01/10 19:09, Johan Mazel wrote:
Hi
I just tried to install manually libmlpcap-ocaml-dev.
And, the behavior is the same, I still have the -1 as size for pcap_payload.
So, I understand, this is not a bug.
What is the procedure, to set this bug report as solved or non-relevant ?

Closing as requested.

Regards,

--
Mehdi


--- End Message ---

Reply to: