-
-static struct ip_vs_get_services *ipvs_get_services (void);
-static struct ip_vs_get_dests *ipvs_get_dests (struct ip_vs_service_entry *);
-
-static const char *ipvs_strerror (int err)
-{
- unsigned int i;
-
- struct {
- void *func;
- int err;
- const char *message;
- } table [] = {
- { 0, EPERM, "Permission denied (you must be root)" },
- { 0, EINVAL, "Module is wrong version" },
- { 0, ENOPROTOOPT, "Protocol not available" },
- { 0, ENOMEM, "Memory allocation problem" },
- { ipvs_get_services, ESRCH, "No such service" },
- { ipvs_get_dests, ESRCH, "No such service" },
- };
-
- for (i = 0; i < sizeof (table) / sizeof (table[0]); i++) {
- if (((NULL == table[i].func) || (table[i].func == ipvs_func))
- && (table[i].err == err))
- return table[i].message;
- }
- return strerror (err);
-} /* ipvs_strerror */
-