From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e2be1c8e99a1c994,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.karotte.org!news2.arglkargh.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: Kim Rostgaard Christensen Newsgroups: comp.lang.ada Subject: Adding offset to 'Address Date: Fri, 12 Sep 2008 10:35:42 +0200 Organization: Jacob's private Usenet server Message-ID: NNTP-Posting-Host: pintsize.dmusyd.edu Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: jacob-sparre.dk 1221208556 7402 83.94.115.162 (12 Sep 2008 08:35:56 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 12 Sep 2008 08:35:56 +0000 (UTC) User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) Xref: g2news1.google.com comp.lang.ada:1991 Date: 2008-09-12T10:35:42+02:00 List-Id: 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