Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Little ou Big endian ?

3 réponses
Avatar
Zouplaz
Bonjour, dans un datagramme IP les données sont organisées en Big ou Little
endian ?

Est-ce que ça s'applique aussi aux données dont la longueur est inférieure
à 8 bits ?

Exemple les champs IHL et Version


Merci

3 réponses

Avatar
Xavier Roche
Zouplaz wrote:
Bonjour, dans un datagramme IP les données sont organisées en Big ou Little
endian ?


Les bits de poids forts sont "à gauche" (en premier), donc du big endian
si je ne dis pas de bêtises (on "tient" en premier le "gros" bout (pids
fort))

Voir <http://www.ietf.org/rfc/rfc791.txt?numbery1>, appendix B

APPENDIX B: Data Transmission Order

The order of transmission of the header and data described in this
document is resolved to the octet level. Whenever a diagram shows a
group of octets, the order of transmission of those octets is the normal
order in which they are read in English. For example, in the following
diagram the octets are transmitted in the order they are numbered.


0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 1 | 2 | 3 | 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 5 | 6 | 7 | 8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 9 | 10 | 11 | 12 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Transmission Order of Bytes

Figure 10.

Whenever an octet represents a numeric quantity the left most bit in the
diagram is the high order or most significant bit. That is, the bit
labeled 0 is the most significant bit. For example, the following
diagram represents the value 170 (decimal).


0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|1 0 1 0 1 0 1 0|
+-+-+-+-+-+-+-+-+

Significance of Bits

Figure 11.

Similarly, whenever a multi-octet field represents a numeric quantity
the left most bit of the whole field is the most significant bit. When
a multi-octet quantity is transmitted the most significant octet is
transmitted first.

Avatar
Zouplaz
Xavier Roche - :

Zouplaz wrote:
Bonjour, dans un datagramme IP les donn‚es sont organis‚es en Big ou
Little endian ?


Les bits de poids forts sont "… gauche" (en premier), donc du big
endian si je ne dis pas de bˆtises (on "tient" en premier le "gros"
bout (pids fort))


Merci bien !


Avatar
Nicolas Krebs
Bonjour,

Xavier Roche écrivit dans l'article news:ciujrb$v11$

Zouplaz wrote:
Bonjour, dans un datagramme IP les données sont organisées en Big ou Little
endian ?


Les bits de poids forts sont "à gauche" (en premier), donc du big endian
si je ne dis pas de bêtises (on "tient" en premier le "gros" bout (pids
fort))



Cette hiérarchie est francophone.

Veuillez traduire le terme « big endian » de votre réponse à l'individu
« Zouplaz », sous peine d'une amende de classe 42 et d'un retrait de
vingt minutes de votre autorisation de publication dans fmbd, avec une
période probatoire de (...)

[rfc 791]

Article publié dans fr.comp.normes.unicode, fr.comp.reseaux.ip,
fr.lettres.langue.francaise.