Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

stp.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef _IPXE_STP_H
  2. #define _IPXE_STP_H
  3. /** @file
  4. *
  5. * Spanning Tree Protocol (STP)
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  9. #include <stdint.h>
  10. #include <ipxe/if_ether.h>
  11. /** "Protocol" value for STP
  12. *
  13. * This is the concatenated {DSAP,SSAP} value used internally by iPXE
  14. * as the network-layer protocol for LLC frames.
  15. */
  16. #define ETH_P_STP 0x4242
  17. /** A switch identifier */
  18. struct stp_switch {
  19. /** Priotity */
  20. uint16_t priority;
  21. /** MAC address */
  22. uint8_t mac[ETH_ALEN];
  23. } __attribute__ (( packed ));
  24. /** A Spanning Tree bridge protocol data unit */
  25. struct stp_bpdu {
  26. /** LLC DSAP */
  27. uint8_t dsap;
  28. /** LLC SSAP */
  29. uint8_t ssap;
  30. /** LLC control field */
  31. uint8_t control;
  32. /** Protocol ID */
  33. uint16_t protocol;
  34. /** Protocol version */
  35. uint8_t version;
  36. /** Message type */
  37. uint8_t type;
  38. /** Flags */
  39. uint8_t flags;
  40. /** Root switch */
  41. struct stp_switch root;
  42. /** Root path cost */
  43. uint32_t cost;
  44. /** Sender switch */
  45. struct stp_switch sender;
  46. /** Port */
  47. uint16_t port;
  48. /** Message age */
  49. uint16_t age;
  50. /** Maximum age */
  51. uint16_t max;
  52. /** Hello time */
  53. uint16_t hello;
  54. /** Forward delay */
  55. uint16_t delay;
  56. } __attribute__ (( packed ));
  57. /** Spanning Tree protocol ID */
  58. #define STP_PROTOCOL 0x0000
  59. /** Rapid Spanning Tree protocol version */
  60. #define STP_VERSION_RSTP 0x02
  61. /** Rapid Spanning Tree bridge PDU type */
  62. #define STP_TYPE_RSTP 0x02
  63. /** Port is forwarding */
  64. #define STP_FL_FORWARDING 0x20
  65. #endif /* _IPXE_STP_H */