[Xorp-users] How to export all routes into a file
Nitin Choudhary
Nitin.Choudhary at nechclst.in
Fri Jul 9 00:21:55 PDT 2010
There is a function named "system()" in library stdlib.h(gcc). You pass
the xorp command as parameter to system() function and it will execute
that command..
Command will be xorpsh -c "show route table ipv4 unicast final".
Do google for details..
Nitin Choudhary
-----Original Message-----
From: xorp-users-bounces at xorp.org [mailto:xorp-users-bounces at xorp.org]
On Behalf Of wubaochuan
Sent: Friday, July 09, 2010 12:18 PM
To: xorp-users at xorp.org
Subject: [Xorp-users] How to export all routes into a file
Dear everyone,
I can see all the routes using the following command in xorpsh:
show route table ipv4 unicast final
I want to write a C or C++ program which can get all the routes
of a router, but I have no idea how to do that.Maybe I can export the
output of the command above into a file, and then I write a program to
process the file. My question is how can I export output of the command
above into a file ?
Thank you!
Chuan
_______________________________________________
Xorp-users mailing list
Xorp-users at xorp.org
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NECHCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NECHCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
More information about the Xorp-users
mailing list