netdb

netdb - /* Copyright (C) 1996-2002, 2003, 2004, 2009 Free...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: /* Copyright (C) 1996-2002, 2003, 2004, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ /* All data returned by the network data base library are supplied in host order and returned in network order (suitable for use in system calls). */ #ifndef _NETDB_H #define _NETDB_H 1 #include <features.h> #include <netinet/in.h> #include <stdint.h> #ifdef __USE_MISC /* This is necessary to make this include file properly replace the Sun version. */ # include <rpc/netdb.h> #endif #ifdef __USE_GNU # define __need_sigevent_t # include <bits/siginfo.h> # define __need_timespec # include <time.h> #endif #include <bits/netdb.h> /* Absolute file name for network data base files. */ #define _PATH_HEQUIV "/etc/hosts.equiv" #define _PATH_HOSTS "/etc/hosts" #define _PATH_NETWORKS "/etc/networks" #define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf" #define _PATH_PROTOCOLS "/etc/protocols" #define _PATH_SERVICES "/etc/services" __BEGIN_DECLS /* Error status for non-reentrant lookup functions. We use a macro to access always the thread-specific `h_errno' variable. */ #define h_errno (*__h_errno_location ()) /* Function to get address of global `h_errno' variable. */ extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); /* Possible values left in `h_errno'. */ #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found. */ #define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL. */ #define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP. */ #define NO_DATA 4 /* Valid name, no data record of requested type. */ #if defined __USE_MISC || defined __USE_GNU # define NETDB_INTERNAL -1 /* See errno. */ # define NETDB_SUCCESS /* No problem. */ # define NO_ADDRESS NO_DATA /* No address, look for MX record. */ #endif #ifdef __USE_XOPEN2K /* Highest reserved Internet port number. */ # define IPPORT_RESERVED 1024 #endif #ifdef __USE_GNU /* Scope delimiter for getaddrinfo(), getnameinfo(). */ # define SCOPE_DELIMITER '%' #endif #if defined __USE_MISC || defined __USE_GNU /* Print error indicated by `h_errno' variable on standard error. STR if non-null is printed before the error string. */ extern void herror (__const char *__str) __THROW; /* Return string associated with error ERR_NUM. */ extern __const char *hstrerror (int __err_num) __THROW;...
View Full Document

This note was uploaded on 02/09/2010 for the course CS 152 taught by Professor Staff during the Spring '98 term at UCLA.

Page1 / 12

netdb - /* Copyright (C) 1996-2002, 2003, 2004, 2009 Free...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online