Lines Matching refs:chunk

129 	__u16 inbound, struct sctp_chunk *chunk, gfp_t gfp)
135 /* If the lower layer passed in the chunk, it will be
138 if (chunk) {
139 /* Copy the chunk data to a new skb and reserve enough
142 skb = skb_copy_expand(chunk->skb,
158 ntohs(chunk->chunk_hdr->length) -
356 * Note: This assumes that the chunk->skb->data already points to the
371 struct sctp_chunk *chunk, __u16 flags,
381 ch = (sctp_errhdr_t *)(chunk->skb->data);
386 skb_pull(chunk->skb, sizeof(sctp_errhdr_t));
391 skb = skb_copy_expand(chunk->skb, sizeof(*sre), 0, gfp);
393 /* Pull off the rest of the cause TLV from the chunk. */
394 skb_pull(chunk->skb, elen);
427 const struct sctp_association *asoc, struct sctp_chunk *chunk,
435 int len = ntohs(chunk->chunk_hdr->length);
438 skb = skb_copy_expand(chunk->skb,
445 /* Pull off the common chunk header and DATA header. */
506 memcpy(&ssf->ssf_info, &chunk->sinfo, sizeof(struct sctp_sndrcvinfo));
511 ssf->ssf_info.sinfo_flags = chunk->chunk_hdr->flags;
636 struct sctp_chunk *chunk,
657 (!sk_rmem_schedule(asoc->base.sk, chunk->skb,
658 chunk->skb->truesize)))
663 skb = skb_clone(chunk->skb, gfp);
667 /* Now that all memory allocations for this chunk succeeded, we
671 ntohl(chunk->subh.data_hdr->tsn),
672 chunk->transport))
680 * The total length of a chunk(including Type, Length and Value fields)
681 * MUST be a multiple of 4 bytes. If the length of the chunk is not a
682 * multiple of 4 bytes, the sender MUST pad the chunk with all zero
683 * bytes and this padding is not included in the chunk length field.
687 len = ntohs(chunk->chunk_hdr->length);
691 skb_trim(skb, chunk->chunk_end - padding - skb->data);
698 * the data of this chunk as other chunks will be accounted separately.
704 event->stream = ntohs(chunk->subh.data_hdr->stream);
705 event->ssn = ntohs(chunk->subh.data_hdr->ssn);
706 event->ppid = chunk->subh.data_hdr->ppid;
707 if (chunk->chunk_hdr->flags & SCTP_DATA_UNORDERED) {
711 event->tsn = ntohl(chunk->subh.data_hdr->tsn);
712 event->msg_flags |= chunk->chunk_hdr->flags;
713 event->iif = sctp_chunk_iif(chunk);