stp.py 371 B

1234567891011121314151617181920
  1. """Spanning Tree Protocol."""
  2. from pypacker import pypacker
  3. class STP(pypacker.Packet):
  4. __hdr__ = (
  5. ("proto_id", "H", 0),
  6. ("v", "B", 0),
  7. ("type", "B", 0),
  8. ("flags", "B", 0),
  9. ("root_id", "8s", b""),
  10. ("root_path", "I", 0),
  11. ("bridge_id", "8s", b""),
  12. ("port_id", "H", 0),
  13. ("age", "H", 0),
  14. ("max_age", "H", 0),
  15. ("hello", "H", 0),
  16. ("fd", "H", 0)
  17. )