aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_shaper.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/if_shaper.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 'include/linux/if_shaper.h')
-rw-r--r--include/linux/if_shaper.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/include/linux/if_shaper.h b/include/linux/if_shaper.h
new file mode 100644
index 000000000000..0485b256d043
--- /dev/null
+++ b/include/linux/if_shaper.h
@@ -0,0 +1,64 @@
1#ifndef __LINUX_SHAPER_H
2#define __LINUX_SHAPER_H
3
4#ifdef __KERNEL__
5
6#define SHAPER_QLEN 10
7/*
8 * This is a bit speed dependent (read it shouldn't be a constant!)
9 *
10 * 5 is about right for 28.8 upwards. Below that double for every
11 * halving of speed or so. - ie about 20 for 9600 baud.
12 */
13#define SHAPER_LATENCY (5*HZ)
14#define SHAPER_MAXSLIP 2
15#define SHAPER_BURST (HZ/50) /* Good for >128K then */
16
17struct shaper
18{
19 struct sk_buff_head sendq;
20 __u32 bytespertick;
21 __u32 bitspersec;
22 __u32 shapelatency;
23 __u32 shapeclock;
24 unsigned long recovery; /* Time we can next clock a packet out on
25 an empty queue */
26 unsigned long locked;
27 struct net_device_stats stats;
28 struct net_device *dev;
29 int (*hard_start_xmit) (struct sk_buff *skb,
30 struct net_device *dev);
31 int (*hard_header) (struct sk_buff *skb,
32 struct net_device *dev,
33 unsigned short type,
34 void *daddr,
35 void *saddr,
36 unsigned len);
37 int (*rebuild_header)(struct sk_buff *skb);
38 int (*hard_header_cache)(struct neighbour *neigh, struct hh_cache *hh);
39 void (*header_cache_update)(struct hh_cache *hh, struct net_device *dev, unsigned char * haddr);
40 struct net_device_stats* (*get_stats)(struct net_device *dev);
41 wait_queue_head_t wait_queue;
42 struct timer_list timer;
43};
44
45#endif
46
47#define SHAPER_SET_DEV 0x0001
48#define SHAPER_SET_SPEED 0x0002
49#define SHAPER_GET_DEV 0x0003
50#define SHAPER_GET_SPEED 0x0004
51
52struct shaperconf
53{
54 __u16 ss_cmd;
55 union
56 {
57 char ssu_name[14];
58 __u32 ssu_speed;
59 } ss_u;
60#define ss_speed ss_u.ssu_speed
61#define ss_name ss_u.ssu_name
62};
63
64#endif