All structures for network packets must have __attribute__((packed))
Ondrej Filip
feela at network.cz
Thu Oct 16 18:08:56 CEST 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 16.10.2014 17:54, Maksim Tamarsky wrote:
> All structures for network packets must have
> __attribute__((packed)) We already speak about this problem 2
> years ago. On my platform i have bad structure alignment in ospf
> and i need make this fix.
Thanks Maksim for the report. Added into git tree.
Ondrej
>
> ospf.h .............. struct immsb { #ifdef CPU_BIG_ENDIAN u8
> padding:5; u8 i:1; u8 m:1; u8 ms:1; #else u8 ms:1; u8 m:1; u8
> i:1; u8 padding:5; #endif }*__attribute__((packed))*;
>
> union imms { u8 byte; struct immsb bit;
> }*__attribute__((packed))*; .......
>
> -- RU: ????????? ?????? ????????????? ???????-???????????
>
> ??? ??-??-??? ?.??????, ????????? 39/41 ??.1302 ???????? ?????:
> 105187 ??????, ?????? ??.???????, ?.35, ??.NSG
>
> ???./????: +7 495 727-19-59 Web-????: http://www.nsg.ru
>
> EN: Maksim Tamarsky Software Engineer NSG Ltd. 35 Volnaya Street,
> 105187 Moscow, Russia +7 495 727-19-59 http://www.nsg.ru
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJUP+2VAAoJED82D4RIDoWP6mUP/jtpZIc0HufUZcI4Q0T6KqBL
H0WvEIBewKgMj+rr43pFyrZye4sU4lbEIM5OMshxA7H5lvQzFwz2dxJSjOBr8c7h
FtgsjfzkWqQoJEUI8Fo+YVjn+UBspQtkdY5PA+d+tuiM4QzNs5N4LWKam9CJgUSk
yL3TatsLilRg3PhXNvaptma0+8LeYmEO2OHGnlVJoEwB0Sj+6XQTItCymQI0OVup
slxtFSTU0kCrtjjeNaCegXCY2xeCkshA2pXbVYg7cWpBohkVzGSExpfteyM/u8xh
JGD4wDI+pkXeg9lXJ4xW0te7VZCQRhJbao23vDywpveBb1HOxDR7zL6cqTpD0DWz
XqGXXGLHQk4hsnfBLGpXO2ZO2lgfYXcG+Q5O3b3r9Dz6f7NcPzu9j9G7CkO6hXlP
osYLtikNwRdQQ1zxxNHlrj+WTfM5clSnrSa/SLJXopf+921z+faBJtqY1IVgl51f
40EMh0h5/M7Gv071Juc2fcBuJFIZYf5oNeD0xipZBYwHsv/qVx7P+yeLyrP6afYN
DflnRQVS5jfV9qKYFr4hxhb9DKRNgPKwG2xoIb0q01gbrXdRjbk39QibvyD+3Kn6
DJiE+5bfthS4XOxQb/vebEgBZEnQmld+vwCfR4NBGByo6T9rAEvqRopMTClMpJLN
cS9IM1kHKz3ZEy2FOVsj
=6/Lz
-----END PGP SIGNATURE-----
More information about the Bird-users
mailing list