structs.h (a3479c7fc096a1a7a2dccbfbdc6fcf86b805711a) structs.h (05364ca03cfd419caecb292fede20eb39667eaae)
1/* SCTP kernel implementation
2 * (C) Copyright IBM Corp. 2001, 2004
3 * Copyright (c) 1999-2000 Cisco, Inc.
4 * Copyright (c) 1999-2001 Motorola, Inc.
5 * Copyright (c) 2001 Intel Corp.
6 *
7 * This file is part of the SCTP kernel implementation
8 *

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

43 * Anup Pemmaiah <pemmaiah@cc.usu.edu>
44 * Kevin Gao <kevin.gao@intel.com>
45 */
46
47#ifndef __sctp_structs_h__
48#define __sctp_structs_h__
49
50#include <linux/ktime.h>
1/* SCTP kernel implementation
2 * (C) Copyright IBM Corp. 2001, 2004
3 * Copyright (c) 1999-2000 Cisco, Inc.
4 * Copyright (c) 1999-2001 Motorola, Inc.
5 * Copyright (c) 2001 Intel Corp.
6 *
7 * This file is part of the SCTP kernel implementation
8 *

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

43 * Anup Pemmaiah <pemmaiah@cc.usu.edu>
44 * Kevin Gao <kevin.gao@intel.com>
45 */
46
47#ifndef __sctp_structs_h__
48#define __sctp_structs_h__
49
50#include <linux/ktime.h>
51#include <linux/rhashtable.h>
51#include <linux/rhashtable-types.h>
52#include <linux/socket.h> /* linux/in.h needs this!! */
53#include <linux/in.h> /* We get struct sockaddr_in. */
54#include <linux/in6.h> /* We get struct in6_addr */
55#include <linux/ipv6.h>
56#include <asm/param.h> /* We get MAXHOSTNAMELEN. */
57#include <linux/atomic.h> /* This gets us atomic counters. */
58#include <linux/skbuff.h> /* We need sk_buff_head. */
59#include <linux/workqueue.h> /* We need tq_struct. */

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

188 * the destination address every heartbeat interval. This value
189 * will be inherited by all new associations.
190 */
191 __u32 hbinterval;
192
193 /* This is the max_retrans value for new associations. */
194 __u16 pathmaxrxt;
195
52#include <linux/socket.h> /* linux/in.h needs this!! */
53#include <linux/in.h> /* We get struct sockaddr_in. */
54#include <linux/in6.h> /* We get struct in6_addr */
55#include <linux/ipv6.h>
56#include <asm/param.h> /* We get MAXHOSTNAMELEN. */
57#include <linux/atomic.h> /* This gets us atomic counters. */
58#include <linux/skbuff.h> /* We need sk_buff_head. */
59#include <linux/workqueue.h> /* We need tq_struct. */

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

188 * the destination address every heartbeat interval. This value
189 * will be inherited by all new associations.
190 */
191 __u32 hbinterval;
192
193 /* This is the max_retrans value for new associations. */
194 __u16 pathmaxrxt;
195
196 __u32 flowlabel;
197 __u8 dscp;
198
196 /* The initial Path MTU to use for new associations. */
197 __u32 pathmtu;
198
199 /* The default SACK delay timeout for new associations. */
200 __u32 sackdelay;
201 __u32 sackfreq;
202
203 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */

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

215 struct sctp_initmsg initmsg;
216
217 int user_frag;
218
219 __u32 autoclose;
220 __u32 adaptation_ind;
221 __u32 pd_point;
222 __u16 nodelay:1,
199 /* The initial Path MTU to use for new associations. */
200 __u32 pathmtu;
201
202 /* The default SACK delay timeout for new associations. */
203 __u32 sackdelay;
204 __u32 sackfreq;
205
206 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */

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

218 struct sctp_initmsg initmsg;
219
220 int user_frag;
221
222 __u32 autoclose;
223 __u32 adaptation_ind;
224 __u32 pd_point;
225 __u16 nodelay:1,
226 reuse:1,
223 disable_fragments:1,
224 v4mapped:1,
225 frag_interleave:1,
226 strm_interleave:1,
227 recvrcvinfo:1,
228 recvnxtinfo:1,
229 data_ready_signalled:1;
230

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

