X-Git-Url: http://gitweb.michael.orlitzky.com/?p=valtz.git;a=blobdiff_plain;f=valtz;h=92aaa405512abef015746f53f6e047a6d6ed3488;hp=eebda76f4b17beb77fce88c1d3b4f5ecb282428f;hb=9d29c28941ca629e223d0d4f20a833f10375d331;hpb=7c5df8ad5c18a9f8b9440dbd1ae4faacf55b452a diff --git a/valtz b/valtz old mode 100644 new mode 100755 index eebda76..92aaa40 --- a/valtz +++ b/valtz @@ -100,6 +100,9 @@ my %token_name = ( 'min' => 'Minimum time', 'n' => 'Record type number', 'rdata' => 'Resource data', + 'port' => 'Port', + 'priority' => 'Priority', + 'weight' => 'Weight' ); my %record_type = ( @@ -114,6 +117,7 @@ my %record_type = ( "'" => 'TXT', '^' => 'PTR', 'C' => 'CNAME', + 'S' => 'SRV', 'Z' => 'SOA', ':' => 'GENERIC' ); @@ -131,6 +135,8 @@ my %line_type = ( "'" => [ 'TXT', 'fqdn:s:ttl:timestamp:lo', 'fqdn:s' ], '^' => [ 'PTR', 'fqdn:p:ttl:timestamp:lo', 'fqdn:p' ], 'C' => [ 'CNAME', 'fqdn:p:ttl:timestamp:lo', 'fqdn:p' ], + 'S' => [ 'SRV', 'fqdn:ip:x:port:weight:priority:ttl:timestamp:lo', + 'fqdn:x:port' ], 'Z' => [ 'SOA', 'fqdn:mname:rname:ser:ref:ret:exp:min:ttl:timestamp:lo', 'fqdn:mname:rname' ], ':' => [ 'GENERIC', 'fqdn:n:rdata:ttl:timestamp:lo', 'fqdn:n:rdata' ] @@ -340,6 +346,21 @@ my %token_validator = ( # TODO : Validation needed? my $result = 0; return $result; + }], + 'port' => [ 21, sub { + my ($type, $s) = @_; + my $result = validate_integer($s, 65536); + return $result; + }], + 'priority' => [ 22, sub { + my ($type, $s) = @_; + my $result = validate_integer($s, 65536); + return $result; + }], + 'weight' => [ 23, sub { + my ($type, $s) = @_; + my $result = validate_integer($s, 65536); + return $result; }],