Ratan Gupta | 8ab1792 | 2017-05-25 13:07:05 +0530 | [diff] [blame] | 1 | #pragma once |
William A. Kennington III | cb64b99 | 2019-04-21 18:45:07 -0700 | [diff] [blame^] | 2 | #include <net/ethernet.h> |
| 3 | |
William A. Kennington III | ebb1ad0 | 2019-04-21 18:02:49 -0700 | [diff] [blame] | 4 | #include <string> |
Ratan Gupta | 8ab1792 | 2017-05-25 13:07:05 +0530 | [diff] [blame] | 5 | |
| 6 | /** @brief Adds the given interface and addr info |
| 7 | * into the ifaddr list. |
| 8 | * @param[in] name - Interface name. |
| 9 | * @param[in] addr - IP address. |
| 10 | * @param[in] mask - subnet mask. |
| 11 | * @param[in] flags - Interface flags. |
| 12 | */ |
| 13 | |
| 14 | void mock_addIP(const char* name, const char* addr, const char* mask, |
| 15 | unsigned int flags); |
William A. Kennington III | ebb1ad0 | 2019-04-21 18:02:49 -0700 | [diff] [blame] | 16 | |
William A. Kennington III | cb64b99 | 2019-04-21 18:45:07 -0700 | [diff] [blame^] | 17 | /** @brief Adds an address string to index mapping and MAC mapping |
William A. Kennington III | ebb1ad0 | 2019-04-21 18:02:49 -0700 | [diff] [blame] | 18 | * |
| 19 | * @param[in] name - Interface name |
| 20 | * @param[in] idx - Interface index |
William A. Kennington III | cb64b99 | 2019-04-21 18:45:07 -0700 | [diff] [blame^] | 21 | * @param[in] mac - Interface MAC address |
William A. Kennington III | ebb1ad0 | 2019-04-21 18:02:49 -0700 | [diff] [blame] | 22 | */ |
William A. Kennington III | cb64b99 | 2019-04-21 18:45:07 -0700 | [diff] [blame^] | 23 | void mock_addIF(const std::string& name, int idx, |
| 24 | const ether_addr& mac = ether_addr{}); |