diff options
| author | Adrian Bunk <bunk@stusta.de> | 2006-11-13 19:02:22 -0500 |
|---|---|---|
| committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:22:23 -0500 |
| commit | 90833aa4f496d69ca374af6acef7d1614c8693ff (patch) | |
| tree | dbac818cc40ab12d493c45778febf6b7a768f757 /include/linux | |
| parent | d7f7365f5776723da6df73540d855069c2daaa5c (diff) | |
[NET]: The scheduled removal of the frame diverter.
This patch contains the scheduled removal of the frame diverter.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/Kbuild | 1 | ||||
| -rw-r--r-- | include/linux/divert.h | 132 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 6 | ||||
| -rw-r--r-- | include/linux/sockios.h | 4 |
4 files changed, 2 insertions, 141 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index a1155a2beb32..d7e04689304c 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -193,7 +193,6 @@ unifdef-y += cuda.h | |||
| 193 | unifdef-y += cyclades.h | 193 | unifdef-y += cyclades.h |
| 194 | unifdef-y += dccp.h | 194 | unifdef-y += dccp.h |
| 195 | unifdef-y += dirent.h | 195 | unifdef-y += dirent.h |
| 196 | unifdef-y += divert.h | ||
| 197 | unifdef-y += dlm.h | 196 | unifdef-y += dlm.h |
| 198 | unifdef-y += elfcore.h | 197 | unifdef-y += elfcore.h |
| 199 | unifdef-y += errno.h | 198 | unifdef-y += errno.h |
diff --git a/include/linux/divert.h b/include/linux/divert.h deleted file mode 100644 index 8fb4e9de6843..000000000000 --- a/include/linux/divert.h +++ /dev/null | |||
| @@ -1,132 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Frame Diversion, Benoit Locher <Benoit.Locher@skf.com> | ||
| 3 | * | ||
| 4 | * Changes: | ||
| 5 | * 06/09/2000 BL: initial version | ||
| 6 | * | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _LINUX_DIVERT_H | ||
| 10 | #define _LINUX_DIVERT_H | ||
| 11 | |||
| 12 | #include <asm/types.h> | ||
| 13 | |||
| 14 | #define MAX_DIVERT_PORTS 8 /* Max number of ports to divert (tcp, udp) */ | ||
| 15 | |||
| 16 | /* Divertable protocols */ | ||
| 17 | #define DIVERT_PROTO_NONE 0x0000 | ||
| 18 | #define DIVERT_PROTO_IP 0x0001 | ||
| 19 | #define DIVERT_PROTO_ICMP 0x0002 | ||
| 20 | #define DIVERT_PROTO_TCP 0x0004 | ||
| 21 | #define DIVERT_PROTO_UDP 0x0008 | ||
| 22 | |||
| 23 | /* | ||
| 24 | * This is an Ethernet Frame Diverter option block | ||
| 25 | */ | ||
| 26 | struct divert_blk | ||
| 27 | { | ||
| 28 | int divert; /* are we active */ | ||
| 29 | unsigned int protos; /* protocols */ | ||
| 30 | __u16 tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */ | ||
| 31 | __u16 tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */ | ||
| 32 | __u16 udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */ | ||
| 33 | __u16 udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */ | ||
| 34 | }; | ||
| 35 | |||
| 36 | /* | ||
| 37 | * Diversion control block, for configuration with the userspace tool | ||
| 38 | * divert | ||
| 39 | */ | ||
| 40 | |||
| 41 | typedef union _divert_cf_arg | ||
| 42 | { | ||
| 43 | __s16 int16; | ||
| 44 | __u16 uint16; | ||
| 45 | __s32 int32; | ||
| 46 | __u32 uint32; | ||
| 47 | __s64 int64; | ||
| 48 | __u64 uint64; | ||
| 49 | void __user *ptr; | ||
| 50 | } divert_cf_arg; | ||
| 51 | |||
| 52 | |||
| 53 | struct divert_cf | ||
| 54 | { | ||
| 55 | int cmd; /* Command */ | ||
| 56 | divert_cf_arg arg1, | ||
| 57 | arg2, | ||
| 58 | arg3; | ||
| 59 | int dev_index; /* device index (eth0=0, etc...) */ | ||
| 60 | }; | ||
| 61 | |||
| 62 | |||
| 63 | /* Diversion commands */ | ||
| 64 | #define DIVCMD_DIVERT 1 /* ENABLE/DISABLE diversion */ | ||
| 65 | #define DIVCMD_IP 2 /* ENABLE/DISABLE whold IP diversion */ | ||
| 66 | #define DIVCMD_TCP 3 /* ENABLE/DISABLE whold TCP diversion */ | ||
| 67 | #define DIVCMD_TCPDST 4 /* ADD/REMOVE TCP DST port for diversion */ | ||
| 68 | #define DIVCMD_TCPSRC 5 /* ADD/REMOVE TCP SRC port for diversion */ | ||
| 69 | #define DIVCMD_UDP 6 /* ENABLE/DISABLE whole UDP diversion */ | ||
| 70 | #define DIVCMD_UDPDST 7 /* ADD/REMOVE UDP DST port for diversion */ | ||
| 71 | #define DIVCMD_UDPSRC 8 /* ADD/REMOVE UDP SRC port for diversion */ | ||
| 72 | #define DIVCMD_ICMP 9 /* ENABLE/DISABLE whole ICMP diversion */ | ||
| 73 | #define DIVCMD_GETSTATUS 10 /* GET the status of the diverter */ | ||
| 74 | #define DIVCMD_RESET 11 /* Reset the diverter on the specified dev */ | ||
| 75 | #define DIVCMD_GETVERSION 12 /* Retrieve the diverter code version (char[32]) */ | ||
| 76 | |||
| 77 | /* General syntax of the commands: | ||
| 78 | * | ||
| 79 | * DIVCMD_xxxxxx(arg1, arg2, arg3, dev_index) | ||
| 80 | * | ||
| 81 | * SIOCSIFDIVERT: | ||
| 82 | * DIVCMD_DIVERT(DIVARG1_ENABLE|DIVARG1_DISABLE, , ,ifindex) | ||
| 83 | * DIVCMD_IP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex) | ||
| 84 | * DIVCMD_TCP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex) | ||
| 85 | * DIVCMD_TCPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex) | ||
| 86 | * DIVCMD_TCPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex) | ||
| 87 | * DIVCMD_UDP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex) | ||
| 88 | * DIVCMD_UDPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex) | ||
| 89 | * DIVCMD_UDPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex) | ||
| 90 | * DIVCMD_ICMP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex) | ||
| 91 | * DIVCMD_RESET(, , , ifindex) | ||
| 92 | * | ||
| 93 | * SIOGIFDIVERT: | ||
| 94 | * DIVCMD_GETSTATUS(divert_blk, , , ifindex) | ||
| 95 | * DIVCMD_GETVERSION(string[3]) | ||
| 96 | */ | ||
| 97 | |||
| 98 | |||
| 99 | /* Possible values for arg1 */ | ||
| 100 | #define DIVARG1_ENABLE 0 /* ENABLE something */ | ||
| 101 | #define DIVARG1_DISABLE 1 /* DISABLE something */ | ||
| 102 | #define DIVARG1_ADD 2 /* ADD something */ | ||
| 103 | #define DIVARG1_REMOVE 3 /* REMOVE something */ | ||
| 104 | |||
| 105 | |||
| 106 | #ifdef __KERNEL__ | ||
| 107 | |||
| 108 | /* diverter functions */ | ||
| 109 | #include <linux/skbuff.h> | ||
| 110 | |||
| 111 | #ifdef CONFIG_NET_DIVERT | ||
| 112 | #include <linux/netdevice.h> | ||
| 113 | |||
| 114 | int alloc_divert_blk(struct net_device *); | ||
| 115 | void free_divert_blk(struct net_device *); | ||
| 116 | int divert_ioctl(unsigned int cmd, struct divert_cf __user *arg); | ||
| 117 | void divert_frame(struct sk_buff *skb); | ||
| 118 | static inline void handle_diverter(struct sk_buff *skb) | ||
| 119 | { | ||
| 120 | /* if diversion is supported on device, then divert */ | ||
| 121 | if (skb->dev->divert && skb->dev->divert->divert) | ||
| 122 | divert_frame(skb); | ||
| 123 | } | ||
| 124 | |||
| 125 | #else | ||
| 126 | # define alloc_divert_blk(dev) (0) | ||
| 127 | # define free_divert_blk(dev) do {} while (0) | ||
| 128 | # define divert_ioctl(cmd, arg) (-ENOPKG) | ||
| 129 | # define handle_diverter(skb) do {} while (0) | ||
| 130 | #endif | ||
| 131 | #endif | ||
| 132 | #endif /* _LINUX_DIVERT_H */ | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 83b8c4f1d69d..4e967b2e22cc 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -38,7 +38,6 @@ | |||
| 38 | #include <linux/percpu.h> | 38 | #include <linux/percpu.h> |
| 39 | #include <linux/dmaengine.h> | 39 | #include <linux/dmaengine.h> |
| 40 | 40 | ||
| 41 | struct divert_blk; | ||
| 42 | struct vlan_group; | 41 | struct vlan_group; |
| 43 | struct ethtool_ops; | 42 | struct ethtool_ops; |
| 44 | struct netpoll_info; | 43 | struct netpoll_info; |
| @@ -517,11 +516,6 @@ struct net_device | |||
| 517 | /* bridge stuff */ | 516 | /* bridge stuff */ |
| 518 | struct net_bridge_port *br_port; | 517 | struct net_bridge_port *br_port; |
| 519 | 518 | ||
| 520 | #ifdef CONFIG_NET_DIVERT | ||
| 521 | /* this will get initialized at each interface type init routine */ | ||
| 522 | struct divert_blk *divert; | ||
| 523 | #endif /* CONFIG_NET_DIVERT */ | ||
| 524 | |||
| 525 | /* class/net/name entry */ | 519 | /* class/net/name entry */ |
| 526 | struct class_device class_dev; | 520 | struct class_device class_dev; |
| 527 | /* space for optional statistics and wireless sysfs groups */ | 521 | /* space for optional statistics and wireless sysfs groups */ |
diff --git a/include/linux/sockios.h b/include/linux/sockios.h index e6b9d1d36ea2..abef7596655a 100644 --- a/include/linux/sockios.h +++ b/include/linux/sockios.h | |||
| @@ -72,8 +72,8 @@ | |||
| 72 | #define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ | 72 | #define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ |
| 73 | #define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ | 73 | #define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ |
| 74 | 74 | ||
| 75 | #define SIOCGIFDIVERT 0x8944 /* Frame diversion support */ | 75 | /* SIOCGIFDIVERT was: 0x8944 Frame diversion support */ |
| 76 | #define SIOCSIFDIVERT 0x8945 /* Set frame diversion options */ | 76 | /* SIOCSIFDIVERT was: 0x8945 Set frame diversion options */ |
| 77 | 77 | ||
| 78 | #define SIOCETHTOOL 0x8946 /* Ethtool interface */ | 78 | #define SIOCETHTOOL 0x8946 /* Ethtool interface */ |
| 79 | 79 | ||
