2 This file is part of avahi.
4 avahi is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2.1 of the
7 License, or (at your option) any later version.
9 avahi is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
12 Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with avahi; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27 const char *avahi_strerror(int error) {
29 const char * const msg[- AVAHI_ERR_MAX] = {
31 N_("Operation failed"),
33 N_("Invalid host name"),
34 N_("Invalid domain name"),
35 N_("No suitable network protocol available"),
36 N_("Invalid DNS TTL"),
37 N_("Resource record key is pattern"),
38 N_("Local name collision"),
41 N_("Invalid service name"),
42 N_("Invalid service type"),
43 N_("Invalid port number"),
44 N_("Invalid record key"),
45 N_("Invalid address"),
46 N_("Timeout reached"),
47 N_("Too many clients"),
48 N_("Too many objects"),
49 N_("Too many entries"),
53 N_("Invalid operation"),
54 N_("An unexpected D-Bus error occurred"),
55 N_("Daemon connection failed"),
56 N_("Memory exhausted"),
57 N_("The object passed in was not valid"),
58 N_("Daemon not running"),
59 N_("Invalid interface index"),
60 N_("Invalid protocol specification"),
64 N_("Invalid configuration"),
65 N_("Version mismatch"),
66 N_("Invalid service subtype"),
68 N_("Invalid DNS return code"),
69 N_("DNS failure: FORMERR"),
70 N_("DNS failure: SERVFAIL"),
71 N_("DNS failure: NXDOMAIN"),
72 N_("DNS failure: NOTIMP"),
74 N_("DNS failure: REFUSED"),
75 N_("DNS failure: YXDOMAIN"),
76 N_("DNS failure: YXRRSET"),
77 N_("DNS failure: NXRRSET"),
78 N_("DNS failure: NOTAUTH"),
79 N_("DNS failure: NOTZONE"),
81 N_("Invalid DNS type"),
82 N_("Invalid DNS class"),
86 N_("Invalid argument"),
88 N_("The requested operation is invalid because redundant")
93 if (-error < 0 || -error >= -AVAHI_ERR_MAX)
94 return _("Invalid Error Code");
96 return _(msg[-error]);