SCTPCommand.h

Go to the documentation of this file.
00001 //
00002 // Copyright (C) 2008 by Irene Ruengeler
00003 // Copyright (C) 2010 by Thomas Dreibholz
00004 //
00005 // This program is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, see <http://www.gnu.org/licenses/>.
00017 //
00018 
00019 #ifndef __SCTPCOMMAND_H
00020 #define __SCTPCOMMAND_H
00021 
00022 
00023 //
00024 // SCTP command codes, sent by the application to SCTP. These constants
00025 // should be set as message kind on a message sent to the SCTP entity.
00026 //
00027 // @see SCTPCommand, SCTPOpenCommand, SCTP
00028 //
00029 enum SctpCommandCode
00030 {
00031     SCTP_C_ASSOCIATE            = 1,        // active open (must carry SCTPOpenCommand)
00032     SCTP_C_OPEN_PASSIVE         = 2,        // passive open (must carry SCTPOpenCommand)
00033     SCTP_C_SEND                 = 3,        // send data (set on data packet)
00034     SCTP_C_CLOSE                = 5,        // shutdown the association
00035     SCTP_C_ABORT                = 6,        // abort connection
00036     SCTP_C_STATUS               = 7,        // request status info (SCTP_I_STATUS) from SCTP
00037     SCTP_C_RECEIVE              = 8,        // data receive request
00038     SCTP_C_SEND_ORDERED         = 9,        // send data ordered
00039     SCTP_C_SEND_UNORDERED       = 10,   // send data unordered
00040     SCTP_C_PRIMARY              = 11,   // set primary path
00041     SCTP_C_QUEUE_BYTES_LIMIT    = 12,   // set send queue limit (in bytes)
00042     SCTP_C_QUEUE_MSGS_LIMIT     = 13,   // set send queue limit (in messages)
00043     SCTP_C_SHUTDOWN             = 14,
00044     SCTP_C_NO_OUTSTANDING       = 15
00045 };
00046 
00047 //
00048 // SCTP indications, sent by SCTP to the application. SCTP will set these
00049 // constants as message kind on messages it sends to the application.
00050 //
00051 // @see SCTPCommand, SCTPStatusInfo, SCTP
00052 //
00053 enum SctpStatusInd
00054 {
00055     SCTP_I_DATA                 = 1,                     // data packet (set on data packet)
00056     SCTP_I_DATA_NOTIFICATION    = 2,     // data arrived notification
00057     SCTP_I_ESTABLISHED          = 3,             // connection established
00058     SCTP_I_PEER_CLOSED          = 4,             // FIN received from remote SCTP
00059     SCTP_I_CLOSED               = 5,                 // connection closed normally (via FIN exchange)
00060     SCTP_I_CONNECTION_REFUSED   = 6, // connection refused
00061     SCTP_I_CONNECTION_RESET     = 7,     // connection reset
00062     SCTP_I_TIMED_OUT            = 8,             // conn-estab timer went off, or max retransm. count reached
00063     SCTP_I_STATUS               = 9,                 // status info (will carry SCTPStatusInfo)
00064     SCTP_I_ABORT                = 10,                // association was aborted by the peer
00065     SCTP_I_CONN_LOST            = 11,            // association had too many retransmissions FIXME
00066     SCTP_I_SEND_MSG             = 12,
00067     SCTP_I_SHUTDOWN_RECEIVED    = 13,
00068     SCTP_I_SENDQUEUE_FULL       = 14,
00069     SCTP_I_SENDQUEUE_ABATED     = 15
00070 };
00071 
00072 
00073 //
00074 // Currently not in use.
00075 //
00076 
00077 #endif
00078 
00079