mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Added extra compiler specific structure packing options.
This commit is contained in:
parent
d6ec78a568
commit
aa2ffbfde5
|
@ -79,6 +79,9 @@ void icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t);
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct icmp_echo_hdr {
|
struct icmp_echo_hdr {
|
||||||
PACK_STRUCT_FIELD(u16_t _type_code);
|
PACK_STRUCT_FIELD(u16_t _type_code);
|
||||||
PACK_STRUCT_FIELD(u16_t chksum);
|
PACK_STRUCT_FIELD(u16_t chksum);
|
||||||
|
@ -88,6 +91,9 @@ struct icmp_echo_hdr {
|
||||||
PACK_STRUCT_END
|
PACK_STRUCT_END
|
||||||
|
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct icmp_dur_hdr {
|
struct icmp_dur_hdr {
|
||||||
PACK_STRUCT_FIELD(u16_t _type_code);
|
PACK_STRUCT_FIELD(u16_t _type_code);
|
||||||
PACK_STRUCT_FIELD(u16_t chksum);
|
PACK_STRUCT_FIELD(u16_t chksum);
|
||||||
|
@ -96,6 +102,9 @@ struct icmp_dur_hdr {
|
||||||
PACK_STRUCT_END
|
PACK_STRUCT_END
|
||||||
|
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct icmp_te_hdr {
|
struct icmp_te_hdr {
|
||||||
PACK_STRUCT_FIELD(u16_t _type_code);
|
PACK_STRUCT_FIELD(u16_t _type_code);
|
||||||
PACK_STRUCT_FIELD(u16_t chksum);
|
PACK_STRUCT_FIELD(u16_t chksum);
|
||||||
|
|
|
@ -84,6 +84,9 @@ extern "C" {
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct igmp_msg {
|
struct igmp_msg {
|
||||||
PACK_STRUCT_FIELD(u8_t igmp_msgtype);
|
PACK_STRUCT_FIELD(u8_t igmp_msgtype);
|
||||||
PACK_STRUCT_FIELD(u8_t igmp_maxresp);
|
PACK_STRUCT_FIELD(u8_t igmp_maxresp);
|
||||||
|
|
|
@ -114,6 +114,9 @@ struct ip_pcb {
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct ip_hdr {
|
struct ip_hdr {
|
||||||
/* version / header length / type of service */
|
/* version / header length / type of service */
|
||||||
PACK_STRUCT_FIELD(u16_t _v_hl_tos);
|
PACK_STRUCT_FIELD(u16_t _v_hl_tos);
|
||||||
|
|
|
@ -42,6 +42,9 @@ extern "C" {
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct ip_addr {
|
struct ip_addr {
|
||||||
PACK_STRUCT_FIELD(u32_t addr);
|
PACK_STRUCT_FIELD(u32_t addr);
|
||||||
} PACK_STRUCT_STRUCT;
|
} PACK_STRUCT_STRUCT;
|
||||||
|
@ -58,6 +61,9 @@ PACK_STRUCT_END
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct ip_addr2 {
|
struct ip_addr2 {
|
||||||
PACK_STRUCT_FIELD(u16_t addrw[2]);
|
PACK_STRUCT_FIELD(u16_t addrw[2]);
|
||||||
} PACK_STRUCT_STRUCT;
|
} PACK_STRUCT_STRUCT;
|
||||||
|
|
|
@ -44,6 +44,9 @@ extern "C" {
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct ip_addr {
|
struct ip_addr {
|
||||||
PACK_STRUCT_FIELD(u32_t addr[4]);
|
PACK_STRUCT_FIELD(u32_t addr[4]);
|
||||||
} PACK_STRUCT_STRUCT;
|
} PACK_STRUCT_STRUCT;
|
||||||
|
@ -60,6 +63,9 @@ PACK_STRUCT_END
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct ip_addr2 {
|
struct ip_addr2 {
|
||||||
PACK_STRUCT_FIELD(u16_t addrw[2]);
|
PACK_STRUCT_FIELD(u16_t addrw[2]);
|
||||||
} PACK_STRUCT_STRUCT;
|
} PACK_STRUCT_STRUCT;
|
||||||
|
|
|
@ -76,6 +76,9 @@ struct dhcp
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
/** minimum set of fields of any DHCP message */
|
/** minimum set of fields of any DHCP message */
|
||||||
struct dhcp_msg
|
struct dhcp_msg
|
||||||
{
|
{
|
||||||
|
|
|
@ -210,6 +210,9 @@ void tcp_rexmit_rto (struct tcp_pcb *pcb);
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct tcp_hdr {
|
struct tcp_hdr {
|
||||||
PACK_STRUCT_FIELD(u16_t src);
|
PACK_STRUCT_FIELD(u16_t src);
|
||||||
PACK_STRUCT_FIELD(u16_t dest);
|
PACK_STRUCT_FIELD(u16_t dest);
|
||||||
|
|
|
@ -52,6 +52,9 @@ extern "C" {
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct udp_hdr {
|
struct udp_hdr {
|
||||||
PACK_STRUCT_FIELD(u16_t src);
|
PACK_STRUCT_FIELD(u16_t src);
|
||||||
PACK_STRUCT_FIELD(u16_t dest); /* src/dest UDP ports */
|
PACK_STRUCT_FIELD(u16_t dest); /* src/dest UDP ports */
|
||||||
|
|
|
@ -60,6 +60,9 @@ extern "C" {
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct eth_addr {
|
struct eth_addr {
|
||||||
PACK_STRUCT_FIELD(u8_t addr[ETHARP_HWADDR_LEN]);
|
PACK_STRUCT_FIELD(u8_t addr[ETHARP_HWADDR_LEN]);
|
||||||
} PACK_STRUCT_STRUCT;
|
} PACK_STRUCT_STRUCT;
|
||||||
|
@ -72,6 +75,9 @@ PACK_STRUCT_END
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct eth_hdr {
|
struct eth_hdr {
|
||||||
#if ETH_PAD_SIZE
|
#if ETH_PAD_SIZE
|
||||||
PACK_STRUCT_FIELD(u8_t padding[ETH_PAD_SIZE]);
|
PACK_STRUCT_FIELD(u8_t padding[ETH_PAD_SIZE]);
|
||||||
|
@ -89,6 +95,9 @@ PACK_STRUCT_END
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
/** the ARP message */
|
/** the ARP message */
|
||||||
struct etharp_hdr {
|
struct etharp_hdr {
|
||||||
PACK_STRUCT_FIELD(struct eth_hdr ethhdr);
|
PACK_STRUCT_FIELD(struct eth_hdr ethhdr);
|
||||||
|
@ -110,6 +119,9 @@ PACK_STRUCT_END
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct ethip_hdr {
|
struct ethip_hdr {
|
||||||
PACK_STRUCT_FIELD(struct eth_hdr eth);
|
PACK_STRUCT_FIELD(struct eth_hdr eth);
|
||||||
PACK_STRUCT_FIELD(struct ip_hdr ip);
|
PACK_STRUCT_FIELD(struct ip_hdr ip);
|
||||||
|
|
|
@ -78,6 +78,9 @@
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct pppoehdr {
|
struct pppoehdr {
|
||||||
PACK_STRUCT_FIELD(u8_t vertype);
|
PACK_STRUCT_FIELD(u8_t vertype);
|
||||||
PACK_STRUCT_FIELD(u8_t code);
|
PACK_STRUCT_FIELD(u8_t code);
|
||||||
|
@ -93,6 +96,9 @@ PACK_STRUCT_END
|
||||||
# include "arch/bpstruct.h"
|
# include "arch/bpstruct.h"
|
||||||
#endif
|
#endif
|
||||||
PACK_STRUCT_BEGIN
|
PACK_STRUCT_BEGIN
|
||||||
|
#if (defined(__MWERKS__) || defined(__CWCC__))
|
||||||
|
#pragma options align= packed
|
||||||
|
#endif
|
||||||
struct pppoetag {
|
struct pppoetag {
|
||||||
PACK_STRUCT_FIELD(u16_t tag);
|
PACK_STRUCT_FIELD(u16_t tag);
|
||||||
PACK_STRUCT_FIELD(u16_t len);
|
PACK_STRUCT_FIELD(u16_t len);
|
||||||
|
|
Loading…
Reference in a new issue