Back to index

nagios-plugins  1.4.16
Defines | Functions | Variables
gai_strerror.c File Reference
#include <config.h>
#include <stdio.h>
#include <netdb.h>
#include "gettext.h"

Go to the source code of this file.


#define _(String)   gettext (String)
#define N_(String)   String


const char * gai_strerror (int code)


struct {
int code
const char * msg
values []

Define Documentation

#define _ (   String)    gettext (String)

Definition at line 31 of file gai_strerror.c.

#define N_ (   String)    String

Definition at line 32 of file gai_strerror.c.

Function Documentation

const char* gai_strerror ( int  code)

Definition at line 65 of file gai_strerror.c.

  size_t i;
  for (i = 0; i < sizeof (values) / sizeof (values[0]); ++i)
    if (values[i].code == code)
      return _(values[i].msg);

  return _("Unknown error");

Here is the caller graph for this function:

Variable Documentation

struct { ... } values[] [static]