# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1678819606 -3600
# Node ID ddb9e330d627e0931c84460208103061bd6c9ed5
# Parent  c6dffebab2f89e1f439864ce412072610cad5eeb
util.ip: Add Teal interface description

diff -r c6dffebab2f8 -r ddb9e330d627 teal-src/util/ip.d.tl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/teal-src/util/ip.d.tl	Tue Mar 14 19:46:46 2023 +0100
@@ -0,0 +1,20 @@
+local record iplib
+	enum protocol
+		"IPv6"
+		"IPv4"
+	end
+	record ip_t
+		addr : string
+		packed : string
+		proto : protocol
+		zone : string
+	end
+
+	new_ip : function (string, protocol) : ip_t
+	commonPrefixLength : function (ip_t, ip_t) : integer
+	parse_cidr : function (string) : ip_t, integer
+	match : function (ip_t, ip_t, integer) : boolean
+	is_ip : function (any) : boolean
+	truncate : function (ip_t, integer) : ip_t
+end
+return iplib