@@ -122,6 +122,7 @@ static PHP_MINIT_FUNCTION(rdns)
122122 RDNS_TYPE_CONST (TXT );
123123 RDNS_TYPE_CONST (SRV );
124124 RDNS_TYPE_CONST (AAAA );
125+ RDNS_TYPE_CONST (SOA );
125126#undef RDNS_TYPE_CONST
126127
127128 return SUCCESS ;
@@ -135,7 +136,7 @@ static PHP_MINFO_FUNCTION(rdns)
135136 php_info_print_table_header (2 , "RDNS Support" , "enabled" );
136137 php_info_print_table_row (2 , "RDNS Version" , PHP_RDNS_VERSION );
137138 php_info_print_table_row (2 , "RDNS GitHub" , "https://github.com/weheartwebsites/php-rdns" );
138- php_info_print_table_row (2 , "RDNS librdns" , "$Id: 40d4eb2ad845643fe6a949f98042bb14c1ea24ba $" );
139+ php_info_print_table_row (2 , "RDNS librdns" , "$Id: 429e2100724fa709e64011951edee8d1e747d04e $" );
139140 php_info_print_table_end ();
140141}
141142/* }}} */
@@ -279,6 +280,18 @@ rdns_reply_callback(struct rdns_reply *reply, void *arg)
279280 add_assoc_long (result_item , "pri" , entry -> content .srv .priority );
280281 add_assoc_long (result_item , "weight" , entry -> content .srv .weight );
281282 add_assoc_long (result_item , "port" , entry -> content .srv .port );
283+ } else if (entry -> type == RDNS_REQUEST_SOA ) {
284+ add_assoc_string_ex (result_item , ZEND_STRS ("type" ), "SOA" , 1 );
285+ add_assoc_string_ex (result_item , ZEND_STRS ("mname" ),
286+ entry -> content .soa .mname , 1 );
287+ add_assoc_string_ex (result_item , ZEND_STRS ("rname" ),
288+ entry -> content .soa .admin , 1 );
289+ add_assoc_long (result_item , "serial" , entry -> content .soa .serial );
290+ add_assoc_long (result_item , "refresh" , entry -> content .soa .refresh );
291+ add_assoc_long (result_item , "retry" , entry -> content .soa .retry );
292+ add_assoc_long (result_item , "expire" , entry -> content .soa .expire );
293+ add_assoc_long (result_item , "minimum-ttl" ,
294+ entry -> content .soa .minimum );
282295 }
283296
284297 entry = entry -> next ;
0 commit comments