pidgin: nat-pmp.h File Reference

pidgin 2.14.4

Loading...
Searching...
No Matches
Macros | Enumerations | Functions
nat-pmp.h File Reference
libpurple

NAT-PMP Implementation. More...

`#include <glib.h>`

Go to the source code of this file.

## Macros
#define | PURPLE_PMP_LIFETIME 3600 /* 3600 seconds */

## Enumerations
enum | PurplePmpType { PURPLE_PMP_TYPE_UDP , PURPLE_PMP_TYPE_TCP }

## Functions
void | purple_pmp_init (void)
| Initialize nat-pmp.
char * | purple_pmp_get_public_ip (void)
gboolean | purple_pmp_create_map (PurplePmpType type, unsigned short privateport, unsigned short publicport, int lifetime)
| Remove the NAT-PMP mapping for a specified type on a specified port.
gboolean | purple_pmp_destroy_map (PurplePmpType type, unsigned short privateport)
| Remove the NAT-PMP mapping for a specified type on a specified port.

## Detailed Description

NAT-PMP Implementation.

Definition in file nat-pmp.h.

## Macro Definition Documentation

## ◆ PURPLE_PMP_LIFETIME

#define PURPLE_PMP_LIFETIME 3600 /* 3600 seconds */

Definition at line 37 of file nat-pmp.h.

## Enumeration Type Documentation

## ◆ PurplePmpType

enum PurplePmpType

Definition at line 39 of file nat-pmp.h.

## Function Documentation

## ◆ purple_pmp_create_map()

gboolean purple_pmp_create_map | ( | PurplePmpType | type,
|  | unsigned short | privateport,
|  | unsigned short | publicport,
|  | int | lifetime
| ) |  |

Remove the NAT-PMP mapping for a specified type on a specified port.

Parameters

  type | The PurplePmpType
  privateport | The private port on which we are listening locally
  publicport | The public port on which we are expecting a response
  lifetime | The lifetime of the mapping. It is recommended that this be PURPLE_PMP_LIFETIME.

Returns
  TRUE if succesful; FALSE if unsuccessful

## ◆ purple_pmp_destroy_map()

gboolean purple_pmp_destroy_map | ( | PurplePmpType | type,
|  | unsigned short | privateport
| ) |  |

Remove the NAT-PMP mapping for a specified type on a specified port.

Parameters

  type | The PurplePmpType
  privateport | The private port on which the mapping was previously made

Returns
  TRUE if succesful; FALSE if unsuccessful