Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


atmbr2684.h
001: #ifndef _LINUX_ATMBR2684_H
002: #define _LINUX_ATMBR2684_H
003: 
004: #include <linux/types.h>
005: #include <linux/atm.h>
006: #include <linux/if.h>           /* For IFNAMSIZ */
007: 
008: /*
009:  * Type of media we're bridging (ethernet, token ring, etc)  Currently only
010:  * ethernet is supported
011:  */
012: #define BR2684_MEDIA_ETHERNET   (0)     /* 802.3 */
013: #define BR2684_MEDIA_802_4      (1)     /* 802.4 */
014: #define BR2684_MEDIA_TR         (2)     /* 802.5 - token ring */
015: #define BR2684_MEDIA_FDDI       (3)
016: #define BR2684_MEDIA_802_6      (4)     /* 802.6 */
017: 
018:                                         /* used only at device creation:  */
019: #define BR2684_FLAG_ROUTED      (1<<16) /* payload is routed, not bridged */
020: 
021: /*
022:  * Is there FCS inbound on this VC?  This currently isn't supported.
023:  */
024: #define BR2684_FCSIN_NO         (0)
025: #define BR2684_FCSIN_IGNORE     (1)
026: #define BR2684_FCSIN_VERIFY     (2)
027: 
028: /*
029:  * Is there FCS outbound on this VC?  This currently isn't supported.
030:  */
031: #define BR2684_FCSOUT_NO        (0)
032: #define BR2684_FCSOUT_SENDZERO  (1)
033: #define BR2684_FCSOUT_GENERATE  (2)
034: 
035: /*
036:  * Does this VC include LLC encapsulation?
037:  */
038: #define BR2684_ENCAPS_VC        (0)     /* VC-mux */
039: #define BR2684_ENCAPS_LLC       (1)
040: #define BR2684_ENCAPS_AUTODETECT (2)    /* Unsuported */
041: 
042: /*
043:  * Is this VC bridged or routed?
044:  */
045: 
046: #define BR2684_PAYLOAD_ROUTED   (0)
047: #define BR2684_PAYLOAD_BRIDGED  (1)
048: 
049: /*
050:  * This is for the ATM_NEWBACKENDIF call - these are like socket families:
051:  * the first element of the structure is the backend number and the rest
052:  * is per-backend specific
053:  */
054: struct atm_newif_br2684 {
055:         atm_backend_t backend_num;      /* ATM_BACKEND_BR2684 */
056:         int media;              /* BR2684_MEDIA_*, flags in upper bits */
057:         char ifname[IFNAMSIZ];
058:         int mtu;
059: };
060: 
061: /*
062:  * This structure is used to specify a br2684 interface - either by a
063:  * positive integer (returned by ATM_NEWBACKENDIF) or the interfaces name
064:  */
065: #define BR2684_FIND_BYNOTHING   (0)
066: #define BR2684_FIND_BYNUM       (1)
067: #define BR2684_FIND_BYIFNAME    (2)
068: struct br2684_if_spec {
069:         int method;             /* BR2684_FIND_* */
070:         union {
071:                 char ifname[IFNAMSIZ];
072:                 int devnum;
073:         } spec;
074: };
075: 
076: /*
077:  * This is for the ATM_SETBACKEND call - these are like socket families:
078:  * the first element of the structure is the backend number and the rest
079:  * is per-backend specific
080:  */
081: struct atm_backend_br2684 {
082:         atm_backend_t backend_num;      /* ATM_BACKEND_BR2684 */
083:         struct br2684_if_spec ifspec;
084:         int fcs_in;             /* BR2684_FCSIN_* */
085:         int fcs_out;            /* BR2684_FCSOUT_* */
086:         int fcs_auto;           /* 1: fcs_{in,out} disabled if no FCS rx'ed */
087:         int encaps;             /* BR2684_ENCAPS_* */
088:         int has_vpiid;          /* 1: use vpn_id - Unsupported */
089:         __u8 vpn_id[7];
090:         int send_padding;       /* unsupported */
091:         int min_size;           /* we will pad smaller packets than this */
092: };
093: 
094: /*
095:  * The BR2684_SETFILT ioctl is an experimental mechanism for folks
096:  * terminating a large number of IP-only vcc's.  When netfilter allows
097:  * efficient per-if in/out filters, this support will be removed
098:  */
099: struct br2684_filter {
100:         __be32 prefix;          /* network byte order */
101:         __be32 netmask;         /* 0 = disable filter */
102: };
103: 
104: struct br2684_filter_set {
105:         struct br2684_if_spec ifspec;
106:         struct br2684_filter filter;
107: };
108: 
109: enum br2684_payload {
110:         p_routed = BR2684_PAYLOAD_ROUTED,
111:         p_bridged = BR2684_PAYLOAD_BRIDGED,
112: };
113: 
114: #define BR2684_SETFILT  _IOW( 'a', ATMIOC_BACKEND + 0, \
115:                                 struct br2684_filter_set)
116: 
117: #endif /* _LINUX_ATMBR2684_H */
118: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/