code style scripts/checkpatch.pl (linux-3.9-rc1) formatting
[linux-2.6.32.60-moxart.git] / include / linux / if_eql.h
blob79c4f268410d2223ee31986cfae0dda8c0442fb4
1 /*
2 * Equalizer Load-balancer for serial network interfaces.
4 * (c) Copyright 1995 Simon "Guru Aleph-Null" Janes
5 * NCM: Network and Communications Management, Inc.
8 * This software may be used and distributed according to the terms
9 * of the GNU General Public License, incorporated herein by reference.
11 * The author may be reached as simon@ncm.com, or C/O
12 * NCM
13 * Attn: Simon Janes
14 * 6803 Whittier Ave
15 * McLean VA 22101
16 * Phone: 1-703-847-0040 ext 103
19 #ifndef _LINUX_IF_EQL_H
20 #define _LINUX_IF_EQL_H
22 #define EQL_DEFAULT_SLAVE_PRIORITY 28800
23 #define EQL_DEFAULT_MAX_SLAVES 4
24 #define EQL_DEFAULT_MTU 576
25 #define EQL_DEFAULT_RESCHED_IVAL 100
27 #define EQL_ENSLAVE (SIOCDEVPRIVATE)
28 #define EQL_EMANCIPATE (SIOCDEVPRIVATE + 1)
30 #define EQL_GETSLAVECFG (SIOCDEVPRIVATE + 2)
31 #define EQL_SETSLAVECFG (SIOCDEVPRIVATE + 3)
33 #define EQL_GETMASTRCFG (SIOCDEVPRIVATE + 4)
34 #define EQL_SETMASTRCFG (SIOCDEVPRIVATE + 5)
36 #ifdef __KERNEL__
38 #include <linux/timer.h>
39 #include <linux/spinlock.h>
41 typedef struct slave {
42 struct list_head list;
43 struct net_device *dev;
44 long priority;
45 long priority_bps;
46 long priority_Bps;
47 long bytes_queued;
48 } slave_t;
50 typedef struct slave_queue {
51 spinlock_t lock;
52 struct list_head all_slaves;
53 int num_slaves;
54 struct net_device *master_dev;
55 } slave_queue_t;
57 typedef struct equalizer {
58 slave_queue_t queue;
59 int min_slaves;
60 int max_slaves;
61 struct timer_list timer;
62 } equalizer_t;
64 #endif /* __KERNEL__ */
66 typedef struct master_config {
67 char master_name[16];
68 int max_slaves;
69 int min_slaves;
70 } master_config_t;
72 typedef struct slave_config {
73 char slave_name[16];
74 long priority;
75 } slave_config_t;
77 typedef struct slaving_request {
78 char slave_name[16];
79 long priority;
80 } slaving_request_t;
83 #endif /* _LINUX_EQL_H */