Lines Matching defs:chunk

79 	struct sctp_chunk *chunk = event->chunk;
90 if (chunk && chunk->head_skb && !chunk->head_skb->sk)
91 chunk->head_skb->sk = asoc->base.sk;
117 __u16 inbound, struct sctp_chunk *chunk, gfp_t gfp)
123 /* If the lower layer passed in the chunk, it will be
126 if (chunk) {
127 /* Copy the chunk data to a new skb and reserve enough
130 skb = skb_copy_expand(chunk->skb,
145 ntohs(chunk->chunk_hdr->length) -
360 * Note: This assumes that the chunk->skb->data already points to the
375 struct sctp_chunk *chunk, __u16 flags,
385 ch = (struct sctp_errhdr *)(chunk->skb->data);
390 skb_pull(chunk->skb, sizeof(*ch));
395 skb = skb_copy_expand(chunk->skb, sizeof(*sre), 0, gfp);
397 /* Pull off the rest of the cause TLV from the chunk. */
398 skb_pull(chunk->skb, elen);
431 const struct sctp_association *asoc, struct sctp_chunk *chunk,
439 int len = ntohs(chunk->chunk_hdr->length);
442 skb = skb_copy_expand(chunk->skb,
449 /* Pull off the common chunk header and DATA header. */
509 memcpy(&ssf->ssf_info, &chunk->sinfo, sizeof(struct sctp_sndrcvinfo));
514 ssf->ssf_info.sinfo_flags = chunk->chunk_hdr->flags;
534 const struct sctp_association *asoc, struct sctp_chunk *chunk,
542 skb = skb_copy_expand(chunk->skb, sizeof(*ssf), 0, gfp);
546 len = ntohs(chunk->chunk_hdr->length);
560 ssf->ssfe_info.snd_sid = chunk->sinfo.sinfo_stream;
561 ssf->ssfe_info.snd_ppid = chunk->sinfo.sinfo_ppid;
562 ssf->ssfe_info.snd_context = chunk->sinfo.sinfo_context;
563 ssf->ssfe_info.snd_assoc_id = chunk->sinfo.sinfo_assoc_id;
564 ssf->ssfe_info.snd_flags = chunk->chunk_hdr->flags;
676 struct sctp_chunk *chunk,
680 struct sk_buff *skb = chunk->skb;
695 datalen = ntohs(chunk->chunk_hdr->length);
701 skb = skb_clone(chunk->skb, gfp);
705 /* Now that all memory allocations for this chunk succeeded, we
709 ntohl(chunk->subh.data_hdr->tsn),
710 chunk->transport))
718 * The total length of a chunk(including Type, Length and Value fields)
719 * MUST be a multiple of 4 bytes. If the length of the chunk is not a
720 * multiple of 4 bytes, the sender MUST pad the chunk with all zero
721 * bytes and this padding is not included in the chunk length field.
728 skb_trim(skb, chunk->chunk_end - padding - skb->data);
735 * the data of this chunk as other chunks will be accounted separately.
739 /* And hold the chunk as we need it for getting the IP headers
742 sctp_chunk_hold(chunk);
743 event->chunk = chunk;
747 event->stream = ntohs(chunk->subh.data_hdr->stream);
748 if (chunk->chunk_hdr->flags & SCTP_DATA_UNORDERED) {
752 event->tsn = ntohl(chunk->subh.data_hdr->tsn);
753 event->msg_flags |= chunk->chunk_hdr->flags;
1133 sctp_chunk_put(event->chunk);
1156 sctp_chunk_put(event->chunk);