1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
.\" -*- nroff -*-
.\"
.\" copyright (C) 1997 Cyrus Durgin <cider@speakeasy.org>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.TH SKB_INSERT 9 "November 24, 1997" "Linux DDI" "Networking Functions"
.hlm 0
.na
.SH NAME
__skb_insert, skb_insert, skb_append \- insert an sk_buff into a list
.SH SYNOPSIS
.B #include <linux/skbuff.h>
.HP
.BI "void __skb_insert(struct sk_buff " *newsk ", struct sk_buff " *prev ", struct sk_buff " *next ", struct sk_buff_head " *list ")"
.TP
.BI "void skb_insert(struct sk_buff " *old ", struct sk_buff " *newsk ")"
.TP
.BI "void skb_append(struct sk_buff " *old ", struct sk_buff " *newsk ")"
.hlm 1
.ad
.SH DESCRIPTION
\fBskb_insert\fP and \fBskb_append\fP are essentially wrapper functions for
\fB__skb_insert\fP (see \fBNOTES\fP, below.) \fB__skb_insert\fP inserts
\fInewsk\fP into \fIlist\fP, and resets the appropriate next and prev
pointers. \fIprev\fP and \fInext\fP are used to frame \fInewsk\fP in
\fIlist\fP. After setting the next and prev pointers in \fInewsk\fP,
\fB__skb_insert\fP sets the prev pointer in \fInext\fP and the next pointer
in \fIprev\fP, sets the list pointer in \fInewsk\fP, and increments the qlen
counter in \fIlist\fP.
\fBskb_insert\fP and \fBskb_append\fP should be used to add sk_buffs
to a list rather than performing this task manually; in addition to
performing this task in a standardized way, these functions also provide
for interrupt diasabling and prevent list mangling. Both of these
functions use the list pointer in \fIold\fP to determine to which list
\fInewsk\fP should be attached.
The \fBskb_insert\fP function adds \fInewsk\fP to the list before \fIold\fP.
The \fBskb_append\fP function adds \fInewsk\fP to the list after \fIold\fP.
.SH "RETURN VALUE"
None.
.SH NOTES
It is important to note the difference between not only \fBskb_insert\fP,
\fBskb_append\fP and \fB__skb_insert\fP, but all the \fB__skb_\fP functions
and their \fBskb_\fP counterparts. Essentially, the \fB__skb_\fP functions
are non-atomic, and should only be used with interrupts disabled. As a
convenience, the \fBskb_\fP functions are provided, which perform interrupt
disable / enable wrapper functionality in addition to performing their specific
tasks.
.SH AVAILABILITY
Linux 1.0+
.SH "SEE ALSO"
.hlm 0
.na
.BR intro "(9), " skb_queue_head "(9), " skb_queue_tail "(9)"
.ad
.hlm 1
.PP
/usr/src/linux/net/ax25/af_ax25.c /usr/src/linux/net/core/skbuff.c /usr/src/linux/net/ipv4/tcp_input.c /usr/src/linux/net/netrom/nr_in.c
.SH AUTHOR
Cyrus Durgin <cider@speakeasy.org>
|