Deleted Added
full compact
sctp.h (170094) sctp.h (170606)
1/*-
2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30/* $KAME: sctp.h,v 1.18 2005/03/06 16:04:16 itojun Exp $ */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30/* $KAME: sctp.h,v 1.18 2005/03/06 16:04:16 itojun Exp $ */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/netinet/sctp.h 170094 2007-05-29 11:53:27Z rrs $");
33__FBSDID("$FreeBSD: head/sys/netinet/sctp.h 170606 2007-06-12 11:21:00Z rrs $");
34
35#ifndef _NETINET_SCTP_H_
36#define _NETINET_SCTP_H_
37
38#include <sys/types.h>
39
40/*
41 * SCTP protocol - RFC2960.
42 */
43
44struct sctphdr {
45 uint16_t src_port; /* source port */
46 uint16_t dest_port; /* destination port */
47 uint32_t v_tag; /* verification tag of packet */
48 uint32_t checksum; /* Adler32 C-Sum */
49 /* chunks follow... */
34
35#ifndef _NETINET_SCTP_H_
36#define _NETINET_SCTP_H_
37
38#include <sys/types.h>
39
40/*
41 * SCTP protocol - RFC2960.
42 */
43
44struct sctphdr {
45 uint16_t src_port; /* source port */
46 uint16_t dest_port; /* destination port */
47 uint32_t v_tag; /* verification tag of packet */
48 uint32_t checksum; /* Adler32 C-Sum */
49 /* chunks follow... */
50};
50}
51
51
52__attribute__((packed));
53
52/*
53 * SCTP Chunks
54 */
54/*
55 * SCTP Chunks
56 */
55struct sctp_chunkhdr {
56 uint8_t chunk_type; /* chunk type */
57 uint8_t chunk_flags; /* chunk flags */
58 uint16_t chunk_length; /* chunk length */
59 /* optional params follow */
60};
57 struct sctp_chunkhdr {
58 uint8_t chunk_type; /* chunk type */
59 uint8_t chunk_flags; /* chunk flags */
60 uint16_t chunk_length; /* chunk length */
61 /* optional params follow */
62 } __attribute__((packed));
61
62/*
63 * SCTP chunk parameters
64 */
63
64/*
65 * SCTP chunk parameters
66 */
65struct sctp_paramhdr {
66 uint16_t param_type; /* parameter type */
67 uint16_t param_length; /* parameter length */
68};
67 struct sctp_paramhdr {
68 uint16_t param_type; /* parameter type */
69 uint16_t param_length; /* parameter length */
70 } __attribute__((packed));
69
70/*
71 * user socket options: socket API defined
72 */
73/*
74 * read-write options
75 */
76#define SCTP_RTOINFO 0x00000001

--- 208 unchanged lines hidden (view full) ---

285#define SCTP_CAUSE_REQUEST_REFUSED 0x0104
286
287/* Error causes from draft-ietf-tsvwg-sctp-auth */
288#define SCTP_CAUSE_UNSUPPORTED_HMACID 0x0105
289
290/*
291 * error cause parameters (user visisble)
292 */
71
72/*
73 * user socket options: socket API defined
74 */
75/*
76 * read-write options
77 */
78#define SCTP_RTOINFO 0x00000001

--- 208 unchanged lines hidden (view full) ---

287#define SCTP_CAUSE_REQUEST_REFUSED 0x0104
288
289/* Error causes from draft-ietf-tsvwg-sctp-auth */
290#define SCTP_CAUSE_UNSUPPORTED_HMACID 0x0105
291
292/*
293 * error cause parameters (user visisble)
294 */
293struct sctp_error_cause {
294 uint16_t code;
295 uint16_t length;
296 /* optional cause-specific info may follow */
297};
295 struct sctp_error_cause {
296 uint16_t code;
297 uint16_t length;
298 /* optional cause-specific info may follow */
299 } __attribute__((packed));
298
300
299struct sctp_error_invalid_stream {
300 struct sctp_error_cause cause; /* code=SCTP_ERROR_INVALID_STREAM */
301 uint16_t stream_id; /* stream id of the DATA in error */
302 uint16_t reserved;
303};
301 struct sctp_error_invalid_stream {
302 struct sctp_error_cause cause; /* code=SCTP_ERROR_INVALID_STRE
303 * AM */
304 uint16_t stream_id; /* stream id of the DATA in error */
305 uint16_t reserved;
306 } __attribute__((packed));
304
307
305struct sctp_error_missing_param {
306 struct sctp_error_cause cause; /* code=SCTP_ERROR_MISSING_PARAM */
307 uint32_t num_missing_params; /* number of missing parameters */
308 /* uint16_t param_type's follow */
309};
308 struct sctp_error_missing_param {
309 struct sctp_error_cause cause; /* code=SCTP_ERROR_MISSING_PARA
310 * M */
311 uint32_t num_missing_params; /* number of missing
312 * parameters */
313 /* uint16_t param_type's follow */
314 } __attribute__((packed));
310
315
311struct sctp_error_stale_cookie {
312 struct sctp_error_cause cause; /* code=SCTP_ERROR_STALE_COOKIE */
313 uint32_t stale_time; /* time in usec of staleness */
314};
316 struct sctp_error_stale_cookie {
317 struct sctp_error_cause cause; /* code=SCTP_ERROR_STALE_COOKIE
318 * */
319 uint32_t stale_time; /* time in usec of staleness */
320 } __attribute__((packed));
315
321
316struct sctp_error_out_of_resource {
317 struct sctp_error_cause cause; /* code=SCTP_ERROR_OUT_OF_RESOURCES */
318};
322 struct sctp_error_out_of_resource {
323 struct sctp_error_cause cause; /* code=SCTP_ERROR_OUT_OF_RESOU
324 * RCES */
325 } __attribute__((packed));
319
326
320struct sctp_error_unresolv_addr {
321 struct sctp_error_cause cause; /* code=SCTP_ERROR_UNRESOLVABLE_ADDR */
327 struct sctp_error_unresolv_addr {
328 struct sctp_error_cause cause; /* code=SCTP_ERROR_UNRESOLVABLE
329 * _ADDR */
322
330
323};
331 } __attribute__((packed));
324
332
325struct sctp_error_unrecognized_chunk {
326 struct sctp_error_cause cause; /* code=SCTP_ERROR_UNRECOG_CHUNK */
327 struct sctp_chunkhdr ch;/* header from chunk in error */
328};
333 struct sctp_error_unrecognized_chunk {
334 struct sctp_error_cause cause; /* code=SCTP_ERROR_UNRECOG_CHUN
335 * K */
336 struct sctp_chunkhdr ch; /* header from chunk in error */
337 } __attribute__((packed));
329
330#define HAVE_SCTP 1
331#define HAVE_KERNEL_SCTP 1
332#define HAVE_SCTP_PRSCTP 1
333#define HAVE_SCTP_ADDIP 1
334#define HAVE_SCTP_CANSET_PRIMARY 1
335#define HAVE_SCTP_SAT_CAPABILITY 1
336#define HAVE_SCTP_MULTIBUF 1

--- 135 unchanged lines hidden ---
338
339#define HAVE_SCTP 1
340#define HAVE_KERNEL_SCTP 1
341#define HAVE_SCTP_PRSCTP 1
342#define HAVE_SCTP_ADDIP 1
343#define HAVE_SCTP_CANSET_PRIMARY 1
344#define HAVE_SCTP_SAT_CAPABILITY 1
345#define HAVE_SCTP_MULTIBUF 1

--- 135 unchanged lines hidden ---