Annotate

teal-src/util/ip.d.tl @ 12977:74b9e05af71e

plugins: Prefix module imports with prosody namespace
author Kim Alvefur <zash@zash.se>
date Fri, 24 Mar 2023 13:15:28 +0100
parent 12935:ddb9e330d627
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12935
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 local record iplib
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2 enum protocol
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 "IPv6"
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 "IPv4"
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 end
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 record ip_t
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 addr : string
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 packed : string
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 proto : protocol
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10 zone : string
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11 end
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13 new_ip : function (string, protocol) : ip_t
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14 commonPrefixLength : function (ip_t, ip_t) : integer
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 parse_cidr : function (string) : ip_t, integer
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
16 match : function (ip_t, ip_t, integer) : boolean
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
17 is_ip : function (any) : boolean
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18 truncate : function (ip_t, integer) : ip_t
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
19 end
ddb9e330d627 util.ip: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
20 return iplib