if_eql.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Equalizer Load-balancer for serial network interfaces.
  3. *
  4. * (c) Copyright 1995 Simon "Guru Aleph-Null" Janes
  5. * NCM: Network and Communications Management, Inc.
  6. *
  7. *
  8. * This software may be used and distributed according to the terms
  9. * of the GNU General Public License, incorporated herein by reference.
  10. *
  11. * The author may be reached as [email protected], 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
  17. */
  18. #ifndef _LINUX_IF_EQL_H
  19. #define _LINUX_IF_EQL_H
  20. #include <linux/timer.h>
  21. #include <linux/spinlock.h>
  22. #include <net/net_trackers.h>
  23. #include <uapi/linux/if_eql.h>
  24. typedef struct slave {
  25. struct list_head list;
  26. struct net_device *dev;
  27. netdevice_tracker dev_tracker;
  28. long priority;
  29. long priority_bps;
  30. long priority_Bps;
  31. long bytes_queued;
  32. } slave_t;
  33. typedef struct slave_queue {
  34. spinlock_t lock;
  35. struct list_head all_slaves;
  36. int num_slaves;
  37. struct net_device *master_dev;
  38. } slave_queue_t;
  39. typedef struct equalizer {
  40. slave_queue_t queue;
  41. int min_slaves;
  42. int max_slaves;
  43. struct timer_list timer;
  44. } equalizer_t;
  45. #endif /* _LINUX_EQL_H */