1 /* net/atm/ipcommon.c - Common items for all ways of doing IP over ATM */
3 /* Written 1996-2000 by Werner Almesberger, EPFL LRC/ICA */
6 #include <linux/module.h>
7 #include <linux/string.h>
8 #include <linux/skbuff.h>
9 #include <linux/netdevice.h>
11 #include <linux/atmdev.h>
12 #include <linux/atmclip.h>
19 #define DPRINTK(format,args...) printk(KERN_DEBUG format,##args)
21 #define DPRINTK(format,args...)
25 const unsigned char llc_oui
[] = {
26 0xaa, /* DSAP: non-ISO */
27 0xaa, /* SSAP: non-ISO */
28 0x03, /* Ctrl: Unnumbered Information Command PDU */
29 0x00, /* OUI: EtherType */
35 * skb_migrate appends the list at "from" to "to", emptying "from" in the
36 * process. skb_migrate is atomic with respect to all other skb operations on
37 * "from" and "to". Note that it locks both lists at the same time, so beware
38 * of potential deadlocks.
40 * This function should live in skbuff.c or skbuff.h.
44 void skb_migrate(struct sk_buff_head
*from
,struct sk_buff_head
*to
)
48 struct sk_buff
*skb_from
= (struct sk_buff
*) from
;
49 struct sk_buff
*skb_to
= (struct sk_buff
*) to
;
52 spin_lock_irqsave(&from
->lock
,flags
);
55 from
->next
->prev
= to
->prev
;
57 to
->prev
->next
= from
->next
;
58 to
->prev
= from
->prev
;
59 for (skb
= from
->next
; skb
!= skb_to
; skb
= skb
->next
)
61 to
->qlen
+= from
->qlen
;
62 spin_unlock(&to
->lock
);
63 from
->prev
= skb_from
;
64 from
->next
= skb_from
;
66 spin_unlock_irqrestore(&from
->lock
,flags
);
70 EXPORT_SYMBOL(llc_oui
);
71 EXPORT_SYMBOL(skb_migrate
);