Re: [iproute PATCH 1/2] include: Add linux/sctp.h

2016-07-31 Thread Stephen Hemminger
On Fri, 29 Jul 2016 22:27:19 +
Phil Sutter  wrote:

> This header does not exist in this form upstream yet, as it contains
> struct sctp_info which is required for SCTP support in 'ss' and hasn't
> been exported yet.
> 
> Signed-off-by: Phil Sutter 

Holding off on this until header is correctly exported from kernel.



[iproute PATCH 1/2] include: Add linux/sctp.h

2016-07-29 Thread Phil Sutter
This header does not exist in this form upstream yet, as it contains
struct sctp_info which is required for SCTP support in 'ss' and hasn't
been exported yet.

Signed-off-by: Phil Sutter 
---
 include/linux/sctp.h | 1005 ++
 1 file changed, 1005 insertions(+)
 create mode 100644 include/linux/sctp.h

diff --git a/include/linux/sctp.h b/include/linux/sctp.h
new file mode 100644
index 0..eee08c066679e
--- /dev/null
+++ b/include/linux/sctp.h
@@ -0,0 +1,1005 @@
+/* SCTP kernel implementation
+ * (C) Copyright IBM Corp. 2001, 2004
+ * Copyright (c) 1999-2000 Cisco, Inc.
+ * Copyright (c) 1999-2001 Motorola, Inc.
+ * Copyright (c) 2002 Intel Corp.
+ *
+ * This file is part of the SCTP kernel implementation
+ *
+ * This header represents the structures and constants needed to support
+ * the SCTP Extension to the Sockets API.
+ *
+ * This SCTP implementation is free software;
+ * you can redistribute it and/or modify it under the terms of
+ * the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This SCTP implementation is distributed in the hope that it
+ * will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * 
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU CC; see the file COPYING.  If not, see
+ * .
+ *
+ * Please send any bug reports or fixes you make to the
+ * email address(es):
+ *lksctp developers 
+ *
+ * Or submit a bug report through the following website:
+ *http://www.sf.net/projects/lksctp
+ *
+ * Written or modified by:
+ *La Monte H.P. Yarroll
+ *R. Stewart   
+ *K. Morneau   
+ *Q. Xie   
+ *Karl Knutson 
+ *Jon Grimm
+ *Daisy Chang  
+ *Ryan Layer   
+ *Ardelle Fan  
+ *Sridhar Samudrala
+ *Inaky Perez-Gonzalez 
+ *Vlad Yasevich
+ *
+ * Any bugs reported given to us we will try to fix... any fixes shared will
+ * be incorporated into the next SCTP release.
+ */
+
+#ifndef _SCTP_H
+#define _SCTP_H
+
+#include 
+#include 
+
+typedef __s32 sctp_assoc_t;
+
+/* The following symbols come from the Sockets API Extensions for
+ * SCTP .
+ */
+#define SCTP_RTOINFO   0
+#define SCTP_ASSOCINFO  1
+#define SCTP_INITMSG   2
+#define SCTP_NODELAY   3   /* Get/set nodelay option. */
+#define SCTP_AUTOCLOSE 4
+#define SCTP_SET_PEER_PRIMARY_ADDR 5
+#define SCTP_PRIMARY_ADDR  6
+#define SCTP_ADAPTATION_LAYER  7
+#define SCTP_DISABLE_FRAGMENTS 8
+#define SCTP_PEER_ADDR_PARAMS  9
+#define SCTP_DEFAULT_SEND_PARAM10
+#define SCTP_EVENTS11
+#define SCTP_I_WANT_MAPPED_V4_ADDR 12  /* Turn on/off mapped v4 addresses  */
+#define SCTP_MAXSEG13  /* Get/set maximum fragment. */
+#define SCTP_STATUS14
+#define SCTP_GET_PEER_ADDR_INFO15
+#define SCTP_DELAYED_ACK_TIME  16
+#define SCTP_DELAYED_ACK SCTP_DELAYED_ACK_TIME
+#define SCTP_DELAYED_SACK SCTP_DELAYED_ACK_TIME
+#define SCTP_CONTEXT   17
+#define SCTP_FRAGMENT_INTERLEAVE   18
+#define SCTP_PARTIAL_DELIVERY_POINT19 /* Set/Get partial delivery point */
+#define SCTP_MAX_BURST 20  /* Set/Get max burst */
+#define SCTP_AUTH_CHUNK21  /* Set only: add a chunk type to 
authenticate */
+#define SCTP_HMAC_IDENT22
+#define SCTP_AUTH_KEY  23
+#define SCTP_AUTH_ACTIVE_KEY   24
+#define SCTP_AUTH_DELETE_KEY   25
+#define SCTP_PEER_AUTH_CHUNKS  26  /* Read only */
+#define SCTP_LOCAL_AUTH_CHUNKS 27  /* Read only */
+#define SCTP_GET_ASSOC_NUMBER  28  /* Read only */
+#define SCTP_GET_ASSOC_ID_LIST 29  /* Read only */
+#define SCTP_AUTO_ASCONF   30
+#define SCTP_PEER_ADDR_THLDS   31
+#define SCTP_RECVRCVINFO   32
+#define SCTP_RECVNXTINFO   33
+#define SCTP_DEFAULT_SNDINFO   34
+
+/* Internal Socket Options. Some of the sctp library functions are
+ * implemented using these socket options.
+ */
+#define SCTP_SOCKOPT_BINDX_ADD 100 /* BINDX requests for adding addrs */
+#define SCTP_SOCKOPT_BINDX_REM 101 /* BINDX requests for removing addrs. */
+#define SCTP_SOCKOPT_PEELOFF   102 /* peel off association. */
+/* Options 104-106 are deprecated and removed. Do not use this space */
+#define SCTP_SOCKOPT_CONNECTX_OLD  107 /* CONNECTX old requests. */
+#define