MINOR: lua: add ip addresses and network manipulation function
Add two functions core.parse_addr() and core.match_addr() where are used
for matching networks.
diff --git a/include/types/hlua.h b/include/types/hlua.h
index 698786d..d2aaa4a 100644
--- a/include/types/hlua.h
+++ b/include/types/hlua.h
@@ -150,6 +150,20 @@
int len;
};
+struct hlua_addr {
+ union {
+ struct {
+ struct in_addr ip;
+ struct in_addr mask;
+ } v4;
+ struct {
+ struct in6_addr ip;
+ struct in6_addr mask;
+ } v6;
+ } addr;
+ int type;
+};
+
#else /* USE_LUA */
/* Empty struct for compilation compatibility */