diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2011-04-17 13:29:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-21 13:35:44 -0400 |
commit | e1cdd553d482ceb083fac5e544e8702fccefbfd6 (patch) | |
tree | b2b0f0bdc7a90c03a91bba6289143ae0056c651a /include/net/sctp | |
parent | ee916fd0fdb8f43dacaab431de3e1f7225039d72 (diff) |
sctp: implement event notification SCTP_SENDER_DRY_EVENT
This patch implement event notification SCTP_SENDER_DRY_EVENT.
SCTP Socket API Extensions:
6.1.9. SCTP_SENDER_DRY_EVENT
When the SCTP stack has no more user data to send or retransmit, this
notification is given to the user. Also, at the time when a user app
subscribes to this event, if there is no data to be sent or
retransmit, the stack will immediately send up this notification.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp')
-rw-r--r-- | include/net/sctp/sm.h | 1 | ||||
-rw-r--r-- | include/net/sctp/ulpevent.h | 3 | ||||
-rw-r--r-- | include/net/sctp/user.h | 17 |
3 files changed, 21 insertions, 0 deletions
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 652f09bba504..9148632b8204 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; | |||
165 | sctp_state_fn_t sctp_sf_do_prm_asconf; | 165 | sctp_state_fn_t sctp_sf_do_prm_asconf; |
166 | 166 | ||
167 | /* Prototypes for other event state functions. */ | 167 | /* Prototypes for other event state functions. */ |
168 | sctp_state_fn_t sctp_sf_do_no_pending_tsn; | ||
168 | sctp_state_fn_t sctp_sf_do_9_2_start_shutdown; | 169 | sctp_state_fn_t sctp_sf_do_9_2_start_shutdown; |
169 | sctp_state_fn_t sctp_sf_do_9_2_shutdown_ack; | 170 | sctp_state_fn_t sctp_sf_do_9_2_shutdown_ack; |
170 | sctp_state_fn_t sctp_sf_ignore_other; | 171 | sctp_state_fn_t sctp_sf_ignore_other; |
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index 7ea12e8e6676..99b027b2adce 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 | ||
135 | struct sctp_ulpevent *sctp_ulpevent_make_sender_dry_event( | ||
136 | const struct sctp_association *asoc, gfp_t gfp); | ||
137 | |||
135 | void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event, | 138 | void 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 4525d8c7f71a..32fd51274037 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -354,6 +354,20 @@ struct sctp_authkey_event { | |||
354 | 354 | ||
355 | enum { SCTP_AUTH_NEWKEY = 0, }; | 355 | enum { SCTP_AUTH_NEWKEY = 0, }; |
356 | 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 | */ | ||
365 | struct 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 | }; | ||
357 | 371 | ||
358 | /* | 372 | /* |
359 | * Described in Section 7.3 | 373 | * Described in Section 7.3 |
@@ -369,6 +383,7 @@ struct sctp_event_subscribe { | |||
369 | __u8 sctp_partial_delivery_event; | 383 | __u8 sctp_partial_delivery_event; |
370 | __u8 sctp_adaptation_layer_event; | 384 | __u8 sctp_adaptation_layer_event; |
371 | __u8 sctp_authentication_event; | 385 | __u8 sctp_authentication_event; |
386 | __u8 sctp_sender_dry_event; | ||
372 | }; | 387 | }; |
373 | 388 | ||
374 | /* | 389 | /* |
@@ -392,6 +407,7 @@ union sctp_notification { | |||
392 | struct sctp_adaptation_event sn_adaptation_event; | 407 | struct sctp_adaptation_event sn_adaptation_event; |
393 | struct sctp_pdapi_event sn_pdapi_event; | 408 | struct sctp_pdapi_event sn_pdapi_event; |
394 | 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; | ||
395 | }; | 411 | }; |
396 | 412 | ||
397 | /* Section 5.3.1 | 413 | /* Section 5.3.1 |
@@ -410,6 +426,7 @@ enum sctp_sn_type { | |||
410 | SCTP_ADAPTATION_INDICATION, | 426 | SCTP_ADAPTATION_INDICATION, |
411 | SCTP_AUTHENTICATION_EVENT, | 427 | SCTP_AUTHENTICATION_EVENT, |
412 | #define SCTP_AUTHENTICATION_INDICATION SCTP_AUTHENTICATION_EVENT | 428 | #define SCTP_AUTHENTICATION_INDICATION SCTP_AUTHENTICATION_EVENT |
429 | SCTP_SENDER_DRY_EVENT, | ||
413 | }; | 430 | }; |
414 | 431 | ||
415 | /* 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 |