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!.POSTED!not-for-mail From: Paul Rubin 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 15:44:11 -0700 Organization: A noiseless patient Spider Message-ID: <87y3gryvus.fsf@nightsong.com> References: <2821b8e0-2c64-4621-b65e-337027fc121e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="8ee8a87c586ad688bbbd7b3afaf6ee4e"; logging-data="21245"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/I1K7lF/IAQYxSRljIkqb7" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:IW7bs9FewCAaycNxS/0MDyAJSCM= sha1:ZlMJxPxwJnNiOcD78C3YA3YikGs= Xref: reader02.eternal-september.org comp.lang.ada:52223 Date: 2018-05-10T15:44:11-07:00 List-Id: "Dan'l Miller" writes: > Serialization? LoL!! Streamed field-by-field (even textual?) > serialization like OO designs do? Serialization just means representing a data structure as a series of bytes. Some languages can do it automatically by reflection on the datatype description, giving a convenient representation for exchanging those objects with another program written in the same language. In the case of an IP packet you'd write the serialization code yourself so that the representation would be packet format sent over the wire. > LoL!! Oh, so an IC manufacturer doesn't want to sell their chips to > both big-endian and little-endian accounts? Or is it that the IC > manufacturer wants to write entirely different source code for > different processors? Do you write any actual programs, bro? To switch between big and little endian processors in C you change a #ifdef to redefine some byte swapping macros, not write entirely different source code. Here: https://linux.die.net/man/3/byteorder It's inconceivable to me that Ada networking programs don't do something similar.