1 #pragma once
2 #include <net/ethernet.h>
3 
4 #include <string>
5 
6 /** @brief Clears out the interfaces and IPs configured for mocking
7  */
8 void mock_clear();
9 
10 /** @brief Adds the given interface and addr info
11  *         into the ifaddr list.
12  *  @param[in] name - Interface name.
13  *  @param[in] addr - IP address.
14  *  @param[in] mask - subnet mask.
15  *  @param[in] flags - Interface flags.
16  */
17 
18 void mock_addIP(const char* name, const char* addr, const char* mask,
19                 unsigned int flags);
20 
21 /** @brief Adds an address string to index mapping and MAC mapping
22  *
23  *  @param[in] name - Interface name
24  *  @param[in] idx  - Interface index
25  *  @param[in] mac  - Interface MAC address
26  */
27 void mock_addIF(const std::string& name, int idx,
28                 const ether_addr& mac = ether_addr{});
29