@@ -67,73 +67,73 @@ struct dhcpv6_packet {
6767 uint8_t msg_type ;
6868 uint8_t transaction_id [3 ];
6969 uint8_t options [];
70- } __rte_packed ;
70+ } __attribute__(( __packed__ )) ;
7171
7272struct dhcpv6_option {
7373 rte_be16_t op_code ;
7474 rte_be16_t op_len ;
7575 uint8_t data [];
76- } __rte_packed ;
76+ } __attribute__(( __packed__ )) ;
7777
7878struct dhcpv6_opt_dns_servers {
7979 uint16_t opt_code ;
8080 uint16_t opt_len ;
8181 struct in6_addr dns_server_addrs []; // Array of IPv6 addresses
82- } __rte_packed ;
82+ } __attribute__(( __packed__ )) ;
8383
8484// client id can be of any type, this is the maximum size allowed
8585struct dhcpv6_opt_client_id {
8686 rte_be16_t op_code ;
8787 rte_be16_t op_len ;
8888 uint8_t id [128 ];
89- } __rte_packed ;
89+ } __attribute__(( __packed__ )) ;
9090
9191struct dhcpv6_ia_na {
9292 rte_be32_t iaid ;
9393 rte_be32_t t1 ;
9494 rte_be32_t t2 ;
9595 struct dhcpv6_option options [];
96- } __rte_packed ;
96+ } __attribute__(( __packed__ )) ;
9797
9898struct dhcpv6_opt_ia_na {
9999 rte_be16_t op_code ;
100100 rte_be16_t op_len ;
101101 struct dhcpv6_ia_na ia_na ;
102- } __rte_packed ;
102+ } __attribute__(( __packed__ )) ;
103103
104104struct dhcpv6_opt_vnd_cls {
105105 rte_be16_t op_code ;
106106 rte_be16_t op_len ;
107107 rte_be32_t entp_id ;
108108 rte_be16_t opq_data_len ;
109109 uint8_t opq_data [];
110- } __rte_packed ;
110+ } __attribute__(( __packed__ )) ;
111111
112112struct dhcpv6_opt_usr_cls {
113113 rte_be16_t op_code ;
114114 rte_be16_t op_len ;
115115 rte_be16_t sub_opt_len ;
116116 uint8_t sub_opt_data [];
117- } __rte_packed ;
117+ } __attribute__(( __packed__ )) ;
118118
119119struct dhcpv6_ia_addr {
120120 uint8_t ipv6 [16 ];
121121 rte_be32_t preferred_lifetime ;
122122 rte_be32_t valid_lifetime ;
123123 struct dhcpv6_option options [];
124- } __rte_packed ;
124+ } __attribute__(( __packed__ )) ;
125125
126126struct dhcpv6_opt_ia_addr {
127127 rte_be16_t op_code ;
128128 rte_be16_t op_len ;
129129 struct dhcpv6_ia_addr addr ;
130- } __rte_packed ;
130+ } __attribute__(( __packed__ )) ;
131131
132132struct dhcpv6_opt_status_code {
133133 rte_be16_t op_code ;
134134 rte_be16_t op_len ;
135135 rte_be16_t status ;
136- } __rte_packed ;
136+ } __attribute__(( __packed__ )) ;
137137
138138struct dhcpv6_duid_ll {
139139 rte_be16_t type ;
@@ -154,31 +154,31 @@ struct dhcpv6_ia_addr_status {
154154 rte_be32_t preferred_lifetime ;
155155 rte_be32_t valid_lifetime ;
156156 struct dhcpv6_opt_status_code options [1 ];
157- } __rte_packed ;
157+ } __attribute__(( __packed__ )) ;
158158
159159struct dhcpv6_opt_ia_addr_status {
160160 rte_be16_t op_code ;
161161 rte_be16_t op_len ;
162162 struct dhcpv6_ia_addr_status addr ;
163- } __rte_packed ;
163+ } __attribute__(( __packed__ )) ;
164164
165165struct dhcpv6_ia_na_single_addr_status {
166166 rte_be32_t iaid ;
167167 rte_be32_t t1 ;
168168 rte_be32_t t2 ;
169169 struct dhcpv6_opt_ia_addr_status options [1 ];
170- } __rte_packed ;
170+ } __attribute__(( __packed__ )) ;
171171
172172struct dhcpv6_opt_ia_na_single_addr_status {
173173 rte_be16_t op_code ;
174174 rte_be16_t op_len ;
175175 struct dhcpv6_ia_na_single_addr_status ia_na ;
176- } __rte_packed ;
176+ } __attribute__(( __packed__ )) ;
177177
178178struct dhcpv6_opt_boot_file_url {
179179 rte_be16_t op_code ;
180180 rte_be16_t op_len ;
181181 char boot_file_url [DHCPV6_BOOT_FILE_BUF_LEN ];
182- } __rte_packed ;
182+ } __attribute__(( __packed__ )) ;
183183
184184#endif
0 commit comments