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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-07 21:03:24 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!portc.blue.aol.com.MISMATCH!portc03.blue.aol.com!uunet!dca.uu.net!ash.uu.net!spool1.news.uu.net!spool0.news.uu.net!reader1.news.uu.net!not-for-mail Sender: DB3L@CTWD0143 Newsgroups: comp.lang.ada Subject: Re: How Ada could have prevented the Red Code distributed denial of service attack. References: <3b690498.1111845720@news.worldonline.nl> <9kbu15$9bj@augusta.math.psu.edu> <9kbvsr$a02@augusta.math.psu.edu> <3B69DB35.4412459E@home.com> <3B6F312F.DA4E178E@home.com> <23lok9.ioi.ln@10.0.0.2> <3B70AB15.35845A98@home.com> From: David Bolen Organization: Fitlinxx, Inc. - Stamford, CT X-Newsreader: Gnus v5.7/Emacs 20.6 Date: 08 Aug 2001 00:03:49 -0400 Message-ID: NNTP-Posting-Host: 208.247.212.3 X-Trace: reader1.news.uu.net 997243401 882 208.247.212.3 Xref: archiver1.google.com comp.lang.ada:11569 Date: 2001-08-08T00:03:49-04:00 List-Id: "Warren W. Gay VE3WWG" writes: > Bart.Vanhauwaert@nowhere.be wrote: (...) > > I have never felt the need to know the size of a certain struct. Why > > don't you give an example where it is needed? > > What? You've never written a structure to a file? A socket? A message queue? To piggy back on this slightly to ask a related question - I'd normally say "no" to your question because a direct write of a structure in any of those situations would be non-portable in most languages/libraries I've used, except when using an official standardized marshalling interface for such I/O, in which case the overall structure size is generally unimportant. Instead you'd want to define what needs to be marshalled on a field by field basis or in dynamic situations let introspection handle it. Does Ada support simply performing I/O on such structures to constructs as files, sockets or message queues in a portable way (without explicit marshalling), such that some other Ada application (even with a different compiler and/or platform) would receive the structure intact? -- -- David -- /-----------------------------------------------------------------------\ \ David Bolen \ E-mail: db3l@fitlinxx.com / | FitLinxx, Inc. \ Phone: (203) 708-5192 | / 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \ \-----------------------------------------------------------------------/