#include "iothread.h"
#include "hostlookup.h"
#include "text.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <SDL.h>
Include dependency graph for hostlookup.c:
Go to the source code of this file.
Functions | |
static void | DoAddrLookup (void *name) |
Performs a lookup for the address of a given hostname on the I/O Thread. | |
void | DoHostnameLookup (void *ignore) |
An operation for the I/O Thread that attempts to discover the local system's hostname and address. | |
static void | DoNameLookup (void *address) |
Performs a lookup for the hostname of a given address on the I/O Thread. | |
int | LookupResult (char *name, INetAddr *addr) |
Provides the results of a host lookup started by a call to either StartAddrLookup() or StartNameLookup(), or a notice that the operation is in progress. | |
void | StartAddrLookup (char *name) |
Starts the process of finding the address of a host based on its name. | |
void | StartNameLookup (SocketAddr *addr, char *name) |
Starts the process of finding the full hostname of a machine based on its address. | |
Bool | StartStrNameLookup (char *addrstr, char *name) |
Starts the process of finding the full hostname of a machine based on its address. | |
Variables | |
static struct addrinfo * | addrLookup = NULL |
Stores the results from looking up an address. | |
static int | conditionCode = 0 |
The current condition code used to tell what the lookup code is doing or the result returned by the sockets function used for the lookup. | |
static INetAddr | hostaddr |
The numeric IP address who's name is sought. | |
char | localhostAddrStr [INET6_ADDRSTRLEN] = { 0 } |
Stores the address of the local system as a string. | |
char | localhostName [64] = { 0 } |
Stores the name of the local system. | |
static char * | lookupName = NULL |
A pointer to where to place the hostname when looking up from an address. |
Copyright (C) 2007 Jeff Jackowski
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Or visit their website at: http://www.gnu.org/
Definition in file hostlookup.c.