From aae6be9edc99e58164a3592c510fe5488141c698 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 30 Jan 2009 04:24:47 +0100 Subject: libxtables: prefix - misc functions Signed-off-by: Jan Engelhardt --- xtables.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xtables.c') diff --git a/xtables.c b/xtables.c index 859a82a5..a387ae0a 100644 --- a/xtables.c +++ b/xtables.c @@ -236,7 +236,7 @@ bool xtables_strtoui(const char *s, char **end, unsigned int *value, return ret; } -int service_to_port(const char *name, const char *proto) +int xtables_service_to_port(const char *name, const char *proto) { struct servent *service; @@ -246,19 +246,20 @@ int service_to_port(const char *name, const char *proto) return -1; } -u_int16_t parse_port(const char *port, const char *proto) +u_int16_t xtables_parse_port(const char *port, const char *proto) { unsigned int portnum; if (xtables_strtoui(port, NULL, &portnum, 0, UINT16_MAX) || - (portnum = service_to_port(port, proto)) != (unsigned)-1) + (portnum = xtables_service_to_port(port, proto)) != (unsigned)-1) return portnum; exit_error(PARAMETER_PROBLEM, "invalid port/service `%s' specified", port); } -void parse_interface(const char *arg, char *vianame, unsigned char *mask) +void xtables_parse_interface(const char *arg, char *vianame, + unsigned char *mask) { int vialen = strlen(arg); unsigned int i; -- cgit v1.2.3