Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | #ifndef _LINUX_ATMBR2684_H |
2 | #define _LINUX_ATMBR2684_H | |
3 | ||
4 | #include <linux/atm.h> | |
5 | #include <linux/if.h> /* For IFNAMSIZ */ | |
6 | ||
7 | /* | |
8 | * Type of media we're bridging (ethernet, token ring, etc) Currently only | |
9 | * ethernet is supported | |
10 | */ | |
11 | #define BR2684_MEDIA_ETHERNET (0) /* 802.3 */ | |
12 | #define BR2684_MEDIA_802_4 (1) /* 802.4 */ | |
13 | #define BR2684_MEDIA_TR (2) /* 802.5 - token ring */ | |
14 | #define BR2684_MEDIA_FDDI (3) | |
15 | #define BR2684_MEDIA_802_6 (4) /* 802.6 */ | |
16 | ||
17 | /* | |
18 | * Is there FCS inbound on this VC? This currently isn't supported. | |
19 | */ | |
20 | #define BR2684_FCSIN_NO (0) | |
21 | #define BR2684_FCSIN_IGNORE (1) | |
22 | #define BR2684_FCSIN_VERIFY (2) | |
23 | ||
24 | /* | |
25 | * Is there FCS outbound on this VC? This currently isn't supported. | |
26 | */ | |
27 | #define BR2684_FCSOUT_NO (0) | |
28 | #define BR2684_FCSOUT_SENDZERO (1) | |
29 | #define BR2684_FCSOUT_GENERATE (2) | |
30 | ||
31 | /* | |
32 | * Does this VC include LLC encapsulation? | |
33 | */ | |
34 | #define BR2684_ENCAPS_VC (0) /* VC-mux */ | |
35 | #define BR2684_ENCAPS_LLC (1) | |
36 | #define BR2684_ENCAPS_AUTODETECT (2) /* Unsuported */ | |
37 | ||
38 | /* | |
39 | * This is for the ATM_NEWBACKENDIF call - these are like socket families: | |
40 | * the first element of the structure is the backend number and the rest | |
41 | * is per-backend specific | |
42 | */ | |
43 | struct atm_newif_br2684 { | |
44 | atm_backend_t backend_num; /* ATM_BACKEND_BR2684 */ | |
45 | int media; /* BR2684_MEDIA_* */ | |
46 | char ifname[IFNAMSIZ]; | |
47 | int mtu; | |
48 | }; | |
49 | ||
50 | /* | |
51 | * This structure is used to specify a br2684 interface - either by a | |
52 | * positive integer (returned by ATM_NEWBACKENDIF) or the interfaces name | |
53 | */ | |
54 | #define BR2684_FIND_BYNOTHING (0) | |
55 | #define BR2684_FIND_BYNUM (1) | |
56 | #define BR2684_FIND_BYIFNAME (2) | |
57 | struct br2684_if_spec { | |
58 | int method; /* BR2684_FIND_* */ | |
59 | union { | |
60 | char ifname[IFNAMSIZ]; | |
61 | int devnum; | |
62 | } spec; | |
63 | }; | |
64 | ||
65 | /* | |
66 | * This is for the ATM_SETBACKEND call - these are like socket families: | |
67 | * the first element of the structure is the backend number and the rest | |
68 | * is per-backend specific | |
69 | */ | |
70 | struct atm_backend_br2684 { | |
71 | atm_backend_t backend_num; /* ATM_BACKEND_BR2684 */ | |
72 | struct br2684_if_spec ifspec; | |
73 | int fcs_in; /* BR2684_FCSIN_* */ | |
74 | int fcs_out; /* BR2684_FCSOUT_* */ | |
75 | int fcs_auto; /* 1: fcs_{in,out} disabled if no FCS rx'ed */ | |
76 | int encaps; /* BR2684_ENCAPS_* */ | |
77 | int has_vpiid; /* 1: use vpn_id - Unsupported */ | |
78 | __u8 vpn_id[7]; | |
79 | int send_padding; /* unsupported */ | |
80 | int min_size; /* we will pad smaller packets than this */ | |
81 | }; | |
82 | ||
83 | /* | |
84 | * The BR2684_SETFILT ioctl is an experimental mechanism for folks | |
85 | * terminating a large number of IP-only vcc's. When netfilter allows | |
86 | * efficient per-if in/out filters, this support will be removed | |
87 | */ | |
88 | struct br2684_filter { | |
89 | __u32 prefix; /* network byte order */ | |
90 | __u32 netmask; /* 0 = disable filter */ | |
91 | }; | |
92 | ||
93 | struct br2684_filter_set { | |
94 | struct br2684_if_spec ifspec; | |
95 | struct br2684_filter filter; | |
96 | }; | |
97 | ||
98 | #define BR2684_SETFILT _IOW( 'a', ATMIOC_BACKEND + 0, \ | |
99 | struct br2684_filter_set) | |
100 | ||
101 | #endif /* _LINUX_ATMBR2684_H */ |