summaryrefslogtreecommitdiffstats
path: root/xtables.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-01-30 04:24:47 +0100
committerJan Engelhardt <jengelh@medozas.de>2009-01-30 05:38:29 +0100
commitaae6be9edc99e58164a3592c510fe5488141c698 (patch)
tree2a48b1166e435497b7021b48d8f52fbb9781376d /xtables.c
parent1e01b0b82f70b0b11dcfbced485dbe7aeac4fb8c (diff)
libxtables: prefix - misc functions
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'xtables.c')
-rw-r--r--xtables.c9
1 files changed, 5 insertions, 4 deletions
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;