Mercurial > hg > anonet-resdb
view doc/ucis.ano/bgp_graph/bgp_path_list_quagga.php @ 340:1299c56b6d5c draft
Fixed the bind generator to qualify full domain names properly in the generated zonefile
author | lex <lex@lynx.ano> |
---|---|
date | Mon, 10 Jan 2011 17:25:44 -0600 |
parents | 4dbe5bf653bb |
children |
line wrap: on
line source
#!/usr/bin/php <?php $sock = fsockopen('localhost', 2605); fread($sock, 1024); fwrite($sock, "insecure\n"); fwrite($sock, "show ip bgp paths\n"); fwrite($sock, "quit\n"); while (!feof($sock)) { $line = stream_get_line($sock, 1024, "\r\n"); if ($line === NULL || $line === FALSE) break; if (!strlen($line) || $line[0] != '[') continue; $pos = strpos($line, ') '); if ($pos === FALSE) continue; if ($pos == strlen($line) - 2) continue; print(substr($line, $pos+2)."\n"); }