summaryrefslogtreecommitdiff
path: root/lib/hstrerror.c
blob: 87f7f64111b6a962c54b229bdb7b59e261664022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "config.h"

#ifdef WIN32
#include <winsock.h>
#else
#include <netdb.h>
#endif
#include <errno.h>

#include "xineintl.h"

/**
 * get error descriptions in DNS lookups
 */
const char *_xine_private_hstrerror(int err) {
  switch (err) {
    case 0: return _("No error");
    case HOST_NOT_FOUND: return _("Unknown host");
    case NO_DATA: return _("No address associated with name");
    case NO_RECOVERY: return _("Unknown server error");
    case TRY_AGAIN: return _("Host name lookup failure");
    default: return _("Unknown error");
  }
}