aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/inqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/inqueue.c')
-rw-r--r--net/sctp/inqueue.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c
index e4ea7fdf36ed..f10fe7fbf24c 100644
--- a/net/sctp/inqueue.c
+++ b/net/sctp/inqueue.c
@@ -100,6 +100,25 @@ void sctp_inq_push(struct sctp_inq *q, struct sctp_chunk *chunk)
100 q->immediate.func(&q->immediate); 100 q->immediate.func(&q->immediate);
101} 101}
102 102
103/* Peek at the next chunk on the inqeue. */
104struct sctp_chunkhdr *sctp_inq_peek(struct sctp_inq *queue)
105{
106 struct sctp_chunk *chunk;
107 sctp_chunkhdr_t *ch = NULL;
108
109 chunk = queue->in_progress;
110 /* If there is no more chunks in this packet, say so */
111 if (chunk->singleton ||
112 chunk->end_of_packet ||
113 chunk->pdiscard)
114 return NULL;
115
116 ch = (sctp_chunkhdr_t *)chunk->chunk_end;
117
118 return ch;
119}
120
121
103/* Extract a chunk from an SCTP inqueue. 122/* Extract a chunk from an SCTP inqueue.
104 * 123 *
105 * WARNING: If you need to put the chunk on another queue, you need to 124 * WARNING: If you need to put the chunk on another queue, you need to