lldp.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*====================================================================*
  2. *
  3. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. *====================================================================*/
  8. /*====================================================================*
  9. *
  10. * Devices.c - device address synonym tables
  11. *
  12. * plc.h
  13. *
  14. * some device addresses are so common or significant that we give
  15. * them names; users can enter the name instead of the address; all
  16. * toolkit programs reference this table via function synonym();
  17. *
  18. * function synonym() uses a binary search to lookup symbols and so
  19. * they must be entered in alphabetical order or lookup errors will
  20. * occur;
  21. *
  22. * Contributor(s):
  23. * Charles Maier <cmaier@qca.qualcomm.com>
  24. *
  25. *--------------------------------------------------------------------*/
  26. #ifndef LLDP_SOURCE
  27. #define LLDP_SOURCE
  28. /*====================================================================*
  29. * custom include files;
  30. *--------------------------------------------------------------------*/
  31. #include "../tools/types.h"
  32. #include "../lldp/lldp.h"
  33. /*====================================================================*
  34. * variables;
  35. *--------------------------------------------------------------------*/
  36. struct _term_ const addresses [LLDP_ADDRESSES] =
  37. {
  38. {
  39. "broadcast",
  40. BROADCAST
  41. },
  42. {
  43. "LLDP1",
  44. LLDP_NEAREST_BRIDGE
  45. },
  46. {
  47. "LLDP2",
  48. LLDP_NEAREST_NON_TMPR_BRIDGE
  49. },
  50. {
  51. "LLDP3",
  52. LLDP_NEAREST_CUSTOMER_BRIDGE
  53. }
  54. };
  55. byte const broadcast [ETHER_ADDR_LEN] =
  56. {
  57. 0xFF,
  58. 0xFF,
  59. 0xFF,
  60. 0xFF,
  61. 0xFF,
  62. 0xFF
  63. };
  64. byte const nearest_bridge [] =
  65. {
  66. 0x01,
  67. 0x80,
  68. 0xC2,
  69. 0x00,
  70. 0x00,
  71. 0x0E
  72. };
  73. byte const nearest_non_tpmr_bridge [] =
  74. {
  75. 0x01,
  76. 0x80,
  77. 0xC2,
  78. 0x00,
  79. 0x00,
  80. 0x03
  81. };
  82. byte const nearest_customer_bridge [] =
  83. {
  84. 0x01,
  85. 0x80,
  86. 0xC2,
  87. 0x00,
  88. 0x00,
  89. 0x00
  90. };
  91. /*====================================================================*
  92. *
  93. *--------------------------------------------------------------------*/
  94. #endif