+/* Shared library add-on to iptables to add simple non load-balancing SNAT support. */
#include <stdio.h>
#include <netdb.h>
#include <string.h>
{
printf(
"SAME v%s options:\n"
-" --to-source <ipaddr>-<ipaddr>\n"
+" --to <ipaddr>-<ipaddr>\n"
" Addresses to map source to.\n",
NETFILTER_VERSION);
}
static struct option opts[] = {
- { "to-source", 1, 0, '1' },
+ { "to", 1, 0, '1' },
{ 0 }
};
case '1':
if (check_inverse(optarg, &invert))
exit_error(PARAMETER_PROBLEM,
- "Unexpected `!' after --to-source");
+ "Unexpected `!' after --to");
parse_to(optarg, &mr->range[0]);
*flags = 1;
}
}
-/* Final check; need --to-dest. */
+/* Final check; need --to. */
static void final_check(unsigned int flags)
{
if (!flags)
exit_error(PARAMETER_PROBLEM,
- "BALANCE needs --to-source");
+ "SAME needs --to");
}
/* Prints out the targinfo. */
struct in_addr a;
a.s_addr = r->min_ip;
- printf("--to-source %s", addr_to_dotted(&a));
+ printf("--to %s", addr_to_dotted(&a));
a.s_addr = r->max_ip;
printf("-%s ", addr_to_dotted(&a));
}