[Xorp-users] Help
전해숙
hsjeon88 at etri.re.kr
Wed Aug 13 01:44:49 PDT 2014
Q1:
I solved below my problems.
But now stll have one problem.
As I said before to you, I want to get information from CLICK router.
So, I add CLI for reading routerversion of CLICK for example.
But when I run the ./xorp_rtrmgr and ./xorpsh, CLI said that some information is always registed and then I can get that information.
Sometimes, I don't want to set any information and just get information CLICK gives to me and prints that in CLI.
I think tool directory of BGP. OSPF, RIP is behaved like that.
So, I add some information for exampel.
But I cannot see that CLI command.
How can I see that command just to get information from CLICK.
Q2:
xorp_clickinf.cc file is like this.
Is this content right ???
===================================================================================
#include "clickinf_module.h"
#include "libxorp/xlog.h"
#include "libxorp/eventloop.hh"
//#inlcude "libxorp/ipv4.hh"
#include "libxorp/xorp.h"
#include "libxorp/debug.h"
//#include "libxipc/finder_constants.hh"
#include "libxipc/xrl_std_router.hh"
#include "clickinf_exception.hh"
#include "clickinf_target.hh"
#include "clickinf.hh"
int main(int argc, char* argv[])
{
XorpUnexpectedHandler x(xorp_unexpected_handler);
UNUSED(argc);
xlog_init(argv[0], 0);
xlog_set_verbose(XLOG_VERBOSE_LOW);
xlog_add_default_output();
xlog_start();
try {
EventLoop e;
//string finder_host = FinderConstants::FINDER_DEFAULT_HOST().str();
//uint16_t finder_port = FinderConstants::FINDER_DEFAULT_PORT();
//XrlStdRouter rtr(e,"clickinf", "finder", finder_port);
//XrlStdRouter rtr(e,"clickinf", "127.0.0.1", finder_port);
XrlStdRouter rtr(e,"clickinf");
Clickinf cif(e);
ClickinfTarget ClickinfTgt(rtr, cif);
wait_until_xrl_router_is_ready(e, rtr);
setup_dflt_sighandlers();
//cif.start();
while(1)
e.run();
} catch(const ClickinfException& e) {
XLOG_FATAL("ClickinfException: %s", e.str().c_str());
}
xlog_stop();
xlog_exit();
exit(0);
}
Littletree.
________________________________
보낸 사람 : "전해숙" <hsjeon88 at etri.re.kr>
보낸 날짜 : 2014-08-08 18:38:13 ( +09:00 )
받는 사람 : Ben Greear <greearb at candelatech.com>
참조 : xorp-users at xorp.org <xorp-users at xorp.org>
제목 : RE: [Xorp-users] Help
Hi, Ben
I added Clickinf directory as a protocol to XORP.
In startup, Clickinf connects a netlink with CLICK in user mode with port 7777 and ip 127.0.0.1, local IP.
When command is received from CLI, clickinf want to make a funcion call of csclient,hh.
I already make a sample test using controlsocketTest.cpp , csclient.cc and csclient.hh.
When you see the controlsocketTest.cpp, you can know it easily.
I want to make that kind of function call using XORP.
Attached file description :
1. Scons-error-mesg : When I scons in XORP, there is a error message.
2. clickinf-2-0808.tar
. clickinf directory file +
. /xrl/interfaces/clickinf.xif
./Xrl/targets/clickinf.tgt
./etc/templates/clickinf.cmds, clickinf.tp
3. controlsocketTest.cpp ; when you call elements lists of click, you can use this sample.
+ csclient.cc (clickinf-2-0808.tar)
+ csclient.hh (clickinf-2-0808.tar)
Thank you for answering my question.
Littletree, Haesook.
________________________________
보낸 사람 : "Ben Greear" <greearb at candelatech.com>
보낸 날짜 : 2014-08-08 01:08:13 ( +09:00 )
받는 사람 : 전해숙 <hsjeon88 at etri.re.kr>
참조 : xorp-users at xorp.org <xorp-users at xorp.org>
제목 : Re: [Xorp-users] Help
On 08/07/2014 05:26 AM, 전해숙 wrote:
>
> I have one more thing to ask.
> In click router, there is a string.
> How can I use it on the XORP ?
>
> We are changing click router for new protocol.
> So, We want to check the status of the click such as elements list, count of each element.
> So, I want to use CotrolSocketClient class on the XORP.
> By the way, the string format of XORP is different from that of click router.
Xorp is written in C++, so using the STL and std::string should be fine
as far as I remember....
It has been a while since I looked at xorp code, so please post examples
of the code you are talking about, both click and xorp code...
Thanks,
Ben
>
>
> Littletree.
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------
> *보낸 사람 : *"전해숙"
> *보낸 날짜 : *2014-08-07 18:46:09 ( +09:00 )
> *받는 사람 : *xorp-users at xorp.org
> *참조 : *
> *제목 : *RE: Help
>
>
> I overcome the below problems.
>
> But I have a question.
> My software programs is user mode click.
> and I want to control this.
> It uses std::string.
> In xorp, we use different string.
> How can I change string of xorp into std::string of my user mode click ?
>
> Could you give me some advices ?
>
> Littletree.
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------
> *보낸 사람 : *"전해숙"
> *보낸 날짜 : *2014-08-06 15:58:28 ( +09:00 )
> *받는 사람 : *xorp-users at xorp.org
> *참조 : *
> *제목 : *Help
>
>
>
>
> First I made /xorp/clickinf/Sconscript.
>
> I changed /xorp/xrl/interfaces/SConscript , /xorp/arl/targets/SConscript, /xorp/etc/templates/SConscript for my clickinf directory.
> But running scons, there is a KeyError : 'enable_clickinf'.
>
> How can I avoid this error ???
>
> Littletree.
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------
> *보낸 사람 : *"전해숙"
> *보낸 날짜 : *2014-08-06 11:40:58 ( +09:00 )
> *받는 사람 : *xorp-users at xorp.org
> *참조 : *
> *제목 : *Help
>
>
>
>
>
>
>
> I am a begginer at XORP.
>
> XORP uses scons.
>
> Now, I want to add my new creating directory, clickinf.
>
> So I change SConscript file which adds new sub directory.
>
> But after scons, when checking obj directory, my directiry is not created.
>
> So, I also deleted the existing directory cli or bgp in obj directory.
>
> And I tried scons again, but cli or bgp directory is also not created.
>
> Now I all deleted directory in obj.
>
> after scons, any directory is not created.
>
> What problems do I have ???
>
>
>
> I attached SConscript file which are using now.
>
> I just changed SConscript file for mine.
>
> I add my new directory clickinf including sources to the XORP sources.
>
>
>
> Before scons, I do 'rm -fr /xorp/obj'. but it only fails. Anything of object file is not created.
>
>
>
>
>
>
>
> //////////////////////////////////
>
> // SConscript file
>
> /////////////////////////////////
>
> # Copyright (c) 2009-2011 XORP, Inc and Others
> #
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License, Version 2, June
> # 1991 as published by the Free Software Foundation. Redistribution
> # and/or modification of this program under the terms of any other
> # version of the GNU General Public License is not permitted.
> #
> # This program is distributed in the hope that it will be useful, but
> # WITHOUT ANY WARRANTY; without even the implied warranty of
> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
> # see the GNU General Public License, Version 2, a copy of which can be
> # found in the XORP LICENSE.gpl file.
> #
> # XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
> # http://xorp.net
>
> # $ID$
>
> Import('env')
>
> subdirs = [
> 'cli',
> 'libcomm',
> 'libxorp',
> 'libxipc',
> 'libproto',
> 'libfeaclient',
> 'xrl/targets',
> 'xrl/interfaces',
> # 'xrl/tests',# XXX not in use.
> 'etc/templates',
> 'fea',
> 'fib2mrib',
> 'mld6igmp',
> 'mrt',
> 'pim',
> 'policy',
> 'rib',
> 'rtrmgr',
> 'static_routes',
> 'utils',
> ]
>
> if env['enable_olsr']:
> subdirs.append('contrib/olsr')
>
> if env['enable_wrapper']:
> subdirs.append('contrib/wrapper')
>
> if env['enable_clickinf']: ####################################################### This is for mine. I added this for my purpose.
> subdirs.append('clickinf')
>
> if env['enable_bgp']:
> subdirs.append('bgp')
>
> if env['enable_ospf']:
> subdirs.append('ospf')
>
> if env['enable_rip']:
> subdirs.append('rip')
>
> if env['enable_vrrp']:
> subdirs.append('vrrp')
>
>
> SConscript(dirs = subdirs, exports='env')
> ======================================================
>
>
>
> Littletree.
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Xorp-users mailing list
> Xorp-users at xorp.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users
>
--
Ben Greear
Candela Technologies Inc http://www.candelatech.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20140813/19556a44/attachment-0001.html
More information about the Xorp-users
mailing list