.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* SCTP kernel reference Implementation |
---|
2 | 3 | * (C) Copyright IBM Corp. 2001, 2004 |
---|
3 | 4 | * Copyright (c) 1999-2000 Cisco, Inc. |
---|
.. | .. |
---|
9 | 10 | * This file is part of the SCTP kernel reference Implementation |
---|
10 | 11 | * |
---|
11 | 12 | * Various protocol defined structures. |
---|
12 | | - * |
---|
13 | | - * This SCTP implementation is free software; |
---|
14 | | - * you can redistribute it and/or modify it under the terms of |
---|
15 | | - * the GNU General Public License as published by |
---|
16 | | - * the Free Software Foundation; either version 2, or (at your option) |
---|
17 | | - * any later version. |
---|
18 | | - * |
---|
19 | | - * This SCTP implementation is distributed in the hope that it |
---|
20 | | - * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
---|
21 | | - * ************************ |
---|
22 | | - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
23 | | - * See the GNU General Public License for more details. |
---|
24 | | - * |
---|
25 | | - * You should have received a copy of the GNU General Public License |
---|
26 | | - * along with GNU CC; see the file COPYING. If not, see |
---|
27 | | - * <http://www.gnu.org/licenses/>. |
---|
28 | 13 | * |
---|
29 | 14 | * Please send any bug reports or fixes you make to the |
---|
30 | 15 | * email address(es): |
---|
.. | .. |
---|
236 | 221 | __be16 stream; |
---|
237 | 222 | __be16 ssn; |
---|
238 | 223 | __u32 ppid; |
---|
239 | | - __u8 payload[0]; |
---|
| 224 | + __u8 payload[]; |
---|
240 | 225 | }; |
---|
241 | 226 | |
---|
242 | 227 | struct sctp_data_chunk { |
---|
.. | .. |
---|
284 | 269 | __be16 num_outbound_streams; |
---|
285 | 270 | __be16 num_inbound_streams; |
---|
286 | 271 | __be32 initial_tsn; |
---|
287 | | - __u8 params[0]; |
---|
| 272 | + __u8 params[]; |
---|
288 | 273 | }; |
---|
289 | 274 | |
---|
290 | 275 | struct sctp_init_chunk { |
---|
.. | .. |
---|
314 | 299 | /* Section 3.3.2.1 Host Name Address (11) */ |
---|
315 | 300 | struct sctp_hostname_param { |
---|
316 | 301 | struct sctp_paramhdr param_hdr; |
---|
317 | | - uint8_t hostname[0]; |
---|
| 302 | + uint8_t hostname[]; |
---|
318 | 303 | }; |
---|
319 | 304 | |
---|
320 | 305 | /* Section 3.3.2.1 Supported Address Types (12) */ |
---|
321 | 306 | struct sctp_supported_addrs_param { |
---|
322 | 307 | struct sctp_paramhdr param_hdr; |
---|
323 | | - __be16 types[0]; |
---|
| 308 | + __be16 types[]; |
---|
324 | 309 | }; |
---|
325 | 310 | |
---|
326 | 311 | /* ADDIP Section 3.2.6 Adaptation Layer Indication */ |
---|
.. | .. |
---|
332 | 317 | /* ADDIP Section 4.2.7 Supported Extensions Parameter */ |
---|
333 | 318 | struct sctp_supported_ext_param { |
---|
334 | 319 | struct sctp_paramhdr param_hdr; |
---|
335 | | - __u8 chunks[0]; |
---|
| 320 | + __u8 chunks[]; |
---|
336 | 321 | }; |
---|
337 | 322 | |
---|
338 | 323 | /* AUTH Section 3.1 Random */ |
---|
339 | 324 | struct sctp_random_param { |
---|
340 | 325 | struct sctp_paramhdr param_hdr; |
---|
341 | | - __u8 random_val[0]; |
---|
| 326 | + __u8 random_val[]; |
---|
342 | 327 | }; |
---|
343 | 328 | |
---|
344 | 329 | /* AUTH Section 3.2 Chunk List */ |
---|
345 | 330 | struct sctp_chunks_param { |
---|
346 | 331 | struct sctp_paramhdr param_hdr; |
---|
347 | | - __u8 chunks[0]; |
---|
| 332 | + __u8 chunks[]; |
---|
348 | 333 | }; |
---|
349 | 334 | |
---|
350 | 335 | /* AUTH Section 3.3 HMAC Algorithm */ |
---|
351 | 336 | struct sctp_hmac_algo_param { |
---|
352 | 337 | struct sctp_paramhdr param_hdr; |
---|
353 | | - __be16 hmac_ids[0]; |
---|
| 338 | + __be16 hmac_ids[]; |
---|
354 | 339 | }; |
---|
355 | 340 | |
---|
356 | 341 | /* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2): |
---|
.. | .. |
---|
365 | 350 | /* Section 3.3.3.1 State Cookie (7) */ |
---|
366 | 351 | struct sctp_cookie_param { |
---|
367 | 352 | struct sctp_paramhdr p; |
---|
368 | | - __u8 body[0]; |
---|
| 353 | + __u8 body[]; |
---|
369 | 354 | }; |
---|
370 | 355 | |
---|
371 | 356 | /* Section 3.3.3.1 Unrecognized Parameters (8) */ |
---|
.. | .. |
---|
399 | 384 | __be32 a_rwnd; |
---|
400 | 385 | __be16 num_gap_ack_blocks; |
---|
401 | 386 | __be16 num_dup_tsns; |
---|
402 | | - union sctp_sack_variable variable[0]; |
---|
| 387 | + union sctp_sack_variable variable[]; |
---|
403 | 388 | }; |
---|
404 | 389 | |
---|
405 | 390 | struct sctp_sack_chunk { |
---|
.. | .. |
---|
451 | 436 | struct sctp_errhdr { |
---|
452 | 437 | __be16 cause; |
---|
453 | 438 | __be16 length; |
---|
454 | | - __u8 variable[0]; |
---|
| 439 | + __u8 variable[]; |
---|
455 | 440 | }; |
---|
456 | 441 | |
---|
457 | 442 | struct sctp_operr_chunk { |
---|
.. | .. |
---|
609 | 594 | |
---|
610 | 595 | struct sctp_fwdtsn_hdr { |
---|
611 | 596 | __be32 new_cum_tsn; |
---|
612 | | - struct sctp_fwdtsn_skip skip[0]; |
---|
| 597 | + struct sctp_fwdtsn_skip skip[]; |
---|
613 | 598 | }; |
---|
614 | 599 | |
---|
615 | 600 | struct sctp_fwdtsn_chunk { |
---|
.. | .. |
---|
626 | 611 | |
---|
627 | 612 | struct sctp_ifwdtsn_hdr { |
---|
628 | 613 | __be32 new_cum_tsn; |
---|
629 | | - struct sctp_ifwdtsn_skip skip[0]; |
---|
| 614 | + struct sctp_ifwdtsn_skip skip[]; |
---|
630 | 615 | }; |
---|
631 | 616 | |
---|
632 | 617 | struct sctp_ifwdtsn_chunk { |
---|
.. | .. |
---|
673 | 658 | |
---|
674 | 659 | struct sctp_addiphdr { |
---|
675 | 660 | __be32 serial; |
---|
676 | | - __u8 params[0]; |
---|
| 661 | + __u8 params[]; |
---|
677 | 662 | }; |
---|
678 | 663 | |
---|
679 | 664 | struct sctp_addip_chunk { |
---|
.. | .. |
---|
733 | 718 | struct sctp_authhdr { |
---|
734 | 719 | __be16 shkey_id; |
---|
735 | 720 | __be16 hmac_id; |
---|
736 | | - __u8 hmac[0]; |
---|
| 721 | + __u8 hmac[]; |
---|
737 | 722 | }; |
---|
738 | 723 | |
---|
739 | 724 | struct sctp_auth_chunk { |
---|
.. | .. |
---|
748 | 733 | |
---|
749 | 734 | struct sctp_reconf_chunk { |
---|
750 | 735 | struct sctp_chunkhdr chunk_hdr; |
---|
751 | | - __u8 params[0]; |
---|
| 736 | + __u8 params[]; |
---|
752 | 737 | }; |
---|
753 | 738 | |
---|
754 | 739 | struct sctp_strreset_outreq { |
---|
.. | .. |
---|
756 | 741 | __be32 request_seq; |
---|
757 | 742 | __be32 response_seq; |
---|
758 | 743 | __be32 send_reset_at_tsn; |
---|
759 | | - __be16 list_of_streams[0]; |
---|
| 744 | + __be16 list_of_streams[]; |
---|
760 | 745 | }; |
---|
761 | 746 | |
---|
762 | 747 | struct sctp_strreset_inreq { |
---|
763 | 748 | struct sctp_paramhdr param_hdr; |
---|
764 | 749 | __be32 request_seq; |
---|
765 | | - __be16 list_of_streams[0]; |
---|
| 750 | + __be16 list_of_streams[]; |
---|
766 | 751 | }; |
---|
767 | 752 | |
---|
768 | 753 | struct sctp_strreset_tsnreq { |
---|