Blame view

include/linux/atmbr2684.h 3.13 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
  #ifndef _LINUX_ATMBR2684_H
  #define _LINUX_ATMBR2684_H
f757f603f   Jaswinder Singh Rajput   headers_check fix...
3
  #include <linux/types.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
4
5
6
7
8
9
10
11
12
13
14
15
  #include <linux/atm.h>
  #include <linux/if.h>		/* For IFNAMSIZ */
  
  /*
   * Type of media we're bridging (ethernet, token ring, etc)  Currently only
   * ethernet is supported
   */
  #define BR2684_MEDIA_ETHERNET	(0)	/* 802.3 */
  #define BR2684_MEDIA_802_4	(1)	/* 802.4 */
  #define BR2684_MEDIA_TR		(2)	/* 802.5 - token ring */
  #define BR2684_MEDIA_FDDI	(3)
  #define BR2684_MEDIA_802_6	(4)	/* 802.6 */
097b19a99   Eric Kinzie   [ATM]: [br2864] r...
16
  					/* used only at device creation:  */
fb64c735a   Chas Williams   [ATM]: [br2864] w...
17
  #define BR2684_FLAG_ROUTED	(1<<16)	/* payload is routed, not bridged */
097b19a99   Eric Kinzie   [ATM]: [br2864] r...
18

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  /*
   * Is there FCS inbound on this VC?  This currently isn't supported.
   */
  #define BR2684_FCSIN_NO		(0)
  #define BR2684_FCSIN_IGNORE	(1)
  #define BR2684_FCSIN_VERIFY	(2)
  
  /*
   * Is there FCS outbound on this VC?  This currently isn't supported.
   */
  #define BR2684_FCSOUT_NO	(0)
  #define BR2684_FCSOUT_SENDZERO	(1)
  #define BR2684_FCSOUT_GENERATE	(2)
  
  /*
   * Does this VC include LLC encapsulation?
   */
  #define BR2684_ENCAPS_VC	(0)	/* VC-mux */
  #define BR2684_ENCAPS_LLC	(1)
  #define BR2684_ENCAPS_AUTODETECT (2)	/* Unsuported */
  
  /*
097b19a99   Eric Kinzie   [ATM]: [br2864] r...
41
42
43
44
45
   * Is this VC bridged or routed?
   */
  
  #define BR2684_PAYLOAD_ROUTED   (0)
  #define BR2684_PAYLOAD_BRIDGED  (1)
097b19a99   Eric Kinzie   [ATM]: [br2864] r...
46
  /*
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
47
48
49
50
51
   * This is for the ATM_NEWBACKENDIF call - these are like socket families:
   * the first element of the structure is the backend number and the rest
   * is per-backend specific
   */
  struct atm_newif_br2684 {
fb64c735a   Chas Williams   [ATM]: [br2864] w...
52
53
54
55
  	atm_backend_t backend_num;	/* ATM_BACKEND_BR2684 */
  	int media;		/* BR2684_MEDIA_*, flags in upper bits */
  	char ifname[IFNAMSIZ];
  	int mtu;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
56
57
58
59
60
61
62
63
64
65
  };
  
  /*
   * This structure is used to specify a br2684 interface - either by a
   * positive integer (returned by ATM_NEWBACKENDIF) or the interfaces name
   */
  #define BR2684_FIND_BYNOTHING	(0)
  #define BR2684_FIND_BYNUM	(1)
  #define BR2684_FIND_BYIFNAME	(2)
  struct br2684_if_spec {
fb64c735a   Chas Williams   [ATM]: [br2864] w...
66
  	int method;		/* BR2684_FIND_* */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
67
  	union {
fb64c735a   Chas Williams   [ATM]: [br2864] w...
68
69
  		char ifname[IFNAMSIZ];
  		int devnum;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
70
71
72
73
74
75
76
77
78
  	} spec;
  };
  
  /*
   * This is for the ATM_SETBACKEND call - these are like socket families:
   * the first element of the structure is the backend number and the rest
   * is per-backend specific
   */
  struct atm_backend_br2684 {
fb64c735a   Chas Williams   [ATM]: [br2864] w...
79
  	atm_backend_t backend_num;	/* ATM_BACKEND_BR2684 */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
80
  	struct br2684_if_spec ifspec;
fb64c735a   Chas Williams   [ATM]: [br2864] w...
81
82
83
84
85
86
87
88
  	int fcs_in;		/* BR2684_FCSIN_* */
  	int fcs_out;		/* BR2684_FCSOUT_* */
  	int fcs_auto;		/* 1: fcs_{in,out} disabled if no FCS rx'ed */
  	int encaps;		/* BR2684_ENCAPS_* */
  	int has_vpiid;		/* 1: use vpn_id - Unsupported */
  	__u8 vpn_id[7];
  	int send_padding;	/* unsupported */
  	int min_size;		/* we will pad smaller packets than this */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
89
90
91
92
93
94
95
96
  };
  
  /*
   * The BR2684_SETFILT ioctl is an experimental mechanism for folks
   * terminating a large number of IP-only vcc's.  When netfilter allows
   * efficient per-if in/out filters, this support will be removed
   */
  struct br2684_filter {
fb64c735a   Chas Williams   [ATM]: [br2864] w...
97
98
  	__be32 prefix;		/* network byte order */
  	__be32 netmask;		/* 0 = disable filter */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
99
100
101
102
103
104
  };
  
  struct br2684_filter_set {
  	struct br2684_if_spec ifspec;
  	struct br2684_filter filter;
  };
097b19a99   Eric Kinzie   [ATM]: [br2864] r...
105
  enum br2684_payload {
fb64c735a   Chas Williams   [ATM]: [br2864] w...
106
107
  	p_routed = BR2684_PAYLOAD_ROUTED,
  	p_bridged = BR2684_PAYLOAD_BRIDGED,
097b19a99   Eric Kinzie   [ATM]: [br2864] r...
108
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
109
110
111
112
  #define BR2684_SETFILT	_IOW( 'a', ATMIOC_BACKEND + 0, \
  				struct br2684_filter_set)
  
  #endif /* _LINUX_ATMBR2684_H */