| 17 | |
| 18 | |
| 19 | class AddPathDataContainer { |
| 20 | private: |
| 21 | |
| 22 | struct sendReceiveCodesForSentAndReceivedOpenMessageStructure { |
| 23 | int sendReceiveCodeForSentOpenMessage; |
| 24 | int sendReceiveCodeForReceivedOpenMessage; |
| 25 | }; |
| 26 | |
| 27 | // Peer related data container. First key is afi safi unique key. Second is structure with Add Path information |
| 28 | typedef std::map<std::string, sendReceiveCodesForSentAndReceivedOpenMessageStructure> AddPathMap; |
| 29 | |
| 30 | // Peer related information about Add Path |
| 31 | AddPathMap addPathMap; |
| 32 | |
| 33 | /** |
| 34 | * Generates unique string from AFI and SAFI combination |
| 35 | * |
| 36 | * \param [in] afi Afi code from RFC |
| 37 | * \param [in] safi Safi code form RFC |
| 38 | * |
| 39 | * \return string unique for AFI and SAFI combination |
| 40 | */ |
| 41 | std::string getAFiSafiKeyString(int afi, int safi); |
| 42 | |
| 43 | public: |
| 44 | AddPathDataContainer(); |
| 45 | |
| 46 | ~AddPathDataContainer(); |
| 47 | |
| 48 | /** |
| 49 | * Add Add Path data to persistent storage |
| 50 | * |
| 51 | * \param [in] afi Afi code from RFC |
| 52 | * \param [in] safi Safi code form RFC |
| 53 | * \param [in] send_receive Send Recieve code from RFC |
| 54 | * \param [in] sent_open Is obtained from sent open message. False if from recieved |
| 55 | */ |
| 56 | void addAddPath(int afi, int safi, int send_receive, bool sent_open); |
| 57 | |
| 58 | /** |
| 59 | * Is add path capability enabled for such AFI and SAFI |
| 60 | * |
| 61 | * \param [in] afi Afi code from RFC |
| 62 | * \param [in] safi Safi code form RFC |
| 63 | * |
| 64 | * \return is enabled |
| 65 | */ |
| 66 | bool isAddPathEnabled(int afi, int safi); |
| 67 | |
| 68 | }; |
| 69 | |
| 70 | |
| 71 | #endif //OPENBMP_ADDPATHDATACONTAINER_H |
nothing calls this directly
no outgoing calls
no test coverage detected