aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-20 16:43:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-20 16:43:21 -0400
commit06f4e926d256d902dd9a53dcb400fd74974ce087 (patch)
tree0b438b67f5f0eff6fd617bc497a9dace6164a488 /include/net/sctp
parent8e7bfcbab3825d1b404d615cb1b54f44ff81f981 (diff)
parentd93515611bbc70c2fe4db232e5feb448ed8e4cc9 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits) macvlan: fix panic if lowerdev in a bond tg3: Add braces around 5906 workaround. tg3: Fix NETIF_F_LOOPBACK error macvlan: remove one synchronize_rcu() call networking: NET_CLS_ROUTE4 depends on INET irda: Fix error propagation in ircomm_lmp_connect_response() irda: Kill set but unused variable 'bytes' in irlan_check_command_param() irda: Kill set but unused variable 'clen' in ircomm_connect_indication() rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport() be2net: Kill set but unused variable 'req' in lancer_fw_download() irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication() atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined. rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer(). rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler() rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection() rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window() pkt_sched: Kill set but unused variable 'protocol' in tc_classify() isdn: capi: Use pr_debug() instead of ifdefs. tg3: Update version to 3.119 tg3: Apply rx_discards fix to 5719/5720 ... Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c as per Davem.
Diffstat (limited to 'include/net/sctp')
-rw-r--r--include/net/sctp/command.h1
-rw-r--r--include/net/sctp/constants.h18
-rw-r--r--include/net/sctp/sctp.h2
-rw-r--r--include/net/sctp/sm.h5
-rw-r--r--include/net/sctp/structs.h21
-rw-r--r--include/net/sctp/ulpevent.h3
-rw-r--r--include/net/sctp/user.h33
7 files changed, 54 insertions, 29 deletions
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h
index c01dc99def0..2b447646ce4 100644
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -73,7 +73,6 @@ typedef enum {
73 SCTP_CMD_INIT_FAILED, /* High level, do init failure work. */ 73 SCTP_CMD_INIT_FAILED, /* High level, do init failure work. */
74 SCTP_CMD_REPORT_DUP, /* Report a duplicate TSN. */ 74 SCTP_CMD_REPORT_DUP, /* Report a duplicate TSN. */
75 SCTP_CMD_STRIKE, /* Mark a strike against a transport. */ 75 SCTP_CMD_STRIKE, /* Mark a strike against a transport. */
76 SCTP_CMD_TRANSMIT, /* Transmit the outqueue. */
77 SCTP_CMD_HB_TIMERS_START, /* Start the heartbeat timers. */ 76 SCTP_CMD_HB_TIMERS_START, /* Start the heartbeat timers. */
78 SCTP_CMD_HB_TIMER_UPDATE, /* Update a heartbeat timers. */ 77 SCTP_CMD_HB_TIMER_UPDATE, /* Update a heartbeat timers. */
79 SCTP_CMD_HB_TIMERS_STOP, /* Stop the heartbeat timers. */ 78 SCTP_CMD_HB_TIMERS_STOP, /* Stop the heartbeat timers. */
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index c70d8ccc55c..942b864f613 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -150,7 +150,6 @@ SCTP_SUBTYPE_CONSTRUCTOR(OTHER, sctp_event_other_t, other)
150SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, sctp_event_primitive_t, primitive) 150SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, sctp_event_primitive_t, primitive)
151 151
152 152
153#define sctp_chunk_is_control(a) (a->chunk_hdr->type != SCTP_CID_DATA)
154#define sctp_chunk_is_data(a) (a->chunk_hdr->type == SCTP_CID_DATA) 153#define sctp_chunk_is_data(a) (a->chunk_hdr->type == SCTP_CID_DATA)
155 154
156/* Calculate the actual data size in a data chunk */ 155/* Calculate the actual data size in a data chunk */
@@ -188,15 +187,14 @@ typedef enum {
188/* SCTP state defines for internal state machine */ 187/* SCTP state defines for internal state machine */
189typedef enum { 188typedef enum {
190 189
191 SCTP_STATE_EMPTY = 0, 190 SCTP_STATE_CLOSED = 0,
192 SCTP_STATE_CLOSED = 1, 191 SCTP_STATE_COOKIE_WAIT = 1,
193 SCTP_STATE_COOKIE_WAIT = 2, 192 SCTP_STATE_COOKIE_ECHOED = 2,
194 SCTP_STATE_COOKIE_ECHOED = 3, 193 SCTP_STATE_ESTABLISHED = 3,
195 SCTP_STATE_ESTABLISHED = 4, 194 SCTP_STATE_SHUTDOWN_PENDING = 4,
196 SCTP_STATE_SHUTDOWN_PENDING = 5, 195 SCTP_STATE_SHUTDOWN_SENT = 5,
197 SCTP_STATE_SHUTDOWN_SENT = 6, 196 SCTP_STATE_SHUTDOWN_RECEIVED = 6,
198 SCTP_STATE_SHUTDOWN_RECEIVED = 7, 197 SCTP_STATE_SHUTDOWN_ACK_SENT = 7,
199 SCTP_STATE_SHUTDOWN_ACK_SENT = 8,
200 198
201} sctp_state_t; 199} sctp_state_t;
202 200
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 01e094c6d0a..b2c2366676a 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -530,7 +530,6 @@ _sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length), member)
530 530
531#define _sctp_walk_params(pos, chunk, end, member)\ 531#define _sctp_walk_params(pos, chunk, end, member)\
532for (pos.v = chunk->member;\ 532for (pos.v = chunk->member;\
533 pos.v <= (void *)chunk + end - sizeof(sctp_paramhdr_t) &&\
534 pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ 533 pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\
535 ntohs(pos.p->length) >= sizeof(sctp_paramhdr_t);\ 534 ntohs(pos.p->length) >= sizeof(sctp_paramhdr_t);\
536 pos.v += WORD_ROUND(ntohs(pos.p->length))) 535 pos.v += WORD_ROUND(ntohs(pos.p->length)))
@@ -541,7 +540,6 @@ _sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length))
541#define _sctp_walk_errors(err, chunk_hdr, end)\ 540#define _sctp_walk_errors(err, chunk_hdr, end)\
542for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ 541for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \
543 sizeof(sctp_chunkhdr_t));\ 542 sizeof(sctp_chunkhdr_t));\
544 (void *)err <= (void *)chunk_hdr + end - sizeof(sctp_errhdr_t) &&\
545 (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ 543 (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\
546 ntohs(err->length) >= sizeof(sctp_errhdr_t); \ 544 ntohs(err->length) >= sizeof(sctp_errhdr_t); \
547 err = (sctp_errhdr_t *)((void *)err + WORD_ROUND(ntohs(err->length)))) 545 err = (sctp_errhdr_t *)((void *)err + WORD_ROUND(ntohs(err->length))))
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 9352d12f02d..9148632b820 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -165,6 +165,7 @@ sctp_state_fn_t sctp_sf_do_prm_requestheartbeat;
165sctp_state_fn_t sctp_sf_do_prm_asconf; 165sctp_state_fn_t sctp_sf_do_prm_asconf;
166 166
167/* Prototypes for other event state functions. */ 167/* Prototypes for other event state functions. */
168sctp_state_fn_t sctp_sf_do_no_pending_tsn;
168sctp_state_fn_t sctp_sf_do_9_2_start_shutdown; 169sctp_state_fn_t sctp_sf_do_9_2_start_shutdown;
169sctp_state_fn_t sctp_sf_do_9_2_shutdown_ack; 170sctp_state_fn_t sctp_sf_do_9_2_shutdown_ack;
170sctp_state_fn_t sctp_sf_ignore_other; 171sctp_state_fn_t sctp_sf_ignore_other;
@@ -232,9 +233,7 @@ struct sctp_chunk *sctp_make_violation_paramlen(const struct sctp_association *,
232 const struct sctp_chunk *, 233 const struct sctp_chunk *,
233 struct sctp_paramhdr *); 234 struct sctp_paramhdr *);
234struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *, 235struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *,
235 const struct sctp_transport *, 236 const struct sctp_transport *);
236 const void *payload,
237 const size_t paylen);
238struct sctp_chunk *sctp_make_heartbeat_ack(const struct sctp_association *, 237struct sctp_chunk *sctp_make_heartbeat_ack(const struct sctp_association *,
239 const struct sctp_chunk *, 238 const struct sctp_chunk *,
240 const void *payload, 239 const void *payload,
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 0f6e60a9c30..795f4886e11 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -564,19 +564,15 @@ struct sctp_af {
564 int optname, 564 int optname,
565 char __user *optval, 565 char __user *optval,
566 int __user *optlen); 566 int __user *optlen);
567 struct dst_entry *(*get_dst) (struct sctp_association *asoc, 567 void (*get_dst) (struct sctp_transport *t,
568 union sctp_addr *daddr, 568 union sctp_addr *saddr,
569 union sctp_addr *saddr); 569 struct flowi *fl,
570 struct sock *sk);
570 void (*get_saddr) (struct sctp_sock *sk, 571 void (*get_saddr) (struct sctp_sock *sk,
571 struct sctp_association *asoc, 572 struct sctp_transport *t,
572 struct dst_entry *dst, 573 struct flowi *fl);
573 union sctp_addr *daddr,
574 union sctp_addr *saddr);
575 void (*copy_addrlist) (struct list_head *, 574 void (*copy_addrlist) (struct list_head *,
576 struct net_device *); 575 struct net_device *);
577 void (*dst_saddr) (union sctp_addr *saddr,
578 struct dst_entry *dst,
579 __be16 port);
580 int (*cmp_addr) (const union sctp_addr *addr1, 576 int (*cmp_addr) (const union sctp_addr *addr1,
581 const union sctp_addr *addr2); 577 const union sctp_addr *addr2);
582 void (*addr_copy) (union sctp_addr *dst, 578 void (*addr_copy) (union sctp_addr *dst,
@@ -898,6 +894,7 @@ struct sctp_transport {
898 /* Is this structure kfree()able? */ 894 /* Is this structure kfree()able? */
899 malloced:1; 895 malloced:1;
900 896
897 struct flowi fl;
901 898
902 /* This is the peer's IP address and port. */ 899 /* This is the peer's IP address and port. */
903 union sctp_addr ipaddr; 900 union sctp_addr ipaddr;
@@ -1061,7 +1058,7 @@ void sctp_transport_set_owner(struct sctp_transport *,
1061 struct sctp_association *); 1058 struct sctp_association *);
1062void sctp_transport_route(struct sctp_transport *, union sctp_addr *, 1059void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
1063 struct sctp_sock *); 1060 struct sctp_sock *);
1064void sctp_transport_pmtu(struct sctp_transport *); 1061void sctp_transport_pmtu(struct sctp_transport *, struct sock *sk);
1065void sctp_transport_free(struct sctp_transport *); 1062void sctp_transport_free(struct sctp_transport *);
1066void sctp_transport_reset_timers(struct sctp_transport *); 1063void sctp_transport_reset_timers(struct sctp_transport *);
1067void sctp_transport_hold(struct sctp_transport *); 1064void sctp_transport_hold(struct sctp_transport *);
@@ -1400,7 +1397,7 @@ int sctp_has_association(const union sctp_addr *laddr,
1400int sctp_verify_init(const struct sctp_association *asoc, sctp_cid_t, 1397int sctp_verify_init(const struct sctp_association *asoc, sctp_cid_t,
1401 sctp_init_chunk_t *peer_init, struct sctp_chunk *chunk, 1398 sctp_init_chunk_t *peer_init, struct sctp_chunk *chunk,
1402 struct sctp_chunk **err_chunk); 1399 struct sctp_chunk **err_chunk);
1403int sctp_process_init(struct sctp_association *, sctp_cid_t cid, 1400int sctp_process_init(struct sctp_association *, struct sctp_chunk *chunk,
1404 const union sctp_addr *peer, 1401 const union sctp_addr *peer,
1405 sctp_init_chunk_t *init, gfp_t gfp); 1402 sctp_init_chunk_t *init, gfp_t gfp);
1406__u32 sctp_generate_tag(const struct sctp_endpoint *); 1403__u32 sctp_generate_tag(const struct sctp_endpoint *);
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h
index 7ea12e8e667..99b027b2adc 100644
--- a/include/net/sctp/ulpevent.h
+++ b/include/net/sctp/ulpevent.h
@@ -132,6 +132,9 @@ struct sctp_ulpevent *sctp_ulpevent_make_authkey(
132 const struct sctp_association *asoc, __u16 key_id, 132 const struct sctp_association *asoc, __u16 key_id,
133 __u32 indication, gfp_t gfp); 133 __u32 indication, gfp_t gfp);
134 134
135struct sctp_ulpevent *sctp_ulpevent_make_sender_dry_event(
136 const struct sctp_association *asoc, gfp_t gfp);
137
135void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event, 138void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event,
136 struct msghdr *); 139 struct msghdr *);
137__u16 sctp_ulpevent_get_notification_type(const struct sctp_ulpevent *event); 140__u16 sctp_ulpevent_get_notification_type(const struct sctp_ulpevent *event);
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index e73ebdae323..32fd5127403 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -91,6 +91,7 @@ typedef __s32 sctp_assoc_t;
91#define SCTP_PEER_AUTH_CHUNKS 26 /* Read only */ 91#define SCTP_PEER_AUTH_CHUNKS 26 /* Read only */
92#define SCTP_LOCAL_AUTH_CHUNKS 27 /* Read only */ 92#define SCTP_LOCAL_AUTH_CHUNKS 27 /* Read only */
93#define SCTP_GET_ASSOC_NUMBER 28 /* Read only */ 93#define SCTP_GET_ASSOC_NUMBER 28 /* Read only */
94#define SCTP_GET_ASSOC_ID_LIST 29 /* Read only */
94 95
95/* Internal Socket Options. Some of the sctp library functions are 96/* Internal Socket Options. Some of the sctp library functions are
96 * implemented using these socket options. 97 * implemented using these socket options.
@@ -353,6 +354,20 @@ struct sctp_authkey_event {
353 354
354enum { SCTP_AUTH_NEWKEY = 0, }; 355enum { SCTP_AUTH_NEWKEY = 0, };
355 356
357/*
358 * 6.1.9. SCTP_SENDER_DRY_EVENT
359 *
360 * When the SCTP stack has no more user data to send or retransmit, this
361 * notification is given to the user. Also, at the time when a user app
362 * subscribes to this event, if there is no data to be sent or
363 * retransmit, the stack will immediately send up this notification.
364 */
365struct sctp_sender_dry_event {
366 __u16 sender_dry_type;
367 __u16 sender_dry_flags;
368 __u32 sender_dry_length;
369 sctp_assoc_t sender_dry_assoc_id;
370};
356 371
357/* 372/*
358 * Described in Section 7.3 373 * Described in Section 7.3
@@ -368,6 +383,7 @@ struct sctp_event_subscribe {
368 __u8 sctp_partial_delivery_event; 383 __u8 sctp_partial_delivery_event;
369 __u8 sctp_adaptation_layer_event; 384 __u8 sctp_adaptation_layer_event;
370 __u8 sctp_authentication_event; 385 __u8 sctp_authentication_event;
386 __u8 sctp_sender_dry_event;
371}; 387};
372 388
373/* 389/*
@@ -391,6 +407,7 @@ union sctp_notification {
391 struct sctp_adaptation_event sn_adaptation_event; 407 struct sctp_adaptation_event sn_adaptation_event;
392 struct sctp_pdapi_event sn_pdapi_event; 408 struct sctp_pdapi_event sn_pdapi_event;
393 struct sctp_authkey_event sn_authkey_event; 409 struct sctp_authkey_event sn_authkey_event;
410 struct sctp_sender_dry_event sn_sender_dry_event;
394}; 411};
395 412
396/* Section 5.3.1 413/* Section 5.3.1
@@ -407,7 +424,9 @@ enum sctp_sn_type {
407 SCTP_SHUTDOWN_EVENT, 424 SCTP_SHUTDOWN_EVENT,
408 SCTP_PARTIAL_DELIVERY_EVENT, 425 SCTP_PARTIAL_DELIVERY_EVENT,
409 SCTP_ADAPTATION_INDICATION, 426 SCTP_ADAPTATION_INDICATION,
410 SCTP_AUTHENTICATION_INDICATION, 427 SCTP_AUTHENTICATION_EVENT,
428#define SCTP_AUTHENTICATION_INDICATION SCTP_AUTHENTICATION_EVENT
429 SCTP_SENDER_DRY_EVENT,
411}; 430};
412 431
413/* Notification error codes used to fill up the error fields in some 432/* Notification error codes used to fill up the error fields in some
@@ -669,6 +688,18 @@ struct sctp_authchunks {
669}; 688};
670 689
671/* 690/*
691 * 8.2.6. Get the Current Identifiers of Associations
692 * (SCTP_GET_ASSOC_ID_LIST)
693 *
694 * This option gets the current list of SCTP association identifiers of
695 * the SCTP associations handled by a one-to-many style socket.
696 */
697struct sctp_assoc_ids {
698 __u32 gaids_number_of_ids;
699 sctp_assoc_t gaids_assoc_id[];
700};
701
702/*
672 * 8.3, 8.5 get all peer/local addresses in an association. 703 * 8.3, 8.5 get all peer/local addresses in an association.
673 * This parameter struct is used by SCTP_GET_PEER_ADDRS and 704 * This parameter struct is used by SCTP_GET_PEER_ADDRS and
674 * SCTP_GET_LOCAL_ADDRS socket options used internally to implement 705 * SCTP_GET_LOCAL_ADDRS socket options used internally to implement