From 4bc88f79a4f79984a765cafa0b188b07de72bf30 Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Mon, 5 Sep 2016 23:11:22 +0200 Subject: [PATCH] Doc --- kernel/include/net/arp_cache.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kernel/include/net/arp_cache.hpp b/kernel/include/net/arp_cache.hpp index 353bf56a..40a22995 100644 --- a/kernel/include/net/arp_cache.hpp +++ b/kernel/include/net/arp_cache.hpp @@ -22,7 +22,20 @@ void update_cache(uint64_t mac, network::ip::address ip); bool is_mac_cached(uint64_t mac); bool is_ip_cached(network::ip::address ip); +/*! + * \brief Returns the IP address of the given MAC address. + * The address must be in cache. + * \param ip The MAC address to look for in the cache + * \return The IP address of the MAC address + */ network::ip::address get_ip(uint64_t mac); + +/*! + * \brief Returns the MAC address of the given IP address. + * The address must be in cache. + * \param ip The IP address to look for in the cache + * \return The MAC address of the IP address + */ uint64_t get_mac(network::ip::address ip); uint64_t get_mac_force(network::interface_descriptor& interface, network::ip::address ip);