Debian Codegraph @

common/atm_bridge.h

raw
1 /*
2 * Cisco router simulation platform.
3 * Copyright (c) 2007 Christophe Fillot ([email protected])
4 *
5 * ATM bridge (RFC1483)
6 */
7
8 #ifndef __ATM_BRIDGE_H__
9 #define __ATM_BRIDGE_H__
10
11 #include <pthread.h>
12
13 #include "utils.h"
14 #include "net_io.h"
15 #include "atm.h"
16 #include "atm_vsar.h"
17
18 typedef struct atm_bridge atm_bridge_t;
19 struct atm_bridge {
20 char *name;
21 pthread_mutex_t lock;
22 netio_desc_t *eth_nio,*atm_nio;
23 u_int vpi,vci;
24 struct atm_reas_context arc;
25 };
26
27 /* Acquire a reference to an ATM bridge (increment reference count) */
28 atm_bridge_t *atm_bridge_acquire(char *name);
29
30 /* Release an ATM switch (decrement reference count) */
31 int atm_bridge_release(char *name);
32
33 /* Create a virtual ATM bridge */
34 atm_bridge_t *atm_bridge_create(char *name);
35
36 /* Configure an ATM bridge */
37 int atm_bridge_configure(atm_bridge_t *t,char *eth_nio,
38 char *atm_nio,u_int vpi,u_int vci);
39
40 /* Unconfigure an ATM bridge */
41 int atm_bridge_unconfigure(atm_bridge_t *t);
42
43 /* Delete an ATM bridge */
44 int atm_bridge_delete(char *name);
45
46 /* Delete all ATM switches */
47 int atm_bridge_delete_all(void);
48
49 /* Start a virtual ATM bridge */
50 int atm_bridge_start(char *filename);
51
52 #endif