patch-2.3.15 linux/net/atm/ipcommon.c
Next file: linux/net/atm/ipcommon.h
Previous file: linux/net/atm/common.h
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Mon Aug 23 13:44:03 1999
- Orig file:
v2.3.14/linux/net/atm/ipcommon.c
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.3.14/linux/net/atm/ipcommon.c linux/net/atm/ipcommon.c
@@ -0,0 +1,51 @@
+/* net/atm/ipcommon.c - Common items for all ways of doing IP over ATM */
+
+/* Written 1996,1997 by Werner Almesberger, EPFL LRC */
+
+
+#include <linux/string.h>
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+#include <linux/in.h>
+#include <linux/atmdev.h>
+#include <linux/atmclip.h>
+
+#include "common.h"
+#include "ipcommon.h"
+
+
+#if 0
+#define DPRINTK(format,args...) printk(KERN_DEBUG format,##args)
+#else
+#define DPRINTK(format,args...)
+#endif
+
+
+const unsigned char llc_oui[] = {
+ 0xaa, /* DSAP: non-ISO */
+ 0xaa, /* SSAP: non-ISO */
+ 0x03, /* Ctrl: Unnumbered Information Command PDU */
+ 0x00, /* OUI: EtherType */
+ 0x00,
+ 0x00 };
+
+
+/*
+ * skb_migrate moves the list at FROM to TO, emptying FROM in the process.
+ * This function should live in skbuff.c or skbuff.h. Note that skb_migrate
+ * is not atomic, so turn off interrupts when using it.
+ */
+
+
+void skb_migrate(struct sk_buff_head *from,struct sk_buff_head *to)
+{
+ struct sk_buff *skb,*prev;
+
+ for (skb = ((struct sk_buff *) from)->next;
+ skb != (struct sk_buff *) from; skb = skb->next) skb->list = to;
+ prev = from->prev;
+ from->next->prev = (struct sk_buff *) to;
+ prev->next = (struct sk_buff *) to;
+ *to = *from;
+ skb_queue_head_init(from);
+}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)