hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/include/net/sctp/constants.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /* SCTP kernel implementation
23 * (C) Copyright IBM Corp. 2001, 2004
34 * Copyright (c) 1999-2000 Cisco, Inc.
....@@ -5,22 +6,6 @@
56 * Copyright (c) 2001 Intel Corp.
67 *
78 * This file is part of the SCTP kernel implementation
8
- *
9
- * This SCTP implementation is free software;
10
- * you can redistribute it and/or modify it under the terms of
11
- * the GNU General Public License as published by
12
- * the Free Software Foundation; either version 2, or (at your option)
13
- * any later version.
14
- *
15
- * This SCTP implementation is distributed in the hope that it
16
- * will be useful, but WITHOUT ANY WARRANTY; without even the implied
17
- * ************************
18
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
- * See the GNU General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with GNU CC; see the file COPYING. If not, see
23
- * <http://www.gnu.org/licenses/>.
249 *
2510 * Please send any bug reports or fixes you make to the
2611 * email address(es):
....@@ -71,7 +56,7 @@
7156 SCTP_NUM_AUTH_CHUNK_TYPES)
7257
7358 /* These are the different flavours of event. */
74
-enum sctp_event {
59
+enum sctp_event_type {
7560 SCTP_EVENT_T_CHUNK = 1,
7661 SCTP_EVENT_T_TIMEOUT,
7762 SCTP_EVENT_T_OTHER,
....@@ -147,11 +132,6 @@
147132
148133 #define sctp_chunk_is_data(a) (a->chunk_hdr->type == SCTP_CID_DATA || \
149134 a->chunk_hdr->type == SCTP_CID_I_DATA)
150
-
151
-/* Calculate the actual data size in a data chunk */
152
-#define SCTP_DATA_SNDSIZE(c) ((int)((unsigned long)(c->chunk_end) - \
153
- (unsigned long)(c->chunk_hdr) - \
154
- sctp_datachk_len(&c->asoc->stream)))
155135
156136 /* Internal error codes */
157137 enum sctp_ierror {
....@@ -306,6 +286,18 @@
306286 * functions simpler to write.
307287 */
308288
289
+/* These are the values for pf exposure, UNUSED is to keep compatible with old
290
+ * applications by default.
291
+ */
292
+enum {
293
+ SCTP_PF_EXPOSE_UNSET,
294
+ SCTP_PF_EXPOSE_DISABLE,
295
+ SCTP_PF_EXPOSE_ENABLE,
296
+};
297
+#define SCTP_PF_EXPOSE_MAX SCTP_PF_EXPOSE_ENABLE
298
+
299
+#define SCTP_PS_RETRANS_MAX 0xffff
300
+
309301 /* These return values describe the success or failure of a number of
310302 * routines which form the lower interface to SCTP_outqueue.
311303 */