Mercurial > pidgin
comparison libpurple/nat-pmp.h @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 02 Jun 2012 02:30:49 +0000 |
parents | a6cc3de38233 |
children |
comparison
equal
deleted
inserted
replaced
32818:01ff09d4a463 | 32819:2c6510167895 |
---|---|
39 typedef enum { | 39 typedef enum { |
40 PURPLE_PMP_TYPE_UDP, | 40 PURPLE_PMP_TYPE_UDP, |
41 PURPLE_PMP_TYPE_TCP | 41 PURPLE_PMP_TYPE_TCP |
42 } PurplePmpType; | 42 } PurplePmpType; |
43 | 43 |
44 G_BEGIN_DECLS | |
45 | |
44 /** | 46 /** |
45 * Initialize nat-pmp | 47 * Initialize nat-pmp |
46 */ | 48 */ |
47 void purple_pmp_init(void); | 49 void purple_pmp_init(void); |
48 | 50 |
52 char *purple_pmp_get_public_ip(void); | 54 char *purple_pmp_get_public_ip(void); |
53 | 55 |
54 /** | 56 /** |
55 * Remove the NAT-PMP mapping for a specified type on a specified port | 57 * Remove the NAT-PMP mapping for a specified type on a specified port |
56 * | 58 * |
57 * @param type The PurplePmpType | 59 * @param type The PurplePmpType |
58 * @param privateport The private port on which we are listening locally | 60 * @param privateport The private port on which we are listening locally |
59 * @param publicport The public port on which we are expecting a response | 61 * @param publicport The public port on which we are expecting a response |
60 * @param lifetime The lifetime of the mapping. It is recommended that this be PURPLE_PMP_LIFETIME. | 62 * @param lifetime The lifetime of the mapping. It is recommended that this |
63 * be PURPLE_PMP_LIFETIME. | |
61 * | 64 * |
62 * @returns TRUE if succesful; FALSE if unsuccessful | 65 * @returns TRUE if successful; FALSE if unsuccessful |
63 */ | 66 */ |
64 gboolean purple_pmp_create_map(PurplePmpType type, unsigned short privateport, unsigned short publicport, int lifetime); | 67 gboolean purple_pmp_create_map(PurplePmpType type, unsigned short privateport, |
68 unsigned short publicport, int lifetime); | |
65 | 69 |
66 /** | 70 /** |
67 * Remove the NAT-PMP mapping for a specified type on a specified port | 71 * Remove the NAT-PMP mapping for a specified type on a specified port |
68 * | 72 * |
69 * @param type The PurplePmpType | 73 * @param type The PurplePmpType |
70 * @param privateport The private port on which the mapping was previously made | 74 * @param privateport The private port on which the mapping was previously made |
71 * | 75 * |
72 * @returns TRUE if succesful; FALSE if unsuccessful | 76 * @returns TRUE if successful; FALSE if unsuccessful |
73 */ | 77 */ |
74 gboolean purple_pmp_destroy_map(PurplePmpType type, unsigned short privateport); | 78 gboolean purple_pmp_destroy_map(PurplePmpType type, unsigned short privateport); |
75 | 79 |
80 G_END_DECLS | |
81 | |
76 #endif | 82 #endif |
77 | 83 |