diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/um/include/net_kern.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/um/include/net_kern.h')
-rw-r--r-- | arch/um/include/net_kern.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/arch/um/include/net_kern.h b/arch/um/include/net_kern.h new file mode 100644 index 000000000000..1c07949a13d6 --- /dev/null +++ b/arch/um/include/net_kern.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.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/skbuff.h" | ||
11 | #include "linux/socket.h" | ||
12 | #include "linux/list.h" | ||
13 | |||
14 | struct uml_net { | ||
15 | struct list_head list; | ||
16 | struct net_device *dev; | ||
17 | struct platform_device pdev; | ||
18 | int index; | ||
19 | unsigned char mac[ETH_ALEN]; | ||
20 | int have_mac; | ||
21 | }; | ||
22 | |||
23 | struct uml_net_private { | ||
24 | struct list_head list; | ||
25 | spinlock_t lock; | ||
26 | struct net_device *dev; | ||
27 | struct timer_list tl; | ||
28 | struct net_device_stats stats; | ||
29 | int fd; | ||
30 | unsigned char mac[ETH_ALEN]; | ||
31 | int have_mac; | ||
32 | unsigned short (*protocol)(struct sk_buff *); | ||
33 | int (*open)(void *); | ||
34 | void (*close)(int, void *); | ||
35 | void (*remove)(void *); | ||
36 | int (*read)(int, struct sk_buff **skb, struct uml_net_private *); | ||
37 | int (*write)(int, struct sk_buff **skb, struct uml_net_private *); | ||
38 | |||
39 | void (*add_address)(unsigned char *, unsigned char *, void *); | ||
40 | void (*delete_address)(unsigned char *, unsigned char *, void *); | ||
41 | int (*set_mtu)(int mtu, void *); | ||
42 | int user[1]; | ||
43 | }; | ||
44 | |||
45 | struct net_kern_info { | ||
46 | void (*init)(struct net_device *, void *); | ||
47 | unsigned short (*protocol)(struct sk_buff *); | ||
48 | int (*read)(int, struct sk_buff **skb, struct uml_net_private *); | ||
49 | int (*write)(int, struct sk_buff **skb, struct uml_net_private *); | ||
50 | }; | ||
51 | |||
52 | struct transport { | ||
53 | struct list_head list; | ||
54 | char *name; | ||
55 | int (*setup)(char *, char **, void *); | ||
56 | struct net_user_info *user; | ||
57 | struct net_kern_info *kern; | ||
58 | int private_size; | ||
59 | int setup_size; | ||
60 | }; | ||
61 | |||
62 | extern struct net_device *ether_init(int); | ||
63 | extern unsigned short ether_protocol(struct sk_buff *); | ||
64 | extern int setup_etheraddr(char *str, unsigned char *addr); | ||
65 | extern struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra); | ||
66 | extern int tap_setup_common(char *str, char *type, char **dev_name, | ||
67 | char **mac_out, char **gate_addr); | ||
68 | extern void register_transport(struct transport *new); | ||
69 | extern unsigned short eth_protocol(struct sk_buff *skb); | ||
70 | |||
71 | #endif | ||
72 | |||
73 | /* | ||
74 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
75 | * Emacs will notice this stuff at the end of the file and automatically | ||
76 | * adjust the settings for this buffer only. This must remain at the end | ||
77 | * of the file. | ||
78 | * --------------------------------------------------------------------------- | ||
79 | * Local variables: | ||
80 | * c-file-style: "linux" | ||
81 | * End: | ||
82 | */ | ||