Import 2.3.18pre1
[davej-history.git] / net / atm / mpc.h
blob2237ba43fc2e2bad2f05b5fa9572578783df0344
1 #ifndef _MPC_H_
2 #define _MPC_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"
10 /* kernel -> mpc-daemon */
11 int msg_to_mpoad(struct k_message *msg, struct mpoa_client *mpc);
13 /* Functions for ioctl(ATMMPC_*) operations */
14 int atm_mpoa_mpoad_attach(struct atm_vcc *vcc, int arg);
15 int atm_mpoa_vcc_attach(struct atm_vcc *vcc, long arg);
17 struct mpoa_client {
18 struct mpoa_client *next;
19 struct net_device *dev; /* lec in question */
20 int dev_num; /* e.g. 2 for lec2 */
21 int (*old_hard_start_xmit)(struct sk_buff *skb, struct net_device *dev);
22 struct atm_vcc *mpoad_vcc; /* control channel to mpoad */
23 uint8_t mps_ctrl_addr[ATM_ESA_LEN]; /* MPS control ATM address */
24 uint8_t our_ctrl_addr[ATM_ESA_LEN]; /* MPC's control ATM address */
26 rwlock_t ingress_lock;
27 struct in_cache_ops *in_ops; /* ingress cache operations */
28 in_cache_entry *in_cache; /* the ingress cache of this MPC */
30 rwlock_t egress_lock;
31 struct eg_cache_ops *eg_ops; /* egress cache operations */
32 eg_cache_entry *eg_cache; /* the egress cache of this MPC */
34 uint8_t *mps_macs; /* array of MPS MAC addresses, >=1 */
35 int number_of_mps_macs; /* number of the above MAC addresses */
36 struct mpc_parameters parameters; /* parameters for this client */
40 struct atm_mpoa_qos {
41 struct atm_mpoa_qos *next;
42 uint32_t ipaddr;
43 struct atm_qos qos;
47 /* Functions to call during ioctl(ATMMPC, ) */
48 struct atm_mpoa_ops {
49 int (*mpoad_attach)(struct atm_vcc *vcc, int arg); /* attach mpoa daemon */
50 int (*vcc_attach)(struct atm_vcc *vcc, long arg); /* attach shortcut vcc */
53 /* Boot/module initialization function */
54 void atm_mpoa_init(void);
55 void atm_mpoa_init_ops(struct atm_mpoa_ops *ops);
57 /* MPOA QoS operations */
58 struct atm_mpoa_qos *atm_mpoa_add_qos(uint32_t dst_ip, struct atm_qos *qos);
59 struct atm_mpoa_qos *atm_mpoa_search_qos(uint32_t dst_ip);
60 int atm_mpoa_delete_qos(struct atm_mpoa_qos *qos);
62 /* Display QoS entries. This is for the procfs */
63 void atm_mpoa_disp_qos(char *page, int *len);
65 #endif /* _MPC_H_ */