comp.lang.ada
 help / color / mirror / Atom feed
* Adding offset to 'Address
@ 2008-09-12  8:35 Kim Rostgaard Christensen
  2008-09-12  9:47 ` Georg Bauhaus
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Kim Rostgaard Christensen @ 2008-09-12  8:35 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-09-19  9:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2008-09-17  9:18   ` Kim Rostgaard Christensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox