aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include/shared/net_kern.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:22:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:22:01 -0400
commit5b34653963de7a6d0d8c783527457d68fddc60fb (patch)
tree1a234741e1823a54cd0514616f783b4cf503a528 /arch/um/include/shared/net_kern.h
parent765426e8ee4c0ab2bc9d44951f4865b8494cdbd0 (diff)
parent5e1b00758b5a8bee9d42515bffdaf305a32f1b04 (diff)
Merge branch 'x86/um-header' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86/um-header' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (26 commits) x86: canonicalize remaining header guards x86: drop double underscores from header guards x86: Fix ASM_X86__ header guards x86, um: get rid of uml-config.h x86, um: get rid of arch/um/Kconfig.arch x86, um: get rid of arch/um/os symlink x86, um: get rid of excessive includes of uml-config.h x86, um: get rid of header symlinks x86, um: merge Kconfig.i386 and Kconfig.x86_64 x86, um: get rid of sysdep symlink x86, um: trim the junk from uml ptrace-*.h x86, um: take vm-flags.h to sysdep x86, um: get rid of uml asm/arch x86, um: get rid of uml highmem.h x86, um: get rid of uml unistd.h x86, um: get rid of system.h -> system.h include x86, um: uml atomic.h is not needed anymore x86, um: untangle uml ldt.h x86, um: get rid of more uml asm/arch uses x86, um: remove dead header (uml module-generic.h; never used these days) ...
Diffstat (limited to 'arch/um/include/shared/net_kern.h')
-rw-r--r--arch/um/include/shared/net_kern.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/arch/um/include/shared/net_kern.h b/arch/um/include/shared/net_kern.h
new file mode 100644
index 000000000000..d843c7924a7c
--- /dev/null
+++ b/arch/um/include/shared/net_kern.h
@@ -0,0 +1,70 @@
1/*
2 * Copyright (C) 2002 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_NET_KERN_H
7#define __UM_NET_KERN_H
8
9#include <linux/netdevice.h>
10#include <linux/platform_device.h>
11#include <linux/skbuff.h>
12#include <linux/socket.h>
13#include <linux/list.h>
14#include <linux/workqueue.h>
15
16struct uml_net {
17 struct list_head list;
18 struct net_device *dev;
19 struct platform_device pdev;
20 int index;
21 unsigned char mac[ETH_ALEN];
22};
23
24struct uml_net_private {
25 struct list_head list;
26 spinlock_t lock;
27 struct net_device *dev;
28 struct timer_list tl;
29 struct net_device_stats stats;
30 struct work_struct work;
31 int fd;
32 unsigned char mac[ETH_ALEN];
33 int max_packet;
34 unsigned short (*protocol)(struct sk_buff *);
35 int (*open)(void *);
36 void (*close)(int, void *);
37 void (*remove)(void *);
38 int (*read)(int, struct sk_buff *skb, struct uml_net_private *);
39 int (*write)(int, struct sk_buff *skb, struct uml_net_private *);
40
41 void (*add_address)(unsigned char *, unsigned char *, void *);
42 void (*delete_address)(unsigned char *, unsigned char *, void *);
43 char user[0];
44};
45
46struct net_kern_info {
47 void (*init)(struct net_device *, void *);
48 unsigned short (*protocol)(struct sk_buff *);
49 int (*read)(int, struct sk_buff *skb, struct uml_net_private *);
50 int (*write)(int, struct sk_buff *skb, struct uml_net_private *);
51};
52
53struct transport {
54 struct list_head list;
55 const char *name;
56 int (* const setup)(char *, char **, void *);
57 const struct net_user_info *user;
58 const struct net_kern_info *kern;
59 const int private_size;
60 const int setup_size;
61};
62
63extern struct net_device *ether_init(int);
64extern unsigned short ether_protocol(struct sk_buff *);
65extern int tap_setup_common(char *str, char *type, char **dev_name,
66 char **mac_out, char **gate_addr);
67extern void register_transport(struct transport *new);
68extern unsigned short eth_protocol(struct sk_buff *skb);
69
70#endif