From: Björn <ssh9614@hotmail.com>
Subject: Re: Adding offset to 'Address
Date: Sat, 13 Sep 2008 03:18:32 -0700 (PDT)
Date: 2008-09-13T03:18:32-07:00 [thread overview]
Message-ID: <50d60932-3553-44ce-9fde-25e9990621b7@d1g2000hsg.googlegroups.com> (raw)
In-Reply-To: gad9lc$77a$1@jacob-sparre.dk
On 12 Sep, 10:35, Kim Rostgaard Christensen <k...@greenpc.dk> wrote:
> Hi
>
> How does one go about setting a 'Address + (size of other record) to a
> record at runtime ?
>
> In brief, I am switching over "Frametype" in a Ethernet frame record, to
> dynamically assign the next record by type (IPv4,IPv6,ARP, etc.)
> My "datablob" is a *u_char from a imported C function.
>
> So I have:
>
> Raw_Bytes : access Unsigned_Char
> for Ethernet_Header'Address use Raw_Bytes.all'Address;
>
> and additionally need something like:
> for IP_Packet'Address use Raw_Bytes.all'Address + Ethernet_Header'Size;
>
> Also, I am not confident that this _the_ solution, so other approaches
> are very welcome. For those curious about what it is all about, I ran a
> gnathtml on the source and made it available athttp://krc.greenpc.dk/hovedopgave/html/index.htm
>
> Regards
> Kim Rostgaard Christensen
I was also playing around with PCAP earlier this year. I have not yet
finished what I intended to do but I got basic IP reassembly and TCP
session reconstruction to work. I uploaded the files to
http://www.mediafire.com/?1neezbx5bb1 if you want to have a peek.
However, note that this is work in progress. The application is not
finished and the quality of the code will need improvement. There are
also a lot more special cases in TCP handling that will need to be
handled.
Regards
Björn
next prev parent reply other threads:[~2008-09-13 10:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 8:35 Adding offset to 'Address Kim Rostgaard Christensen
2008-09-12 9:47 ` Georg Bauhaus
2008-09-12 10:17 ` Kim Rostgaard Christensen
2008-09-12 11:18 ` petter_fryklund
2008-09-12 15:23 ` Adam Beneschan
2008-09-12 21:40 ` Robert A Duff
2008-09-13 0:37 ` Adam Beneschan
2008-09-13 6:21 ` tmoran
2008-09-17 9:15 ` Kim Rostgaard Christensen
2008-09-19 6:09 ` Randy Brukardt
2008-09-19 9:25 ` anon
2008-09-13 10:18 ` Björn [this message]
2008-09-17 9:18 ` Kim Rostgaard Christensen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox