bgp_dump.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* BGP dump routine.
  2. Copyright (C) 1999 Kunihiro Ishiguro
  3. This file is part of GNU Zebra.
  4. GNU Zebra is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU General Public License as published by the
  6. Free Software Foundation; either version 2, or (at your option) any
  7. later version.
  8. GNU Zebra is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNU Zebra; see the file COPYING. If not, write to the Free
  14. Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  15. 02111-1307, USA. */
  16. #ifndef _QUAGGA_BGP_DUMP_H
  17. #define _QUAGGA_BGP_DUMP_H
  18. /* MRT compatible packet dump values. */
  19. /* type value */
  20. #define MSG_PROTOCOL_BGP4MP 16
  21. #define MSG_PROTOCOL_BGP4MP_ET 17
  22. /* subtype value */
  23. #define BGP4MP_STATE_CHANGE 0
  24. #define BGP4MP_MESSAGE 1
  25. #define BGP4MP_ENTRY 2
  26. #define BGP4MP_SNAPSHOT 3
  27. #define BGP4MP_MESSAGE_AS4 4
  28. #define BGP4MP_STATE_CHANGE_AS4 5
  29. #define BGP_DUMP_HEADER_SIZE 12
  30. #define BGP_DUMP_MSG_HEADER 40
  31. #define TABLE_DUMP_V2_PEER_INDEX_TABLE 1
  32. #define TABLE_DUMP_V2_RIB_IPV4_UNICAST 2
  33. #define TABLE_DUMP_V2_RIB_IPV4_MULTICAST 3
  34. #define TABLE_DUMP_V2_RIB_IPV6_UNICAST 4
  35. #define TABLE_DUMP_V2_RIB_IPV6_MULTICAST 5
  36. #define TABLE_DUMP_V2_RIB_GENERIC 6
  37. #define TABLE_DUMP_V2_PEER_INDEX_TABLE_IP 0
  38. #define TABLE_DUMP_V2_PEER_INDEX_TABLE_IP6 1
  39. #define TABLE_DUMP_V2_PEER_INDEX_TABLE_AS2 0
  40. #define TABLE_DUMP_V2_PEER_INDEX_TABLE_AS4 2
  41. extern void bgp_dump_init (void);
  42. extern void bgp_dump_finish (void);
  43. extern void bgp_dump_state (struct peer *, int, int);
  44. extern void bgp_dump_packet (struct peer *, int, struct stream *);
  45. #endif /* _QUAGGA_BGP_DUMP_H */