Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Equalizer Load-balancer for serial network interfaces.
0003  *
0004  * (c) Copyright 1995 Simon "Guru Aleph-Null" Janes
0005  * NCM: Network and Communications Management, Inc.
0006  *
0007  *
0008  *  This software may be used and distributed according to the terms
0009  *  of the GNU General Public License, incorporated herein by reference.
0010  * 
0011  * The author may be reached as simon@ncm.com, or C/O
0012  *    NCM
0013  *    Attn: Simon Janes
0014  *    6803 Whittier Ave
0015  *    McLean VA 22101
0016  *    Phone: 1-703-847-0040 ext 103
0017  */
0018 #ifndef _LINUX_IF_EQL_H
0019 #define _LINUX_IF_EQL_H
0020 
0021 
0022 #include <linux/timer.h>
0023 #include <linux/spinlock.h>
0024 #include <net/net_trackers.h>
0025 #include <uapi/linux/if_eql.h>
0026 
0027 typedef struct slave {
0028     struct list_head    list;
0029     struct net_device   *dev;
0030     netdevice_tracker   dev_tracker;
0031     long            priority;
0032     long            priority_bps;
0033     long            priority_Bps;
0034     long            bytes_queued;
0035 } slave_t;
0036 
0037 typedef struct slave_queue {
0038     spinlock_t      lock;
0039     struct list_head    all_slaves;
0040     int         num_slaves;
0041     struct net_device   *master_dev;
0042 } slave_queue_t;
0043 
0044 typedef struct equalizer {
0045     slave_queue_t       queue;
0046     int         min_slaves;
0047     int         max_slaves;
0048     struct timer_list   timer;
0049 } equalizer_t;  
0050 
0051 #endif /* _LINUX_EQL_H */