Import 2.1.15
[davej-history.git] / drivers / net / shaper.h
blobfea13bbbdcd4f9c4058c283384b9c5d2b0bdf08f
1 #ifndef __LINUX_SHAPER_H
2 #define __LINUX_SHAPER_H
4 #ifdef __KERNEL__
6 #define SHAPER_QLEN 10
7 /*
8 * This is a bit speed dependant (read it shouldnt be a constant!)
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.
13 #define SHAPER_LATENCY (5*HZ)
14 #define SHAPER_MAXSLIP 2
15 #define SHAPER_BURST (HZ/50)/* Good for >128K then */
17 struct shaper
19 struct sk_buff_head sendq;
20 __u32 bytespertick;
21 __u32 shapelatency;
22 __u32 shapeclock;
23 __u32 recovery;/* Time we can next clock a packet out on
24 an empty queue */
25 char locked;
26 struct device *dev;
27 int(*hard_start_xmit) (struct sk_buff *skb,
28 struct device *dev);
29 int(*hard_header) (struct sk_buff *skb,
30 struct device *dev,
31 unsigned short type,
32 void*daddr,
33 void*saddr,
34 unsigned len);
35 int(*rebuild_header)(struct sk_buff *skb);
36 int(*hard_header_cache)(struct dst_entry *dst,struct dst_entry *neigh,
37 struct hh_cache *hh);
38 void(*header_cache_update)(struct hh_cache *hh,struct device *dev,unsigned char* haddr);
39 struct enet_statistics* (*get_stats)(struct device *dev);
40 struct wait_queue *wait_queue;
41 struct timer_list timer;
44 #endif
46 #define SHAPER_SET_DEV 0x0001
47 #define SHAPER_SET_SPEED 0x0002
49 struct shaperconf
51 __u16 ss_cmd;
52 union
54 char ssu_name[14];
55 __u32 ssu_speed;
56 } ss_u;
57 #define ss_speed ss_u.ssu_speed
58 #define ss_name ss_u.ssu_name
61 #endif
close