hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/include/linux/sctp.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /* SCTP kernel reference Implementation
23 * (C) Copyright IBM Corp. 2001, 2004
34 * Copyright (c) 1999-2000 Cisco, Inc.
....@@ -9,22 +10,6 @@
910 * This file is part of the SCTP kernel reference Implementation
1011 *
1112 * 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/>.
2813 *
2914 * Please send any bug reports or fixes you make to the
3015 * email address(es):
....@@ -236,7 +221,7 @@
236221 __be16 stream;
237222 __be16 ssn;
238223 __u32 ppid;
239
- __u8 payload[0];
224
+ __u8 payload[];
240225 };
241226
242227 struct sctp_data_chunk {
....@@ -284,7 +269,7 @@
284269 __be16 num_outbound_streams;
285270 __be16 num_inbound_streams;
286271 __be32 initial_tsn;
287
- __u8 params[0];
272
+ __u8 params[];
288273 };
289274
290275 struct sctp_init_chunk {
....@@ -314,13 +299,13 @@
314299 /* Section 3.3.2.1 Host Name Address (11) */
315300 struct sctp_hostname_param {
316301 struct sctp_paramhdr param_hdr;
317
- uint8_t hostname[0];
302
+ uint8_t hostname[];
318303 };
319304
320305 /* Section 3.3.2.1 Supported Address Types (12) */
321306 struct sctp_supported_addrs_param {
322307 struct sctp_paramhdr param_hdr;
323
- __be16 types[0];
308
+ __be16 types[];
324309 };
325310
326311 /* ADDIP Section 3.2.6 Adaptation Layer Indication */
....@@ -332,25 +317,25 @@
332317 /* ADDIP Section 4.2.7 Supported Extensions Parameter */
333318 struct sctp_supported_ext_param {
334319 struct sctp_paramhdr param_hdr;
335
- __u8 chunks[0];
320
+ __u8 chunks[];
336321 };
337322
338323 /* AUTH Section 3.1 Random */
339324 struct sctp_random_param {
340325 struct sctp_paramhdr param_hdr;
341
- __u8 random_val[0];
326
+ __u8 random_val[];
342327 };
343328
344329 /* AUTH Section 3.2 Chunk List */
345330 struct sctp_chunks_param {
346331 struct sctp_paramhdr param_hdr;
347
- __u8 chunks[0];
332
+ __u8 chunks[];
348333 };
349334
350335 /* AUTH Section 3.3 HMAC Algorithm */
351336 struct sctp_hmac_algo_param {
352337 struct sctp_paramhdr param_hdr;
353
- __be16 hmac_ids[0];
338
+ __be16 hmac_ids[];
354339 };
355340
356341 /* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2):
....@@ -365,7 +350,7 @@
365350 /* Section 3.3.3.1 State Cookie (7) */
366351 struct sctp_cookie_param {
367352 struct sctp_paramhdr p;
368
- __u8 body[0];
353
+ __u8 body[];
369354 };
370355
371356 /* Section 3.3.3.1 Unrecognized Parameters (8) */
....@@ -399,7 +384,7 @@
399384 __be32 a_rwnd;
400385 __be16 num_gap_ack_blocks;
401386 __be16 num_dup_tsns;
402
- union sctp_sack_variable variable[0];
387
+ union sctp_sack_variable variable[];
403388 };
404389
405390 struct sctp_sack_chunk {
....@@ -451,7 +436,7 @@
451436 struct sctp_errhdr {
452437 __be16 cause;
453438 __be16 length;
454
- __u8 variable[0];
439
+ __u8 variable[];
455440 };
456441
457442 struct sctp_operr_chunk {
....@@ -609,7 +594,7 @@
609594
610595 struct sctp_fwdtsn_hdr {
611596 __be32 new_cum_tsn;
612
- struct sctp_fwdtsn_skip skip[0];
597
+ struct sctp_fwdtsn_skip skip[];
613598 };
614599
615600 struct sctp_fwdtsn_chunk {
....@@ -626,7 +611,7 @@
626611
627612 struct sctp_ifwdtsn_hdr {
628613 __be32 new_cum_tsn;
629
- struct sctp_ifwdtsn_skip skip[0];
614
+ struct sctp_ifwdtsn_skip skip[];
630615 };
631616
632617 struct sctp_ifwdtsn_chunk {
....@@ -673,7 +658,7 @@
673658
674659 struct sctp_addiphdr {
675660 __be32 serial;
676
- __u8 params[0];
661
+ __u8 params[];
677662 };
678663
679664 struct sctp_addip_chunk {
....@@ -733,7 +718,7 @@
733718 struct sctp_authhdr {
734719 __be16 shkey_id;
735720 __be16 hmac_id;
736
- __u8 hmac[0];
721
+ __u8 hmac[];
737722 };
738723
739724 struct sctp_auth_chunk {
....@@ -748,7 +733,7 @@
748733
749734 struct sctp_reconf_chunk {
750735 struct sctp_chunkhdr chunk_hdr;
751
- __u8 params[0];
736
+ __u8 params[];
752737 };
753738
754739 struct sctp_strreset_outreq {
....@@ -756,13 +741,13 @@
756741 __be32 request_seq;
757742 __be32 response_seq;
758743 __be32 send_reset_at_tsn;
759
- __be16 list_of_streams[0];
744
+ __be16 list_of_streams[];
760745 };
761746
762747 struct sctp_strreset_inreq {
763748 struct sctp_paramhdr param_hdr;
764749 __be32 request_seq;
765
- __be16 list_of_streams[0];
750
+ __be16 list_of_streams[];
766751 };
767752
768753 struct sctp_strreset_tsnreq {