From: Kim Rostgaard Christensen <krc@greenpc.dk>
Subject: Adding offset to 'Address
Date: Fri, 12 Sep 2008 10:35:42 +0200
Date: 2008-09-12T10:35:42+02:00 [thread overview]
Message-ID: <gad9lc$77a$1@jacob-sparre.dk> (raw)
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 at
http://krc.greenpc.dk/hovedopgave/html/index.htm
Regards
Kim Rostgaard Christensen
next reply other threads:[~2008-09-12 8:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 8:35 Kim Rostgaard Christensen [this message]
2008-09-12 9:47 ` Adding offset to 'Address 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
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