__u16 flags, __u32 error, unsigned int __nocast gfp) 
__u16 flags, __u32 error, gfp_t gfp) 
struct sctp_ulpevent *sctp_ulpevent_make_send_failed(	const struct sctp_association *asoc, struct sctp_chunk *chunk,	__u16 flags, __u32 error, unsigned int __nocast gfp){	struct sctp_ulpevent *event;	struct sctp_send_failed *ssf;	struct sk_buff *skb;	/* Pull off any padding. */	int len = ntohs(chunk->chunk_hdr->length);	/* Make skb with more room so we can prepend notification.  */	skb = skb_copy_expand(chunk->skb,			      sizeof(struct sctp_send_failed), /* headroom */			      0,                               /* tailroom */			      gfp);	if (!skb)		goto fail;	/* Pull off the common chunk header and DATA header.  */	skb_pull(skb, sizeof(struct sctp_data_chunk));	len -= sizeof(struct sctp_data_chunk);	/* Embed the event fields inside the cloned skb.  */	event = sctp_skb2event(skb);	sctp_ulpevent_init(event, MSG_NOTIFICATION);	ssf = (struct sctp_send_failed *)		skb_push(skb, sizeof(struct sctp_send_failed));	/* Socket Extensions for SCTP	 * 5.3.1.4 SCTP_SEND_FAILED	 *	 * ssf_type:	 * It should be SCTP_SEND_FAILED.	 */	ssf->ssf_type = SCTP_SEND_FAILED;	/* Socket Extensions for SCTP	 * 5.3.1.4 SCTP_SEND_FAILED	 *	 * ssf_flags: 16 bits (unsigned integer)	 * The flag value will take one of the following values	 *	 * SCTP_DATA_UNSENT - Indicates that the data was never put on	 *                    the wire.	 *	 * SCTP_DATA_SENT   - Indicates that the data was put on the wire.	 *                    Note that this does not necessarily mean that the	 *                    data was (or was not) successfully delivered.	 */	ssf->ssf_flags = flags;	/* Socket Extensions for SCTP	 * 5.3.1.4 SCTP_SEND_FAILED	 *	 * ssf_length: sizeof (__u32)	 * This field is the total length of the notification data, including	 * the notification header.	 */	ssf->ssf_length = sizeof(struct sctp_send_failed) + len;	skb_trim(skb, ssf->ssf_length);	/* Socket Extensions for SCTP	 * 5.3.1.4 SCTP_SEND_FAILED	 *	 * ssf_error: 16 bits (unsigned integer)	 * This value represents the reason why the send failed, and if set,	 * will be a SCTP protocol error code as defined in [SCTP] section	 * 3.3.10.	 */	ssf->ssf_error = error;	/* Socket Extensions for SCTP	 * 5.3.1.4 SCTP_SEND_FAILED	 *	 * ssf_info: sizeof (struct sctp_sndrcvinfo)	 * The original send information associated with the undelivered	 * message.	 */	memcpy(&ssf->ssf_info, &chunk->sinfo, sizeof(struct sctp_sndrcvinfo));	/* Per TSVWG discussion with Randy. Allow the application to	 * ressemble a fragmented message.	 */	ssf->ssf_info.sinfo_flags = chunk->chunk_hdr->flags;	/* Socket Extensions for SCTP	 * 5.3.1.4 SCTP_SEND_FAILED	 *	 * ssf_assoc_id: sizeof (sctp_assoc_t)	 * The association id field, sf_assoc_id, holds the identifier for the	 * association.  All notifications for a given association have the	 * same association identifier.  For TCP style socket, this field is	 * ignored.	 */	sctp_ulpevent_set_owner(event, asoc);	ssf->ssf_assoc_id = sctp_assoc2id(asoc);	return event;fail:	return NULL;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/dd0fc66fb33cd610bc1a5db8a5e232d34879b4d7/ulpevent.c/buggy/net/sctp/ulpevent.c