mpc.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. struct atm_vcc *mpoad_vcc; /* control channel to mpoad */
  16. uint8_t mps_ctrl_addr[ATM_ESA_LEN]; /* MPS control ATM address */
  17. uint8_t our_ctrl_addr[ATM_ESA_LEN]; /* MPC's control ATM address */
  18. rwlock_t ingress_lock;
  19. const struct in_cache_ops *in_ops; /* ingress cache operations */
  20. in_cache_entry *in_cache; /* the ingress cache of this MPC */
  21. rwlock_t egress_lock;
  22. const struct eg_cache_ops *eg_ops; /* egress cache operations */
  23. eg_cache_entry *eg_cache; /* the egress cache of this MPC */
  24. uint8_t *mps_macs; /* array of MPS MAC addresses, >=1 */
  25. int number_of_mps_macs; /* number of the above MAC addresses */
  26. struct mpc_parameters parameters; /* parameters for this client */
  27. const struct net_device_ops *old_ops;
  28. struct net_device_ops new_ops;
  29. };
  30. struct atm_mpoa_qos {
  31. struct atm_mpoa_qos *next;
  32. __be32 ipaddr;
  33. struct atm_qos qos;
  34. };
  35. /* MPOA QoS operations */
  36. struct atm_mpoa_qos *atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos);
  37. struct atm_mpoa_qos *atm_mpoa_search_qos(__be32 dst_ip);
  38. int atm_mpoa_delete_qos(struct atm_mpoa_qos *qos);
  39. /* Display QoS entries. This is for the procfs */
  40. struct seq_file;
  41. void atm_mpoa_disp_qos(struct seq_file *m);
  42. #ifdef CONFIG_PROC_FS
  43. int mpc_proc_init(void);
  44. void mpc_proc_clean(void);
  45. #else
  46. #define mpc_proc_init() (0)
  47. #define mpc_proc_clean() do { } while(0)
  48. #endif
  49. #endif /* _MPC_H_ */