OSDN Git Service

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