/*
 * IdealIRC - Internet Relay Chat client
 * Copyright (c) 2022  Tom-Andre Barstad.
 * This software is licensed under the Software Attribution License.
 * See LICENSE for more information.
*/

#ifndef NATPORTMAPPING_H
#define NATPORTMAPPING_H

#include <cstdint>
#include <string>

namespace NATPortMapping {

/**
 * Add a port forwarding onto local network router using libnatpmp.
 * The reservation is set to expire after one week to accommodate for clients on slow connections doing for example a file transfer taking a few days (it is theoretically possible.)
 * Returns true on success.
*/
bool add(uint16_t intPort, uint16_t extPort);

/**
 * Remove a port forward using libnatpmp.
 * Returns true on success.
*/
bool remove(uint16_t intPort, uint16_t extPort);

}

#endif //NATPORTMAPPING_H