GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
#if defined(WITH_DNS_UPDATES)
+/*
+ * Silly prototype to get rid of a warning
+ */
+
+DNS_ERROR DoDNSUpdate(char *pszServerName,
+ const char *pszDomainName, const char *pszHostName,
+ const struct in_addr *iplist, size_t num_addrs );
+
/*********************************************************************
*********************************************************************/
{
struct iface_struct nics[MAX_INTERFACES];
int i, n;
- struct in_addr loopback_ip = *interpret_addr2("127.0.0.1");
struct in_addr *list;
int count = 0;
}
for ( i=0; i<n; i++ ) {
- if ( nics[i].ip.s_addr != loopback_ip.s_addr ) {
- memcpy( &list[count++], &nics[i].ip, sizeof( struct in_addr ) );
+ if ((nics[i].ip.ss_family == AF_INET)) {
+ struct in_addr ifip;
+
+ ifip = ((const struct sockaddr_in *)&nics[i].ip)->sin_addr;
+
+ if (!is_loopback_ip_v4(ifip)) {
+ memcpy(&list[count++], &ifip, sizeof(struct in_addr));
+ }
}
}
*ips = list;
return count;
}
+/*
+ * Silly prototype to get rid of a warning
+ */
+
+DNS_ERROR do_gethostbyname(const char *server, const char *host);
+
DNS_ERROR do_gethostbyname(const char *server, const char *host)
{
struct dns_connection *conn;