* Constructor for class * * \note * This class will allocate via 'new' the bgp_peers variables * as needed. The calling method/class/function should check each var * in the structure for non-NULL pointers. Non-NULL pointers need to be * freed with 'delete' * * \param [in] logPtr Pointer to existing Logger for app logging * \param [in,out] peer_entry Point
| 33 | * \param [in,out] peer_entry Pointer to the peer entry |
| 34 | */ |
| 35 | parseBMP::parseBMP(Logger *logPtr, MsgBusInterface::obj_bgp_peer *peer_entry) { |
| 36 | debug = false; |
| 37 | bmp_type = -1; // Initially set to error |
| 38 | bmp_len = 0; |
| 39 | logger = logPtr; |
| 40 | |
| 41 | bmp_data_len = 0; |
| 42 | bzero(bmp_data, sizeof(bmp_data)); |
| 43 | |
| 44 | bmp_packet_len = 0; |
| 45 | bzero(bmp_packet, sizeof(bmp_packet)); |
| 46 | |
| 47 | // Set the passed storage for the router entry items. |
| 48 | p_entry = peer_entry; |
| 49 | bzero(p_entry, sizeof(MsgBusInterface::obj_bgp_peer)); |
| 50 | } |
| 51 | |
| 52 | parseBMP::~parseBMP() { |
| 53 | // clean up |
nothing calls this directly
no outgoing calls
no test coverage detected