* \class UpdateMsg * * \brief BGP update message parser * \details This class parses a BGP update message. It can be extended to create messages. * message. */
| 76 | * message. |
| 77 | */ |
| 78 | class UpdateMsg { |
| 79 | |
| 80 | public: |
| 81 | |
| 82 | |
| 83 | /** |
| 84 | * Update header - defined in RFC4271 |
| 85 | */ |
| 86 | struct update_bgp_hdr { |
| 87 | /** |
| 88 | * indicates the total len of withdrawn routes field in octets. |
| 89 | */ |
| 90 | uint16_t withdrawn_len; |
| 91 | |
| 92 | /** |
| 93 | * Withdrawn routes data pointer |
| 94 | */ |
| 95 | u_char *withdrawnPtr; |
| 96 | |
| 97 | /** |
| 98 | * Total length of the path attributes field in octets |
| 99 | * |
| 100 | * A value of 0 indicates NLRI nor path attrs are present |
| 101 | */ |
| 102 | uint16_t attr_len; |
| 103 | |
| 104 | /** |
| 105 | * Attribute data pointer |
| 106 | */ |
| 107 | u_char *attrPtr; |
| 108 | |
| 109 | /** |
| 110 | * NLRI data pointer |
| 111 | */ |
| 112 | u_char *nlriPtr; |
| 113 | }; |
| 114 | |
| 115 | /** |
| 116 | * parsed path attributes map |
| 117 | */ |
| 118 | std::map<bgp_msg::UPDATE_ATTR_TYPES, std::string> parsed_attrs; |
| 119 | typedef std::pair<bgp_msg::UPDATE_ATTR_TYPES, std::string> parsed_attrs_pair; |
| 120 | typedef std::map<bgp_msg::UPDATE_ATTR_TYPES, std::string> parsed_attrs_map; |
| 121 | |
| 122 | // Parsed bgp-ls attributes map |
| 123 | typedef std::map<uint16_t, std::array<uint8_t, 255>> parsed_ls_attrs_map; |
| 124 | |
| 125 | /** |
| 126 | * Parsed data structure for BGP-LS |
| 127 | */ |
| 128 | struct parsed_data_ls { |
| 129 | std::list<MsgBusInterface::obj_ls_node> nodes; ///< List of Link state nodes |
| 130 | std::list<MsgBusInterface::obj_ls_link> links; ///< List of link state links |
| 131 | std::list<MsgBusInterface::obj_ls_prefix> prefixes; ///< List of link state prefixes |
| 132 | }; |
| 133 | |
| 134 | /** |
| 135 | * Parsed update data - decoded data from complete update parse |
nothing calls this directly
no outgoing calls
no test coverage detected