6363#define DHCPV6_OPT_BOOT_FILE 59
6464
6565// General definitions as per RFC
66- struct dhcpv6_packet {
66+ struct __rte_packed_begin dhcpv6_packet {
6767 uint8_t msg_type ;
6868 uint8_t transaction_id [3 ];
6969 uint8_t options [];
70- } __attribute__(( __packed__ )) ;
70+ } __rte_packed_end ;
7171
72- struct dhcpv6_option {
72+ struct __rte_packed_begin dhcpv6_option {
7373 rte_be16_t op_code ;
7474 rte_be16_t op_len ;
7575 uint8_t data [];
76- } __attribute__(( __packed__ )) ;
76+ } __rte_packed_end ;
7777
78- struct dhcpv6_opt_dns_servers {
78+ struct __rte_packed_begin 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- } __attribute__(( __packed__ )) ;
82+ } __rte_packed_end ;
8383
8484// client id can be of any type, this is the maximum size allowed
85- struct dhcpv6_opt_client_id {
85+ struct __rte_packed_begin dhcpv6_opt_client_id {
8686 rte_be16_t op_code ;
8787 rte_be16_t op_len ;
8888 uint8_t id [128 ];
89- } __attribute__(( __packed__ )) ;
89+ } __rte_packed_end ;
9090
91- struct dhcpv6_ia_na {
91+ struct __rte_packed_begin dhcpv6_ia_na {
9292 rte_be32_t iaid ;
9393 rte_be32_t t1 ;
9494 rte_be32_t t2 ;
9595 struct dhcpv6_option options [];
96- } __attribute__(( __packed__ )) ;
96+ } __rte_packed_end ;
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- } __attribute__(( __packed__ )) ;
102+ } __rte_packed_end ;
103103
104- struct dhcpv6_opt_vnd_cls {
104+ struct __rte_packed_begin 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- } __attribute__(( __packed__ )) ;
110+ } __rte_packed_end ;
111111
112- struct dhcpv6_opt_usr_cls {
112+ struct __rte_packed_begin 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- } __attribute__(( __packed__ )) ;
117+ } __rte_packed_end ;
118118
119- struct dhcpv6_ia_addr {
119+ struct __rte_packed_begin 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- } __attribute__(( __packed__ )) ;
124+ } __rte_packed_end ;
125125
126- struct dhcpv6_opt_ia_addr {
126+ struct __rte_packed_begin dhcpv6_opt_ia_addr {
127127 rte_be16_t op_code ;
128128 rte_be16_t op_len ;
129129 struct dhcpv6_ia_addr addr ;
130- } __attribute__(( __packed__ )) ;
130+ } __rte_packed_end ;
131131
132- struct dhcpv6_opt_status_code {
132+ struct __rte_packed_begin dhcpv6_opt_status_code {
133133 rte_be16_t op_code ;
134134 rte_be16_t op_len ;
135135 rte_be16_t status ;
136- } __attribute__(( __packed__ )) ;
136+ } __rte_packed_end ;
137137
138138struct dhcpv6_duid_ll {
139139 rte_be16_t type ;
@@ -149,36 +149,36 @@ struct dhcpv6_opt_server_id_ll {
149149 struct dhcpv6_duid_ll id ;
150150};
151151
152- struct dhcpv6_ia_addr_status {
152+ struct __rte_packed_begin dhcpv6_ia_addr_status {
153153 uint8_t ipv6 [16 ];
154154 rte_be32_t preferred_lifetime ;
155155 rte_be32_t valid_lifetime ;
156156 struct dhcpv6_opt_status_code options [1 ];
157- } __attribute__(( __packed__ )) ;
157+ } __rte_packed_end ;
158158
159- struct dhcpv6_opt_ia_addr_status {
159+ struct __rte_packed_begin 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- } __attribute__(( __packed__ )) ;
163+ } __rte_packed_end ;
164164
165- struct dhcpv6_ia_na_single_addr_status {
165+ struct __rte_packed_begin 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- } __attribute__(( __packed__ )) ;
170+ } __rte_packed_end ;
171171
172- struct dhcpv6_opt_ia_na_single_addr_status {
172+ struct __rte_packed_begin 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- } __attribute__(( __packed__ )) ;
176+ } __rte_packed_end ;
177177
178- struct dhcpv6_opt_boot_file_url {
178+ struct __rte_packed_begin 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- } __attribute__(( __packed__ )) ;
182+ } __rte_packed_end ;
183183
184184#endif
0 commit comments