1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
/*
* $Id: sctp_wrapper.h 1515 2007-08-22 03:57:59Z dreibh $
*
* SCTP implementation according to RFC 2960.
* Copyright (C) 2000 by Siemens AG, Munich, Germany.
*
* Realized in co-operation between Siemens AG
* and University of Essen, Institute of Computer Networking Technology.
*
* This program 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
* of the License, or (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* There are two mailinglists available at http://www.sctp.de which should be
* used for any discussion related to this implementation.
*
* Contact: discussion@sctp.de
* tuexen@fh-muenster.de
* ajung@exp-math.uni-essen.de
*
* wrapper for SCTPLIB functions. Outputs appropriate error messages
*
*/
#include "./sctp.h"
#ifdef __cplusplus
extern "C" {
#endif
int
SCTP_getLibraryParameters(SCTP_LibraryParameters *params);
int
SCTP_setLibraryParameters(SCTP_LibraryParameters *params);
int
SCTP_initLibrary(void);
int
SCTP_registerInstance(unsigned short port,
unsigned short noOfInStreams,
unsigned short noOfOutStreams,
unsigned int noOfLocalAddresses,
unsigned char localAddressList[][SCTP_MAX_IP_LEN],
SCTP_ulpCallbacks ULPcallbackFunctions);
int
SCTP_unregisterInstance(unsigned short instance_name);
int
SCTP_deleteAssociation(unsigned int associationID);
int
SCTP_send(unsigned int associationID, unsigned short streamID,
unsigned char *buffer, unsigned int length, unsigned int protocolId, short path_id,
void* context,
unsigned int lifetime,
int unorderedDelivery,
int dontBundle);
int
SCTP_receive(unsigned int associationID, unsigned short streamID, unsigned char *buffer,
unsigned int *length, unsigned short* streamSN, unsigned int * tsn, unsigned int flags);
int
SCTP_shutdown(unsigned int associationID);
int
SCTP_abort(unsigned int associationID);
short
SCTP_setPrimary(unsigned int associationID, short path_id);
short
SCTP_getPrimary(unsigned int associationID);
int
SCTP_receiveUnacked(unsigned int associationID, unsigned char *buffer, unsigned int *length, unsigned int* tsn,
unsigned short *streamID, unsigned short *streamSN,unsigned int* protocolId);
int
SCTP_receiveUnsent(unsigned int associationID, unsigned char *buffer, unsigned int *length,unsigned int* tsn,
unsigned short *streamID, unsigned short *streamSN,unsigned int* protocolId);
int
SCTP_eventLoop(void);
int
SCTP_getPathStatus(unsigned int associationID, short path_id, SCTP_PathStatus* status);
int
SCTP_getAssocStatus(unsigned int associationID, SCTP_AssociationStatus* status);
unsigned int
SCTP_associate(unsigned short SCTP_InstanceName,
unsigned short noOfOutStreams,
unsigned char destinationAddress[],
unsigned short destinationPort,
void* ulp_data);
int
SCTP_registerStdinCallback(sctp_StdinCallback sdf, char* buffer, int length);
int SCTP_unregisterStdinCallback();
int SCTP_changeHeartBeat(unsigned int associationID,
short path_id, int heartbeatON, unsigned int timeIntervall);
#ifndef WIN32
int
SCTP_registerUserCallback(int fd, sctp_userCallback sdf, void* userData);
#endif
int
SCTP_getAssocDefaults(unsigned short SCTP_InstanceName, SCTP_InstanceParameters* params);
int
SCTP_setAssocDefaults(unsigned short SCTP_InstanceName, SCTP_InstanceParameters* params);
unsigned int
SCTP_startTimer(unsigned int milliseconds, sctp_timerCallback timer_cb,
void *param1, void *param2);
#ifdef __cplusplus
}
#endif
|