| 52 | #ifdef USE_NATPMP |
| 53 | static uint16_t g_mapport_external_port = 0; |
| 54 | static bool NatpmpInit(natpmp_t* natpmp) |
| 55 | { |
| 56 | const int r_init = initnatpmp(natpmp, /* detect gateway automatically */ 0, /* forced gateway - NOT APPLIED*/ 0); |
| 57 | if (r_init == 0) return true; |
| 58 | LogPrintf("natpmp: initnatpmp() failed with %d error.\n", r_init); |
| 59 | return false; |
| 60 | } |
| 61 | |
| 62 | static bool NatpmpDiscover(natpmp_t* natpmp, struct in_addr& external_ipv4_addr) |
| 63 | { |