Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
netdb.h File Reference
#include <sys/types.h>
#include <stdint.h>
#include <netinet/in.h>

Go to the source code of this file.

Classes

struct  addrinfo
 Structure to contain information about address of a service provider. More...
 

Macros

#define EAI_AGAIN   -3
 Temporary failure in name resolution.
 
#define EAI_FAIL   -4
 , Non-recoverable failure in name res
 
#define EAI_MEMORY   -10
 Memory allocation failure.
 

Functions

const char * gai_strerror (int __ecode)
 see 'man gai_strerror'
 
void freeaddrinfo (struct addrinfo *ai)
 see 'man freeaddrinfo'
 
int getaddrinfo (const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
 see 'man getaddrinfo'
 

Detailed Description

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This file implements POSIX netdb.h prototypes.

Author
Stuart W. Baker
Date
2 July 2016

Definition in file netdb.h.

Macro Definition Documentation

◆ EAI_AGAIN

#define EAI_AGAIN   -3

Temporary failure in name resolution.

Definition at line 67 of file netdb.h.

◆ EAI_FAIL

#define EAI_FAIL   -4

, Non-recoverable failure in name res

Definition at line 68 of file netdb.h.

◆ EAI_MEMORY

#define EAI_MEMORY   -10

Memory allocation failure.

Definition at line 69 of file netdb.h.

Function Documentation

◆ freeaddrinfo()

void freeaddrinfo ( struct addrinfo ai)

see 'man freeaddrinfo'

Parameters
aiis the addrinfo structure, allocated by getaddrinfo, to be released.

Definition at line 1112 of file net_cc3220/CC32xxSocket.cxx.

◆ gai_strerror()

const char * gai_strerror ( int  __ecode)

see 'man gai_strerror'

Parameters
__ecodeis the error code
Returns
error string (statically allocated)

Definition at line 1093 of file net_cc3220/CC32xxSocket.cxx.

◆ getaddrinfo()

int getaddrinfo ( const char *  nodename,
const char *  servname,
const struct addrinfo hints,
struct addrinfo **  res 
)

see 'man getaddrinfo'

Parameters
nodenamewhat to look up (host name typically)
servnamelocal mDNS service name to look up
hintsnot sure
resan addrinfo strcture will be allocated into here
Returns
0 on success, -1 on error

Definition at line 1131 of file net_cc3220/CC32xxSocket.cxx.