atmlec.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * ATM Lan Emulation Daemon driver interface
  3. *
  4. * Marko Kiiskila <mkiiskila@yahoo.com>
  5. */
  6. #ifndef _ATMLEC_H_
  7. #define _ATMLEC_H_
  8. #include <linux/atmapi.h>
  9. #include <linux/atmioc.h>
  10. #include <linux/atm.h>
  11. #include <linux/if_ether.h>
  12. #include <linux/types.h>
  13. /* ATM lec daemon control socket */
  14. #define ATMLEC_CTRL _IO('a', ATMIOC_LANE)
  15. #define ATMLEC_DATA _IO('a', ATMIOC_LANE+1)
  16. #define ATMLEC_MCAST _IO('a', ATMIOC_LANE+2)
  17. /* Maximum number of LEC interfaces (tweakable) */
  18. #define MAX_LEC_ITF 48
  19. typedef enum {
  20. l_set_mac_addr,
  21. l_del_mac_addr,
  22. l_svc_setup,
  23. l_addr_delete,
  24. l_topology_change,
  25. l_flush_complete,
  26. l_arp_update,
  27. l_narp_req, /* LANE2 mandates the use of this */
  28. l_config,
  29. l_flush_tran_id,
  30. l_set_lecid,
  31. l_arp_xmt,
  32. l_rdesc_arp_xmt,
  33. l_associate_req,
  34. l_should_bridge /* should we bridge this MAC? */
  35. } atmlec_msg_type;
  36. #define ATMLEC_MSG_TYPE_MAX l_should_bridge
  37. struct atmlec_config_msg {
  38. unsigned int maximum_unknown_frame_count;
  39. unsigned int max_unknown_frame_time;
  40. unsigned short max_retry_count;
  41. unsigned int aging_time;
  42. unsigned int forward_delay_time;
  43. unsigned int arp_response_time;
  44. unsigned int flush_timeout;
  45. unsigned int path_switching_delay;
  46. unsigned int lane_version; /* LANE2: 1 for LANEv1, 2 for LANEv2 */
  47. int mtu;
  48. int is_proxy;
  49. };
  50. struct atmlec_msg {
  51. atmlec_msg_type type;
  52. int sizeoftlvs; /* LANE2: if != 0, tlvs follow */
  53. union {
  54. struct {
  55. unsigned char mac_addr[ETH_ALEN];
  56. unsigned char atm_addr[ATM_ESA_LEN];
  57. unsigned int flag; /*
  58. * Topology_change flag,
  59. * remoteflag, permanent flag,
  60. * lecid, transaction id
  61. */
  62. unsigned int targetless_le_arp; /* LANE2 */
  63. unsigned int no_source_le_narp; /* LANE2 */
  64. } normal;
  65. struct atmlec_config_msg config;
  66. struct {
  67. __u16 lec_id; /* requestor lec_id */
  68. __u32 tran_id; /* transaction id */
  69. unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */
  70. unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */
  71. } proxy; /*
  72. * For mapping LE_ARP requests to responses. Filled by
  73. * zeppelin, returned by kernel. Used only when proxying
  74. */
  75. } content;
  76. } __ATM_API_ALIGN;
  77. struct atmlec_ioc {
  78. int dev_num;
  79. unsigned char atm_addr[ATM_ESA_LEN];
  80. unsigned char receive; /* 1= receive vcc, 0 = send vcc */
  81. };
  82. #endif /* _ATMLEC_H_ */