atmlec.h 2.3 KB

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