blob: 4d934b3c0bc29395d58f4aaf249cfcaf40d84195 [file] [log] [blame]
Ratan Gupta8ab17922017-05-25 13:07:05 +05301#pragma once
William A. Kennington IIIcb64b992019-04-21 18:45:07 -07002#include <net/ethernet.h>
3
William A. Kennington IIIebb1ad02019-04-21 18:02:49 -07004#include <string>
Ratan Gupta8ab17922017-05-25 13:07:05 +05305
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
14void mock_addIP(const char* name, const char* addr, const char* mask,
15 unsigned int flags);
William A. Kennington IIIebb1ad02019-04-21 18:02:49 -070016
William A. Kennington IIIcb64b992019-04-21 18:45:07 -070017/** @brief Adds an address string to index mapping and MAC mapping
William A. Kennington IIIebb1ad02019-04-21 18:02:49 -070018 *
19 * @param[in] name - Interface name
20 * @param[in] idx - Interface index
William A. Kennington IIIcb64b992019-04-21 18:45:07 -070021 * @param[in] mac - Interface MAC address
William A. Kennington IIIebb1ad02019-04-21 18:02:49 -070022 */
William A. Kennington IIIcb64b992019-04-21 18:45:07 -070023void mock_addIF(const std::string& name, int idx,
24 const ether_addr& mac = ether_addr{});