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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: AI12-0218: What is the portable representation clause for processing IETF packets on little-endian machines? Date: Thu, 10 May 2018 17:50:08 -0500 Organization: JSA Research & Innovation Message-ID: References: <2821b8e0-2c64-4621-b65e-337027fc121e@googlegroups.com> Injection-Date: Thu, 10 May 2018 22:50:11 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="15060"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:52225 Date: 2018-05-10T17:50:08-05:00 List-Id: "Dan'l Miller" wrote in message news:2821b8e0-2c64-4621-b65e-337027fc121e@googlegroups.com... >But until then, we're not tilting at windmills; we live in IETF's reality >of their >packet-header formats. Now show how to process them portably in Ada >without AI12-0218. Why would you want to process them portably? Low-level hardware specific code (and socket drivers are always that) is never portable (too much hardware dependence); the usual Ada plan is to carefully encapsulate such stuff in a package and provide several bodies for different targets. Code using such a package is portable of course (any differences are filed-off by the package). Portable representation clauses are a waste of time, especially as machines are inconsistent in the ways that they number bits. Just don't go there. (218 solves one such problem, but there are many others.) Randy.