389 gfp_t gfp);
390int sctp_stream_init_ext(struct sctp_stream *stream, __u16 sid);
391void sctp_stream_free(struct sctp_stream *stream);
392void sctp_stream_clear(struct sctp_stream *stream);
393void sctp_stream_update(struct sctp_stream *stream, struct sctp_stream *new);
394
395/* What is the current SSN number for this stream? */
396#define sctp_ssn_peek(stream, type, sid) \
227 disable_fragments:1,
228 v4mapped:1,
229 frag_interleave:1,
230 strm_interleave:1,
231 recvrcvinfo:1,
232 recvnxtinfo:1,
233 data_ready_signalled:1;
234

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

393 gfp_t gfp);
394int sctp_stream_init_ext(struct sctp_stream *stream, __u16 sid);
395void sctp_stream_free(struct sctp_stream *stream);
396void sctp_stream_clear(struct sctp_stream *stream);
397void sctp_stream_update(struct sctp_stream *stream, struct sctp_stream *new);
398
399/* What is the current SSN number for this stream? */
400#define sctp_ssn_peek(stream, type, sid) \
397 ((stream)->type[sid].ssn)
401 (sctp_stream_##type((stream), (sid))->ssn)
398
399/* Return the next SSN number for this stream. */
400#define sctp_ssn_next(stream, type, sid) \
402
403/* Return the next SSN number for this stream. */
404#define sctp_ssn_next(stream, type, sid) \
401 ((stream)->type[sid].ssn++)
405 (sctp_stream_##type((stream), (sid))->ssn++)
402
403/* Skip over this ssn and all below. */
404#define sctp_ssn_skip(stream, type, sid, ssn) \
406
407/* Skip over this ssn and all below. */
408#define sctp_ssn_skip(stream, type, sid, ssn) \
405 ((stream)->type[sid].ssn = ssn + 1)
409 (sctp_stream_##type((stream), (sid))->ssn = ssn + 1)
406
407/* What is the current MID number for this stream? */
408#define sctp_mid_peek(stream, type, sid) \
410
411/* What is the current MID number for this stream? */
412#define sctp_mid_peek(stream, type, sid) \
409 ((stream)->type[sid].mid)
413 (sctp_stream_##type((stream), (sid))->mid)
410
411/* Return the next MID number for this stream. */
412#define sctp_mid_next(stream, type, sid) \
414
415/* Return the next MID number for this stream. */
416#define sctp_mid_next(stream, type, sid) \
413 ((stream)->type[sid].mid++)
417 (sctp_stream_##type((stream), (sid))->mid++)
414
415/* Skip over this mid and all below. */
416#define sctp_mid_skip(stream, type, sid, mid) \
418
419/* Skip over this mid and all below. */
420#define sctp_mid_skip(stream, type, sid, mid) \
417 ((stream)->type[sid].mid = mid + 1)
421 (sctp_stream_##type((stream), (sid))->mid = mid + 1)
418
422
419#define sctp_stream_in(asoc, sid) (&(asoc)->stream.in[sid])
420
421/* What is the current MID_uo number for this stream? */
422#define sctp_mid_uo_peek(stream, type, sid) \
423/* What is the current MID_uo number for this stream? */
424#define sctp_mid_uo_peek(stream, type, sid) \
423 ((stream)->type[sid].mid_uo)
425 (sctp_stream_##type((stream), (sid))->mid_uo)
424
425/* Return the next MID_uo number for this stream. */
426#define sctp_mid_uo_next(stream, type, sid) \
426
427/* Return the next MID_uo number for this stream. */
428#define sctp_mid_uo_next(stream, type, sid) \
427 ((stream)->type[sid].mid_uo++)
429 (sctp_stream_##type((stream), (sid))->mid_uo++)
428
429/*
430 * Pointers to address related SCTP functions.
431 * (i.e. things that depend on the address family.)
432 */
433struct sctp_af {
434 int (*sctp_xmit) (struct sk_buff *skb,
435 struct sctp_transport *);

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

889 unsigned long last_time_ecne_reduced;
890
891 /* This is the max_retrans value for the transport and will
892 * be initialized from the assocs value. This can be changed
893 * using the SCTP_SET_PEER_ADDR_PARAMS socket option.
894 */
895 __u16 pathmaxrxt;
896
430
431/*
432 * Pointers to address related SCTP functions.
433 * (i.e. things that depend on the address family.)
434 */
435struct sctp_af {
436 int (*sctp_xmit) (struct sk_buff *skb,
437 struct sctp_transport *);

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

891 unsigned long last_time_ecne_reduced;
892
893 /* This is the max_retrans value for the transport and will
894 * be initialized from the assocs value. This can be changed
895 * using the SCTP_SET_PEER_ADDR_PARAMS socket option.
896 */
897 __u16 pathmaxrxt;
898
899 __u32 flowlabel;
900 __u8 dscp;
901
897 /* This is the partially failed retrans value for the transport
898 * and will be initialized from the assocs value. This can be changed
899 * using the SCTP_PEER_ADDR_THLDS socket option
900 */
901 int pf_retrans;
902 /* PMTU : The current known path MTU. */
903 __u32 pathmtu;
904

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

1451 struct list_head rr_list;
1452 /* The next stream stream in line */
1453 struct sctp_stream_out_ext *rr_next;
1454 };
1455 };
1456 struct sctp_stream_interleave *si;
1457};
1458
902 /* This is the partially failed retrans value for the transport
903 * and will be initialized from the assocs value. This can be changed
904 * using the SCTP_PEER_ADDR_THLDS socket option
905 */
906 int pf_retrans;
907 /* PMTU : The current known path MTU. */
908 __u32 pathmtu;
909

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

1456 struct list_head rr_list;
1457 /* The next stream stream in line */
1458 struct sctp_stream_out_ext *rr_next;
1459 };
1460 };
1461 struct sctp_stream_interleave *si;
1462};
1463
1464static inline struct sctp_stream_out *sctp_stream_out(
1465 const struct sctp_stream *stream,
1466 __u16 sid)
1467{
1468 return ((struct sctp_stream_out *)(stream->out)) + sid;
1469}
1470
1471static inline struct sctp_stream_in *sctp_stream_in(
1472 const struct sctp_stream *stream,
1473 __u16 sid)
1474{
1475 return ((struct sctp_stream_in *)(stream->in)) + sid;
1476}
1477
1478#define SCTP_SO(s, i) sctp_stream_out((s), (i))
1479#define SCTP_SI(s, i) sctp_stream_in((s), (i))
1480
1459#define SCTP_STREAM_CLOSED 0x00
1460#define SCTP_STREAM_OPEN 0x01
1461
1462static inline __u16 sctp_datachk_len(const struct sctp_stream *stream)
1463{
1464 return stream->si->data_chunk_len;
1465}
1466

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

1766 */
1767 unsigned long hbinterval;
1768
1769 /* This is the max_retrans value for new transports in the
1770 * association.
1771 */
1772 __u16 pathmaxrxt;
1773
1481#define SCTP_STREAM_CLOSED 0x00
1482#define SCTP_STREAM_OPEN 0x01
1483
1484static inline __u16 sctp_datachk_len(const struct sctp_stream *stream)
1485{
1486 return stream->si->data_chunk_len;
1487}
1488

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

1788 */
1789 unsigned long hbinterval;
1790
1791 /* This is the max_retrans value for new transports in the
1792 * association.
1793 */
1794 __u16 pathmaxrxt;
1795
1796 __u32 flowlabel;
1797 __u8 dscp;
1798
1774 /* Flag that path mtu update is pending */
1775 __u8 pmtu_pending;
1776
1777 /* Association : The smallest PMTU discovered for all of the
1778 * PMTU : peer's transport addresses.
1779 */
1780 __u32 pathmtu;
1781

--- 365 unchanged lines hidden ---
1799 /* Flag that path mtu update is pending */
1800 __u8 pmtu_pending;
1801
1802 /* Association : The smallest PMTU discovered for all of the
1803 * PMTU : peer's transport addresses.
1804 */
1805 __u32 pathmtu;
1806

--- 365 unchanged lines hidden ---