/* API 5.3.1.5 SCTP_SHUTDOWN_EVENT * When a peer sends a SHUTDOWN, SCTP delivers this notification to * inform the application that it should cease sending data. */ ev = sctp_ulpevent_make_shutdown_event(asoc, 0, GFP_ATOMIC); if (!ev) { disposition = SCTP_DISPOSITION_NOMEM; goto out; } sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev));  
sctp_disposition_t sctp_sf_do_9_2_shutdown(const struct sctp_endpoint *ep,					   const struct sctp_association *asoc,					   const sctp_subtype_t type,					   void *arg,					   sctp_cmd_seq_t *commands){	struct sctp_chunk *chunk = arg;	sctp_shutdownhdr_t *sdh;	sctp_disposition_t disposition;	struct sctp_ulpevent *ev;	if (!sctp_vtag_verify(chunk, asoc))		return sctp_sf_pdiscard(ep, asoc, type, arg, commands);	/* Make sure that the SHUTDOWN chunk has a valid length. */	if (!sctp_chunk_length_valid(chunk,				      sizeof(struct sctp_shutdown_chunk_t)))		return sctp_sf_violation_chunklen(ep, asoc, type, arg,						  commands);	/* Convert the elaborate header.  */	sdh = (sctp_shutdownhdr_t *)chunk->skb->data;	skb_pull(chunk->skb, sizeof(sctp_shutdownhdr_t));	chunk->subh.shutdown_hdr = sdh;	/* Upon the reception of the SHUTDOWN, the peer endpoint shall	 *  - enter the SHUTDOWN-RECEIVED state,	 *  - stop accepting new data from its SCTP user	 *	 * [This is implicit in the new state.]	 */	sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE,			SCTP_STATE(SCTP_STATE_SHUTDOWN_RECEIVED));	disposition = SCTP_DISPOSITION_CONSUME;	if (sctp_outq_is_empty(&asoc->outqueue)) {		disposition = sctp_sf_do_9_2_shutdown_ack(ep, asoc, type,							  arg, commands);	}	if (SCTP_DISPOSITION_NOMEM == disposition)		goto out;	/*  - verify, by checking the Cumulative TSN Ack field of the	 *    chunk, that all its outstanding DATA chunks have been	 *    received by the SHUTDOWN sender.	 */	sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_CTSN,			SCTP_U32(chunk->subh.shutdown_hdr->cum_tsn_ack));	/* API 5.3.1.5 SCTP_SHUTDOWN_EVENT	 * When a peer sends a SHUTDOWN, SCTP delivers this notification to	 * inform the application that it should cease sending data.	 */	ev = sctp_ulpevent_make_shutdown_event(asoc, 0, GFP_ATOMIC);	if (!ev) {		disposition = SCTP_DISPOSITION_NOMEM;		goto out;		}	sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev));out:	return disposition;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/eb0e0076878a4f9e8e6e7e524ded0d6f7d4a6130/sm_statefuns.c/clean/net/sctp/sm_statefuns.c