File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 41
41
42
42
inherit combinators ;
43
43
44
- inherit ( dnslib . util ) mkReverseRecord ;
44
+ inherit ( dnslib . util ) mkIPv4ReverseRecord mkIPv6ReverseRecord ;
45
45
}
Original file line number Diff line number Diff line change 35
35
36
36
# : str -> [ str ]
37
37
# Returns the record of the ipv6 as a list
38
- mkRecordAux = v6 :
38
+ mkIPv6RecordAux = v6 :
39
39
let
40
40
v6' = if lib . hasPrefix "::" v6 then
41
41
"0${ v6 } "
50
50
51
51
# : str -> str
52
52
# Returns the reversed record of the ipv6
53
- mkReverseRecord = v6 :
54
- lib . concatStringsSep "." ( lib . reverseList ( mkRecordAux v6 ) ) + ".ip6.arpa" ;
53
+ mkIPv6ReverseRecord = v6 :
54
+ lib . concatStringsSep "." ( lib . reverseList ( mkIPv6RecordAux v6 ) ) + ".ip6.arpa" ;
55
55
56
+ # : str -> str
57
+ # Returns the reversed record of the ipv4
58
+ mkIPv4ReverseRecord = v4 :
59
+ lib . concatStringsSep "." (
60
+ lib . reverseList (
61
+ lib . filter lib . isString (
62
+ lib . splitString "." v4
63
+ )
64
+ )
65
+ ) + ".in-addr.arpa" ;
56
66
in {
57
- inherit writeCharacterString mkReverseRecord ;
67
+ inherit writeCharacterString mkIPv4ReverseRecord mkIPv6ReverseRecord ;
58
68
}
You can’t perform that action at this time.
0 commit comments