Mercurial > pidgin
comparison src/network.h @ 8838:518455386538
[gaim-migrate @ 9604]
-Fix the compile error in perl that was my fault
-Rename a network.c function and change it's signature (is that work
applicable in c?)
-Make rendezvous crash when trying to sign on
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 28 Apr 2004 03:16:40 +0000 |
parents | beb7be215db3 |
children | 9c5a2f0bb32c |
comparison
equal
deleted
inserted
replaced
8837:25206a0fb4e4 | 8838:518455386538 |
---|---|
33 /** @name Network API */ | 33 /** @name Network API */ |
34 /**************************************************************************/ | 34 /**************************************************************************/ |
35 /*@{*/ | 35 /*@{*/ |
36 | 36 |
37 /** | 37 /** |
38 * Converts a dot-decimal IP address to an array of unsigned | |
39 * chars. For example, converts 192.168.0.1 to a 4 byte | |
40 * array containing 192, 168, 0 and 1. | |
41 * | |
42 * @param ip An IP address in dot-decimal notiation. | |
43 * @return An array of 4 bytes containing an IP addresses | |
44 * equivalent to the given parameter, or NULL if | |
45 * the given IP address is invalid. This value | |
46 * is statically allocated and should not be | |
47 * freed. | |
48 */ | |
49 const unsigned char *gaim_network_ip_atoi(const char *ip); | |
50 | |
51 /** | |
38 * Sets the IP address of the local system in preferences. This | 52 * Sets the IP address of the local system in preferences. This |
39 * is the IP address that should be used for incoming connections | 53 * is the IP address that should be used for incoming connections |
40 * (file transfer, direct IM, etc.) and should therefore be | 54 * (file transfer, direct IM, etc.) and should therefore be |
41 * publicly accessible. | 55 * publicly accessible. |
42 * | 56 * |
46 | 60 |
47 /** | 61 /** |
48 * Returns the IP address of the local system set in preferences. | 62 * Returns the IP address of the local system set in preferences. |
49 * | 63 * |
50 * This returns the value set via gaim_network_set_public_ip(). | 64 * This returns the value set via gaim_network_set_public_ip(). |
51 * You probably want to use gaim_network_get_ip_for_account() instead. | 65 * You probably want to use gaim_network_get_my_ip() instead. |
52 * | 66 * |
53 * @return The local IP address set in preferences. | 67 * @return The local IP address set in preferences. |
54 */ | 68 */ |
55 const char *gaim_network_get_public_ip(void); | 69 const char *gaim_network_get_public_ip(void); |
56 | 70 |
57 /** | 71 /** |
58 * Returns the IP address of the local system. | 72 * Returns the IP address of the local system. |
59 * | 73 * |
60 * You probably want to use gaim_network_get_ip_for_account() instead. | 74 * You probably want to use gaim_network_get_my_ip() instead. |
61 * | 75 * |
62 * @note The returned string is a pointer to a static buffer. If this | 76 * @note The returned string is a pointer to a static buffer. If this |
63 * function is called twice, it may be important to make a copy | 77 * function is called twice, it may be important to make a copy |
64 * of the returned string. | 78 * of the returned string. |
65 * | 79 * |
85 * @param account The account to use. This may be @c NULL, and if so | 99 * @param account The account to use. This may be @c NULL, and if so |
86 * the first step listed above is skipped. | 100 * the first step listed above is skipped. |
87 * @param fd The fd to use to help figure out the IP, or -1. | 101 * @param fd The fd to use to help figure out the IP, or -1. |
88 * @return The local IP address to be used. | 102 * @return The local IP address to be used. |
89 */ | 103 */ |
90 const char *gaim_network_get_ip_for_account(const GaimAccount *account, int fd); | 104 const char *gaim_network_get_my_ip(int fd); |
91 | 105 |
92 /** | 106 /** |
93 * Attempts to open a listening port ONLY on the specified port number. | 107 * Attempts to open a listening port ONLY on the specified port number. |
94 * You probably want to use gaim_network_listen_range() instead of this. | 108 * You probably want to use gaim_network_listen_range() instead of this. |
95 * This function is useful, for example, if you wanted to write a telnet | 109 * This function is useful, for example, if you wanted to write a telnet |