path: root/include/xtables.h
diff options
authorYasuyuki KOZAKAI <>2007-07-24 05:53:48 +0000
committerYasuyuki KOZAKAI <>2007-07-24 05:53:48 +0000
commit04f8c54dc52e19096d31d94593bd1040716afe4d (patch)
treedf628c95c8f2f5f25cf5f7bdebcca8f8ae8d4e93 /include/xtables.h
parent0d502bcdbc97ed359e84f6a21dfa0049b3b60a6c (diff)
Moves some duplicated functions in ip[6]tables.c to xtables.c
string_to_number_ll, string_to_number_l, string_to_number, service_to_port, parse_port, parse_interface, are moved.
Diffstat (limited to 'include/xtables.h')
1 files changed, 17 insertions, 0 deletions
diff --git a/include/xtables.h b/include/xtables.h
index 89b92c36..5ae30014 100644
--- a/include/xtables.h
+++ b/include/xtables.h
@@ -180,4 +180,21 @@ extern struct xtables_match *find_match(const char *name, enum xt_tryload,
struct xtables_rule_match **match);
extern struct xtables_target *find_target(const char *name, enum xt_tryload);
+extern int string_to_number_ll(const char *s,
+ unsigned long long min,
+ unsigned long long max,
+ unsigned long long *ret);
+extern int string_to_number_l(const char *s,
+ unsigned long min,
+ unsigned long max,
+ unsigned long *ret);
+extern int string_to_number(const char *s,
+ unsigned int min,
+ unsigned int max,
+ unsigned int *ret);
+extern int service_to_port(const char *name, const char *proto);
+extern u_int16_t parse_port(const char *port, const char *proto);
+extern void
+parse_interface(const char *arg, char *vianame, unsigned char *mask);
#endif /* _XTABLES_H */