Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
[linux-2.6-block.git] / include / net / sctp / user.h
CommitLineData
60c778b2 1/* SCTP kernel implementation
1da177e4
LT
2 * (C) Copyright IBM Corp. 2001, 2004
3 * Copyright (c) 1999-2000 Cisco, Inc.
4 * Copyright (c) 1999-2001 Motorola, Inc.
5 * Copyright (c) 2002 Intel Corp.
6 *
60c778b2 7 * This file is part of the SCTP kernel implementation
1da177e4
LT
8 *
9 * This header represents the structures and constants needed to support
10 * the SCTP Extension to the Sockets API.
11 *
60c778b2 12 * This SCTP implementation is free software;
1da177e4
LT
13 * you can redistribute it and/or modify it under the terms of
14 * the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
16 * any later version.
17 *
60c778b2 18 * This SCTP implementation is distributed in the hope that it
1da177e4
LT
19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
20 * ************************
21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22 * See the GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with GNU CC; see the file COPYING. If not, write to
26 * the Free Software Foundation, 59 Temple Place - Suite 330,
27 * Boston, MA 02111-1307, USA.
28 *
29 * Please send any bug reports or fixes you make to the
30 * email address(es):
31 * lksctp developers <lksctp-developers@lists.sourceforge.net>
32 *
33 * Or submit a bug report through the following website:
34 * http://www.sf.net/projects/lksctp
35 *
36 * Written or modified by:
37 * La Monte H.P. Yarroll <piggy@acm.org>
38 * R. Stewart <randall@sctp.chicago.il.us>
39 * K. Morneau <kmorneau@cisco.com>
40 * Q. Xie <qxie1@email.mot.com>
41 * Karl Knutson <karl@athena.chicago.il.us>
42 * Jon Grimm <jgrimm@us.ibm.com>
43 * Daisy Chang <daisyc@us.ibm.com>
44 * Ryan Layer <rmlayer@us.ibm.com>
45 * Ardelle Fan <ardelle.fan@intel.com>
46 * Sridhar Samudrala <sri@us.ibm.com>
47 *
48 * Any bugs reported given to us we will try to fix... any fixes shared will
49 * be incorporated into the next SCTP release.
50 */
51
52#ifndef __net_sctp_user_h__
53#define __net_sctp_user_h__
54
55#include <linux/types.h>
56#include <linux/socket.h>
57
58typedef __s32 sctp_assoc_t;
59
60/* The following symbols come from the Sockets API Extensions for
61 * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>.
62 */
63enum sctp_optname {
64 SCTP_RTOINFO,
65#define SCTP_RTOINFO SCTP_RTOINFO
66 SCTP_ASSOCINFO,
67#define SCTP_ASSOCINFO SCTP_ASSOCINFO
68 SCTP_INITMSG,
69#define SCTP_INITMSG SCTP_INITMSG
70 SCTP_NODELAY, /* Get/set nodelay option. */
71#define SCTP_NODELAY SCTP_NODELAY
72 SCTP_AUTOCLOSE,
73#define SCTP_AUTOCLOSE SCTP_AUTOCLOSE
74 SCTP_SET_PEER_PRIMARY_ADDR,
75#define SCTP_SET_PEER_PRIMARY_ADDR SCTP_SET_PEER_PRIMARY_ADDR
76 SCTP_PRIMARY_ADDR,
77#define SCTP_PRIMARY_ADDR SCTP_PRIMARY_ADDR
0f3fffd8
ISJ
78 SCTP_ADAPTATION_LAYER,
79#define SCTP_ADAPTATION_LAYER SCTP_ADAPTATION_LAYER
1da177e4
LT
80 SCTP_DISABLE_FRAGMENTS,
81#define SCTP_DISABLE_FRAGMENTS SCTP_DISABLE_FRAGMENTS
82 SCTP_PEER_ADDR_PARAMS,
83#define SCTP_PEER_ADDR_PARAMS SCTP_PEER_ADDR_PARAMS
84 SCTP_DEFAULT_SEND_PARAM,
85#define SCTP_DEFAULT_SEND_PARAM SCTP_DEFAULT_SEND_PARAM
86 SCTP_EVENTS,
87#define SCTP_EVENTS SCTP_EVENTS
88 SCTP_I_WANT_MAPPED_V4_ADDR, /* Turn on/off mapped v4 addresses */
89#define SCTP_I_WANT_MAPPED_V4_ADDR SCTP_I_WANT_MAPPED_V4_ADDR
90 SCTP_MAXSEG, /* Get/set maximum fragment. */
91#define SCTP_MAXSEG SCTP_MAXSEG
92 SCTP_STATUS,
93#define SCTP_STATUS SCTP_STATUS
94 SCTP_GET_PEER_ADDR_INFO,
95#define SCTP_GET_PEER_ADDR_INFO SCTP_GET_PEER_ADDR_INFO
d364d927
WY
96 SCTP_DELAYED_ACK,
97#define SCTP_DELAYED_ACK_TIME SCTP_DELAYED_ACK
98#define SCTP_DELAYED_ACK SCTP_DELAYED_ACK
6ab792f5
ISJ
99 SCTP_CONTEXT, /* Receive Context */
100#define SCTP_CONTEXT SCTP_CONTEXT
b6e1331f
VY
101 SCTP_FRAGMENT_INTERLEAVE,
102#define SCTP_FRAGMENT_INTERLEAVE SCTP_FRAGMENT_INTERLEAVE
d49d91d7
VY
103 SCTP_PARTIAL_DELIVERY_POINT, /* Set/Get partial delivery point */
104#define SCTP_PARTIAL_DELIVERY_POINT SCTP_PARTIAL_DELIVERY_POINT
70331571
VY
105 SCTP_MAX_BURST, /* Set/Get max burst */
106#define SCTP_MAX_BURST SCTP_MAX_BURST
65b07e5d
VY
107 SCTP_AUTH_CHUNK, /* Set only: add a chunk type to authenticat */
108#define SCTP_AUTH_CHUNK SCTP_AUTH_CHUNK
109 SCTP_HMAC_IDENT,
110#define SCTP_HMAC_IDENT SCTP_HMAC_IDENT
111 SCTP_AUTH_KEY,
112#define SCTP_AUTH_KEY SCTP_AUTH_KEY
113 SCTP_AUTH_ACTIVE_KEY,
114#define SCTP_AUTH_ACTIVE_KEY SCTP_AUTH_ACTIVE_KEY
115 SCTP_AUTH_DELETE_KEY,
116#define SCTP_AUTH_DELETE_KEY SCTP_AUTH_DELETE_KEY
117 SCTP_PEER_AUTH_CHUNKS, /* Read only */
118#define SCTP_PEER_AUTH_CHUNKS SCTP_PEER_AUTH_CHUNKS
119 SCTP_LOCAL_AUTH_CHUNKS, /* Read only */
120#define SCTP_LOCAL_AUTH_CHUNKS SCTP_LOCAL_AUTH_CHUNKS
aea3c5c0
WY
121 SCTP_GET_ASSOC_NUMBER, /* Read only */
122#define SCTP_GET_ASSOC_NUMBER SCTP_GET_ASSOC_NUMBER
65b07e5d 123
1da177e4
LT
124
125 /* Internal Socket Options. Some of the sctp library functions are
126 * implemented using these socket options.
127 */
128 SCTP_SOCKOPT_BINDX_ADD = 100,/* BINDX requests for adding addresses. */
129#define SCTP_SOCKOPT_BINDX_ADD SCTP_SOCKOPT_BINDX_ADD
130 SCTP_SOCKOPT_BINDX_REM, /* BINDX requests for removing addresses. */
131#define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM
132 SCTP_SOCKOPT_PEELOFF, /* peel off association. */
133#define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF