OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [net/] [atm/] [mpc.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef _MPC_H_
2
#define _MPC_H_
3
 
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
 
10
/* kernel -> mpc-daemon */
11
int msg_to_mpoad(struct k_message *msg, struct mpoa_client *mpc);
12
 
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);
16
 
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   */
25
 
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       */
29
 
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       */
33
 
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    */
37
};
38
 
39
 
40
struct atm_mpoa_qos {
41
        struct atm_mpoa_qos *next;
42
        uint32_t ipaddr;
43
        struct atm_qos qos;
44
};
45
 
46
 
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 */
51
        struct module *owner;
52
};
53
 
54
/* Boot/module initialization function */
55
extern struct atm_mpoa_ops *atm_mpoa_ops;
56
int try_atm_mpoa_ops(void);
57
void atm_mpoa_ops_set(struct atm_mpoa_ops *hook);
58
 
59
/* MPOA QoS operations */
60
struct atm_mpoa_qos *atm_mpoa_add_qos(uint32_t dst_ip, struct atm_qos *qos);
61
struct atm_mpoa_qos *atm_mpoa_search_qos(uint32_t dst_ip);
62
int atm_mpoa_delete_qos(struct atm_mpoa_qos *qos);
63
 
64
/* Display QoS entries. This is for the procfs */
65
void atm_mpoa_disp_qos(char *page, int *len);
66
 
67
#endif /* _MPC_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.