atmbr2684.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #ifndef _LINUX_ATMBR2684_H
  2. #define _LINUX_ATMBR2684_H
  3. #include <linux/types.h>
  4. #include <linux/atm.h>
  5. #include <linux/if.h> /* For IFNAMSIZ */
  6. /*
  7. * Type of media we're bridging (ethernet, token ring, etc) Currently only
  8. * ethernet is supported
  9. */
  10. #define BR2684_MEDIA_ETHERNET (0) /* 802.3 */
  11. #define BR2684_MEDIA_802_4 (1) /* 802.4 */
  12. #define BR2684_MEDIA_TR (2) /* 802.5 - token ring */
  13. #define BR2684_MEDIA_FDDI (3)
  14. #define BR2684_MEDIA_802_6 (4) /* 802.6 */
  15. /* used only at device creation: */
  16. #define BR2684_FLAG_ROUTED (1<<16) /* payload is routed, not bridged */
  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. * Is there FCS outbound on this VC? This currently isn't supported.
  25. */
  26. #define BR2684_FCSOUT_NO (0)
  27. #define BR2684_FCSOUT_SENDZERO (1)
  28. #define BR2684_FCSOUT_GENERATE (2)
  29. /*
  30. * Does this VC include LLC encapsulation?
  31. */
  32. #define BR2684_ENCAPS_VC (0) /* VC-mux */
  33. #define BR2684_ENCAPS_LLC (1)
  34. #define BR2684_ENCAPS_AUTODETECT (2) /* Unsuported */
  35. /*
  36. * Is this VC bridged or routed?
  37. */
  38. #define BR2684_PAYLOAD_ROUTED (0)
  39. #define BR2684_PAYLOAD_BRIDGED (1)
  40. /*
  41. * This is for the ATM_NEWBACKENDIF call - these are like socket families:
  42. * the first element of the structure is the backend number and the rest
  43. * is per-backend specific
  44. */
  45. struct atm_newif_br2684 {
  46. atm_backend_t backend_num; /* ATM_BACKEND_BR2684 */
  47. int media; /* BR2684_MEDIA_*, flags in upper bits */
  48. char ifname[IFNAMSIZ];
  49. int mtu;
  50. };
  51. /*
  52. * This structure is used to specify a br2684 interface - either by a
  53. * positive integer (returned by ATM_NEWBACKENDIF) or the interfaces name
  54. */
  55. #define BR2684_FIND_BYNOTHING (0)
  56. #define BR2684_FIND_BYNUM (1)
  57. #define BR2684_FIND_BYIFNAME (2)
  58. struct br2684_if_spec {
  59. int method; /* BR2684_FIND_* */
  60. union {
  61. char ifname[IFNAMSIZ];
  62. int devnum;
  63. } spec;
  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. * The BR2684_SETFILT ioctl is an experimental mechanism for folks
  84. * terminating a large number of IP-only vcc's. When netfilter allows
  85. * efficient per-if in/out filters, this support will be removed
  86. */
  87. struct br2684_filter {
  88. __be32 prefix; /* network byte order */
  89. __be32 netmask; /* 0 = disable filter */
  90. };
  91. struct br2684_filter_set {
  92. struct br2684_if_spec ifspec;
  93. struct br2684_filter filter;
  94. };
  95. enum br2684_payload {
  96. p_routed = BR2684_PAYLOAD_ROUTED,
  97. p_bridged = BR2684_PAYLOAD_BRIDGED,
  98. };
  99. #define BR2684_SETFILT _IOW( 'a', ATMIOC_BACKEND + 0, \
  100. struct br2684_filter_set)
  101. #endif /* _LINUX_ATMBR2684_H */