0001
0002 #ifndef _MPC_H_
0003 #define _MPC_H_
0004
0005 #include <linux/types.h>
0006 #include <linux/atm.h>
0007 #include <linux/atmmpc.h>
0008 #include <linux/skbuff.h>
0009 #include <linux/spinlock.h>
0010 #include "mpoa_caches.h"
0011
0012
0013 int msg_to_mpoad(struct k_message *msg, struct mpoa_client *mpc);
0014
0015 struct mpoa_client {
0016 struct mpoa_client *next;
0017 struct net_device *dev;
0018 int dev_num;
0019
0020 struct atm_vcc *mpoad_vcc;
0021 uint8_t mps_ctrl_addr[ATM_ESA_LEN];
0022 uint8_t our_ctrl_addr[ATM_ESA_LEN];
0023
0024 rwlock_t ingress_lock;
0025 const struct in_cache_ops *in_ops;
0026 in_cache_entry *in_cache;
0027
0028 rwlock_t egress_lock;
0029 const struct eg_cache_ops *eg_ops;
0030 eg_cache_entry *eg_cache;
0031
0032 uint8_t *mps_macs;
0033 int number_of_mps_macs;
0034 struct mpc_parameters parameters;
0035
0036 const struct net_device_ops *old_ops;
0037 struct net_device_ops new_ops;
0038 };
0039
0040
0041 struct atm_mpoa_qos {
0042 struct atm_mpoa_qos *next;
0043 __be32 ipaddr;
0044 struct atm_qos qos;
0045 };
0046
0047
0048
0049 struct atm_mpoa_qos *atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos);
0050 struct atm_mpoa_qos *atm_mpoa_search_qos(__be32 dst_ip);
0051 int atm_mpoa_delete_qos(struct atm_mpoa_qos *qos);
0052
0053
0054 struct seq_file;
0055 void atm_mpoa_disp_qos(struct seq_file *m);
0056
0057 #ifdef CONFIG_PROC_FS
0058 int mpc_proc_init(void);
0059 void mpc_proc_clean(void);
0060 #else
0061 #define mpc_proc_init() (0)
0062 #define mpc_proc_clean() do { } while(0)
0063 #endif
0064
0065 #endif