Hi all,
i am trying to read the route table in the application. I want to seperate the result into multiple files.
On running this i get a test.txt file which has following dataCode:static void Main(string[] args) { System.Diagnostics.Process.Start("cmd.exe", @"/c route print > d:\test.txt"); }
My first text file needs to have active routes details and the second one needs to have persistent routes details. the text will be varying from pc to pc. What can be a good method to split the dataCode:=========================================================================== Interface List 11...00 21 97 60 87 b2 ......Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller 1...........................Software Loopback Interface 1 12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter 13...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface =========================================================================== IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.10.254 192.168.10.71 276 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306 192.168.10.0 255.255.255.0 On-link 192.168.10.71 276 192.168.10.71 255.255.255.255 On-link 192.168.10.71 276 192.168.10.255 255.255.255.255 On-link 192.168.10.71 276 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306 224.0.0.0 240.0.0.0 On-link 192.168.10.71 276 255.255.255.255 255.255.255.255 On-link 127.0.0.1 306 255.255.255.255 255.255.255.255 On-link 192.168.10.71 276 =========================================================================== Persistent Routes: Network Address Netmask Gateway Address Metric 0.0.0.0 0.0.0.0 192.168.10.254 Default =========================================================================== IPv6 Route Table =========================================================================== Active Routes: If Metric Network Destination Gateway 13 58 ::/0 On-link 1 306 ::1/128 On-link 13 58 2001::/32 On-link 13 306 2001:0:4137:9e50:4a:3687:3f57:f5b8/128 On-link 11 276 fe80::/64 On-link 13 306 fe80::/64 On-link 13 306 fe80::4a:3687:3f57:f5b8/128 On-link 11 276 fe80::570:3b43:1288:342/128 On-link 1 306 ff00::/8 On-link 13 306 ff00::/8 On-link 11 276 ff00::/8 On-link =========================================================================== Persistent Routes: None





Reply With Quote