mpc.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef _MPC_H_
  2. #define _MPC_H_
  3. #include <linux/types.h>
  4. #include <linux/atm.h>
  5. #include <linux/atmmpc.h>
  6. #include <linux/skbuff.h>
  7. #include <linux/spinlock.h>
  8. #include "mpoa_caches.h"
  9. /* kernel -> mpc-daemon */
  10. int msg_to_mpoad(struct k_message *msg, struct mpoa_client *mpc);
  11. struct mpoa_client {
  12. struct mpoa_client *next;
  13. struct net_device *dev; /* lec in question */
  14. int dev_num; /* e.g. 2 for lec2 */
  15. int (*old_hard_start_xmit)(struct sk_buff *skb, struct net_device *dev);
  16. struct atm_vcc *mpoad_vcc; /* control channel to mpoad */
  17. uint8_t mps_ctrl_addr[ATM_ESA_LEN]; /* MPS control ATM address */
  18. uint8_t our_ctrl_addr[ATM_ESA_LEN]; /* MPC's control ATM address */
  19. rwlock_t ingress_lock;
  20. struct in_cache_ops *in_ops; /* ingress cache operations */
  21. in_cache_entry *in_cache; /* the ingress cache of this MPC */
  22. rwlock_t egress_lock;
  23. struct eg_cache_ops *eg_ops; /* egress cache operations */
  24. eg_cache_entry *eg_cache; /* the egress cache of this MPC */
  25. uint8_t *mps_macs; /* array of MPS MAC addresses, >=1 */
  26. int number_of_mps_macs; /* number of the above MAC addresses */
  27. struct mpc_parameters parameters; /* parameters for this client */
  28. };
  29. struct atm_mpoa_qos {
  30. struct atm_mpoa_qos *next;
  31. __be32 ipaddr;
  32. struct atm_qos qos;
  33. };
  34. /* MPOA QoS operations */
  35. struct atm_mpoa_qos *atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos);
  36. struct atm_mpoa_qos *atm_mpoa_search_qos(__be32 dst_ip);
  37. int atm_mpoa_delete_qos(struct atm_mpoa_qos *qos);
  38. /* Display QoS entries. This is for the procfs */
  39. struct seq_file;
  40. void atm_mpoa_disp_qos(struct seq_file *m);
  41. #ifdef CONFIG_PROC_FS
  42. int mpc_proc_init(void);
  43. void mpc_proc_clean(void);
  44. #else
  45. #define mpc_proc_init() (0)
  46. #define mpc_proc_clean() do { } while(0)
  47. #endif
  48. #endif /* _MPC_H_ */