From greearb at candelatech.com Tue Mar 1 11:45:05 2011 From: greearb at candelatech.com (Ben Greear) Date: Tue, 01 Mar 2011 11:45:05 -0800 Subject: [Xorp-hackers] [Xorp-users] RFC: New VLAN api for xorp.ct In-Reply-To: <65A6944974518C4B9C0E818727B559E9397F8E7C@mecexchange2007.meccorp.mec.edu> References: <4D6C8D74.9090602@candelatech.com> <65A6944974518C4B9C0E818727B559E9397F8E7C@mecexchange2007.meccorp.mec.edu> Message-ID: <4D6D4CC1.2080209@candelatech.com> On 03/01/2011 11:51 AM, Joe Coco wrote: > > Ben, > > Maybe it's just me but. Patch applies clean, however I can't get past this step. > > For example: > > create interfaces interface foo disable false > > ^^^ works > > create interfaces interface foo vlan > > ^^ says > > ERROR: path "interfaces interface foo vlan" is not valid > > ?? Likely it's broken...I haven't had time to do any testing yet. Trying to bring up a new web server, migrate a wiki, and kick a new release out the door in the next few days, so might be a bit before I can poke at xorp :) Thanks, Ben > > -- Joe > > > -----Original Message----- > From: xorp-users-bounces at xorp.org [mailto:xorp-users-bounces at xorp.org] On Behalf Of Ben Greear > Sent: Tuesday, March 01, 2011 1:09 AM > To: xorp-users at xorp.org; xorp > Subject: [Xorp-users] RFC: New VLAN api for xorp.ct > > Here is a patch I cooked up to deal with automatically > creating/deleting VLANs, while treating them as real > interfaces. > > This is totally un-tested (it does compile on Linux, at least). > > Comments welcome. I hope to test it in the next few days. > > http://www.candelatech.com/~greearb/0001-vlans-Treat-vlans-as-primary-interfaces.patch > > Thanks, > Ben > -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Wed Mar 2 17:07:59 2011 From: greearb at candelatech.com (Ben Greear) Date: Wed, 02 Mar 2011 17:07:59 -0800 Subject: [Xorp-hackers] New XORP project manager: Ben Greear In-Reply-To: References: Message-ID: <4D6EE9EF.108@candelatech.com> On 03/02/2011 04:26 PM, Mark Handley wrote: > As I'm sure you've noticed, for quite a while now Ben Greear's xorp.ct > branch has been the de-facto current XORP branch. We've decided to > make this official. > > Ben is now the official project manager, and the xorp.org domain name > now points at Ben's version of the XORP webserver. XORP will of > course remain open-source under the GPL. Many thanks to Ben for > taking over care and feeding of XORP and for all the effort's he's put > in to date. > > - Mark Handley (XORP project founder). And thanks to Mark for getting XORP started and seeing it through all these years! My immediate plans are to tweak the web page (remove ".ct" for starters) and try to get auto-created VLANs working better. Some other folks are working on updating the docs and we should have those links go live soon. After that, no big plans for a while, aside from fixing bugs and dealing with customer requests. I'll likely leave the 'xorp.ct' repository on github as the primary source repository, and use github's bug-tracking tools. I could also setup bugzilla on my web server if someone thinks that would be better. I'm not sure what to do about sourceforge. Maybe just leave the svn up for historical reasons, or perhaps see if someone can archive it and remove it entirely. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From p.gonmu at gmail.com Thu Mar 3 04:45:04 2011 From: p.gonmu at gmail.com (Paula Gonzalez =?ISO-8859-1?Q?Mu=F1oz?=) Date: Thu, 03 Mar 2011 13:45:04 +0100 Subject: [Xorp-hackers] compiling modified source code Message-ID: <1299156304.2289.71.camel@polilla> Hello, I'm trying to write a process for XORP and I have created my .xif, my .tgt and a directory which contains my process files. My doubt is where do I have to include the route to the makefile on my process directory? BR, Paula Gonzalez From pierre.lepropre at student.ulg.ac.be Thu Mar 3 05:02:24 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Thu, 03 Mar 2011 14:02:24 +0100 Subject: [Xorp-hackers] compiling modified source code In-Reply-To: <1299156304.2289.71.camel@polilla> References: <1299156304.2289.71.camel@polilla> Message-ID: <1299157344.3445.11.camel@pierre-T500> Hello Paula, Are you still using the "old" XORP 1.6 ? If you aren't and you're working on XORP (CT) 1.8, check this link out, maybe it will help you: http://queen.run.montefiore.ulg.ac.be/~willemaers/doku-xorp/doku.php?id=xorp:writing_a_process Either way you can check the link and it will probably help you a little bit, even with the 1.6 version. All the steps are the same ones. I thought the documentation was still kinda accurate about that before they switched to SCons. Hope this helps, Pierre. On Thu, 2011-03-03 at 13:45 +0100, Paula Gonzalez Mu?oz wrote: > Hello, > > I'm trying to write a process for XORP and I have created my .xif, > my .tgt and a directory which contains my process files. > > My doubt is where do I have to include the route to the makefile on my > process directory? > > BR, > Paula Gonzalez > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers From greearb at candelatech.com Thu Mar 3 23:04:47 2011 From: greearb at candelatech.com (Ben Greear) Date: Thu, 03 Mar 2011 23:04:47 -0800 Subject: [Xorp-hackers] Bug tracker for xorp Message-ID: <4D708F0F.5040503@candelatech.com> I found a script that will import bugs from the sourceforge tracker into github's tracker, but I must say I find github's tracker lacking (it can't even email you when bugs are entered...) So, I'll be setting up a bugzilla tracker on xorp.org as soon as I get a chance. Anyone know of a clever way to import sourceforge Trac bugs into bugzilla? I didn't find anything while googling... Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From p.gonmu at gmail.com Mon Mar 7 03:59:01 2011 From: p.gonmu at gmail.com (Paula Gonzalez =?ISO-8859-1?Q?Mu=F1oz?=) Date: Mon, 07 Mar 2011 12:59:01 +0100 Subject: [Xorp-hackers] compiling modified source code In-Reply-To: <1299157344.3445.11.camel@pierre-T500> References: <1299156304.2289.71.camel@polilla> <1299157344.3445.11.camel@pierre-T500> Message-ID: <1299499141.2216.1.camel@polilla> Hello Pierre, It has helped me very much. It is actually much more clear than the writing process overview for some details. Thank you very much. Paula On Thu, 2011-03-03 at 14:02 +0100, Pierre Lepropre wrote: > Hello Paula, > > Are you still using the "old" XORP 1.6 ? > > If you aren't and you're working on XORP (CT) 1.8, check this link out, > maybe it will help you: > > http://queen.run.montefiore.ulg.ac.be/~willemaers/doku-xorp/doku.php?id=xorp:writing_a_process > > Either way you can check the link and it will probably help you a little > bit, even with the 1.6 version. All the steps are the same ones. > > I thought the documentation was still kinda accurate about that before > they switched to SCons. > > Hope this helps, > > Pierre. > > On Thu, 2011-03-03 at 13:45 +0100, Paula Gonzalez Mu?oz wrote: > > Hello, > > > > I'm trying to write a process for XORP and I have created my .xif, > > my .tgt and a directory which contains my process files. > > > > My doubt is where do I have to include the route to the makefile on my > > process directory? > > > > BR, > > Paula Gonzalez > > > > _______________________________________________ > > Xorp-hackers mailing list > > Xorp-hackers at icir.org > > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > > From wxh585 at 126.com Mon Mar 7 22:27:59 2011 From: wxh585 at 126.com (wxh585 at 126.com) Date: Tue, 8 Mar 2011 14:27:59 +0800 (CST) Subject: [Xorp-hackers] firewall is not work,for freebsd 7.3 ,xorp 1.8-ct. Message-ID: <5ab4988.606.12e942694d7.Coremail.wxh585@126.com> this bug is cleared,xorp will become good. vi /etc/rc.conf ...... firewall_enable="YES" ...... admin at router.h# set firewall rule4 100 action drop [edit] admin at router.h# commit Commit Failed 102 Command failed No firewall plugin to set the entries[edit] admin at router.h# thinks -- ??? ???13312601392 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110308/3fa698a8/attachment.html From ss at comp.lancs.ac.uk Tue Mar 8 05:27:06 2011 From: ss at comp.lancs.ac.uk (ss at comp.lancs.ac.uk) Date: Tue, 8 Mar 2011 13:27:06 +0000 Subject: [Xorp-hackers] [PATCH 1/3] Supporting asynchronous server implementations - compiled. In-Reply-To: <4D500B54.6030707@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> Message-ID: <1299590828-13787-1-git-send-email-ss@comp.lancs.ac.uk> From: Steven Simpson --- xorp/libxipc/finder_client.cc | 23 +++-- xorp/libxipc/finder_client.hh | 13 ++- xorp/libxipc/finder_client_xrl_target.cc | 35 +++++- xorp/libxipc/finder_client_xrl_target.hh | 12 ++- xorp/libxipc/finder_messenger.cc | 14 ++- xorp/libxipc/finder_messenger.hh | 5 + xorp/libxipc/xrl_cmd_map.cc | 2 +- xorp/libxipc/xrl_cmd_map.hh | 14 ++- xorp/libxipc/xrl_dispatcher.cc | 26 ++++-- xorp/libxipc/xrl_dispatcher.hh | 20 +++- xorp/libxipc/xrl_error.hh | 3 + xorp/libxipc/xrl_pf_stcp.cc | 55 +++++++--- xorp/libxipc/xrl_router.cc | 11 +- xorp/libxipc/xrl_router.hh | 8 +- xorp/xrl/scripts/tgt-gen | 171 ++++++++++++++++++++--------- 15 files changed, 297 insertions(+), 115 deletions(-) diff --git a/xorp/libxipc/finder_client.cc b/xorp/libxipc/finder_client.cc index 2fe7876..5713e5c 100644 --- a/xorp/libxipc/finder_client.cc +++ b/xorp/libxipc/finder_client.cc @@ -961,8 +961,16 @@ FinderClient::uncache_xrls_from_target(const string& target) XORP_UINT_CAST(n), target.c_str()); } -XrlCmdError -FinderClient::dispatch_tunneled_xrl(const string& xrl_str) +void +FinderClient::dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs &a, + XrlRespCallback cb) const +{ + cb->dispatch(XrlCmdError(e), a); +} + +void +FinderClient::dispatch_tunneled_xrl(const string& xrl_str, + const XrlRespCallback& cb) { finder_trace_init("dispatch_tunneled_xrl(\"%s\")", xrl_str.c_str()); Xrl xrl; @@ -971,16 +979,17 @@ FinderClient::dispatch_tunneled_xrl(const string& xrl_str) InstanceList::iterator i = find_instance(xrl.target()); if (i == _ids.end()) { finder_trace_result("target not found"); - return XrlCmdError::COMMAND_FAILED("target not found"); + cb->dispatch(XrlCmdError::COMMAND_FAILED("target not found"), + XrlArgs()); } XrlArgs ret_vals; - i->dispatcher()->dispatch_xrl(xrl.command(), - xrl.args(), ret_vals); + XrlDispatcherCallback mycb = + callback(this, &FinderClient::dispatch_tunneled_xrl_cb, cb); + i->dispatcher()->dispatch_xrl(xrl.command(), xrl.args(), mycb); finder_trace_result("success"); - return XrlCmdError::OKAY(); } catch (InvalidString&) { - return XrlCmdError::COMMAND_FAILED("Bad Xrl string"); + cb->dispatch(XrlCmdError::COMMAND_FAILED("Bad Xrl string"), XrlArgs()); } } diff --git a/xorp/libxipc/finder_client.hh b/xorp/libxipc/finder_client.hh index 21e1f11..2d585ad 100644 --- a/xorp/libxipc/finder_client.hh +++ b/xorp/libxipc/finder_client.hh @@ -32,6 +32,8 @@ #include "finder_messenger.hh" #include "xrl_pf.hh" +#include "xrl_dispatcher.hh" +#include "xrl_cmd_map.hh" class FinderClientOp; class FinderClientObserver; @@ -76,7 +78,8 @@ public: virtual ~FinderClientXrlCommandInterface() {} virtual void uncache_xrl(const string& xrl) = 0; virtual void uncache_xrls_from_target(const string& target) = 0; - virtual XrlCmdError dispatch_tunneled_xrl(const string& xrl) = 0; + virtual void dispatch_tunneled_xrl(const string& xrl, + const XrlRespCallback& cb) = 0; }; /** @@ -312,7 +315,13 @@ protected: // FinderClientXrlCommandInterface void uncache_xrl(const string& xrl); void uncache_xrls_from_target(const string& target); - XrlCmdError dispatch_tunneled_xrl(const string& xrl); + void dispatch_tunneled_xrl(const string& xrl_str, + const XrlRespCallback& cb); + +private: + void + dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs &a, + XrlRespCallback cb) const; protected: void crank(); diff --git a/xorp/libxipc/finder_client_xrl_target.cc b/xorp/libxipc/finder_client_xrl_target.cc index ce1ca05..4e33b21 100644 --- a/xorp/libxipc/finder_client_xrl_target.cc +++ b/xorp/libxipc/finder_client_xrl_target.cc @@ -22,6 +22,7 @@ #include "libxorp/status_codes.h" +#include "libxorp/callback.hh" #include "finder_client_xrl_target.hh" #include "finder_client.hh" @@ -85,15 +86,37 @@ FinderClientXrlTarget::finder_client_0_2_remove_xrls_for_target_from_cache( return XrlCmdError::OKAY(); } + +void +FinderClientXrlTarget::async_finder_client_0_2_dispatch_tunneled_xrl +(const string& xrl, + FinderClient02DispatchTunneledXrlCB cb) +{ + _client->dispatch_tunneled_xrl + (xrl, + callback(this, + &FinderClientXrlTarget::dispatch_tunneled_xrl_cb, + cb)); +} + +void +FinderClientXrlTarget::dispatch_tunneled_xrl_cb +(const XrlCmdError &e, + const XrlArgs &out, + FinderClient02DispatchTunneledXrlCB cb) const +{ + UNUSED(out); + cb->dispatch(XrlCmdError::OKAY(), e.error_code(), e.note()); +} + XrlCmdError FinderClientXrlTarget::finder_client_0_2_dispatch_tunneled_xrl( const string& xrl, uint32_t& xrl_errno, - string& xrl_errtxt - ) + string& xrl_errtxt) { - XrlCmdError e = _client->dispatch_tunneled_xrl(xrl); - xrl_errno = e.error_code(); - xrl_errtxt = e.note(); - return XrlCmdError::OKAY(); + UNUSED(xrl); + UNUSED(xrl_errno); + UNUSED(xrl_errtxt); + return XrlCmdError::COMMAND_FAILED("Unreachable"); } diff --git a/xorp/libxipc/finder_client_xrl_target.hh b/xorp/libxipc/finder_client_xrl_target.hh index 59cc2b0..b6c4e53 100644 --- a/xorp/libxipc/finder_client_xrl_target.hh +++ b/xorp/libxipc/finder_client_xrl_target.hh @@ -25,6 +25,7 @@ #define __LIBXIPC_FINDER_CLIENT_XRL_TARGET_HH__ #include "xrl/targets/finder_client_base.hh" +#include "xrl_dispatcher.hh" class FinderClientXrlCommandInterface; @@ -46,12 +47,21 @@ public: XrlCmdError finder_client_0_2_remove_xrls_for_target_from_cache( const string& target); + void async_finder_client_0_2_dispatch_tunneled_xrl + (const string& xrl, + FinderClient02DispatchTunneledXrlCB); XrlCmdError finder_client_0_2_dispatch_tunneled_xrl(const string& xrl, uint32_t& xrl_errno, string& xrl_errtxt); - + protected: FinderClientXrlCommandInterface* _client; + +private: + void dispatch_tunneled_xrl_cb + (const XrlCmdError &e, + const XrlArgs &out, + FinderClient02DispatchTunneledXrlCB cb) const; }; #endif // __LIBXIPC_FINDER_CLIENT_XRL_TARGET_HH__ diff --git a/xorp/libxipc/finder_messenger.cc b/xorp/libxipc/finder_messenger.cc index 5e71386..74a5826 100644 --- a/xorp/libxipc/finder_messenger.cc +++ b/xorp/libxipc/finder_messenger.cc @@ -97,14 +97,24 @@ FinderMessengerBase::dispatch_xrl(uint32_t seqno, const Xrl& xrl) if (manager()) manager()->messenger_active_event(this); - XrlArgs reply_args; - XrlError e = ce->dispatch(xrl.args(), &reply_args); + ce->dispatch(xrl.args(), + callback(this, &FinderMessengerBase::dispatch_xrl_cb, seqno)); +} + +void +FinderMessengerBase::dispatch_xrl_cb(const XrlCmdError &e, + const XrlArgs &reply_args, + uint32_t seqno) +{ if (XrlCmdError::OKAY() == e) { reply(seqno, e, &reply_args); } else { reply(seqno, e, 0); } + // TODO: Is there any context that must be passed to the + // FinderMessengerManager, now that the events are asynchronous? + // Announce we've dispatched xrl if (manager()) manager()->messenger_inactive_event(this); diff --git a/xorp/libxipc/finder_messenger.hh b/xorp/libxipc/finder_messenger.hh index d80405d..679bcf3 100644 --- a/xorp/libxipc/finder_messenger.hh +++ b/xorp/libxipc/finder_messenger.hh @@ -123,6 +123,11 @@ protected: void response_timeout(uint32_t seqno); private: + void + dispatch_xrl_cb(const XrlCmdError &e, + const XrlArgs &reply_args, + uint32_t seqno); + class ResponseState { public: ResponseState(uint32_t seqno, diff --git a/xorp/libxipc/xrl_cmd_map.cc b/xorp/libxipc/xrl_cmd_map.cc index 487f68e..0d25952 100644 --- a/xorp/libxipc/xrl_cmd_map.cc +++ b/xorp/libxipc/xrl_cmd_map.cc @@ -42,7 +42,7 @@ XrlCmdMap::add_handler(const XrlCmdEntry& cmd) } bool -XrlCmdMap::add_handler(const string& cmd, const XrlRecvCallback& rcb) +XrlCmdMap::add_handler(const string& cmd, XrlRecvCallback rcb) { return add_handler(XrlCmdEntry(cmd, rcb)); } diff --git a/xorp/libxipc/xrl_cmd_map.hh b/xorp/libxipc/xrl_cmd_map.hh index 45c6bd6..da8f522 100644 --- a/xorp/libxipc/xrl_cmd_map.hh +++ b/xorp/libxipc/xrl_cmd_map.hh @@ -33,7 +33,13 @@ #include "xrl_error.hh" typedef -XorpCallback2::RefPtr XrlRecvCallback; +XorpCallback2::RefPtr +XrlRespCallback; + +typedef +XorpCallback2::RefPtr XrlRecvCallback; + + class XrlCmdEntry { public: @@ -45,8 +51,8 @@ public: const string& name() const { return _name; } - const XrlCmdError dispatch(const XrlArgs& inputs, XrlArgs* outputs) const { - return _cb->dispatch(inputs, outputs); + void dispatch(const XrlArgs& inputs, XrlRespCallback resp) const { + _cb->dispatch(inputs, resp); } protected: @@ -65,7 +71,7 @@ public: const string& name() const { return _name; } - virtual bool add_handler(const string& cmd, const XrlRecvCallback& rcb); + virtual bool add_handler(const string& cmd, XrlRecvCallback rcb); virtual bool remove_handler (const string& name); diff --git a/xorp/libxipc/xrl_dispatcher.cc b/xorp/libxipc/xrl_dispatcher.cc index ead5e09..04b618f 100644 --- a/xorp/libxipc/xrl_dispatcher.cc +++ b/xorp/libxipc/xrl_dispatcher.cc @@ -51,20 +51,22 @@ do { \ // ---------------------------------------------------------------------------- // XrlDispatcher methods -XrlError +void XrlDispatcher::dispatch_xrl(const string& method_name, const XrlArgs& inputs, - XrlArgs& outputs) const + XrlDispatcherCallback resp) const { const XrlCmdEntry* c = get_handler(method_name.c_str()); if (c == 0) { trace_xrl_dispatch("dispatch_xrl (invalid) ", method_name); debug_msg("No handler for %s\n", method_name.c_str()); - return XrlError::NO_SUCH_METHOD(); + resp->dispatch(XrlError::NO_SUCH_METHOD(), XrlArgs()); + return; } trace_xrl_dispatch("dispatch_xrl (valid) ", method_name); - return c->dispatch(inputs, &outputs); + c->dispatch(inputs, + callback(this, &XrlDispatcher::dispatch_cb, resp)); } XrlDispatcher::XI* @@ -77,8 +79,18 @@ XrlDispatcher::lookup_xrl(const string& name) const return new XI(c); } -XrlError -XrlDispatcher::dispatch_xrl_fast(const XI& xi, XrlArgs& outputs) const +void +XrlDispatcher::dispatch_xrl_fast(const XI& xi, + XrlDispatcherCallback resp) const { - return xi._cmd->dispatch(xi._xrl.args(), &outputs); + xi._cmd->dispatch(xi._xrl.args(), + callback(this, &XrlDispatcher::dispatch_cb, resp)); +} + +void +XrlDispatcher::dispatch_cb(const XrlCmdError &err, + const XrlArgs &outputs, + XrlDispatcherCallback resp) const +{ + resp->dispatch(err, outputs); } diff --git a/xorp/libxipc/xrl_dispatcher.hh b/xorp/libxipc/xrl_dispatcher.hh index 6dadb8b..43fb12d 100644 --- a/xorp/libxipc/xrl_dispatcher.hh +++ b/xorp/libxipc/xrl_dispatcher.hh @@ -25,6 +25,11 @@ #include "xrl_cmd_map.hh" +typedef +XorpCallback2::RefPtr +XrlDispatcherCallback; + + class XrlDispatcher : public XrlCmdMap { public: struct XI { @@ -40,11 +45,16 @@ public: {} virtual ~XrlDispatcher() {} - virtual XI* lookup_xrl(const string& name) const; - virtual XrlError dispatch_xrl(const string& method_name, - const XrlArgs& in, - XrlArgs& out) const; - XrlError dispatch_xrl_fast(const XI& xi, XrlArgs& out) const; + virtual XI* lookup_xrl(const string& name) const; + virtual void dispatch_xrl(const string& method_name, + const XrlArgs& in, + XrlDispatcherCallback resp) const; + void dispatch_xrl_fast(const XI& xi, + XrlDispatcherCallback resp) const; + +private: + void dispatch_cb(const XrlCmdError &, const XrlArgs &, + XrlDispatcherCallback resp) const; }; #endif // __LIBXIPC_XRL_DISPATCHER_HH__ diff --git a/xorp/libxipc/xrl_error.hh b/xorp/libxipc/xrl_error.hh index 7ae7eed..6909a96 100644 --- a/xorp/libxipc/xrl_error.hh +++ b/xorp/libxipc/xrl_error.hh @@ -163,6 +163,7 @@ protected: string _note; }; +class FinderClient; /** * Error codes for user callbacks. @@ -221,6 +222,8 @@ private: XrlCmdError(const XrlError& xe) : _xrl_error(xe) {} XrlError _xrl_error; static XrlCmdError _xce_ok; + + friend class FinderClient; }; diff --git a/xorp/libxipc/xrl_pf_stcp.cc b/xorp/libxipc/xrl_pf_stcp.cc index e441809..a1b6c58 100644 --- a/xorp/libxipc/xrl_pf_stcp.cc +++ b/xorp/libxipc/xrl_pf_stcp.cc @@ -130,6 +130,9 @@ public: void dispatch_request(uint32_t seqno, bool batch, const uint8_t* buffer, size_t bytes); + void transmit_response(const XrlError &e, const XrlArgs &response, + uint32_t seqno, bool batch); + void ack_helo(uint32_t seqno); void read_event(BufferedAsyncReader* reader, @@ -151,8 +154,8 @@ public: string toString() const; private: - XrlError do_dispatch(const uint8_t* packed_xrl, size_t packed_xrl_bytes, - XrlArgs& response); + void do_dispatch(const uint8_t* packed_xrl, size_t packed_xrl_bytes, + XrlDispatcherCallback cb); XrlPFSTCPListener& _parent; XorpFd _sock; @@ -251,10 +254,10 @@ STCPRequestHandler::read_event(BufferedAsyncReader* /* source */, _reader.set_trigger_bytes(STCPPacketHeader::header_size()); } -XrlError +void STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, size_t packed_xrl_bytes, - XrlArgs& response) + XrlDispatcherCallback cb) { static XrlError e(XrlError::INTERNAL_ERROR().error_code(), "corrupt xrl"); @@ -263,33 +266,44 @@ STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, string command; size_t cmdsz = Xrl::unpack_command(command, packed_xrl, packed_xrl_bytes); - if (!cmdsz) - return e; + if (!cmdsz) { + cb->dispatch(e, XrlArgs()); + return; + } XrlDispatcher::XI* xi = d->lookup_xrl(command); - if (!xi) - return e; + if (!xi) { + cb->dispatch(e, XrlArgs()); + return; + } Xrl& xrl = xi->_xrl; try { if (xi->_new) { - if (xrl.unpack(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) - return e; + if (xrl.unpack(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) { + cb->dispatch(e, XrlArgs()); + return; + } + xi->_new = false; } else { packed_xrl += cmdsz; packed_xrl_bytes -= cmdsz; - if (xrl.fill(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) - return e; + if (xrl.fill(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) { + cb->dispatch(e, XrlArgs()); + return; + } + } } catch (...) { - return e; + cb->dispatch(e, XrlArgs()); + return; } - return d->dispatch_xrl_fast(*xi, response); + return d->dispatch_xrl_fast(*xi, cb); } void @@ -298,11 +312,16 @@ STCPRequestHandler::dispatch_request(uint32_t seqno, const uint8_t* packed_xrl, size_t packed_xrl_bytes) { - XrlArgs response; - XrlError e; - - e = do_dispatch(packed_xrl, packed_xrl_bytes, response); + do_dispatch(packed_xrl, packed_xrl_bytes, + callback(this, &STCPRequestHandler::transmit_response, + seqno, batch)); +} +void STCPRequestHandler::transmit_response(const XrlError &e, + const XrlArgs &response, + uint32_t seqno, + bool batch) +{ size_t xrl_response_bytes = response.packed_bytes(); size_t note_bytes = e.note().size(); diff --git a/xorp/libxipc/xrl_router.cc b/xorp/libxipc/xrl_router.cc index e547cbf..d46f8a9 100644 --- a/xorp/libxipc/xrl_router.cc +++ b/xorp/libxipc/xrl_router.cc @@ -372,7 +372,7 @@ XrlRouter::finalize() } bool -XrlRouter::add_handler(const string& cmd, const XrlRecvCallback& rcb) +XrlRouter::add_handler(const string& cmd, XrlRecvCallback rcb) { if (finalized()) { XLOG_ERROR("Attempting to add handler after XrlRouter finalized. Handler = \"%s\"", cmd.c_str()); @@ -650,17 +650,18 @@ XrlRouter::send(const Xrl& xrl, const XrlCallback& user_cb) return true; } -XrlError +void XrlRouter::dispatch_xrl(const string& method_name, const XrlArgs& inputs, - XrlArgs& outputs) const + XrlDispatcherCallback resp) const { string resolved_method; if (_fc->query_self(method_name, resolved_method) == true) { - return XrlDispatcher::dispatch_xrl(resolved_method, inputs, outputs); + XrlDispatcher::dispatch_xrl(resolved_method, inputs, resp); + return; } debug_msg("Could not find mapping for %s\n", method_name.c_str()); - return XrlError::NO_SUCH_METHOD(); + resp->dispatch(XrlError::NO_SUCH_METHOD(), XrlArgs()); } XrlDispatcher::XI* diff --git a/xorp/libxipc/xrl_router.hh b/xorp/libxipc/xrl_router.hh index 9478f44..700152a 100644 --- a/xorp/libxipc/xrl_router.hh +++ b/xorp/libxipc/xrl_router.hh @@ -130,7 +130,7 @@ public: * @param rcb callback to be dispatched when XRL method is received for * invocation. */ - bool add_handler(const string& cmd, const XrlRecvCallback& rcb); + bool add_handler(const string& cmd, XrlRecvCallback rcb); /** * @return EventLoop used by XrlRouter instance. @@ -176,9 +176,9 @@ protected: */ virtual void finder_ready_event(const string& tgt_name); - XrlError dispatch_xrl(const string& method_name, - const XrlArgs& inputs, - XrlArgs& outputs) const; + void dispatch_xrl(const string& method_name, + const XrlArgs& inputs, + XrlDispatcherCallback resp) const; /** * Resolve callback (slow path). diff --git a/xorp/xrl/scripts/tgt-gen b/xorp/xrl/scripts/tgt-gen index 899cf13..3ce47e0 100755 --- a/xorp/xrl/scripts/tgt-gen +++ b/xorp/xrl/scripts/tgt-gen @@ -9,7 +9,7 @@ import os, sys import Xif.util from Xif.util import \ - joining_csv, csv, cpp_name, cpp_classname, xorp_indent_string, xorp_indent + joining_csv, csv, cpp_name, caps_cpp_classname, cpp_classname, xorp_indent_string, xorp_indent from Xif.xiftypes import \ XrlArg, XrlMethod, XrlInterface, XrlTarget @@ -69,7 +69,7 @@ def target_declare_handler_table(cls): s = """ struct handler_table { const char *name; - const XrlCmdError (%s::*method)(const XrlArgs&, XrlArgs*); + void (%s::*method)(const XrlArgs&, XrlRespCallback); }; static const struct handler_table handlers[]; @@ -100,6 +100,7 @@ def target_virtual_fns(methods): "Pure-virtual function that needs to be implemented to:") if len(kdoc_note): r += kdoc_note + "\n" + r += " virtual XrlCmdError %s("% cpp_name(x.name()) # input args @@ -109,7 +110,7 @@ def target_virtual_fns(methods): for a in x.args(): cpa = "\n%sconst %s&\t%s" % \ - (xorp_indent(2), a.cpp_type(), cpp_name(a.name())) + (xorp_indent(2), a.cpp_type(), cpp_name(a.name())) args.append(cpa) # output args @@ -124,13 +125,41 @@ def target_virtual_fns(methods): r += csv(args) r += ") = 0;\n\n" + + + + r += " typedef\n" + r += " XorpCallback%sdispatch(XrlCmdError::BAD_ARGS(), XrlArgs()); + return; } """ % (len(m.args()), len(m.args()), m.name()) - if len(m.rargs()): - s += """ - if (pxa_outputs == 0) { - XLOG_FATAL(\"Return list empty\"); - return XrlCmdError::BAD_ARGS(); - } -""" - s += "\n /* Return value declarations */\n" - for r in m.rargs(): - s += " %s %s;\n" % (r.cpp_type(), cpp_name(r.name())) s += xorp_indent(1) + "try {\n" - s += xorp_indent(2) + "XrlCmdError e = %s(" % cpp_name(m.name()) - get_reqs = [] + s += xorp_indent(2) + \ + "%sCB mycb =\n%s callback(this, &%s::callback_%s, c_b);\n" \ + % (caps_cpp_classname(m.name()), xorp_indent(3), \ + cls, cpp_name(m.name())) + s += xorp_indent(2) + "async_%s(" % cpp_name(m.name()) i = 0 for a in m.args(): - get_reqs.append("\n" + xorp_indent(3) + \ - "xa_inputs.get(%d, \"%s\").%s()" \ - % (i, a.name(), a.accessor())) - i += 1 - ret_vals = [] - for r in m.rargs(): - ret_vals.append("\n" + xorp_indent(3) + "%s" % cpp_name(r.name())) - s += csv(get_reqs + ret_vals, ",") + ");\n" - - s += \ -""" if (e != XrlCmdError::OKAY()) { - XLOG_WARNING(\"Handling method for %%s failed: %%s\", - \"%s\", e.str().c_str()); - return e; - } -""" % m.name() + s += "\n" + xorp_indent(3) + \ + "xa_inputs.get(%d, \"%s\").%s()," \ + % (i, a.name(), a.accessor()) + i += 1 + s += " mycb);\n" s += \ """ } catch (const XrlArgs::BadArgs& e) { XLOG_ERROR(\"Error decoding the arguments: %s\", e.str().c_str()); - return XrlCmdError::BAD_ARGS(e.str()); + c_b->dispatch(XrlCmdError::BAD_ARGS(e.str()), XrlArgs()); + return; } """ + s += "}\n" - if m.rargs(): - s += "\n /* Marshall return values */\n try {\n" - for r in m.rargs(): - s += xorp_indent(2) + "%s->add(\"%s\", %s);\n" % \ - (argarg, r.name(), cpp_name(r.name())) - s += \ -""" } catch (const XrlArgs::XrlAtomFound& ) { - XLOG_FATAL("Duplicate atom name"); /* XXX Should never happen */ - } -""" + s += "\nvoid\n%s::async_%s(" \ + % (cls, cpp_name(m.name())) + + # input args + for a in m.args(): + s += "\n%sconst %s&\targ_%s," % \ + (xorp_indent(2), a.cpp_type(), cpp_name(a.name())) + + s += "\n%s%sCB c_b)\n{\n" % \ + (xorp_indent(2), caps_cpp_classname(m.name())) + + s += "\n /* Return value declarations */\n" + for r in m.rargs(): + s += " %s rarg_%s;\n" % (r.cpp_type(), cpp_name(r.name())) + + s += " XrlCmdError e = %s(" % cpp_name(m.name()) + sep = "" + for r in m.args(): + s += "%s\n arg_%s" % (sep, cpp_name(r.name())) + sep = "," + for r in m.rargs(): + s += "%s\n rarg_%s" % (sep, cpp_name(r.name())) + sep = "," + s += ");\n" + s += " c_b->dispatch(e" + for r in m.rargs(): + s += ",\n rarg_%s" % (cpp_name(r.name())) + sep = "," + s += ");\n" + s += "}\n" - s += " return XrlCmdError::OKAY();\n}\n\n" return s def protect(file): -- 1.7.0.4 From ss at comp.lancs.ac.uk Tue Mar 8 05:27:07 2011 From: ss at comp.lancs.ac.uk (ss at comp.lancs.ac.uk) Date: Tue, 8 Mar 2011 13:27:07 +0000 Subject: [Xorp-hackers] [PATCH 2/3] Using XrlArgs* for out-arguments, so that errors can pass 0. In-Reply-To: <4D500B54.6030707@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> Message-ID: <1299590828-13787-2-git-send-email-ss@comp.lancs.ac.uk> From: Steven Simpson Current messenger is marked inactive in call to user code, rather than in callback from it. --- xorp/libxipc/finder_client.cc | 7 +++---- xorp/libxipc/finder_client.hh | 2 +- xorp/libxipc/finder_client_xrl_target.cc | 2 +- xorp/libxipc/finder_client_xrl_target.hh | 2 +- xorp/libxipc/finder_messenger.cc | 19 ++++++------------- xorp/libxipc/finder_messenger.hh | 2 +- xorp/libxipc/xrl_cmd_map.hh | 2 +- xorp/libxipc/xrl_dispatcher.cc | 4 ++-- xorp/libxipc/xrl_dispatcher.hh | 4 ++-- xorp/libxipc/xrl_pf_stcp.cc | 26 ++++++++++++++++---------- xorp/libxipc/xrl_router.cc | 2 +- xorp/rtrmgr/task.cc | 8 +++++++- xorp/xrl/scripts/tgt-gen | 9 +++++---- 13 files changed, 47 insertions(+), 42 deletions(-) diff --git a/xorp/libxipc/finder_client.cc b/xorp/libxipc/finder_client.cc index 5713e5c..5b20aa8 100644 --- a/xorp/libxipc/finder_client.cc +++ b/xorp/libxipc/finder_client.cc @@ -962,7 +962,7 @@ FinderClient::uncache_xrls_from_target(const string& target) } void -FinderClient::dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs &a, +FinderClient::dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs *a, XrlRespCallback cb) const { cb->dispatch(XrlCmdError(e), a); @@ -979,8 +979,7 @@ FinderClient::dispatch_tunneled_xrl(const string& xrl_str, InstanceList::iterator i = find_instance(xrl.target()); if (i == _ids.end()) { finder_trace_result("target not found"); - cb->dispatch(XrlCmdError::COMMAND_FAILED("target not found"), - XrlArgs()); + cb->dispatch(XrlCmdError::COMMAND_FAILED("target not found"), 0); } XrlArgs ret_vals; @@ -989,7 +988,7 @@ FinderClient::dispatch_tunneled_xrl(const string& xrl_str, i->dispatcher()->dispatch_xrl(xrl.command(), xrl.args(), mycb); finder_trace_result("success"); } catch (InvalidString&) { - cb->dispatch(XrlCmdError::COMMAND_FAILED("Bad Xrl string"), XrlArgs()); + cb->dispatch(XrlCmdError::COMMAND_FAILED("Bad Xrl string"), 0); } } diff --git a/xorp/libxipc/finder_client.hh b/xorp/libxipc/finder_client.hh index 2d585ad..a94db26 100644 --- a/xorp/libxipc/finder_client.hh +++ b/xorp/libxipc/finder_client.hh @@ -320,7 +320,7 @@ protected: private: void - dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs &a, + dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs *a, XrlRespCallback cb) const; protected: diff --git a/xorp/libxipc/finder_client_xrl_target.cc b/xorp/libxipc/finder_client_xrl_target.cc index 4e33b21..53e46db 100644 --- a/xorp/libxipc/finder_client_xrl_target.cc +++ b/xorp/libxipc/finder_client_xrl_target.cc @@ -102,7 +102,7 @@ FinderClientXrlTarget::async_finder_client_0_2_dispatch_tunneled_xrl void FinderClientXrlTarget::dispatch_tunneled_xrl_cb (const XrlCmdError &e, - const XrlArgs &out, + const XrlArgs *out, FinderClient02DispatchTunneledXrlCB cb) const { UNUSED(out); diff --git a/xorp/libxipc/finder_client_xrl_target.hh b/xorp/libxipc/finder_client_xrl_target.hh index b6c4e53..8613c43 100644 --- a/xorp/libxipc/finder_client_xrl_target.hh +++ b/xorp/libxipc/finder_client_xrl_target.hh @@ -60,7 +60,7 @@ protected: private: void dispatch_tunneled_xrl_cb (const XrlCmdError &e, - const XrlArgs &out, + const XrlArgs *out, FinderClient02DispatchTunneledXrlCB cb) const; }; diff --git a/xorp/libxipc/finder_messenger.cc b/xorp/libxipc/finder_messenger.cc index 74a5826..27253e4 100644 --- a/xorp/libxipc/finder_messenger.cc +++ b/xorp/libxipc/finder_messenger.cc @@ -99,25 +99,18 @@ FinderMessengerBase::dispatch_xrl(uint32_t seqno, const Xrl& xrl) ce->dispatch(xrl.args(), callback(this, &FinderMessengerBase::dispatch_xrl_cb, seqno)); + + // Announce we've dispatched xrl + if (manager()) + manager()->messenger_inactive_event(this); } void FinderMessengerBase::dispatch_xrl_cb(const XrlCmdError &e, - const XrlArgs &reply_args, + const XrlArgs *reply_args, uint32_t seqno) { - if (XrlCmdError::OKAY() == e) { - reply(seqno, e, &reply_args); - } else { - reply(seqno, e, 0); - } - - // TODO: Is there any context that must be passed to the - // FinderMessengerManager, now that the events are asynchronous? - - // Announce we've dispatched xrl - if (manager()) - manager()->messenger_inactive_event(this); + reply(seqno, e, reply_args); } void diff --git a/xorp/libxipc/finder_messenger.hh b/xorp/libxipc/finder_messenger.hh index 679bcf3..50ea8c0 100644 --- a/xorp/libxipc/finder_messenger.hh +++ b/xorp/libxipc/finder_messenger.hh @@ -125,7 +125,7 @@ protected: private: void dispatch_xrl_cb(const XrlCmdError &e, - const XrlArgs &reply_args, + const XrlArgs *reply_args, uint32_t seqno); class ResponseState { diff --git a/xorp/libxipc/xrl_cmd_map.hh b/xorp/libxipc/xrl_cmd_map.hh index da8f522..b5336cf 100644 --- a/xorp/libxipc/xrl_cmd_map.hh +++ b/xorp/libxipc/xrl_cmd_map.hh @@ -33,7 +33,7 @@ #include "xrl_error.hh" typedef -XorpCallback2::RefPtr +XorpCallback2::RefPtr XrlRespCallback; typedef diff --git a/xorp/libxipc/xrl_dispatcher.cc b/xorp/libxipc/xrl_dispatcher.cc index 04b618f..9e59d94 100644 --- a/xorp/libxipc/xrl_dispatcher.cc +++ b/xorp/libxipc/xrl_dispatcher.cc @@ -60,7 +60,7 @@ XrlDispatcher::dispatch_xrl(const string& method_name, if (c == 0) { trace_xrl_dispatch("dispatch_xrl (invalid) ", method_name); debug_msg("No handler for %s\n", method_name.c_str()); - resp->dispatch(XrlError::NO_SUCH_METHOD(), XrlArgs()); + resp->dispatch(XrlError::NO_SUCH_METHOD(), 0); return; } @@ -89,7 +89,7 @@ XrlDispatcher::dispatch_xrl_fast(const XI& xi, void XrlDispatcher::dispatch_cb(const XrlCmdError &err, - const XrlArgs &outputs, + const XrlArgs *outputs, XrlDispatcherCallback resp) const { resp->dispatch(err, outputs); diff --git a/xorp/libxipc/xrl_dispatcher.hh b/xorp/libxipc/xrl_dispatcher.hh index 43fb12d..28a5fbf 100644 --- a/xorp/libxipc/xrl_dispatcher.hh +++ b/xorp/libxipc/xrl_dispatcher.hh @@ -26,7 +26,7 @@ #include "xrl_cmd_map.hh" typedef -XorpCallback2::RefPtr +XorpCallback2::RefPtr XrlDispatcherCallback; @@ -53,7 +53,7 @@ public: XrlDispatcherCallback resp) const; private: - void dispatch_cb(const XrlCmdError &, const XrlArgs &, + void dispatch_cb(const XrlCmdError &, const XrlArgs *, XrlDispatcherCallback resp) const; }; diff --git a/xorp/libxipc/xrl_pf_stcp.cc b/xorp/libxipc/xrl_pf_stcp.cc index a1b6c58..9e2dbd9 100644 --- a/xorp/libxipc/xrl_pf_stcp.cc +++ b/xorp/libxipc/xrl_pf_stcp.cc @@ -130,7 +130,7 @@ public: void dispatch_request(uint32_t seqno, bool batch, const uint8_t* buffer, size_t bytes); - void transmit_response(const XrlError &e, const XrlArgs &response, + void transmit_response(const XrlError &e, const XrlArgs *response, uint32_t seqno, bool batch); void ack_helo(uint32_t seqno); @@ -267,13 +267,13 @@ STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, string command; size_t cmdsz = Xrl::unpack_command(command, packed_xrl, packed_xrl_bytes); if (!cmdsz) { - cb->dispatch(e, XrlArgs()); + cb->dispatch(e, 0); return; } XrlDispatcher::XI* xi = d->lookup_xrl(command); if (!xi) { - cb->dispatch(e, XrlArgs()); + cb->dispatch(e, 0); return; } @@ -282,7 +282,7 @@ STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, try { if (xi->_new) { if (xrl.unpack(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) { - cb->dispatch(e, XrlArgs()); + cb->dispatch(e, 0); return; } @@ -293,13 +293,13 @@ STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, packed_xrl_bytes -= cmdsz; if (xrl.fill(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) { - cb->dispatch(e, XrlArgs()); + cb->dispatch(e, 0); return; } } } catch (...) { - cb->dispatch(e, XrlArgs()); + cb->dispatch(e, 0); return; } @@ -318,11 +318,17 @@ STCPRequestHandler::dispatch_request(uint32_t seqno, } void STCPRequestHandler::transmit_response(const XrlError &e, - const XrlArgs &response, + const XrlArgs *response, uint32_t seqno, bool batch) { - size_t xrl_response_bytes = response.packed_bytes(); + // If no response arguments were given, provide an empty set of + // them. + XrlArgs dummy; + if (!response) + response = &dummy; + + size_t xrl_response_bytes = response->packed_bytes(); size_t note_bytes = e.note().size(); _responses.push_back(vector(STCPPacketHeader::header_size() @@ -340,8 +346,8 @@ void STCPRequestHandler::transmit_response(const XrlError &e, } if (xrl_response_bytes != 0) { - response.pack(&r[0] + STCPPacketHeader::header_size() + note_bytes, - xrl_response_bytes); + response->pack(&r[0] + STCPPacketHeader::header_size() + note_bytes, + xrl_response_bytes); } _writer.add_buffer(&r[0], r.size(), diff --git a/xorp/libxipc/xrl_router.cc b/xorp/libxipc/xrl_router.cc index d46f8a9..4274bd4 100644 --- a/xorp/libxipc/xrl_router.cc +++ b/xorp/libxipc/xrl_router.cc @@ -661,7 +661,7 @@ XrlRouter::dispatch_xrl(const string& method_name, return; } debug_msg("Could not find mapping for %s\n", method_name.c_str()); - resp->dispatch(XrlError::NO_SUCH_METHOD(), XrlArgs()); + resp->dispatch(XrlError::NO_SUCH_METHOD(), 0); } XrlDispatcher::XI* diff --git a/xorp/rtrmgr/task.cc b/xorp/rtrmgr/task.cc index d904a31..727282b 100644 --- a/xorp/rtrmgr/task.cc +++ b/xorp/rtrmgr/task.cc @@ -1408,10 +1408,16 @@ TaskXrlItem::execute_done(const XrlError& err, XrlArgs* xrl_args) break; case NO_FINDER: + // The error was a fatal one for the target - we now + // consider the target to be fatally wounded. + XLOG_ERROR("NO_FINDER: %s", err.str().c_str()); + fatal = true; + break; + case SEND_FAILED: // The error was a fatal one for the target - we now // consider the target to be fatally wounded. - XLOG_ERROR("%s", err.str().c_str()); + XLOG_ERROR("SEND_FAILED: %s", err.str().c_str()); fatal = true; break; diff --git a/xorp/xrl/scripts/tgt-gen b/xorp/xrl/scripts/tgt-gen index 3ce47e0..53b3744 100755 --- a/xorp/xrl/scripts/tgt-gen +++ b/xorp/xrl/scripts/tgt-gen @@ -201,14 +201,15 @@ def target_handler_methods(cls, name, methods): s += ",\n XrlRespCallback c_b)\n" s += "{\n" - s += xorp_indent(1) + "XrlArgs out;\n" s += \ """ if (e != XrlCmdError::OKAY()) { XLOG_WARNING(\"Handling method for %%s failed: %%s\", \"%s\", e.str().c_str()); + c_b->dispatch(e, 0); } else { """ % m.name() + s += xorp_indent(2) + "XrlArgs out;\n" if m.rargs(): s += "\n /* Marshall return values */\n try {\n" for r in m.rargs(): @@ -221,7 +222,7 @@ def target_handler_methods(cls, name, methods): """ - s += " c_b->dispatch(e, out);\n }\n}\n\n" + s += " c_b->dispatch(e, &out);\n }\n}\n\n" s += "\nvoid\n" @@ -232,7 +233,7 @@ def target_handler_methods(cls, name, methods): if (xa_inputs.size() != %d) { XLOG_ERROR(\"Wrong number of arguments (%%u != %%u) handling %%s\", XORP_UINT_CAST(%d), XORP_UINT_CAST(xa_inputs.size()), \"%s\"); - c_b->dispatch(XrlCmdError::BAD_ARGS(), XrlArgs()); + c_b->dispatch(XrlCmdError::BAD_ARGS(), 0); return; } """ % (len(m.args()), len(m.args()), m.name()) @@ -255,7 +256,7 @@ def target_handler_methods(cls, name, methods): s += \ """ } catch (const XrlArgs::BadArgs& e) { XLOG_ERROR(\"Error decoding the arguments: %s\", e.str().c_str()); - c_b->dispatch(XrlCmdError::BAD_ARGS(e.str()), XrlArgs()); + c_b->dispatch(XrlCmdError::BAD_ARGS(e.str()), 0); return; } """ -- 1.7.0.4 From ss at comp.lancs.ac.uk Tue Mar 8 05:27:08 2011 From: ss at comp.lancs.ac.uk (ss at comp.lancs.ac.uk) Date: Tue, 8 Mar 2011 13:27:08 +0000 Subject: [Xorp-hackers] [PATCH 3/3] Reverted some unnecessary changes. In-Reply-To: <4D500B54.6030707@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> Message-ID: <1299590828-13787-3-git-send-email-ss@comp.lancs.ac.uk> From: Steven Simpson --- xorp/libxipc/finder_messenger.cc | 2 +- xorp/libxipc/xrl_cmd_map.cc | 2 +- xorp/libxipc/xrl_cmd_map.hh | 2 +- xorp/libxipc/xrl_router.cc | 2 +- xorp/libxipc/xrl_router.hh | 2 +- xorp/rtrmgr/task.cc | 8 +------- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/xorp/libxipc/finder_messenger.cc b/xorp/libxipc/finder_messenger.cc index 27253e4..463c175 100644 --- a/xorp/libxipc/finder_messenger.cc +++ b/xorp/libxipc/finder_messenger.cc @@ -110,7 +110,7 @@ FinderMessengerBase::dispatch_xrl_cb(const XrlCmdError &e, const XrlArgs *reply_args, uint32_t seqno) { - reply(seqno, e, reply_args); + reply(seqno, e, XrlCmdError::OKAY() == e ? reply_args : 0); } void diff --git a/xorp/libxipc/xrl_cmd_map.cc b/xorp/libxipc/xrl_cmd_map.cc index 0d25952..487f68e 100644 --- a/xorp/libxipc/xrl_cmd_map.cc +++ b/xorp/libxipc/xrl_cmd_map.cc @@ -42,7 +42,7 @@ XrlCmdMap::add_handler(const XrlCmdEntry& cmd) } bool -XrlCmdMap::add_handler(const string& cmd, XrlRecvCallback rcb) +XrlCmdMap::add_handler(const string& cmd, const XrlRecvCallback& rcb) { return add_handler(XrlCmdEntry(cmd, rcb)); } diff --git a/xorp/libxipc/xrl_cmd_map.hh b/xorp/libxipc/xrl_cmd_map.hh index b5336cf..177c066 100644 --- a/xorp/libxipc/xrl_cmd_map.hh +++ b/xorp/libxipc/xrl_cmd_map.hh @@ -71,7 +71,7 @@ public: const string& name() const { return _name; } - virtual bool add_handler(const string& cmd, XrlRecvCallback rcb); + virtual bool add_handler(const string& cmd, const XrlRecvCallback& rcb); virtual bool remove_handler (const string& name); diff --git a/xorp/libxipc/xrl_router.cc b/xorp/libxipc/xrl_router.cc index 4274bd4..b93a26f 100644 --- a/xorp/libxipc/xrl_router.cc +++ b/xorp/libxipc/xrl_router.cc @@ -372,7 +372,7 @@ XrlRouter::finalize() } bool -XrlRouter::add_handler(const string& cmd, XrlRecvCallback rcb) +XrlRouter::add_handler(const string& cmd, const XrlRecvCallback& rcb) { if (finalized()) { XLOG_ERROR("Attempting to add handler after XrlRouter finalized. Handler = \"%s\"", cmd.c_str()); diff --git a/xorp/libxipc/xrl_router.hh b/xorp/libxipc/xrl_router.hh index 700152a..5e17305 100644 --- a/xorp/libxipc/xrl_router.hh +++ b/xorp/libxipc/xrl_router.hh @@ -130,7 +130,7 @@ public: * @param rcb callback to be dispatched when XRL method is received for * invocation. */ - bool add_handler(const string& cmd, XrlRecvCallback rcb); + bool add_handler(const string& cmd, const XrlRecvCallback& rcb); /** * @return EventLoop used by XrlRouter instance. diff --git a/xorp/rtrmgr/task.cc b/xorp/rtrmgr/task.cc index 727282b..d904a31 100644 --- a/xorp/rtrmgr/task.cc +++ b/xorp/rtrmgr/task.cc @@ -1408,16 +1408,10 @@ TaskXrlItem::execute_done(const XrlError& err, XrlArgs* xrl_args) break; case NO_FINDER: - // The error was a fatal one for the target - we now - // consider the target to be fatally wounded. - XLOG_ERROR("NO_FINDER: %s", err.str().c_str()); - fatal = true; - break; - case SEND_FAILED: // The error was a fatal one for the target - we now // consider the target to be fatally wounded. - XLOG_ERROR("SEND_FAILED: %s", err.str().c_str()); + XLOG_ERROR("%s", err.str().c_str()); fatal = true; break; -- 1.7.0.4 From ss at comp.lancs.ac.uk Tue Mar 8 06:19:26 2011 From: ss at comp.lancs.ac.uk (Steven Simpson) Date: Tue, 08 Mar 2011 14:19:26 +0000 Subject: [Xorp-hackers] Using results from one XRL to respond to another In-Reply-To: <4D500B54.6030707@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> Message-ID: <4D763AEE.9060103@comp.lancs.ac.uk> On 07/02/11 15:10, Steven Simpson wrote: > 3. Redesign the code generator so that the Xrl*TargetBase class > contains methods to be provided by the implementation that receive > the in-args plus a call-back for the out-args. I've just sent 3 patches to the list regarding this redesign, to allow asynchronous method implementations. Please excuse any unconventional use of git, as I'm not used to it. I'll summarise the changes... Here's what's now generated in "finder_client_base.hh" for "common/0.1/get_target_name": virtual XrlCmdError common_0_1_get_target_name( // Output values, string& name) = 0; typedef XorpCallback2::RefPtr Common01GetTargetNameCB; virtual void async_common_0_1_get_target_name ( Common01GetTargetNameCB); The first declaration is unchanged from before. Even for an asynchronous implementation, this method will still have to be provided - but if it's not meant to be called, then it should probably be set up to assert(false) or something equivalent. The second declaration is new, and defines a callback type for passing the error and out-arguments. The third declaration is also new, and declares a function which the server should override as an asynchronous implementation. It's virtual, but not pure - here's the definition: void XrlFinderclientTargetBase::async_common_0_1_get_target_name( Common01GetTargetNameCB c_b) { /* Return value declarations */ string rarg_name; XrlCmdError e = common_0_1_get_target_name( rarg_name); c_b->dispatch(e, rarg_name); } So it just makes the asynchronous call into a synchronous one by making a call to the synchronous implementation and immediately calling the supplied callback. This way, existing methods can still be implemented synchronously; however, by overriding this function, you can provide a fully asynchronous implementation - no need to call c_b straight-away. All the changes stem from ones in "xorp/libxipc/xrl_cmd_map.hh", which now defines a callback type: typedef XorpCallback2::RefPtr XrlRespCallback; This change propagates throughout the code, basically changing any function which takes XrlArgs*out and returns XrlCmdError into one that returns void and takes an XrlRespCallback. In order to reach a compilable state from these changes, the asynchronous mode is used in anger in FinderClientXrlTarget in xorp/libxipc/finder_client_xrl_target.(cc|hh). The method "finder_client/0.2/dispatch_tunneled_xrl" was previously implemented synchronously with: XrlCmdError FinderClientXrlTarget::finder_client_0_2_dispatch_tunneled_xrl( const string& xrl, uint32_t& xrl_errno, string& xrl_errtxt ) { XrlCmdError e = _client->dispatch_tunneled_xrl(xrl); xrl_errno = e.error_code(); xrl_errtxt = e.note(); return XrlCmdError::OKAY(); } Now it is implemented with two functions: void FinderClientXrlTarget::async_finder_client_0_2_dispatch_tunneled_xrl (const string& xrl, FinderClient02DispatchTunneledXrlCB cb) { _client->dispatch_tunneled_xrl (xrl, callback(this, &FinderClientXrlTarget::dispatch_tunneled_xrl_cb, cb)); } void FinderClientXrlTarget::dispatch_tunneled_xrl_cb (const XrlCmdError &e, const XrlArgs *out, FinderClient02DispatchTunneledXrlCB cb) const { UNUSED(out); cb->dispatch(XrlCmdError::OKAY(), e.error_code(), e.note()); } Now for a couple of caveats. First, STCPRequestHandler::dispatch_request in xorp/libxipc/xrl_pf_stcp.cc packs out-arguments into some sort of buffering. There's a sequence number involved, so I'd be hopeful that that's the only information needed to ensure that the response gets back to the correct entity in the client - however, I haven't investigated any deeper. Second, FinderMessengerBase::dispatch_xrl in xorp/libxipc/finder_messenger.cc invokes FinderMessengerManager::messenger_(in)active_event in pairs. Initially, the steps were: 1. Mark the messenger as active. 2. Dispatch the call with the in-args, and wait for the out-args and error code. 3. Call 'reply' with the out-args/error code. 4. Mark the messenger as inactive. To make it asynchronous, I split the steps up into (1,2) for dispatch_xrl and (3,4) for its callback. However, this fails an assertion in finder_client.cc, possibly because you can no longer guarantee that each 'inactive' event will occur before the next 'active' event this way. The FinderMessengerManager that the Finder implements can only cope with one FinderMessenger at a time, which is why the guarantee is required. The finder seems to use these events to determine who is invoking it, so that a caller can not overwrite an XRL registration for some other caller's target. Instead, dispatch_xrl performs (1,2,4), while the callback just does (3). This restores the guarantee, but it means that the messenger is not necessarily considered active during the 'reply' call. It will be for synchronously implemented methods, as they cause the callback to occur before returning. I don't know if this change will have an impact on 'reply' for asynchronously implemented methods. Anyway, for testing, I'm not clear on what I should be doing. I just tried the following: configure set firewall rule4 4 source network 255.255.255.255/32 set firewall rule4 4 action drop commit On the synchronous version, I got this among the trace: Handling method for fea_firewall/0.1/commit_transaction failed: XrlCmdError 102 Command failed No firewall plugin to set the entries I dare say, there's more I'd need to do to make that do something proper, but I figured it was enough to compare against. From the async version after patch#1, I got the assertion failure in FinderClient::messenger_active_event. After patch#2, I managed to get the same trace as for the sync version, as it fixes the (in)active status of the messenger. I hope that this turns out to be useful (and working), and invite your comments. Cheers, Steven -- From greearb at candelatech.com Tue Mar 8 10:07:34 2011 From: greearb at candelatech.com (Ben Greear) Date: Tue, 08 Mar 2011 10:07:34 -0800 Subject: [Xorp-hackers] Using results from one XRL to respond to another In-Reply-To: <4D763AEE.9060103@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> <4D763AEE.9060103@comp.lancs.ac.uk> Message-ID: <4D767066.6030104@candelatech.com> On 03/08/2011 06:19 AM, Steven Simpson wrote: > On 07/02/11 15:10, Steven Simpson wrote: >> 3. Redesign the code generator so that the Xrl*TargetBase class >> contains methods to be provided by the implementation that receive >> the in-args plus a call-back for the out-args. > > I've just sent 3 patches to the list regarding this redesign, to allow > asynchronous method implementations. Please excuse any unconventional > use of git, as I'm not used to it. I'll summarise the changes... Thanks for the patches. The callback and XRL code is some tough stuff to deal with! I have some general comments before I review your patches in detail. First: It seems at least some of the 3rd patch is changing code from the first or second patch. This increases the amount of code review needed, so I'm hoping you can re-work this so that the third patch is merged into the previous patch(es). You are welcome to have more smaller patches, just don't have a later patch do changes to the previous ones if possible. Second: I *think* you are using '0' when you are passing a NULL pointer. Please use 'NULL' instead so it's obvious it's a pointer type and not an integer value. I know that they are in practice equivalent on any modern architecture... Third: Please compare the size of the stripped binaries before and after your changes. If your changes cause a significant increase in disk space usage, we may want to allow them to be #ifdef'd out: There are folks who are trying to use xorp with very small storage systems. You can check the SConstruct file for examples of how to compile out things (see 'disable_profile', etc). Fourth: Please add more verbose descriptions to the individual patches. And finally: I'd like a: Signed-off-by: [you] on each patch. This basically says you are contributing this patch to the project under the GPL and you have a right to do so. See: http://gerrit.googlecode.com/svn/documentation/2.0/user-signedoffby.html Use: git commit -s to have it automatically appended, and the git format-patch can also append it automatically I believe. Please repost your patches when you are satisfied with them, and/or resolve that the suggestions above are not needed for whatever reason. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Tue Mar 8 10:14:45 2011 From: greearb at candelatech.com (Ben Greear) Date: Tue, 08 Mar 2011 10:14:45 -0800 Subject: [Xorp-hackers] firewall is not work, for freebsd 7.3 , xorp 1.8-ct. In-Reply-To: <5ab4988.606.12e942694d7.Coremail.wxh585@126.com> References: <5ab4988.606.12e942694d7.Coremail.wxh585@126.com> Message-ID: <4D767215.2090202@candelatech.com> On 03/07/2011 10:27 PM, wxh585 at 126.com wrote: > this bug is cleared,xorp will become good. I don't personally have time or interest in hacking on firewalling code for BSD. I will review patches if someone else wants to fix it. I'm not sure the firewall code works on Linux either, but I might be able to fix that if it is broken. Please open a bug to track this problem: http://www.xorp.org/bugzilla/ Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From p.gonmu at gmail.com Wed Mar 9 03:14:18 2011 From: p.gonmu at gmail.com (Paula Gonzalez =?ISO-8859-1?Q?Mu=F1oz?=) Date: Wed, 09 Mar 2011 12:14:18 +0100 Subject: [Xorp-hackers] problem while running scons Message-ID: <1299669258.2216.18.camel@polilla> Hello, I'm trying to write a quite simple process (a Hello world), and when I run scons I receive the following error: /home/riva/xorp-1-8-CT/xorp/xrl/scripts/clnt-gen -Iobj/i686-pc-linux-gnu/xrl/interfaces/../.. --output-dir obj/i686-pc-linux-gnu/xrl/interfaces xrl/interfaces/holamundo.xif No interface definitions provided scons: *** [obj/i686-pc-linux-gnu/xrl/interfaces/holamundo_xif.cc] Error 1 scons: building terminated because of errors. I'm quite baffled since the xrl is a quite simple one and I have simply added the line adding the .xif at Sconscript. I've made sure that all the files are where they are supposed to be (/xorp/xrl/interfaces ), but I don't really see where the mistake could be. Regards, Paula From m.jakeman at lancs.ac.uk Wed Mar 9 03:23:10 2011 From: m.jakeman at lancs.ac.uk (Matthew Jakeman) Date: Wed, 09 Mar 2011 11:23:10 +0000 Subject: [Xorp-hackers] problem while running scons In-Reply-To: <1299669258.2216.18.camel@polilla> References: <1299669258.2216.18.camel@polilla> Message-ID: <1299669790.6378.9.camel@matt-desktop> Hi Paula, It might help if you either attached or pasted your xif file into the email. Cheers Matt On Wed, 2011-03-09 at 12:14 +0100, Paula Gonzalez Mu?oz wrote: > Hello, > > I'm trying to write a quite simple process (a Hello world), and when I > run scons I receive the following error: > > /home/riva/xorp-1-8-CT/xorp/xrl/scripts/clnt-gen > -Iobj/i686-pc-linux-gnu/xrl/interfaces/../.. --output-dir > obj/i686-pc-linux-gnu/xrl/interfaces xrl/interfaces/holamundo.xif > No interface definitions provided > scons: *** [obj/i686-pc-linux-gnu/xrl/interfaces/holamundo_xif.cc] Error > 1 > scons: building terminated because of errors. > > I'm quite baffled since the xrl is a quite simple one and I have simply > added the line adding the .xif at Sconscript. > I've made sure that all the files are where they are supposed to be > (/xorp/xrl/interfaces ), but I don't really see where the mistake could > be. > > Regards, > Paula > > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers From p.gonmu at gmail.com Wed Mar 9 03:54:08 2011 From: p.gonmu at gmail.com (Paula Gonzalez =?ISO-8859-1?Q?Mu=F1oz?=) Date: Wed, 09 Mar 2011 12:54:08 +0100 Subject: [Xorp-hackers] problem while running scons In-Reply-To: <1299669790.6378.9.camel@matt-desktop> References: <1299669258.2216.18.camel@polilla> <1299669790.6378.9.camel@matt-desktop> Message-ID: <1299671648.2216.19.camel@polilla> True, sorry. The xif file is this one: /* * Hola Mundo xif file */ interface holamundo/0.1 { /* * metodo sin argumentos */ hola_mundo } The comments in spanish are just notes to myself. Paula On Wed, 2011-03-09 at 11:23 +0000, Matthew Jakeman wrote: > Hi Paula, > > It might help if you either attached or pasted your xif file into the > email. > > Cheers > Matt > > On Wed, 2011-03-09 at 12:14 +0100, Paula Gonzalez Mu?oz wrote: > > Hello, > > > > I'm trying to write a quite simple process (a Hello world), and when I > > run scons I receive the following error: > > > > /home/riva/xorp-1-8-CT/xorp/xrl/scripts/clnt-gen > > -Iobj/i686-pc-linux-gnu/xrl/interfaces/../.. --output-dir > > obj/i686-pc-linux-gnu/xrl/interfaces xrl/interfaces/holamundo.xif > > No interface definitions provided > > scons: *** [obj/i686-pc-linux-gnu/xrl/interfaces/holamundo_xif.cc] Error > > 1 > > scons: building terminated because of errors. > > > > I'm quite baffled since the xrl is a quite simple one and I have simply > > added the line adding the .xif at Sconscript. > > I've made sure that all the files are where they are supposed to be > > (/xorp/xrl/interfaces ), but I don't really see where the mistake could > > be. > > > > Regards, > > Paula > > > > > > _______________________________________________ > > Xorp-hackers mailing list > > Xorp-hackers at icir.org > > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > > From m.jakeman at lancs.ac.uk Wed Mar 9 03:56:32 2011 From: m.jakeman at lancs.ac.uk (Matthew Jakeman) Date: Wed, 09 Mar 2011 11:56:32 +0000 Subject: [Xorp-hackers] problem while running scons In-Reply-To: <1299671648.2216.19.camel@polilla> References: <1299669258.2216.18.camel@polilla> <1299669790.6378.9.camel@matt-desktop> <1299671648.2216.19.camel@polilla> Message-ID: <1299671792.6378.10.camel@matt-desktop> You need a semi colon after hola_mundo inside the interface definition. That should hopefully sort the problem. On Wed, 2011-03-09 at 12:54 +0100, Paula Gonzalez Mu?oz wrote: > True, sorry. > > The xif file is this one: > > /* > * Hola Mundo xif file > */ > > interface holamundo/0.1 { > > /* > * metodo sin argumentos > */ > hola_mundo > } > > The comments in spanish are just notes to myself. > > Paula > > On Wed, 2011-03-09 at 11:23 +0000, Matthew Jakeman wrote: > > Hi Paula, > > > > It might help if you either attached or pasted your xif file into the > > email. > > > > Cheers > > Matt > > > > On Wed, 2011-03-09 at 12:14 +0100, Paula Gonzalez Mu?oz wrote: > > > Hello, > > > > > > I'm trying to write a quite simple process (a Hello world), and when I > > > run scons I receive the following error: > > > > > > /home/riva/xorp-1-8-CT/xorp/xrl/scripts/clnt-gen > > > -Iobj/i686-pc-linux-gnu/xrl/interfaces/../.. --output-dir > > > obj/i686-pc-linux-gnu/xrl/interfaces xrl/interfaces/holamundo.xif > > > No interface definitions provided > > > scons: *** [obj/i686-pc-linux-gnu/xrl/interfaces/holamundo_xif.cc] Error > > > 1 > > > scons: building terminated because of errors. > > > > > > I'm quite baffled since the xrl is a quite simple one and I have simply > > > added the line adding the .xif at Sconscript. > > > I've made sure that all the files are where they are supposed to be > > > (/xorp/xrl/interfaces ), but I don't really see where the mistake could > > > be. > > > > > > Regards, > > > Paula > > > > > > > > > _______________________________________________ > > > Xorp-hackers mailing list > > > Xorp-hackers at icir.org > > > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > > > > > > From p.gonmu at gmail.com Wed Mar 9 04:18:16 2011 From: p.gonmu at gmail.com (Paula Gonzalez =?ISO-8859-1?Q?Mu=F1oz?=) Date: Wed, 09 Mar 2011 13:18:16 +0100 Subject: [Xorp-hackers] problem while running scons In-Reply-To: <1299671792.6378.10.camel@matt-desktop> References: <1299669258.2216.18.camel@polilla> <1299669790.6378.9.camel@matt-desktop> <1299671648.2216.19.camel@polilla> <1299671792.6378.10.camel@matt-desktop> Message-ID: <1299673096.2216.35.camel@polilla> Yes, it was that. I was going crazy trying to find that detail. Thanks On Wed, 2011-03-09 at 11:56 +0000, Matthew Jakeman wrote: > You need a semi colon after hola_mundo inside the interface definition. > > That should hopefully sort the problem. > > On Wed, 2011-03-09 at 12:54 +0100, Paula Gonzalez Mu?oz wrote: > > True, sorry. > > > > The xif file is this one: > > > > /* > > * Hola Mundo xif file > > */ > > > > interface holamundo/0.1 { > > > > /* > > * metodo sin argumentos > > */ > > hola_mundo > > } > > > > The comments in spanish are just notes to myself. > > > > Paula > > > > On Wed, 2011-03-09 at 11:23 +0000, Matthew Jakeman wrote: > > > Hi Paula, > > > > > > It might help if you either attached or pasted your xif file into the > > > email. > > > > > > Cheers > > > Matt > > > > > > On Wed, 2011-03-09 at 12:14 +0100, Paula Gonzalez Mu?oz wrote: > > > > Hello, > > > > > > > > I'm trying to write a quite simple process (a Hello world), and when I > > > > run scons I receive the following error: > > > > > > > > /home/riva/xorp-1-8-CT/xorp/xrl/scripts/clnt-gen > > > > -Iobj/i686-pc-linux-gnu/xrl/interfaces/../.. --output-dir > > > > obj/i686-pc-linux-gnu/xrl/interfaces xrl/interfaces/holamundo.xif > > > > No interface definitions provided > > > > scons: *** [obj/i686-pc-linux-gnu/xrl/interfaces/holamundo_xif.cc] Error > > > > 1 > > > > scons: building terminated because of errors. > > > > > > > > I'm quite baffled since the xrl is a quite simple one and I have simply > > > > added the line adding the .xif at Sconscript. > > > > I've made sure that all the files are where they are supposed to be > > > > (/xorp/xrl/interfaces ), but I don't really see where the mistake could > > > > be. > > > > > > > > Regards, > > > > Paula > > > > > > > > > > > > _______________________________________________ > > > > Xorp-hackers mailing list > > > > Xorp-hackers at icir.org > > > > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > > > > > > > > > > > > From ss at comp.lancs.ac.uk Thu Mar 10 08:02:51 2011 From: ss at comp.lancs.ac.uk (Steven Simpson) Date: Thu, 10 Mar 2011 16:02:51 +0000 Subject: [Xorp-hackers] Using results from one XRL to respond to another In-Reply-To: <4D767066.6030104@candelatech.com> References: <4D500B54.6030707@comp.lancs.ac.uk> <4D763AEE.9060103@comp.lancs.ac.uk> <4D767066.6030104@candelatech.com> Message-ID: <4D78F62B.8010707@comp.lancs.ac.uk> Hi Ben, On 08/03/11 18:07, Ben Greear wrote: > First: It seems at least some of the 3rd patch is changing code from the > first or second patch. This increases the amount of code review needed, > so I'm hoping you can re-work this so that the third patch is merged > into the previous patch(es). You are welcome to have more smaller > patches, > just don't have a later patch do changes to the previous ones if > possible. I just sent the output of 'git format-patch'; thought it might have generated just one patch, but it didn't and I couldn't find an option to collapse them. I'd rather have sent just one anyway - they're not functional individually, just compilable. I now seem to have managed to produce a single patch with all changes, though that may be redundant in light of the potential #ifdef requirement... > Second: I *think* you are using '0' when you are passing a NULL pointer. > Please use 'NULL' instead so it's obvious it's a pointer type and not an > integer value. I know that they are in practice equivalent on any modern > architecture... Hmm, I suspect I saw 0 being used somewhere already (in FinderMessengerBase::dispatch_xrl?), and assumed it was the local convention. I will use NULL, however, as you request. > Third: Please compare the size of the stripped binaries before and after > your changes. If your changes cause a significant increase in disk space > usage, we may want to allow them to be #ifdef'd out: There are folks who > are trying to use xorp with very small storage systems. You can check > the SConstruct file for examples of how to compile out things (see > 'disable_profile', etc). I think I counted about 2MB increase stripped and using disable_warninglogs=True disable_tracelogs=True disable_fatallogs=True disable_infologs=True disable_assertlogs=True disable_errorlogs=True disable_otherlogs=True disable_profile=True, and 7MB unstripped. I expect it's all the inlined template instantiations for callbacks...? It sounds like a lot, so I'm having a go at an #ifdef'd version. XORP_ENABLE_ASYNC_SERVER is the macro name, and enable_async_server is the scons argument. Let me know if you prefer other names. Btw, disable_profile=True also raised an error in olsr4.tgt, so I had to temporarily remove profile/0.1 to get beyond it. > Fourth: Please add more verbose descriptions to the individual patches. Will do. > And finally: I'd like a: > > Signed-off-by: [you] Oh, so that's what that's for! No problem. Cheers, Steven -- From greearb at candelatech.com Thu Mar 10 08:11:53 2011 From: greearb at candelatech.com (Ben Greear) Date: Thu, 10 Mar 2011 08:11:53 -0800 Subject: [Xorp-hackers] Using results from one XRL to respond to another In-Reply-To: <4D78F62B.8010707@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> <4D763AEE.9060103@comp.lancs.ac.uk> <4D767066.6030104@candelatech.com> <4D78F62B.8010707@comp.lancs.ac.uk> Message-ID: <4D78F849.5070200@candelatech.com> On 03/10/2011 08:02 AM, Steven Simpson wrote: > Hi Ben, > > On 08/03/11 18:07, Ben Greear wrote: >> First: It seems at least some of the 3rd patch is changing code from the >> first or second patch. This increases the amount of code review needed, >> so I'm hoping you can re-work this so that the third patch is merged >> into the previous patch(es). You are welcome to have more smaller >> patches, >> just don't have a later patch do changes to the previous ones if >> possible. > > I just sent the output of 'git format-patch'; thought it might have > generated just one patch, but it didn't and I couldn't find an option to > collapse them. I'd rather have sent just one anyway - they're not > functional individually, just compilable. I now seem to have managed to > produce a single patch with all changes, though that may be redundant in > light of the potential #ifdef requirement... 'stg' can help edit existing patch series. To combine, I often save the individual patches with format-patch, reset the tree to before the patches were applied, and manually apply them with patch -p1 < ... and then git commit the resulting thing. One suggestion: Be sure to save the patches clear of the tree before you go start messing with git reset, though normally you can recover from pretty much anything you do in git... > >> Second: I *think* you are using '0' when you are passing a NULL pointer. >> Please use 'NULL' instead so it's obvious it's a pointer type and not an >> integer value. I know that they are in practice equivalent on any modern >> architecture... > > Hmm, I suspect I saw 0 being used somewhere already (in > FinderMessengerBase::dispatch_xrl?), and assumed it was the local > convention. I will use NULL, however, as you request. There may be places using 0, but I vastly prefer NULL for pointers, and would be happy to accept any patches that removed usage of '0' for pointers. > >> Third: Please compare the size of the stripped binaries before and after >> your changes. If your changes cause a significant increase in disk space >> usage, we may want to allow them to be #ifdef'd out: There are folks who >> are trying to use xorp with very small storage systems. You can check >> the SConstruct file for examples of how to compile out things (see >> 'disable_profile', etc). > > I think I counted about 2MB increase stripped and using > disable_warninglogs=True disable_tracelogs=True disable_fatallogs=True > disable_infologs=True disable_assertlogs=True disable_errorlogs=True > disable_otherlogs=True disable_profile=True, and 7MB unstripped. I > expect it's all the inlined template instantiations for callbacks...? > > It sounds like a lot, so I'm having a go at an #ifdef'd version. > XORP_ENABLE_ASYNC_SERVER is the macro name, and enable_async_server is > the scons argument. Let me know if you prefer other names. Those are fine with me. > > Btw, disable_profile=True also raised an error in olsr4.tgt, so I had to > temporarily remove profile/0.1 to get beyond it. Probably best to disable OLSR instead. I don't think anyone actually uses it, so I didn't bother to fix the disable_profile problems in it. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Thu Mar 10 15:12:53 2011 From: greearb at candelatech.com (Ben Greear) Date: Thu, 10 Mar 2011 15:12:53 -0800 Subject: [Xorp-hackers] Patch to fix xrl pipe permissions. Message-ID: <4D795AF5.20206@candelatech.com> This is based on a patch by Joe Coco, but I hacked it quite a bit. It attempts to change the xrl pipe group to be 'xorp', and make the file permissions: owner r/w, group r/w, other read-only. I removed his part of the patch that changed the owner..I'm not sure it solved anything. Permissions with this patch: [root at lec2010-ath9k-1 ~]# /usr/local/xorp/sbin/xorpsh [ 2011/03/10 15:06:47.958476 WARNING xorpsh LIBXORP ] read error: _fd: 25 offset: 0 total-len: 4 error: Connection refused ^C [root at lec2010-ath9k-1 ~]# ls -ltr /var/tmp/ total 0 srw-rw-r-- 1 root xorp 0 Mar 10 15:06 xrl.aAVNEc srw-rw-r-- 1 root xorp 0 Mar 10 15:06 xrl.kqGP4a Let me know if you see any problems with this. Patch: diff --git a/xorp/libxipc/xrl_pf_unix.cc b/xorp/libxipc/xrl_pf_unix.cc index 9acd2b9..b24a789 100644 --- a/xorp/libxipc/xrl_pf_unix.cc +++ b/xorp/libxipc/xrl_pf_unix.cc @@ -26,6 +26,9 @@ #ifndef HOST_OS_WINDOWS +#include +#include + const char* XrlPFUNIXListener::_protocol = "unix"; @@ -44,11 +47,22 @@ XrlPFUNIXListener::XrlPFUNIXListener(EventLoop& e, XrlDispatcher* xr) xorp_throw(XrlPFConstructorError, comm_get_last_error_str()); } - // Make sure socket is read/write by group and owner. - if (chmod(path.c_str(), S_ISUID | S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH - cerr << "ERROR: Failed chgrp on path: " << path << " error: " - << strerror(errno) << endl; - // Carry on, might turn out OK! + struct group *grp = getgrnam("xorp"); + if (grp) { + /* Change the group to be 'xorp', leave owner as is. */ + if (chown(path.c_str(), -1, grp->gr_gid)) { + cerr << "ERROR: Failed chown on path: " << path << " error: " << strerror(errno) << endl; + } + } + else { + // Something is wrong, probably no xorp user. This is not necessarily + // a real problem, so don't want to fill up logs. Might be worth + // doing a similar check in xorp_rtrmgr startup and warn once there... + } + + /* Owner read/write, group read/write, other read -JC */ + if (chmod(path.c_str(), S_IWUSR| S_IRUSR| S_IWGRP| S_IRGRP| S_IROTH)) { + cerr << "ERROR: Failed chmod on path: " << path << " error: " << strerror(errno) << endl; } _address_slash_port = path; -- Ben Greear Candela Technologies Inc http://www.candelatech.com From ss at comp.lancs.ac.uk Fri Mar 11 05:36:28 2011 From: ss at comp.lancs.ac.uk (ss at comp.lancs.ac.uk) Date: Fri, 11 Mar 2011 13:36:28 +0000 Subject: [Xorp-hackers] [PATCH] Supporting asynchronous method implementations In-Reply-To: <4D500B54.6030707@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> Message-ID: <1299850588-12653-1-git-send-email-ss@comp.lancs.ac.uk> From: Steven Simpson * Command map and dispatcher declare types for callbacks to pass error code and out-arguments. * Handlers in generated targets meet these callback signatures. * Various dispatch methods changed so that out-arguments and error codes are removed from the signature, and the appropriate callback type is added, all to track changes to command map and dispatcher. * Generated targets include default asynchronous implementations which call synchronous (pure virtual) methods. * One finder method FinderClient::dispatch_tunneled_xrl is implemented asynchronously. * FinderClient made a friend of XrlCmdError so it can use the private constructor. * All changes compiled in only if XORP_ENABLE_ASYNC_SERVER is defined, as set by enable_async_server=True on scons. Signed-off-by: Steven Simpson --- xorp/SConstruct | 13 ++ xorp/libxipc/finder_client.cc | 28 ++++- xorp/libxipc/finder_client.hh | 13 ++- xorp/libxipc/finder_client_xrl_target.cc | 31 +++++ xorp/libxipc/finder_client_xrl_target.hh | 13 ++ xorp/libxipc/finder_messenger.cc | 15 +++ xorp/libxipc/finder_messenger.hh | 7 + xorp/libxipc/xrl_cmd_map.hh | 34 ++++++- xorp/libxipc/xrl_dispatcher.cc | 34 +++++- xorp/libxipc/xrl_dispatcher.hh | 40 ++++++- xorp/libxipc/xrl_error.hh | 7 + xorp/libxipc/xrl_pf_stcp.cc | 42 ++++++-- xorp/libxipc/xrl_router.cc | 9 +- xorp/libxipc/xrl_router.hh | 6 +- xorp/xrl/scripts/tgt-gen | 179 +++++++++++++++++++++++++++--- 15 files changed, 420 insertions(+), 51 deletions(-) diff --git a/xorp/SConstruct b/xorp/SConstruct index 56d36da..6ea1c3a 100644 --- a/xorp/SConstruct +++ b/xorp/SConstruct @@ -92,6 +92,7 @@ vars.AddVariables( BoolVariable('enable_tests', 'Build Test Programs', False), BoolVariable('enable_click', 'Build CLICK support', False), BoolVariable('enable_fea_dummy', 'Build fea-dummy target', True), + BoolVariable('enable_async_server', 'Permit asynchronous method implementations', False), BoolVariable('debug_xrldb', 'Build with runtime XRL syntax validation in Router Manager', False), EnumVariable('debug', 'Build with debug symbols', 'full', allowed_values=('no', 'yes', 'full', 'override'), @@ -267,6 +268,7 @@ print 'Enable xorpsh ', env['enable_xorpsh'] print 'Enable Test Programs: ', env['enable_tests'] print 'Enable CLICK: ', env['enable_click'] print 'Enable FEA Dummy: ', env['enable_fea_dummy'] +print 'Enable async method impls: ', env['enable_async_server'] print 'Enable BGP: ', env['enable_bgp'] print 'Try Enable BOOST: ', env['enable_boost'] print 'Try Enable uSTL : ', env['enable_ustl'] @@ -412,6 +414,13 @@ else: env['enable_fea_dummy'] = True # Default to enabled +tst = ARGUMENTS.get('enable_async_server', False) +if tst and (tst == "no"): + env['enable_async_server'] = False +else: + env['enable_async_server'] = True + +# Default to enabled tst = ARGUMENTS.get('enable_bgp', True) if tst and (tst == "no"): env['enable_bgp'] = False @@ -635,6 +644,10 @@ if not env.GetOption('clean') and \ if tst and not (tst == "no"): conf.Define('XORP_USE_FEA_DUMMY') + tst = ARGUMENTS.get('enable_async_server', False) + if tst and not (tst == "no"): + conf.Define('XORP_ENABLE_ASYNC_SERVER') + if env['enable_xorpsh']: conf.Define('XORP_USE_XORPSH') diff --git a/xorp/libxipc/finder_client.cc b/xorp/libxipc/finder_client.cc index 2fe7876..b39c622 100644 --- a/xorp/libxipc/finder_client.cc +++ b/xorp/libxipc/finder_client.cc @@ -961,8 +961,18 @@ FinderClient::uncache_xrls_from_target(const string& target) XORP_UINT_CAST(n), target.c_str()); } -XrlCmdError -FinderClient::dispatch_tunneled_xrl(const string& xrl_str) +#ifdef XORP_ENABLE_ASYNC_SERVER +void +FinderClient::dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs *a, + XrlRespCallback cb) const +{ + cb->dispatch(XrlCmdError(e), a); +} +#endif + +XrlCmdRT +FinderClient::dispatch_tunneled_xrl(const string& xrl_str + XrlCmdOptCallback(cb)) { finder_trace_init("dispatch_tunneled_xrl(\"%s\")", xrl_str.c_str()); Xrl xrl; @@ -971,16 +981,26 @@ FinderClient::dispatch_tunneled_xrl(const string& xrl_str) InstanceList::iterator i = find_instance(xrl.target()); if (i == _ids.end()) { finder_trace_result("target not found"); - return XrlCmdError::COMMAND_FAILED("target not found"); + XrlCmdReturnError(cb, + XrlCmdError::COMMAND_FAILED("target not found")); } XrlArgs ret_vals; +#ifdef XORP_ENABLE_ASYNC_SERVER + XrlDispatcherCallback mycb = + callback(this, &FinderClient::dispatch_tunneled_xrl_cb, cb); + i->dispatcher()->dispatch_xrl(xrl.command(), xrl.args(), mycb); + finder_trace_result("success"); + return; +#else i->dispatcher()->dispatch_xrl(xrl.command(), xrl.args(), ret_vals); finder_trace_result("success"); return XrlCmdError::OKAY(); +#endif } catch (InvalidString&) { - return XrlCmdError::COMMAND_FAILED("Bad Xrl string"); + XrlCmdReturnError(cb, + XrlCmdError::COMMAND_FAILED("Bad Xrl string")); } } diff --git a/xorp/libxipc/finder_client.hh b/xorp/libxipc/finder_client.hh index 21e1f11..6e2b363 100644 --- a/xorp/libxipc/finder_client.hh +++ b/xorp/libxipc/finder_client.hh @@ -32,6 +32,7 @@ #include "finder_messenger.hh" #include "xrl_pf.hh" +#include "xrl_cmd_map.hh" class FinderClientOp; class FinderClientObserver; @@ -76,7 +77,8 @@ public: virtual ~FinderClientXrlCommandInterface() {} virtual void uncache_xrl(const string& xrl) = 0; virtual void uncache_xrls_from_target(const string& target) = 0; - virtual XrlCmdError dispatch_tunneled_xrl(const string& xrl) = 0; + virtual XrlCmdRT dispatch_tunneled_xrl(const string& xrl + XrlCmdOptCallback(cb)) = 0; }; /** @@ -312,7 +314,14 @@ protected: // FinderClientXrlCommandInterface void uncache_xrl(const string& xrl); void uncache_xrls_from_target(const string& target); - XrlCmdError dispatch_tunneled_xrl(const string& xrl); + XrlCmdRT dispatch_tunneled_xrl(const string& xrl + XrlCmdOptCallback(cb)); +#ifdef XORP_ENABLE_ASYNC_SERVER +private: + void + dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs *a, + XrlRespCallback cb) const; +#endif protected: void crank(); diff --git a/xorp/libxipc/finder_client_xrl_target.cc b/xorp/libxipc/finder_client_xrl_target.cc index ce1ca05..eb9e01d 100644 --- a/xorp/libxipc/finder_client_xrl_target.cc +++ b/xorp/libxipc/finder_client_xrl_target.cc @@ -85,6 +85,30 @@ FinderClientXrlTarget::finder_client_0_2_remove_xrls_for_target_from_cache( return XrlCmdError::OKAY(); } +#ifdef XORP_ENABLE_ASYNC_SERVER +void +FinderClientXrlTarget::async_finder_client_0_2_dispatch_tunneled_xrl +(const string& xrl, + FinderClient02DispatchTunneledXrlCB cb) +{ + _client->dispatch_tunneled_xrl + (xrl, + callback(this, + &FinderClientXrlTarget::dispatch_tunneled_xrl_cb, + cb)); +} + +void +FinderClientXrlTarget::dispatch_tunneled_xrl_cb +(const XrlCmdError &e, + const XrlArgs *out, + FinderClient02DispatchTunneledXrlCB cb) const +{ + UNUSED(out); + cb->dispatch(XrlCmdError::OKAY(), e.error_code(), e.note()); +} +#endif + XrlCmdError FinderClientXrlTarget::finder_client_0_2_dispatch_tunneled_xrl( const string& xrl, @@ -92,8 +116,15 @@ FinderClientXrlTarget::finder_client_0_2_dispatch_tunneled_xrl( string& xrl_errtxt ) { +#ifdef XORP_ENABLE_ASYNC_SERVER + UNUSED(xrl); + UNUSED(xrl_errno); + UNUSED(xrl_errtxt); + return XrlCmdError::COMMAND_FAILED("Unreachable"); +#else XrlCmdError e = _client->dispatch_tunneled_xrl(xrl); xrl_errno = e.error_code(); xrl_errtxt = e.note(); return XrlCmdError::OKAY(); +#endif } diff --git a/xorp/libxipc/finder_client_xrl_target.hh b/xorp/libxipc/finder_client_xrl_target.hh index 59cc2b0..be6c664 100644 --- a/xorp/libxipc/finder_client_xrl_target.hh +++ b/xorp/libxipc/finder_client_xrl_target.hh @@ -46,12 +46,25 @@ public: XrlCmdError finder_client_0_2_remove_xrls_for_target_from_cache( const string& target); +#ifdef XORP_ENABLE_ASYNC_SERVER + void async_finder_client_0_2_dispatch_tunneled_xrl + (const string& xrl, + FinderClient02DispatchTunneledXrlCB); +#endif XrlCmdError finder_client_0_2_dispatch_tunneled_xrl(const string& xrl, uint32_t& xrl_errno, string& xrl_errtxt); protected: FinderClientXrlCommandInterface* _client; + +#ifdef XORP_ENABLE_ASYNC_SERVER +private: + void dispatch_tunneled_xrl_cb + (const XrlCmdError &e, + const XrlArgs *out, + FinderClient02DispatchTunneledXrlCB cb) const; +#endif }; #endif // __LIBXIPC_FINDER_CLIENT_XRL_TARGET_HH__ diff --git a/xorp/libxipc/finder_messenger.cc b/xorp/libxipc/finder_messenger.cc index 5e71386..a6aef38 100644 --- a/xorp/libxipc/finder_messenger.cc +++ b/xorp/libxipc/finder_messenger.cc @@ -97,6 +97,10 @@ FinderMessengerBase::dispatch_xrl(uint32_t seqno, const Xrl& xrl) if (manager()) manager()->messenger_active_event(this); +#ifdef XORP_ENABLE_ASYNC_SERVER + ce->dispatch(xrl.args(), + callback(this, &FinderMessengerBase::dispatch_xrl_cb, seqno)); +#else XrlArgs reply_args; XrlError e = ce->dispatch(xrl.args(), &reply_args); if (XrlCmdError::OKAY() == e) { @@ -104,12 +108,23 @@ FinderMessengerBase::dispatch_xrl(uint32_t seqno, const Xrl& xrl) } else { reply(seqno, e, 0); } +#endif // Announce we've dispatched xrl if (manager()) manager()->messenger_inactive_event(this); } +#ifdef XORP_ENABLE_ASYNC_SERVER +void +FinderMessengerBase::dispatch_xrl_cb(const XrlCmdError &e, + const XrlArgs *reply_args, + uint32_t seqno) +{ + reply(seqno, e, XrlCmdError::OKAY() == e ? reply_args : NULL); +} +#endif + void FinderMessengerBase::unhook_manager() { diff --git a/xorp/libxipc/finder_messenger.hh b/xorp/libxipc/finder_messenger.hh index d80405d..d1d4c71 100644 --- a/xorp/libxipc/finder_messenger.hh +++ b/xorp/libxipc/finder_messenger.hh @@ -123,6 +123,13 @@ protected: void response_timeout(uint32_t seqno); private: +#ifdef XORP_ENABLE_ASYNC_SERVER + void + dispatch_xrl_cb(const XrlCmdError &e, + const XrlArgs *reply_args, + uint32_t seqno); +#endif + class ResponseState { public: ResponseState(uint32_t seqno, diff --git a/xorp/libxipc/xrl_cmd_map.hh b/xorp/libxipc/xrl_cmd_map.hh index 45c6bd6..e6fe00b 100644 --- a/xorp/libxipc/xrl_cmd_map.hh +++ b/xorp/libxipc/xrl_cmd_map.hh @@ -32,9 +32,41 @@ #include "xrl.hh" #include "xrl_error.hh" +#ifdef XORP_ENABLE_ASYNC_SERVER +typedef void XrlCmdRT; + +#define XrlCmdReturnError(OUT, ERR) \ + do { \ + (OUT)->dispatch((ERR), NULL); \ + return; \ + } while (0) + +typedef +XorpCallback2::RefPtr +XrlRespCallback; + +typedef XrlRespCallback XrlCmdOT; + +#define XrlCmdOptCallback(V) , const XrlRespCallback& V + +typedef +XorpCallback2::RefPtr XrlRecvCallback; + +#else + +typedef const XrlCmdError XrlCmdRT; + +#define XrlCmdReturnError(OUT, ERR) return (ERR) + +typedef XrlArgs* XrlCmdOT; + +#define XrlCmdOptCallback(V) + typedef XorpCallback2::RefPtr XrlRecvCallback; +#endif + class XrlCmdEntry { public: XrlCmdEntry(const string& s, XrlRecvCallback cb) : @@ -45,7 +77,7 @@ public: const string& name() const { return _name; } - const XrlCmdError dispatch(const XrlArgs& inputs, XrlArgs* outputs) const { + XrlCmdRT dispatch(const XrlArgs& inputs, XrlCmdOT outputs) const { return _cb->dispatch(inputs, outputs); } diff --git a/xorp/libxipc/xrl_dispatcher.cc b/xorp/libxipc/xrl_dispatcher.cc index ead5e09..493804a 100644 --- a/xorp/libxipc/xrl_dispatcher.cc +++ b/xorp/libxipc/xrl_dispatcher.cc @@ -51,20 +51,25 @@ do { \ // ---------------------------------------------------------------------------- // XrlDispatcher methods -XrlError +XrlDispatcherRT XrlDispatcher::dispatch_xrl(const string& method_name, const XrlArgs& inputs, - XrlArgs& outputs) const + XrlDispatcherOT outputs) const { const XrlCmdEntry* c = get_handler(method_name.c_str()); if (c == 0) { trace_xrl_dispatch("dispatch_xrl (invalid) ", method_name); debug_msg("No handler for %s\n", method_name.c_str()); - return XrlError::NO_SUCH_METHOD(); + XrlDispatcherReturnError(outputs, XrlError::NO_SUCH_METHOD()); } trace_xrl_dispatch("dispatch_xrl (valid) ", method_name); - return c->dispatch(inputs, &outputs); +#ifdef XORP_ENABLE_ASYNC_SERVER + XrlCmdOT resp = callback(this, &XrlDispatcher::dispatch_cb, outputs); +#else + XrlCmdOT resp = &outputs; +#endif + return c->dispatch(inputs, resp); } XrlDispatcher::XI* @@ -77,8 +82,23 @@ XrlDispatcher::lookup_xrl(const string& name) const return new XI(c); } -XrlError -XrlDispatcher::dispatch_xrl_fast(const XI& xi, XrlArgs& outputs) const +XrlDispatcherRT +XrlDispatcher::dispatch_xrl_fast(const XI& xi, XrlDispatcherOT outputs) const { - return xi._cmd->dispatch(xi._xrl.args(), &outputs); +#ifdef XORP_ENABLE_ASYNC_SERVER + XrlCmdOT resp = callback(this, &XrlDispatcher::dispatch_cb, outputs); +#else + XrlCmdOT resp = &outputs; +#endif + return xi._cmd->dispatch(xi._xrl.args(), resp); } + +#ifdef XORP_ENABLE_ASYNC_SERVER +void +XrlDispatcher::dispatch_cb(const XrlCmdError &err, + const XrlArgs *outputs, + XrlDispatcherCallback resp) const +{ + resp->dispatch(err, outputs); +} +#endif diff --git a/xorp/libxipc/xrl_dispatcher.hh b/xorp/libxipc/xrl_dispatcher.hh index 6dadb8b..2a2843f 100644 --- a/xorp/libxipc/xrl_dispatcher.hh +++ b/xorp/libxipc/xrl_dispatcher.hh @@ -25,6 +25,31 @@ #include "xrl_cmd_map.hh" +#ifdef XORP_ENABLE_ASYNC_SERVER + +#define XrlDispatcherReturnError(OUT, ERR) \ + do { \ + (OUT)->dispatch((ERR), NULL); \ + return; \ + } while (0) + +typedef void XrlDispatcherRT; + +typedef +XorpCallback2::RefPtr +XrlDispatcherCallback; + +typedef XrlDispatcherCallback XrlDispatcherOT; + +#else + +#define XrlDispatcherReturnError(OUT, ERR) return (ERR) + +typedef XrlError XrlDispatcherRT; +typedef XrlArgs& XrlDispatcherOT; + +#endif + class XrlDispatcher : public XrlCmdMap { public: struct XI { @@ -41,10 +66,17 @@ public: virtual ~XrlDispatcher() {} virtual XI* lookup_xrl(const string& name) const; - virtual XrlError dispatch_xrl(const string& method_name, - const XrlArgs& in, - XrlArgs& out) const; - XrlError dispatch_xrl_fast(const XI& xi, XrlArgs& out) const; + virtual XrlDispatcherRT dispatch_xrl(const string& method_name, + const XrlArgs& in, + XrlDispatcherOT out) const; + XrlDispatcherRT dispatch_xrl_fast(const XI& xi, + XrlDispatcherOT out) const; + +#ifdef XORP_ENABLE_ASYNC_SERVER +private: + void dispatch_cb(const XrlCmdError &, const XrlArgs *, + XrlDispatcherCallback resp) const; +#endif }; #endif // __LIBXIPC_XRL_DISPATCHER_HH__ diff --git a/xorp/libxipc/xrl_error.hh b/xorp/libxipc/xrl_error.hh index 7ae7eed..127e519 100644 --- a/xorp/libxipc/xrl_error.hh +++ b/xorp/libxipc/xrl_error.hh @@ -163,6 +163,9 @@ protected: string _note; }; +#ifdef XORP_ENABLE_ASYNC_SERVER +class FinderClient; +#endif /** * Error codes for user callbacks. @@ -221,6 +224,10 @@ private: XrlCmdError(const XrlError& xe) : _xrl_error(xe) {} XrlError _xrl_error; static XrlCmdError _xce_ok; + +#ifdef XORP_ENABLE_ASYNC_SERVER + friend class FinderClient; +#endif }; diff --git a/xorp/libxipc/xrl_pf_stcp.cc b/xorp/libxipc/xrl_pf_stcp.cc index e441809..514f2fb 100644 --- a/xorp/libxipc/xrl_pf_stcp.cc +++ b/xorp/libxipc/xrl_pf_stcp.cc @@ -130,6 +130,11 @@ public: void dispatch_request(uint32_t seqno, bool batch, const uint8_t* buffer, size_t bytes); + void transmit_response(const XrlError &e, + const XrlArgs *pResponse, + uint32_t seqno, + bool batch); + void ack_helo(uint32_t seqno); void read_event(BufferedAsyncReader* reader, @@ -151,8 +156,9 @@ public: string toString() const; private: - XrlError do_dispatch(const uint8_t* packed_xrl, size_t packed_xrl_bytes, - XrlArgs& response); + XrlDispatcherRT do_dispatch(const uint8_t* packed_xrl, + size_t packed_xrl_bytes, + XrlDispatcherOT response); XrlPFSTCPListener& _parent; XorpFd _sock; @@ -251,10 +257,10 @@ STCPRequestHandler::read_event(BufferedAsyncReader* /* source */, _reader.set_trigger_bytes(STCPPacketHeader::header_size()); } -XrlError +XrlDispatcherRT STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, size_t packed_xrl_bytes, - XrlArgs& response) + XrlDispatcherOT response) { static XrlError e(XrlError::INTERNAL_ERROR().error_code(), "corrupt xrl"); @@ -264,18 +270,18 @@ STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, string command; size_t cmdsz = Xrl::unpack_command(command, packed_xrl, packed_xrl_bytes); if (!cmdsz) - return e; + XrlDispatcherReturnError(response, e); XrlDispatcher::XI* xi = d->lookup_xrl(command); if (!xi) - return e; + XrlDispatcherReturnError(response, e); Xrl& xrl = xi->_xrl; try { if (xi->_new) { if (xrl.unpack(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) - return e; + XrlDispatcherReturnError(response, e); xi->_new = false; } else { @@ -283,10 +289,10 @@ STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, packed_xrl_bytes -= cmdsz; if (xrl.fill(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) - return e; + XrlDispatcherReturnError(response, e); } } catch (...) { - return e; + XrlDispatcherReturnError(response, e); } return d->dispatch_xrl_fast(*xi, response); @@ -298,10 +304,28 @@ STCPRequestHandler::dispatch_request(uint32_t seqno, const uint8_t* packed_xrl, size_t packed_xrl_bytes) { +#ifdef XORP_ENABLE_ASYNC_SERVER + do_dispatch(packed_xrl, packed_xrl_bytes, + callback(this, &STCPRequestHandler::transmit_response, + seqno, batch)); +#else XrlArgs response; XrlError e; e = do_dispatch(packed_xrl, packed_xrl_bytes, response); + transmit_response(e, &response, seqno, batch); +#endif +} + + +void STCPRequestHandler::transmit_response(const XrlError &e, + const XrlArgs *pResponse, + uint32_t seqno, + bool batch) +{ + // Ensure we have a real arguments object to play with. + XrlArgs dummy; + const XrlArgs &response = pResponse ? *pResponse : dummy; size_t xrl_response_bytes = response.packed_bytes(); size_t note_bytes = e.note().size(); diff --git a/xorp/libxipc/xrl_router.cc b/xorp/libxipc/xrl_router.cc index e547cbf..f97b41a 100644 --- a/xorp/libxipc/xrl_router.cc +++ b/xorp/libxipc/xrl_router.cc @@ -650,17 +650,18 @@ XrlRouter::send(const Xrl& xrl, const XrlCallback& user_cb) return true; } -XrlError +XrlDispatcherRT XrlRouter::dispatch_xrl(const string& method_name, const XrlArgs& inputs, - XrlArgs& outputs) const + XrlDispatcherOT outputs) const { string resolved_method; if (_fc->query_self(method_name, resolved_method) == true) { - return XrlDispatcher::dispatch_xrl(resolved_method, inputs, outputs); + return + XrlDispatcher::dispatch_xrl(resolved_method, inputs, outputs); } debug_msg("Could not find mapping for %s\n", method_name.c_str()); - return XrlError::NO_SUCH_METHOD(); + XrlDispatcherReturnError(outputs, XrlError::NO_SUCH_METHOD()); } XrlDispatcher::XI* diff --git a/xorp/libxipc/xrl_router.hh b/xorp/libxipc/xrl_router.hh index 9478f44..b16546b 100644 --- a/xorp/libxipc/xrl_router.hh +++ b/xorp/libxipc/xrl_router.hh @@ -176,9 +176,9 @@ protected: */ virtual void finder_ready_event(const string& tgt_name); - XrlError dispatch_xrl(const string& method_name, - const XrlArgs& inputs, - XrlArgs& outputs) const; + XrlDispatcherRT dispatch_xrl(const string& method_name, + const XrlArgs& inputs, + XrlDispatcherOT outputs) const; /** * Resolve callback (slow path). diff --git a/xorp/xrl/scripts/tgt-gen b/xorp/xrl/scripts/tgt-gen index 899cf13..a9c7f0f 100755 --- a/xorp/xrl/scripts/tgt-gen +++ b/xorp/xrl/scripts/tgt-gen @@ -9,7 +9,8 @@ import os, sys import Xif.util from Xif.util import \ - joining_csv, csv, cpp_name, cpp_classname, xorp_indent_string, xorp_indent + joining_csv, csv, cpp_name, caps_cpp_classname, \ + cpp_classname, xorp_indent_string, xorp_indent from Xif.xiftypes import \ XrlArg, XrlMethod, XrlInterface, XrlTarget @@ -69,7 +70,7 @@ def target_declare_handler_table(cls): s = """ struct handler_table { const char *name; - const XrlCmdError (%s::*method)(const XrlArgs&, XrlArgs*); + XrlCmdRT (%s::*method)(const XrlArgs&, XrlCmdOT); }; static const struct handler_table handlers[]; @@ -123,14 +124,47 @@ def target_virtual_fns(methods): args.append(cpa) r += csv(args) - r += ") = 0;\n\n" + r += ") = 0;\n" + + + + r += "#ifdef XORP_ENABLE_ASYNC_SERVER\n" + r += " typedef\n" + r += " XorpCallback%sdispatch(e, NULL); + } else { +""" % m.name() + + s += xorp_indent(2) + "XrlArgs out;\n" + if m.rargs(): + s += "\n /* Marshall return values */\n try {\n" + for r in m.rargs(): + s += xorp_indent(3) + "out.add(\"%s\", rarg_%s);\n" % \ + (r.name(), cpp_name(r.name())) + s += \ +""" } catch (const XrlArgs::XrlAtomFound& ) { + XLOG_FATAL("Duplicate atom name"); /* XXX Should never happen */ + } + +""" + s += " return c_b->dispatch(e, &out);\n }\n}\n\n" + + + + + s += "\nvoid\n%s::async_%s(" \ + % (cls, cpp_name(m.name())) + + # input args + for a in m.args(): + s += "\n%sconst %s&\targ_%s," % \ + (xorp_indent(2), a.cpp_type(), cpp_name(a.name())) + + s += "\n%s%sCB c_b)\n{\n" % \ + (xorp_indent(2), caps_cpp_classname(m.name())) + + s += "\n /* Return value declarations */\n" + for r in m.rargs(): + s += " %s rarg_%s;\n" % (r.cpp_type(), cpp_name(r.name())) + + s += " XrlCmdError e = %s(" % cpp_name(m.name()) + sep = "" + for r in m.args(): + s += "%s\n arg_%s" % (sep, cpp_name(r.name())) + sep = "," + for r in m.rargs(): + s += "%s\n rarg_%s" % (sep, cpp_name(r.name())) + sep = "," + s += ");\n" + s += " return c_b->dispatch(e" + for r in m.rargs(): + s += ",\n rarg_%s" % (cpp_name(r.name())) + sep = "," + s += ");\n" + s += "}\n" + s += "#endif\n\n" + + + + s += "XrlCmdRT\n" + s += "%s::handle_%s(const XrlArgs& xa_inputs, XrlCmdOT pxa_outputs)\n" % \ + (cls, cpp_name(m.name())) s += "{" s += """ if (xa_inputs.size() != %d) { XLOG_ERROR(\"Wrong number of arguments (%%u != %%u) handling %%s\", XORP_UINT_CAST(%d), XORP_UINT_CAST(xa_inputs.size()), \"%s\"); - return XrlCmdError::BAD_ARGS(); + XrlCmdReturnError(pxa_outputs, XrlCmdError::BAD_ARGS()); } """ % (len(m.args()), len(m.args()), m.name()) if len(m.rargs()): s += """ +#ifndef XORP_ENABLE_ASYNC_SERVER if (pxa_outputs == 0) { XLOG_FATAL(\"Return list empty\"); return XrlCmdError::BAD_ARGS(); } +#endif + +""" + if len(m.rargs()) == 0: + s += """ +#ifndef XORP_ENABLE_ASYNC_SERVER + UNUSED(pxa_outputs); +#endif + +""" + + s += "#ifdef XORP_ENABLE_ASYNC_SERVER\n" + + + s += xorp_indent(1) + "try {\n" + s += xorp_indent(2) + \ + "%sCB mycb =\n%scallback(this, &%s::callback_%s, pxa_outputs);\n" \ + % (caps_cpp_classname(m.name()), xorp_indent(3), \ + cls, cpp_name(m.name())) + + s += xorp_indent(2) + "async_%s(" % cpp_name(m.name()) + i = 0 + for a in m.args(): + s += "\n" + xorp_indent(3) + \ + "xa_inputs.get(%d, \"%s\").%s()," \ + % (i, a.name(), a.accessor()) + i += 1 + s += " mycb);\n" + + + s += \ +""" } catch (const XrlArgs::BadArgs& e) { + XLOG_ERROR(\"Error decoding the arguments: %s\", e.str().c_str()); + return pxa_outputs->dispatch(XrlCmdError::BAD_ARGS(e.str()), NULL); + } """ + + + s += "#else\n" + + s += "\n /* Return value declarations */\n" for r in m.rargs(): - s += " %s %s;\n" % (r.cpp_type(), cpp_name(r.name())) + s += " %s r_%s;\n" % (r.cpp_type(), cpp_name(r.name())) + s += xorp_indent(1) + "try {\n" s += xorp_indent(2) + "XrlCmdError e = %s(" % cpp_name(m.name()) @@ -197,7 +338,7 @@ def target_handler_methods(cls, name, methods): i += 1 ret_vals = [] for r in m.rargs(): - ret_vals.append("\n" + xorp_indent(3) + "%s" % cpp_name(r.name())) + ret_vals.append("\n" + xorp_indent(3) + "r_%s" % cpp_name(r.name())) s += csv(get_reqs + ret_vals, ",") + ");\n" s += \ @@ -218,15 +359,19 @@ def target_handler_methods(cls, name, methods): if m.rargs(): s += "\n /* Marshall return values */\n try {\n" for r in m.rargs(): - s += xorp_indent(2) + "%s->add(\"%s\", %s);\n" % \ - (argarg, r.name(), cpp_name(r.name())) + s += xorp_indent(2) + "pxa_outputs->add(\"%s\", r_%s);\n" % \ + (r.name(), cpp_name(r.name())) s += \ """ } catch (const XrlArgs::XrlAtomFound& ) { XLOG_FATAL("Duplicate atom name"); /* XXX Should never happen */ } """ - s += " return XrlCmdError::OKAY();\n}\n\n" + s += " return XrlCmdError::OKAY();\n" + + + s += "#endif\n" + s += "}\n\n" return s def protect(file): -- 1.7.0.4 From greearb at candelatech.com Fri Mar 11 06:59:56 2011 From: greearb at candelatech.com (Ben Greear) Date: Fri, 11 Mar 2011 06:59:56 -0800 Subject: [Xorp-hackers] [PATCH] Supporting asynchronous method implementations In-Reply-To: <1299850588-12653-1-git-send-email-ss@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> <1299850588-12653-1-git-send-email-ss@comp.lancs.ac.uk> Message-ID: <4D7A38EC.30602@candelatech.com> On 03/11/2011 05:36 AM, ss at comp.lancs.ac.uk wrote: > From: Steven Simpson > > * Command map and dispatcher declare types for callbacks to pass > error code and out-arguments. > > * Handlers in generated targets meet these callback signatures. > > * Various dispatch methods changed so that out-arguments and > error codes are removed from the signature, and the appropriate > callback type is added, all to track changes to command map and > dispatcher. > > * Generated targets include default asynchronous implementations > which call synchronous (pure virtual) methods. > > * One finder method FinderClient::dispatch_tunneled_xrl is > implemented asynchronously. > > * FinderClient made a friend of XrlCmdError so it can use the > private constructor. > > * All changes compiled in only if XORP_ENABLE_ASYNC_SERVER is defined, > as set by enable_async_server=True on scons. This looks a lot better. There are a few things that bother me, but not sure there is a better way to do it: * I don't like the typedef'd return values that change based on enabling/disabling the async-server. Maybe we can use a helper method somehow? I don't mind if enabling async-server adds a small bit of code/size to the binaries, so not everything has to be #ifdef'd out, for instance. I'm guessing the vast majority of the extra binary size comes from the auto-generated code, so the #ifdefs in it provide most of the benefits. * The Macro that returns one type or another should be all caps at the least. It will be confusing either way, but at least all-caps gives the reader a clue it's a macro instead of a standard function. Have you run 'scons check' with and without this enabled? It takes a few hours to complete, but likely it will catch obvious errors with XRL transport as almost every test uses XRLs one way or another. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From ss at comp.lancs.ac.uk Mon Mar 14 05:14:38 2011 From: ss at comp.lancs.ac.uk (Steven Simpson) Date: Mon, 14 Mar 2011 12:14:38 +0000 Subject: [Xorp-hackers] [PATCH] Supporting asynchronous method implementations In-Reply-To: <4D7A38EC.30602@candelatech.com> References: <4D500B54.6030707@comp.lancs.ac.uk> <1299850588-12653-1-git-send-email-ss@comp.lancs.ac.uk> <4D7A38EC.30602@candelatech.com> Message-ID: <4D7E06AE.5050907@comp.lancs.ac.uk> Hi Ben, On 11/03/11 14:59, Ben Greear wrote: > This looks a lot better. There are a few things that bother me, > but not sure there is a better way to do it: > > * I don't like the typedef'd return values that change based on > enabling/disabling the async-server. Yes, it bothered me that it might be hard to follow, but at least it doesn't spill out into the process-writer's domain, and it rather neatly (I think) avoids maintenance of two /almost/ identical lines or blocks in a few cases. > Maybe we can use a helper method somehow? Not sure what you mean here, but I fear that anything else would just degenerate into awkard #ifdefs and almost duplicate maintenance. I'm open to suggestions, though. > I don't mind if enabling async-server adds a small bit > of code/size to the binaries, so not everything has to be #ifdef'd > out, for instance. I didn't see many opportunities for keeping things in regardless of the sync-async choice, that I haven't taken already. > * The Macro that returns one type or another should be all caps > at the least. It will be confusing either way, but at least all-caps > gives the reader a clue it's a macro instead of a standard function. Okay - there are three macros: * XrlCmdReturnError * XrlCmdOptCallback * XrlDispatcherReturnError How exactly should they be capitalised? Will XRL_CMD_RETURN_ERROR do, for example? Or XORP_something? > Have you run 'scons check' with and without this enabled? I have now. Diffing isn't terribly helpful - timestamps and process ids vary - but I see from a partial scan that most lines have a counterpart in each file, with a little re-ordering. Just grepping for "Tests" showed the same successes and failures in both cases - I hope those are the most important lines. There are certain aspects of the asynchronous stuff that won't be being tested atm. I managed to find a place in xorp/libxipc/xrl_pf_stcp.cc, in XrlPFSTCPSender::read_event, which surely won't work if two replies from the same server to the same client return out of order: if (sph.seqno() != _requests_sent.front()->seqno()) { die("Bad sequence number"); return; } _requests_sent is a list>. Requests with increasing seqnos are pushed to the back, and only the front is consulted when a response comes in - so it is assuming that responses arrive in request order. The code doesn't fail at the moment, since (almost) all XRLs are implemented synchronously anyway, and so a process can't receive another request until after replying to the current one. _requests_sent will have to become a map> to cope with out-of-order responses. I will try to fix that next. Cheers, Steven -- From greearb at candelatech.com Mon Mar 14 09:25:57 2011 From: greearb at candelatech.com (Ben Greear) Date: Mon, 14 Mar 2011 09:25:57 -0700 Subject: [Xorp-hackers] [PATCH] Supporting asynchronous method implementations In-Reply-To: <4D7E06AE.5050907@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> <1299850588-12653-1-git-send-email-ss@comp.lancs.ac.uk> <4D7A38EC.30602@candelatech.com> <4D7E06AE.5050907@comp.lancs.ac.uk> Message-ID: <4D7E4195.5010108@candelatech.com> On 03/14/2011 05:14 AM, Steven Simpson wrote: > Hi Ben, > > On 11/03/11 14:59, Ben Greear wrote: >> This looks a lot better. There are a few things that bother me, >> but not sure there is a better way to do it: >> >> * I don't like the typedef'd return values that change based on >> enabling/disabling the async-server. > > Yes, it bothered me that it might be hard to follow, but at least it > doesn't spill out into the process-writer's domain, and it rather neatly > (I think) avoids maintenance of two /almost/ identical lines or blocks > in a few cases. > >> Maybe we can use a helper method somehow? > > Not sure what you mean here, but I fear that anything else would just > degenerate into awkard #ifdefs and almost duplicate maintenance. I'm > open to suggestions, though. > >> I don't mind if enabling async-server adds a small bit >> of code/size to the binaries, so not everything has to be #ifdef'd >> out, for instance. > > I didn't see many opportunities for keeping things in regardless of the > sync-async choice, that I haven't taken already. When I apply the patch, I'll look it over and see if anything comes to mind. >> * The Macro that returns one type or another should be all caps >> at the least. It will be confusing either way, but at least all-caps >> gives the reader a clue it's a macro instead of a standard function. > > Okay - there are three macros: > > * XrlCmdReturnError > * XrlCmdOptCallback > * XrlDispatcherReturnError > > How exactly should they be capitalised? Will XRL_CMD_RETURN_ERROR do, > for example? Or XORP_something? No need to prepend with XORP I think, so the first one looks fine to me. >> Have you run 'scons check' with and without this enabled? > > I have now. Diffing isn't terribly helpful - timestamps and process ids > vary - but I see from a partial scan that most lines have a counterpart > in each file, with a little re-ordering. Just grepping for "Tests" > showed the same successes and failures in both cases - I hope those are > the most important lines. If it mostly looks OK, that is good enough for me. I have some post-processing of the test results in the buildbot that I'll be sure to check when this is committed. That said, I'm going to release 1.8.3 before applying your patch. 1.8.3 should be released in 1-2 weeks. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From pierre.lepropre at student.ulg.ac.be Mon Mar 14 11:17:21 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Mon, 14 Mar 2011 19:17:21 +0100 Subject: [Xorp-hackers] ProcessStatus VS ServiceStatus Message-ID: <1300126641.2613.10.camel@pierre-T500> Hello guys, I've been trying to build my own sample module for XORP 1.8 for a couple of days. I'm actually doing this from scratch to get the clearest picture that I can get of all the modules/classes/files involved. I'm using "static_routes" as a comparaison basis. There is one thing I'm not sure I've well understood: what's the difference between * ServiceStatus (/libxorp/service.hh) * ProcessStatus (/libxorp/status_codes.h) As far as I can tell, * service status seems to be some kind of inter-xorp process information (with the possibility to observe an other service) whereas * process status seems to be self-contained information regarding the process current relationship with the Finder. Is my understanding correct ? If not, where could I get more information ? I've been digging out a lot of files without any conclusive answer... Best Regards, Pierre. From greearb at candelatech.com Mon Mar 14 15:25:23 2011 From: greearb at candelatech.com (Ben Greear) Date: Mon, 14 Mar 2011 15:25:23 -0700 Subject: [Xorp-hackers] XORP documentation wiki is online. Message-ID: <4D7E95D3.9070302@candelatech.com> Hello! I have just updated the xorp.org web site to point to the XORP Documentation wiki that Pierre Lepropre has been working on (I did some of it too, but he did most of it). He is still working on some of the developer documents, but they are already better than what we had before and likely will be fully functional soon. Please let us know if you have any suggestions for improvement..or register with the wiki and make the improvements yourself! http://www.xorp.org/ http://xorp.run.montefiore.ulg.ac.be/start Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From m.jakeman at lancs.ac.uk Mon Mar 14 15:45:03 2011 From: m.jakeman at lancs.ac.uk (Matthew Jakeman) Date: Mon, 14 Mar 2011 22:45:03 +0000 Subject: [Xorp-hackers] XORP documentation wiki is online. In-Reply-To: <4D7E95D3.9070302@candelatech.com> References: <4D7E95D3.9070302@candelatech.com> Message-ID: <1300142703.27277.11.camel@matt-desktop> Hi Ben, all, This is great. I have just had a look through the new documentation on the wiki and there are some significant updates on there that should make peoples introduction to XORP a lot easier. In particular the updated documentation for writing a process that has updated the old Makefile information to the latest scons processes (among other things). This will be especially useful to people who haven't used XORP before as it was one thing I struggled with a bit when first using XORP. Huge thanks to both yourself and Pierre for this. Myself and Pierre are both working on the ECODE project from which this has come about and it's good to see that it has already pushed something back into the community. Cheers Matt On Mon, 2011-03-14 at 15:25 -0700, Ben Greear wrote: > Hello! > > I have just updated the xorp.org web site to point to the > XORP Documentation wiki that Pierre Lepropre has been working > on (I did some of it too, but he did most of it). > > He is still working on some of the developer > documents, but they are already better than > what we had before and likely will be fully functional > soon. > > Please let us know if you have any suggestions for > improvement..or register with the wiki and make the > improvements yourself! > > http://www.xorp.org/ > > > http://xorp.run.montefiore.ulg.ac.be/start > > > Thanks, > Ben > From pierre.lepropre at student.ulg.ac.be Mon Mar 14 17:06:16 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Tue, 15 Mar 2011 01:06:16 +0100 Subject: [Xorp-hackers] XORP documentation wiki is online. In-Reply-To: <4D7E95D3.9070302@candelatech.com> References: <4D7E95D3.9070302@candelatech.com> Message-ID: <1300147576.2243.11.camel@pierre-T500> Hello guys, As Ben said, the wiki is now officially online, feel free to browse it, bookmark your favorite topics... and register for an account if you want to improve the documentation ! I'd just like to thank the following people who helped me to set this up: *Ben for his continuous thoughtful pieces of advice and suggestions. *Paula Gonzales for some of the mistakes she already corrected On Mon, 2011-03-14 at 15:25 -0700, Ben Greear wrote: > Hello! > > I have just updated the xorp.org web site to point to the > XORP Documentation wiki that Pierre Lepropre has been working > on (I did some of it too, but he did most of it). > > He is still working on some of the developer > documents, but they are already better than > what we had before and likely will be fully functional > soon. > > Please let us know if you have any suggestions for > improvement..or register with the wiki and make the > improvements yourself! > > http://www.xorp.org/ > > > http://xorp.run.montefiore.ulg.ac.be/start > > > Thanks, > Ben > From pierre.lepropre at student.ulg.ac.be Mon Mar 14 17:13:18 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Tue, 15 Mar 2011 01:13:18 +0100 Subject: [Xorp-hackers] XORP documentation wiki is online. In-Reply-To: <4D7E95D3.9070302@candelatech.com> References: <4D7E95D3.9070302@candelatech.com> Message-ID: <1300147998.2243.18.camel@pierre-T500> Hello guys, [Sorry for the duplicate mail, this is the complete one] As Ben said, the wiki is now officially online, feel free to browse it, bookmark your favorite topics... and register for an account if you want to improve the documentation ! I'd just like to thank the following people who helped me to set this up: *Ben Greear for his continuous thoughtful pieces of advice and suggestions. *Ray Soucy for providing me some useful sample configurations for the user getting started *Paula Gonzales for some of the mistakes she already corrected in a pre-release stage. *Bruno Willemaers for setting up and managing the previous (internal) wiki, a few pages of the current wiki content is inspired by it. *Prof. Guy Leduc for his approval and encouragement. *Cyril Soldani, our sysadmin @ ULg for taking care of all the technical management (I'm still the guy to contact regarding the wiki management, don't spam him or I'll probably burn in hell in a couple of days :-) ). Thank you for your attention and sorry again about the duplicate mail. Cheers, Pierre. On Mon, 2011-03-14 at 15:25 -0700, Ben Greear wrote: > Hello! > > I have just updated the xorp.org web site to point to the > XORP Documentation wiki that Pierre Lepropre has been working > on (I did some of it too, but he did most of it). > > He is still working on some of the developer > documents, but they are already better than > what we had before and likely will be fully functional > soon. > > Please let us know if you have any suggestions for > improvement..or register with the wiki and make the > improvements yourself! > > http://www.xorp.org/ > > > http://xorp.run.montefiore.ulg.ac.be/start > > > Thanks, > Ben > From pierre.lepropre at student.ulg.ac.be Mon Mar 14 17:27:39 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Tue, 15 Mar 2011 01:27:39 +0100 Subject: [Xorp-hackers] XORP documentation wiki is online. In-Reply-To: <1300142703.27277.11.camel@matt-desktop> References: <4D7E95D3.9070302@candelatech.com> <1300142703.27277.11.camel@matt-desktop> Message-ID: <1300148859.2243.31.camel@pierre-T500> Hi Matthew, all, > This is great. I have just had a look through the new documentation on > the wiki and there are some significant updates on there that should > make peoples introduction to XORP a lot easier. That was/is *the* purpose I wanted to achieve and I'm kinda happy that you're under that impression. There are still a lot of things to improve, off course. But at this point, it's more or less up to the community to improve everything else: Ben and I can't do this alone. > In particular the > updated documentation for writing a process that has updated the old > Makefile information to the latest scons processes (among other things). > This will be especially useful to people who haven't used XORP before as > it was one thing I struggled with a bit when first using XORP. Yeah, about that I'd like to say something important: I'm still working (and heavily struggling...) on it. There are still important missing parts. I have a lot of things to add and to specify but I can't do it right now. Indeed, as I said in a previous 'hacker' mail (asking a question about proc and service status), I'm trying to write a whole new xorp sample and minimal process from scratch. I've been at it for a couple of days now. There are many things undocumented, even in the source files! I have been searching a lot through the whole project... and I'm currently stuck. > Huge thanks to both yourself and Pierre for this. Myself and Pierre are > both working on the ECODE project from which this has come about and > it's good to see that it has already pushed something back into the > community. You're welcome, I hope it's gonna help people like me trying to get into XORP and constantly banging their heads on the same walls ! A last thing: I don't have much time for this now but if there are guys out there doing their own ECODE-like XORP project and would like to have their own part of the wiki for convenience and visibility purposes, that could be arranged. Cheers, Pierre. > On Mon, 2011-03-14 at 15:25 -0700, Ben Greear wrote: > > Hello! > > > > I have just updated the xorp.org web site to point to the > > XORP Documentation wiki that Pierre Lepropre has been working > > on (I did some of it too, but he did most of it). > > > > He is still working on some of the developer > > documents, but they are already better than > > what we had before and likely will be fully functional > > soon. > > > > Please let us know if you have any suggestions for > > improvement..or register with the wiki and make the > > improvements yourself! > > > > http://www.xorp.org/ > > > > > > http://xorp.run.montefiore.ulg.ac.be/start > > > > > > Thanks, > > Ben > > > > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers From greearb at candelatech.com Mon Mar 14 21:04:43 2011 From: greearb at candelatech.com (Ben Greear) Date: Mon, 14 Mar 2011 21:04:43 -0700 Subject: [Xorp-hackers] XORP documentation wiki is online. In-Reply-To: <1300142703.27277.11.camel@matt-desktop> References: <4D7E95D3.9070302@candelatech.com> <1300142703.27277.11.camel@matt-desktop> Message-ID: <4D7EE55B.90001@candelatech.com> On 03/14/2011 03:45 PM, Matthew Jakeman wrote: > Hi Ben, all, > > This is great. I have just had a look through the new documentation on > the wiki and there are some significant updates on there that should > make peoples introduction to XORP a lot easier. In particular the > updated documentation for writing a process that has updated the old > Makefile information to the latest scons processes (among other things). > This will be especially useful to people who haven't used XORP before as > it was one thing I struggled with a bit when first using XORP. > > Huge thanks to both yourself and Pierre for this. Myself and Pierre are > both working on the ECODE project from which this has come about and > it's good to see that it has already pushed something back into the > community. The documentation help is very useful and very welcome. I am also curious about the state of your xorp modifications. Are they still scheduled to be publicly released? If so, I'd like to try to figure out how to make them part of the official xorp tree. Perhaps somewhere in the contrib/ directory if it's not general purpose code. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Mon Mar 14 21:15:56 2011 From: greearb at candelatech.com (Ben Greear) Date: Mon, 14 Mar 2011 21:15:56 -0700 Subject: [Xorp-hackers] Proposal to consolidate xorp mailing lists. Message-ID: <4D7EE7FC.7090605@candelatech.com> I'd like to propose consolidating the mailing lists: Proposal 1: xorp-cvs type emails (git commit messages, basically) will go to xorp-hackers instead and we get rid of xorp-cvs. xorp-announce type messages (product releases, etc) can be sent to both xorp-users and xorp-hackers, and we get rid of xorp-announce. I think there is at least one private xorp mailing list. I'm not sure I'm even on it, so I think we can close it. Private communication can be through direct email, and at any rate, I don't see much need for an official private communication channel. So at the end, we have: xorp-users: General config questions, release announcements, etc. xorp-hackers: Any and all code related questions, roadmap discussions, bug reports, etc. Proposal 2: Have a single xorp-users at xorp.org mailing list. Any and all discussion goes there. Archive the other mailing lists for posterity. Any opinions? Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From pierre.lepropre at student.ulg.ac.be Tue Mar 15 01:38:47 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Tue, 15 Mar 2011 09:38:47 +0100 Subject: [Xorp-hackers] Proposal to consolidate xorp mailing lists. In-Reply-To: <4D7EE7FC.7090605@candelatech.com> References: <4D7EE7FC.7090605@candelatech.com> Message-ID: <1300178327.2357.1.camel@pierre-T500> I'd go for Proposal 1. Proposal 2 will have to be canceled one day if the community gets bigger and bigger and the only remaining ML couldn't handle the load. Regards, Pierre. On Mon, 2011-03-14 at 21:15 -0700, Ben Greear wrote: > I'd like to propose consolidating the mailing lists: > > Proposal 1: > > xorp-cvs type emails (git commit messages, basically) will go to xorp-hackers instead > and we get rid of xorp-cvs. > > xorp-announce type messages (product releases, etc) can be sent to both xorp-users and xorp-hackers, > and we get rid of xorp-announce. > > I think there is at least one private xorp mailing list. I'm not sure I'm even on it, > so I think we can close it. Private communication can be through direct email, and > at any rate, I don't see much need for an official private communication channel. > > So at the end, we have: > > xorp-users: General config questions, release announcements, etc. > > xorp-hackers: Any and all code related questions, roadmap discussions, bug reports, etc. > > > Proposal 2: > > Have a single xorp-users at xorp.org mailing list. Any and all discussion goes there. > Archive the other mailing lists for posterity. > > > Any opinions? > > Thanks, > Ben > From pierre.lepropre at student.ulg.ac.be Tue Mar 15 01:42:02 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Tue, 15 Mar 2011 09:42:02 +0100 Subject: [Xorp-hackers] [Xorp-users] XORP documentation wiki is online. In-Reply-To: <4D7EE55B.90001@candelatech.com> References: <4D7E95D3.9070302@candelatech.com> <1300142703.27277.11.camel@matt-desktop> <4D7EE55B.90001@candelatech.com> Message-ID: <1300178522.2357.5.camel@pierre-T500> Dear Ben, Matthew, All, I have no idea of what the intentions are among the ECODE partners about that but I wondered the same thing when I started to build the wiki. I'll ask around at my university because I'm just a guy at the bottom of the food chain when it comes to take decision about ECODE ;-). Regards, Pierre. On Mon, 2011-03-14 at 21:04 -0700, Ben Greear wrote: > On 03/14/2011 03:45 PM, Matthew Jakeman wrote: > > Hi Ben, all, > > > > This is great. I have just had a look through the new documentation on > > the wiki and there are some significant updates on there that should > > make peoples introduction to XORP a lot easier. In particular the > > updated documentation for writing a process that has updated the old > > Makefile information to the latest scons processes (among other things). > > This will be especially useful to people who haven't used XORP before as > > it was one thing I struggled with a bit when first using XORP. > > > > Huge thanks to both yourself and Pierre for this. Myself and Pierre are > > both working on the ECODE project from which this has come about and > > it's good to see that it has already pushed something back into the > > community. > > The documentation help is very useful and very welcome. > > I am also curious about the state of your xorp modifications. Are > they still scheduled to be publicly released? If so, I'd like > to try to figure out how to make them part of the official > xorp tree. Perhaps somewhere in the contrib/ directory if > it's not general purpose code. > > Thanks, > Ben > From m.jakeman at lancs.ac.uk Tue Mar 15 05:58:39 2011 From: m.jakeman at lancs.ac.uk (Matthew Jakeman) Date: Tue, 15 Mar 2011 12:58:39 +0000 Subject: [Xorp-hackers] XORP documentation wiki is online. In-Reply-To: <4D7EE55B.90001@candelatech.com> References: <4D7E95D3.9070302@candelatech.com> <1300142703.27277.11.camel@matt-desktop> <4D7EE55B.90001@candelatech.com> Message-ID: <1300193919.6744.150.camel@matt-uni> On Mon, 2011-03-14 at 21:04 -0700, Ben Greear wrote: > On 03/14/2011 03:45 PM, Matthew Jakeman wrote: > > Hi Ben, all, > > > > This is great. I have just had a look through the new documentation on > > the wiki and there are some significant updates on there that should > > make peoples introduction to XORP a lot easier. In particular the > > updated documentation for writing a process that has updated the old > > Makefile information to the latest scons processes (among other things). > > This will be especially useful to people who haven't used XORP before as > > it was one thing I struggled with a bit when first using XORP. > > > > Huge thanks to both yourself and Pierre for this. Myself and Pierre are > > both working on the ECODE project from which this has come about and > > it's good to see that it has already pushed something back into the > > community. > > The documentation help is very useful and very welcome. > > I am also curious about the state of your xorp modifications. Are > they still scheduled to be publicly released? If so, I'd like > to try to figure out how to make them part of the official > xorp tree. Perhaps somewhere in the contrib/ directory if > it's not general purpose code. > We are still working on our implementation and are hoping to release the source code into the public domain at some point down the line. One problem we have is that because the async stuff Steven has implemented was not originally in XORP we have implemented our prototype using the original XORP code. This means that if we wanted to fully integrate it into XORP properly, we will have the issue of porting the code to the new style of coding. We will be looking at this further down the line and depending on the project time constraints, we will see if we can integrate it in a nice manner within the XORP code tree as I believe it would be a nice addition to have in there. Obviously it would be better overall for us to release the code within XORP rather than releasing our branch separately. We will be in touch a bit further down the line and let you know how we progress with these issues. Cheers Matt > Thanks, > Ben > From greearb at candelatech.com Tue Mar 15 09:23:12 2011 From: greearb at candelatech.com (Ben Greear) Date: Tue, 15 Mar 2011 09:23:12 -0700 Subject: [Xorp-hackers] XORP documentation wiki is online. In-Reply-To: <1300193919.6744.150.camel@matt-uni> References: <4D7E95D3.9070302@candelatech.com> <1300142703.27277.11.camel@matt-desktop> <4D7EE55B.90001@candelatech.com> <1300193919.6744.150.camel@matt-uni> Message-ID: <4D7F9270.20005@candelatech.com> On 03/15/2011 05:58 AM, Matthew Jakeman wrote: > On Mon, 2011-03-14 at 21:04 -0700, Ben Greear wrote: >> On 03/14/2011 03:45 PM, Matthew Jakeman wrote: >>> Hi Ben, all, >>> >>> This is great. I have just had a look through the new documentation on >>> the wiki and there are some significant updates on there that should >>> make peoples introduction to XORP a lot easier. In particular the >>> updated documentation for writing a process that has updated the old >>> Makefile information to the latest scons processes (among other things). >>> This will be especially useful to people who haven't used XORP before as >>> it was one thing I struggled with a bit when first using XORP. >>> >>> Huge thanks to both yourself and Pierre for this. Myself and Pierre are >>> both working on the ECODE project from which this has come about and >>> it's good to see that it has already pushed something back into the >>> community. >> >> The documentation help is very useful and very welcome. >> >> I am also curious about the state of your xorp modifications. Are >> they still scheduled to be publicly released? If so, I'd like >> to try to figure out how to make them part of the official >> xorp tree. Perhaps somewhere in the contrib/ directory if >> it's not general purpose code. >> > > We are still working on our implementation and are hoping to release the > source code into the public domain at some point down the line. > > One problem we have is that because the async stuff Steven has > implemented was not originally in XORP we have implemented our prototype > using the original XORP code. This means that if we wanted to fully > integrate it into XORP properly, we will have the issue of porting the > code to the new style of coding. This is exactly why you should merge your code early and often: Maybe he could have used your fixes, or vice versa..and either way, both of you might be better off. > We will be looking at this further down the line and depending on the > project time constraints, we will see if we can integrate it in a nice > manner within the XORP code tree as I believe it would be a nice > addition to have in there. Obviously it would be better overall for us > to release the code within XORP rather than releasing our branch > separately. > > We will be in touch a bit further down the line and let you know how we > progress with these issues. About the only guarantee is that the longer you wait, the more difficult the merge will be. But, it's not my decision, and I hope your plans work out fine regardless. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Tue Mar 15 09:25:00 2011 From: greearb at candelatech.com (Ben Greear) Date: Tue, 15 Mar 2011 09:25:00 -0700 Subject: [Xorp-hackers] Proposal to consolidate xorp mailing lists. In-Reply-To: <1300178327.2357.1.camel@pierre-T500> References: <4D7EE7FC.7090605@candelatech.com> <1300178327.2357.1.camel@pierre-T500> Message-ID: <4D7F92DC.5020700@candelatech.com> On 03/15/2011 01:38 AM, Pierre Lepropre wrote: > I'd go for Proposal 1. > > Proposal 2 will have to be canceled one day if the community gets bigger > and bigger and the only remaining ML couldn't handle the load. You should subscribe to LKML someday :) The consensus seems to be proposal 1, so I'll pursue that. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From m.jakeman at lancs.ac.uk Tue Mar 15 09:30:25 2011 From: m.jakeman at lancs.ac.uk (Matthew Jakeman) Date: Tue, 15 Mar 2011 16:30:25 +0000 Subject: [Xorp-hackers] XORP documentation wiki is online. In-Reply-To: <4D7F9270.20005@candelatech.com> References: <4D7E95D3.9070302@candelatech.com> <1300142703.27277.11.camel@matt-desktop> <4D7EE55B.90001@candelatech.com> <1300193919.6744.150.camel@matt-uni> <4D7F9270.20005@candelatech.com> Message-ID: <1300206625.27277.19.camel@matt-desktop> On Tue, 2011-03-15 at 09:23 -0700, Ben Greear wrote: > On 03/15/2011 05:58 AM, Matthew Jakeman wrote: > > On Mon, 2011-03-14 at 21:04 -0700, Ben Greear wrote: > >> On 03/14/2011 03:45 PM, Matthew Jakeman wrote: > >>> Hi Ben, all, > >>> > >>> This is great. I have just had a look through the new documentation on > >>> the wiki and there are some significant updates on there that should > >>> make peoples introduction to XORP a lot easier. In particular the > >>> updated documentation for writing a process that has updated the old > >>> Makefile information to the latest scons processes (among other things). > >>> This will be especially useful to people who haven't used XORP before as > >>> it was one thing I struggled with a bit when first using XORP. > >>> > >>> Huge thanks to both yourself and Pierre for this. Myself and Pierre are > >>> both working on the ECODE project from which this has come about and > >>> it's good to see that it has already pushed something back into the > >>> community. > >> > >> The documentation help is very useful and very welcome. > >> > >> I am also curious about the state of your xorp modifications. Are > >> they still scheduled to be publicly released? If so, I'd like > >> to try to figure out how to make them part of the official > >> xorp tree. Perhaps somewhere in the contrib/ directory if > >> it's not general purpose code. > >> > > > > We are still working on our implementation and are hoping to release the > > source code into the public domain at some point down the line. > > > > One problem we have is that because the async stuff Steven has > > implemented was not originally in XORP we have implemented our prototype > > using the original XORP code. This means that if we wanted to fully > > integrate it into XORP properly, we will have the issue of porting the > > code to the new style of coding. > > This is exactly why you should merge your code early and often: > Maybe he could have used your fixes, or vice versa..and either way, > both of you might be better off. The problem was that we (Steve and myself work at the same institution) weren't sure how long the changes he has recently done to implement the async stuff were going to take, yet we pretty much knew how long it would take to implement the ECODE work the other way. Therefore it has been implemented within our own XORP tree to a working standard to facilitate quicker implementation of other factors across the board. Unfortunately this also means that we have two source trees but we had no choice but to proceed in this manner in case the async implementation took a lot longer than expected. > > > We will be looking at this further down the line and depending on the > > project time constraints, we will see if we can integrate it in a nice > > manner within the XORP code tree as I believe it would be a nice > > addition to have in there. Obviously it would be better overall for us > > to release the code within XORP rather than releasing our branch > > separately. > > > > We will be in touch a bit further down the line and let you know how we > > progress with these issues. > > About the only guarantee is that the longer you wait, the more difficult > the merge will be. But, it's not my decision, and I hope your plans work > out fine regardless. The merge shouldn't change in complexity now, as long as we export the same API from the ECODE part. I had a chat with Steve today and he thinks that the integration of the async and ECODE work shouldn't present too much of a challenge so hopefully this will get done in the near future. We definitely want to work towards integrating the ECODE work into XORP before our project finishes... Cheers Matt > > Thanks, > Ben > From greearb at candelatech.com Tue Mar 15 09:32:49 2011 From: greearb at candelatech.com (Ben Greear) Date: Tue, 15 Mar 2011 09:32:49 -0700 Subject: [Xorp-hackers] FW: [Xorp-users] Proposal to consolidate xorp mailing lists. In-Reply-To: References: Message-ID: <4D7F94B1.6050108@candelatech.com> On 03/14/2011 11:34 PM, Gorja Prasad-B22290 wrote: > Hi Ben, > > Could you enable me to send the queries to the mailing list as my reply to one of your e-mail is rejected(attached the same). Did you register with the mailing list? http://www.xorp.org/mailing_lists.html > > I have been using the XORP 1.6 sources for multicast protocols MLD,IGNP,PIM-SMipv4 and IPv6. > > > 1. As XORP provides modularity, there is process for each module, my requirement is to run only multicast protocols: mld,igmp,and pim-sm for ipv4 and ipv6, > What are the required processes( other than multicast) to enable multicast processes along with igmp, mld, pim ipv4 and pimsm ipv6?. If > I meant, are there any compilation macros to compile mandatory modules to run the multicast protocols processes thereby not required modules can be omitted for compilation? > If this facility is available, one need not to compile the entire XORP source tree. Yes. scons --help gives you some compile-time options. See things like enable_bgp=no, etc. We should add some notes about these options in the wiki docs... > 2. I understand XORP provides an industry standard CLI(like juniper), are the configuration APIs are exposed to the user to have a customized CLI(by users) ? > Is the soft reconfiguration, the dynamic configuration changes by user affective/reflected by routing process is supported ?? Do you recommend to use the configuration APIs? The xorpsh tool can be scripted using the -c 'command' option. Soft reconfiguration is available and should work. Report bugs if you find errors with this in the latest code. I recommend using xorpsh for API. If you find it cannot do something you want done, open a bug and/or send a patch. > > 3. I have been using XORP1.6 on linux kernel 2.6.32, XORP.CT can also be used on 2.6.32 ? XORP.CT (which is now the only upstream xorp) should work on that as well as older kernels. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From rps at maine.edu Tue Mar 15 13:56:18 2011 From: rps at maine.edu (Ray Soucy) Date: Tue, 15 Mar 2011 16:56:18 -0400 Subject: [Xorp-hackers] XORP documentation wiki is online. In-Reply-To: <1300147576.2243.11.camel@pierre-T500> References: <4D7E95D3.9070302@candelatech.com> <1300147576.2243.11.camel@pierre-T500> Message-ID: Pierre, The website for the Wiki has an IPv6 DNS record (AAAA) but it appears that the web server is not accepting requests over IPv6. This makes those of us with IPv6 have to wait for a timeout with each request. I suspect it's an IPv6 firewall oversight on the server. Ray On Mon, Mar 14, 2011 at 8:06 PM, Pierre Lepropre < pierre.lepropre at student.ulg.ac.be> wrote: > Hello guys, > > As Ben said, the wiki is now officially online, feel free to browse it, > bookmark your favorite topics... and register for an account if you want > to improve the documentation ! > > I'd just like to thank the following people who helped me to set this > up: > > *Ben for his continuous thoughtful pieces of advice and suggestions. > *Paula Gonzales for some of the mistakes she already corrected > > On Mon, 2011-03-14 at 15:25 -0700, Ben Greear wrote: > > Hello! > > > > I have just updated the xorp.org web site to point to the > > XORP Documentation wiki that Pierre Lepropre has been working > > on (I did some of it too, but he did most of it). > > > > He is still working on some of the developer > > documents, but they are already better than > > what we had before and likely will be fully functional > > soon. > > > > Please let us know if you have any suggestions for > > improvement..or register with the wiki and make the > > improvements yourself! > > > > http://www.xorp.org/ > > > > > > http://xorp.run.montefiore.ulg.ac.be/start > > > > > > Thanks, > > Ben > > > > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > -- Ray Soucy Epic Communications Specialist Phone: +1 (207) 561-3526 Networkmaine, a Unit of the University of Maine System http://www.networkmaine.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110315/68801984/attachment.html From pierre.lepropre at student.ulg.ac.be Tue Mar 15 15:36:28 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Tue, 15 Mar 2011 23:36:28 +0100 Subject: [Xorp-hackers] XORP documentation wiki is online. In-Reply-To: References: <4D7E95D3.9070302@candelatech.com> <1300147576.2243.11.camel@pierre-T500> Message-ID: <1300228588.2261.2.camel@pierre-T500> Hello Ray, Oh I'm sorry I wasn't aware of that (as we're not using IPv6 yet at our institution as a standard). I can't promise you anything about that as it isn't in my power to set these things up but I'm forwarding this mail immediately to the guy in charge. Hope this is going to be fixed, Pierre. On Tue, 2011-03-15 at 16:56 -0400, Ray Soucy wrote: > Pierre, > > > The website for the Wiki has an IPv6 DNS record (AAAA) but it appears > that the web server is not accepting requests over IPv6. This makes > those of us with IPv6 have to wait for a timeout with each request. > > > I suspect it's an IPv6 firewall oversight on the server. > > > Ray > > On Mon, Mar 14, 2011 at 8:06 PM, Pierre Lepropre > wrote: > Hello guys, > > As Ben said, the wiki is now officially online, feel free to > browse it, > bookmark your favorite topics... and register for an account > if you want > to improve the documentation ! > > I'd just like to thank the following people who helped me to > set this > up: > > *Ben for his continuous thoughtful pieces of advice and > suggestions. > *Paula Gonzales for some of the mistakes she already corrected > > On Mon, 2011-03-14 at 15:25 -0700, Ben Greear wrote: > > > Hello! > > > > I have just updated the xorp.org web site to point to the > > XORP Documentation wiki that Pierre Lepropre has been > working > > on (I did some of it too, but he did most of it). > > > > He is still working on some of the developer > > documents, but they are already better than > > what we had before and likely will be fully functional > > soon. > > > > Please let us know if you have any suggestions for > > improvement..or register with the wiki and make the > > improvements yourself! > > > > http://www.xorp.org/ > > > > > > http://xorp.run.montefiore.ulg.ac.be/start > > > > > > Thanks, > > Ben > > > > > > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > > > > > -- > Ray Soucy > > Epic Communications Specialist > > Phone: +1 (207) 561-3526 > > Networkmaine, a Unit of the University of Maine System > http://www.networkmaine.net/ > From greearb at candelatech.com Tue Mar 15 17:08:02 2011 From: greearb at candelatech.com (Ben Greear) Date: Tue, 15 Mar 2011 17:08:02 -0700 Subject: [Xorp-hackers] Any reason to keep xorp sourceforge page up? Message-ID: <4D7FFF62.6040308@candelatech.com> I just finished doing a crude cut-n-paste transfer of all of the xorp sourceforge trac bugs into www.xorp.org/bugzilla. Not the most readable thing, but most of these bugs were opened in 2006, so maybe they aren't so critical after all :P Anyway, I think that was the last useful thing to get from the xorp sourceforge page. Unless anyone has complaints, I'm going to try to get that project page deleted. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From wxh585 at 126.com Wed Mar 16 07:30:55 2011 From: wxh585 at 126.com (wxh585 at 126.com) Date: Wed, 16 Mar 2011 22:30:55 +0800 (CST) Subject: [Xorp-hackers] firewall is not work on debian linux ,2.6.26 core Message-ID: dear Ben Greear: I had edit file,like file 1.82-ct/xorp/errata include/linux/netfilter_ipv6/ip6_tables.h include/linux/netfilter_ipv4/ip_tables.h make core,but firewall is not work. root at router# set firewall rule4 100 action drop [edit] root at router# commit Commit Failed 102 Command failed No firewall plugin to set the entries[edit] root at router# ...... router:/usr/src/linux-source-2.6.26# uname -a Linux router 2.6.26-dacheng #1 SMP Wed Mar 16 12:39:27 EDT 2011 i686 GNU/Linux router:/usr/src/linux-source-2.6.26# -- ??? ???13312601392 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110316/b92b9ffe/attachment.html From pierre.lepropre at student.ulg.ac.be Wed Mar 16 07:52:18 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Wed, 16 Mar 2011 15:52:18 +0100 Subject: [Xorp-hackers] Wiki: IPv6 access fixed Message-ID: <1300287138.2436.11.camel@pierre-T500> Dear all, As previously reported by Ray Soucy, the wiki had a native IPv6 connectivity but the firewall at our institution was being too restrictive and causing major inconvenience for IPv6 users. It should now have been fixed by our admin. Please, do report any trouble of the sort if ever happens again. My apologies, Pierre. From greearb at candelatech.com Wed Mar 16 09:21:41 2011 From: greearb at candelatech.com (Ben Greear) Date: Wed, 16 Mar 2011 09:21:41 -0700 Subject: [Xorp-hackers] firewall is not work on debian linux , 2.6.26 core In-Reply-To: References: Message-ID: <4D80E395.3030305@candelatech.com> On 03/16/2011 07:30 AM, wxh585 at 126.com wrote: > dear Ben Greear: > I had edit file,like file 1.82-ct/xorp/errata > include/linux/netfilter_ipv6/ip6_tables.h > include/linux/netfilter_ipv4/ip_tables.h > make core,but firewall is not work. > root at router # set firewall rule4 100 action drop > [edit] > root at router # commit > Commit Failed > 102 Command failed No firewall plugin to set the entries[edit] > root at router # > ...... > router:/usr/src/linux-source-2.6.26# uname -a > Linux router 2.6.26-dacheng #1 SMP Wed Mar 16 12:39:27 EDT 2011 i686 > GNU/Linux > router:/usr/src/linux-source-2.6.26# Please post a patch for what you did change. I haven't done any testing on the firewall logic, and it would not supprise me if it's broken. Maybe I'll have time to look at it after I get the 1.8.3 release done. The firewall plugin is in the xorp/fea directory, so you might start looking there. Thanks, Ben > > > -- > > ?????? > > ??????13312601392 > > > > > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Wed Mar 16 09:39:21 2011 From: greearb at candelatech.com (Ben Greear) Date: Wed, 16 Mar 2011 09:39:21 -0700 Subject: [Xorp-hackers] [Xorp-users] Any reason to keep xorp sourceforge page up? In-Reply-To: <4D80E526.1090601@ll.mit.edu> References: <4D7FFF62.6040308@candelatech.com> <4D80E526.1090601@ll.mit.edu> Message-ID: <4D80E7B9.8040801@candelatech.com> On 03/16/2011 09:28 AM, Jeff Mitchell wrote: > On 3/15/2011 8:08 PM, Ben Greear wrote: >> I just finished doing a crude cut-n-paste transfer of all >> of the xorp sourceforge trac bugs into www.xorp.org/bugzilla. Not the >> most readable >> thing, but most of these bugs were opened in 2006, so maybe >> they aren't so critical after all :P >> >> Anyway, I think that was the last useful thing to get from >> the xorp sourceforge page. Unless anyone has complaints, >> I'm going to try to get that project page deleted. > > I'd recommend keeping the project in SF, even if you only post releases > there, or use it to direct people to the official site. You never know > when their mirrors might be handy, and sometimes project names in SF can > end up getting linked to projects elsewhere (Google Code for instance). > So you probably don't want to give up the name, even if you don't use it > for anything else than that. I plan to use github to host the official upstream source repository and probably downloads as well (or, might just serve downloads directly off of www.xorp.org...it's not exactly high volume). I'll see if I can get admin rights to the xorp sourceforge page, and at least update it a bit. But, I think it would be confusing to have downloads on multiple different sites, even if I somehow managed to keep them all perfectly synch'd, so I'll have to think on that some more. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Wed Mar 16 14:55:28 2011 From: greearb at candelatech.com (Ben Greear) Date: Wed, 16 Mar 2011 14:55:28 -0700 Subject: [Xorp-hackers] firewall is not work on debian linux , 2.6.26 core In-Reply-To: <4D80E395.3030305@candelatech.com> References: <4D80E395.3030305@candelatech.com> Message-ID: <4D8131D0.6050009@candelatech.com> On 03/16/2011 09:21 AM, Ben Greear wrote: > On 03/16/2011 07:30 AM, wxh585 at 126.com wrote: >> dear Ben Greear: >> I had edit file,like file 1.82-ct/xorp/errata >> include/linux/netfilter_ipv6/ip6_tables.h >> include/linux/netfilter_ipv4/ip_tables.h >> make core,but firewall is not work. >> root at router # set firewall rule4 100 action drop >> [edit] >> root at router # commit >> Commit Failed >> 102 Command failed No firewall plugin to set the entries[edit] >> root at router # >> ...... >> router:/usr/src/linux-source-2.6.26# uname -a >> Linux router 2.6.26-dacheng #1 SMP Wed Mar 16 12:39:27 EDT 2011 i686 >> GNU/Linux >> router:/usr/src/linux-source-2.6.26# > > Please post a patch for what you did change. > > I haven't done any testing on the firewall logic, and it would > not supprise me if it's broken. Maybe I'll have time to look > at it after I get the 1.8.3 release done. > > The firewall plugin is in the xorp/fea directory, so you might > start looking there. This is probably the root of the problem: Checking for C header file pcap-bpf.h... (cached) yes WARNING: Netfilter include files are broken or do not exist. This means the Linux firewall support will not be compiled in. To fix, you may edit: /usr/include/linux/netfilter_ipv4/ip_tables.h line 222 or so, to look like this: /* Helper functions */ static __inline__ struct ipt_entry_target * ipt_get_target(struct ipt_entry *e) { /* BEN: Was void* */ return (struct ipt_entry_target *)((char*)e + e->target_offset); } You will also want to edit similar code around line 282 of: /usr/include/linux/netfilter_ipv6/ip6_tables.h Check your 'scons' build output to see if you have that warning. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From noreply at github.com Wed Mar 16 15:07:28 2011 From: noreply at github.com (noreply at github.com) Date: Wed, 16 Mar 2011 15:07:28 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 8584ab: Change xrl pipe group ownership to be xorp Message-ID: <20110316220728.13C17420D5@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 8584ab3cc5b95f29c665ff87013219f0ab28a4ee https://github.com/greearb/xorp.ct/commit/8584ab3cc5b95f29c665ff87013219f0ab28a4ee Author: Ben Greear Date: 2011-03-10 (Thu, 10 Mar 2011) Changed paths: M xorp/libxipc/xrl_pf_unix.cc Log Message: ----------- Change xrl pipe group ownership to be xorp Based on a patch from Joe Coco. With this patch, the permissions are as follows (when created by xorpsh run as user root): srw-rw-r-- 1 root xorp 0 Mar 10 15:06 xrl.aAVNEc Signed-off-by: Ben Greear Commit: dbd8addfc122b72c72af8dbb5dad3d00cb28b4be https://github.com/greearb/xorp.ct/commit/dbd8addfc122b72c72af8dbb5dad3d00cb28b4be Author: Ben Greear Date: 2011-03-10 (Thu, 10 Mar 2011) Changed paths: A data/README R xorp/TODO R xorp/xrl/TODO Log Message: ----------- Add a README, remove some stale TODO files. Signed-off-by: Ben Greear Commit: 91ae067344930a8c63860f16f1ffe19e0180f15c https://github.com/greearb/xorp.ct/commit/91ae067344930a8c63860f16f1ffe19e0180f15c Author: Ben Greear Date: 2011-03-14 (Mon, 14 Mar 2011) Changed paths: M www/TODO M www/html_src/scm.html M www/scripts/XorpOrgGenerator.py Log Message: ----------- www: Update web page to point to wiki documentation. The XORP documentation wiki is now live! A big thanks for Pierre Lepropre for making this happen! Signed-off-by: Ben Greear Compare: https://github.com/greearb/xorp.ct/compare/093d1aa...91ae067 From noreply at github.com Wed Mar 16 15:24:17 2011 From: noreply at github.com (noreply at github.com) Date: Wed, 16 Mar 2011 15:24:17 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 613ab6: www: Remove deprecated mailing lists from web pag... Message-ID: <20110316222417.5E23742098@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 613ab6b359b0f5c4a896e8ff7bcd6599b67c9dd1 https://github.com/greearb/xorp.ct/commit/613ab6b359b0f5c4a896e8ff7bcd6599b67c9dd1 Author: Ben Greear Date: 2011-03-15 (Tue, 15 Mar 2011) Changed paths: M www/html_src/mailing_lists.html Log Message: ----------- www: Remove deprecated mailing lists from web page. Signed-off-by: Ben Greear Commit: ff919959c60e23fc7ee7d6cccf5c5cea506984f7 https://github.com/greearb/xorp.ct/commit/ff919959c60e23fc7ee7d6cccf5c5cea506984f7 Author: Ben Greear Date: 2011-03-16 (Wed, 16 Mar 2011) Changed paths: M docs/SConstruct M docs/bgp/SConscript M docs/design_arch/SConscript M docs/fea/SConscript M docs/libxipc/SConscript M docs/libxorp/SConscript M docs/mfea/SConscript M docs/mld6igmp/SConscript M docs/multicast/SConscript M docs/olsr/SConscript M docs/pim/SConscript M docs/pim_testsuite/SConscript M docs/policy/SConscript M docs/rib/SConscript M docs/rtrmgr/SConscript M docs/snmp/SConscript M docs/test_harness/SConscript M docs/user_manual/SConscript M docs/user_manual/preface.tex M docs/windows_port/SConscript M docs/xorpdev_101/SConscript M xorp/bgp/SConscript M xorp/bgp/aspath.cc M xorp/bgp/aspath.hh M xorp/bgp/attribute_manager.hh M xorp/bgp/bgp_trie.hh M xorp/bgp/bgp_varrw.cc M xorp/bgp/crash_dump.cc M xorp/bgp/damping.cc M xorp/bgp/dump_iterators.hh M xorp/bgp/harness/peer.cc M xorp/bgp/harness/test_peer.hh M xorp/bgp/harness/test_trie.cc M xorp/bgp/iptuple.cc M xorp/bgp/local_data.hh M xorp/bgp/main.cc M xorp/bgp/next_hop_resolver.hh M xorp/bgp/parameter.hh M xorp/bgp/path_attribute.cc M xorp/bgp/peer_data.cc M xorp/bgp/peer_data.hh M xorp/bgp/peer_handler_debug.hh M xorp/bgp/peer_list.hh M xorp/bgp/peer_route_pair.hh M xorp/bgp/route_table_base.hh M xorp/bgp/route_table_cache.hh M xorp/bgp/route_table_decision.hh M xorp/bgp/route_table_fanout.hh M xorp/bgp/route_table_filter.hh M xorp/bgp/route_table_policy.cc M xorp/bgp/route_table_policy_im.cc M xorp/bgp/route_table_reader.hh M xorp/bgp/route_table_ribin.hh M xorp/bgp/route_table_ribout.hh M xorp/bgp/tests/test_cache.cc M xorp/bgp/tests/test_decision.cc M xorp/bgp/tests/test_deletion.cc M xorp/bgp/tests/test_dump.cc M xorp/bgp/tests/test_fanout.cc M xorp/bgp/tests/test_filter.cc M xorp/bgp/tests/test_main.cc M xorp/bgp/tests/test_nhlookup.cc M xorp/bgp/tests/test_plumbing.cc M xorp/bgp/tests/test_policy.cc M xorp/bgp/tests/test_ribin.cc M xorp/bgp/tests/test_ribout.cc M xorp/bgp/tools/SConscript M xorp/bgp/update_attrib.cc M xorp/bgp/update_attrib.hh M xorp/cli/cli_client.cc M xorp/cli/cli_client.hh M xorp/cli/cli_command.hh M xorp/cli/cli_command_pipe.hh M xorp/cli/cli_node.cc M xorp/cli/cli_node.hh M xorp/cli/cli_node_net.cc M xorp/cli/libtecla/SConscript M xorp/cli/tools/SConscript M xorp/cli/tools/cli_generic.cc M xorp/contrib/mld6igmp_lite/mld6igmp_group_record.hh M xorp/contrib/mld6igmp_lite/mld6igmp_node.hh M xorp/contrib/mld6igmp_lite/mld6igmp_node_cli.hh M xorp/contrib/mld6igmp_lite/mld6igmp_proto.cc M xorp/contrib/mld6igmp_lite/mld6igmp_source_record.hh M xorp/contrib/mld6igmp_lite/mld6igmp_vif.hh M xorp/contrib/olsr/external.cc M xorp/contrib/olsr/face.cc M xorp/contrib/olsr/face_manager.cc M xorp/contrib/olsr/face_manager.hh M xorp/contrib/olsr/io.hh M xorp/contrib/olsr/message.cc M xorp/contrib/olsr/message.hh M xorp/contrib/olsr/test_message.cc M xorp/contrib/olsr/tools/clear_database.cc M xorp/contrib/olsr/tools/print_databases.cc M xorp/contrib/olsr/xrl_io.cc M xorp/contrib/olsr/xrl_port.hh M xorp/contrib/olsr/xrl_queue.cc A xorp/devnotes/update_changed_copyright.bash M xorp/fea/data_plane/control_socket/windows_routing_socket.h M xorp/fea/data_plane/control_socket/windows_rras_support.cc M xorp/fea/data_plane/control_socket/windows_rras_support.hh M xorp/fea/data_plane/control_socket/windows_rtm_pipe.cc M xorp/fea/data_plane/control_socket/windows_rtm_pipe.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_get_iphelper.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_get_iphelper.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_get_rtmv2.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_get_rtmv2.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_observer_iphelper.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_observer_iphelper.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_observer_rtmv2.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_observer_rtmv2.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_set_iphelper.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_set_iphelper.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_set_rtmv2.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_set_rtmv2.hh M xorp/fea/data_plane/fibconfig/fibconfig_forwarding_windows.cc M xorp/fea/data_plane/fibconfig/fibconfig_forwarding_windows.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_get_iphelper.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_get_iphelper.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_observer_iphelper.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_observer_iphelper.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_observer_rtmv2.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_observer_rtmv2.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_set_iphelper.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_set_iphelper.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_set_rtmv2.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_set_rtmv2.hh M xorp/fea/data_plane/firewall/firewall_set_dummy.hh M xorp/fea/data_plane/firewall/firewall_set_ipfw2.hh M xorp/fea/data_plane/firewall/firewall_set_netfilter.hh M xorp/fea/data_plane/firewall/firewall_set_pf.hh M xorp/fea/data_plane/ifconfig/SConscript M xorp/fea/data_plane/ifconfig/ifconfig_get_iphelper.cc M xorp/fea/data_plane/ifconfig/ifconfig_get_iphelper.hh M xorp/fea/data_plane/ifconfig/ifconfig_observer_iphelper.cc M xorp/fea/data_plane/ifconfig/ifconfig_observer_iphelper.hh M xorp/fea/data_plane/ifconfig/ifconfig_property_windows.cc M xorp/fea/data_plane/ifconfig/ifconfig_property_windows.hh M xorp/fea/data_plane/ifconfig/ifconfig_set.cc M xorp/fea/data_plane/ifconfig/ifconfig_set_iphelper.cc M xorp/fea/data_plane/ifconfig/ifconfig_set_iphelper.hh M xorp/fea/data_plane/ifconfig/ifconfig_vlan_get_linux.cc M xorp/fea/data_plane/ifconfig/ifconfig_vlan_get_linux.hh M xorp/fea/data_plane/ifconfig/ifconfig_vlan_set_linux.cc M xorp/fea/data_plane/ifconfig/ifconfig_vlan_set_linux.hh M xorp/fea/data_plane/io/SConscript M xorp/fea/data_plane/io/io_ip_dummy.hh M xorp/fea/data_plane/io/io_ip_socket.cc M xorp/fea/data_plane/io/io_ip_socket.hh M xorp/fea/data_plane/io/io_link_dummy.hh M xorp/fea/data_plane/io/io_tcpudp_socket.hh M xorp/fea/data_plane/managers/fea_data_plane_manager_windows.cc M xorp/fea/data_plane/managers/fea_data_plane_manager_windows.hh M xorp/fea/firewall_entry.hh M xorp/fea/fte.hh M xorp/fea/ifconfig_set.hh M xorp/fea/ifconfig_vlan_get.hh M xorp/fea/ifconfig_vlan_set.hh M xorp/fea/io_ip.hh M xorp/fea/io_tcpudp.hh M xorp/fea/mfea_dataflow.hh M xorp/fea/mfea_node_cli.hh M xorp/fea/nexthop_port_mapper.hh M xorp/fea/tests/test_xrl_sockets4_tcp.cc M xorp/fea/tests/test_xrl_sockets4_udp.cc M xorp/fea/tools/SConscript M xorp/fea/tools/show_interfaces.cc M xorp/fib2mrib/SConscript M xorp/fib2mrib/fib2mrib_node.cc M xorp/fib2mrib/fib2mrib_node.hh M xorp/fib2mrib/xorp_fib2mrib.cc M xorp/libcomm/tests/test_connect.cc M xorp/libfeaclient/ifmgr_xrl_mirror.hh M xorp/libfeaclient/tests/test_local_copy.cc M xorp/libfeaclient/tests/test_remote_copy.cc M xorp/libproto/config_node_id.hh M xorp/libproto/proto_node.hh M xorp/libproto/proto_node_cli.hh M xorp/libproto/proto_state.hh M xorp/libproto/proto_unit.hh M xorp/libproto/tests/test_spt.cc M xorp/libxipc/call_xrl.cc M xorp/libxipc/finder.cc M xorp/libxipc/finder_client.hh M xorp/libxipc/finder_client_xrl_target.cc M xorp/libxipc/finder_main.cc M xorp/libxipc/finder_messenger.hh M xorp/libxipc/finder_server.cc M xorp/libxipc/finder_server.hh M xorp/libxipc/finder_tcp.cc M xorp/libxipc/finder_tcp_messenger.cc M xorp/libxipc/finder_tcp_messenger.hh M xorp/libxipc/finder_xrl_queue.cc M xorp/libxipc/finder_xrl_queue.hh M xorp/libxipc/finder_xrl_target.cc M xorp/libxipc/hmac.hh M xorp/libxipc/permits.hh M xorp/libxipc/sockutil.hh M xorp/libxipc/tests/test_finder_events.cc M xorp/libxipc/tests/test_stcp.cc M xorp/libxipc/tests/test_xrl.cc M xorp/libxipc/xrl_args.cc M xorp/libxipc/xrl_args.hh M xorp/libxipc/xrl_atom_encoding.cc M xorp/libxipc/xrl_atom_encoding.hh M xorp/libxipc/xrl_atom_list.hh M xorp/libxipc/xrl_dispatcher.hh M xorp/libxipc/xrl_parser.cc M xorp/libxipc/xrl_parser.hh M xorp/libxipc/xrl_parser_input.cc M xorp/libxipc/xrl_parser_input.hh M xorp/libxipc/xrl_pf.cc M xorp/libxipc/xrl_pf_factory.hh M xorp/libxipc/xrl_pf_stcp.hh M xorp/libxipc/xrl_pf_stcp_ph.cc M xorp/libxipc/xrl_pf_unix.cc M xorp/libxipc/xrl_pf_unix.hh M xorp/libxipc/xrl_std_router.cc M xorp/libxipc/xrl_std_router.hh M xorp/libxipc/xuid.cc M xorp/libxipc/xuid.hh M xorp/libxorp/asnum.hh M xorp/libxorp/backtrace.cc M xorp/libxorp/buffer.hh M xorp/libxorp/buffered_asyncio.cc M xorp/libxorp/c_format.cc M xorp/libxorp/callback.cc M xorp/libxorp/clock.cc M xorp/libxorp/daemon.h M xorp/libxorp/eventloop.cc M xorp/libxorp/exceptions.cc M xorp/libxorp/gai_strerror.c M xorp/libxorp/heap.cc M xorp/libxorp/heap.hh M xorp/libxorp/ipv4.hh M xorp/libxorp/ipv6.cc M xorp/libxorp/ipv6.hh M xorp/libxorp/ipvx.cc M xorp/libxorp/nexthop.hh M xorp/libxorp/popen.cc M xorp/libxorp/popen.hh M xorp/libxorp/profile.cc M xorp/libxorp/random.c M xorp/libxorp/range.hh M xorp/libxorp/ref_ptr.hh M xorp/libxorp/run_command.cc M xorp/libxorp/run_command.hh M xorp/libxorp/safe_callback_obj.cc M xorp/libxorp/service.cc M xorp/libxorp/test_main.hh M xorp/libxorp/tests/test_asyncio.cc M xorp/libxorp/tests/test_callback.cc M xorp/libxorp/tests/test_config_param.cc M xorp/libxorp/tests/test_heap.cc M xorp/libxorp/tests/test_ipnet.cc M xorp/libxorp/tests/test_ipv4.cc M xorp/libxorp/tests/test_ipv4net.cc M xorp/libxorp/tests/test_ipv6.cc M xorp/libxorp/tests/test_ipv6net.cc M xorp/libxorp/tests/test_ipvx.cc M xorp/libxorp/tests/test_ipvxnet.cc M xorp/libxorp/tests/test_mac.cc M xorp/libxorp/tests/test_observers.cc M xorp/libxorp/tests/test_profile.cc M xorp/libxorp/tests/test_ref_ptr.cc M xorp/libxorp/tests/test_ref_trie.cc M xorp/libxorp/tests/test_run_command.cc M xorp/libxorp/tests/test_sched.cc M xorp/libxorp/tests/test_service.cc M xorp/libxorp/tests/test_task.cc M xorp/libxorp/tests/test_time_slice.cc M xorp/libxorp/tests/test_timer.cc M xorp/libxorp/tests/test_timeval.cc M xorp/libxorp/tests/test_trie.cc M xorp/libxorp/tests/test_types.cc M xorp/libxorp/tests/test_utils.cc M xorp/libxorp/tests/test_vif.cc M xorp/libxorp/timer.cc M xorp/libxorp/timeval.cc M xorp/libxorp/timeval.hh M xorp/libxorp/token.cc M xorp/libxorp/token.hh M xorp/libxorp/transaction.cc M xorp/libxorp/trie.hh M xorp/libxorp/utility.h M xorp/libxorp/utils.cc M xorp/libxorp/vif.cc M xorp/libxorp/vif.hh M xorp/libxorp/win_dispatcher.cc M xorp/libxorp/win_dispatcher.hh M xorp/libxorp/win_io.c M xorp/libxorp/win_io.h M xorp/libxorp/xorp_osdep_mid.h M xorp/libxorp/xorpfd.hh M xorp/mld6igmp/mld6igmp_group_record.cc M xorp/mld6igmp/mld6igmp_group_record.hh M xorp/mld6igmp/mld6igmp_node_cli.hh M xorp/mld6igmp/mld6igmp_source_record.hh M xorp/mld6igmp/xorp_igmp.cc M xorp/mld6igmp/xorp_mld.cc M xorp/mrt/buffer.h M xorp/mrt/mifset.hh M xorp/mrt/mrib_table.hh M xorp/mrt/mrt.hh M xorp/mrt/netstream_access.h M xorp/mrt/tests/test_mrt.cc M xorp/ospf/area_router.cc M xorp/ospf/auth.hh M xorp/ospf/external.cc M xorp/ospf/lsa.cc M xorp/ospf/packet.cc M xorp/ospf/policy_varrw.cc M xorp/ospf/routing_table.cc M xorp/ospf/tests/test_packet.cc M xorp/ospf/tests/test_peering.cc M xorp/ospf/tests/test_routing.cc M xorp/ospf/tests/test_routing_database.cc M xorp/ospf/xorp_ospfv2.cc M xorp/pim/pim_bsr.cc M xorp/pim/pim_bsr.hh M xorp/pim/pim_config.cc M xorp/pim/pim_mre_join_prune.cc M xorp/pim/pim_mre_rpf.cc M xorp/pim/pim_mre_task.hh M xorp/pim/pim_mre_track_state.cc M xorp/pim/pim_mre_track_state.hh M xorp/pim/pim_mrib_table.hh M xorp/pim/pim_nbr.cc M xorp/pim/pim_nbr.hh M xorp/pim/pim_node_cli.hh M xorp/pim/pim_proto.h M xorp/pim/pim_proto_join_prune_message.cc M xorp/pim/pim_proto_join_prune_message.hh M xorp/pim/pim_proto_register.cc M xorp/pim/pim_rp.hh M xorp/pim/pim_scope_zone_table.hh M xorp/pim/xorp_pimsm4.cc M xorp/pim/xorp_pimsm6.cc M xorp/policy/SConscript M xorp/policy/backend/filter_base.hh M xorp/policy/backend/policy_backend_parser.hh M xorp/policy/backend/policytags.cc M xorp/policy/backend/policytags.hh M xorp/policy/code.cc M xorp/policy/code.hh M xorp/policy/code_generator.hh M xorp/policy/common/dispatcher.cc M xorp/policy/common/dispatcher.hh M xorp/policy/common/elem_null.hh M xorp/policy/common/elem_set.cc M xorp/policy/common/elem_set.hh M xorp/policy/common/element.hh M xorp/policy/common/element_base.hh M xorp/policy/common/element_factory.hh M xorp/policy/common/filter.cc M xorp/policy/common/filter.hh M xorp/policy/common/operator_base.hh M xorp/policy/common/policy_exception.hh M xorp/policy/common/policy_utils.hh M xorp/policy/common/register_operations.cc M xorp/policy/common/varrw.hh M xorp/policy/export_code_generator.cc M xorp/policy/filter_manager.cc M xorp/policy/filter_manager.hh M xorp/policy/parser.hh M xorp/policy/policy_map.hh M xorp/policy/policy_parser.hh M xorp/policy/policy_target.cc M xorp/policy/policy_target.hh M xorp/policy/process_watch.hh M xorp/policy/process_watch_base.hh M xorp/policy/pw_notifier.hh M xorp/policy/semantic_varrw.cc M xorp/policy/set_map.hh M xorp/policy/test_varrw.hh M xorp/policy/tests/compilepolicy.cc M xorp/policy/tests/execpolicy.cc M xorp/policy/tests/file_varrw.hh M xorp/policy/tests/filter_manager_fake.cc M xorp/policy/tests/process_watch_fake.cc M xorp/policy/visitor.hh M xorp/policy/visitor_dep.cc M xorp/policy/visitor_dep.hh M xorp/policy/visitor_printer.cc M xorp/policy/visitor_semantic.cc M xorp/policy/xorp_policy.cc M xorp/rib/add_route.cc M xorp/rib/parser.hh M xorp/rib/route.hh M xorp/rib/routemap.hh M xorp/rib/rt_tab_deletion.cc M xorp/rib/rt_tab_extint.cc M xorp/rib/rt_tab_log.cc M xorp/rib/rt_tab_log.hh M xorp/rib/rt_tab_merged.cc M xorp/rib/rt_tab_pol_conn.cc M xorp/rib/rt_tab_redist.cc M xorp/rib/rt_tab_register.hh M xorp/rib/tests/dummy_register_server.hh M xorp/rib/tests/test_redist.cc M xorp/rib/tools/SConscript M xorp/rip/auth.cc M xorp/rip/auth.hh M xorp/rip/output_table.cc M xorp/rip/output_updates.cc M xorp/rip/packet_queue.hh M xorp/rip/packets.hh M xorp/rip/port.hh M xorp/rip/port_manager.hh M xorp/rip/route_db.cc M xorp/rip/route_entry.cc M xorp/rip/tests/test_auth.cc M xorp/rip/tests/test_outputs.cc M xorp/rip/tests/test_packets.cc M xorp/rip/tests/test_request.cc M xorp/rip/tests/test_route_walk.cc M xorp/rip/tests/test_timers.cc M xorp/rip/tests/test_update_queue.cc M xorp/rip/tests/test_utils.hh M xorp/rip/tools/SConscript M xorp/rip/tools/common.cc M xorp/rip/tools/common.hh M xorp/rip/tools/rip_announcer.cc M xorp/rip/tools/ripng_announcer.cc M xorp/rip/update_queue.cc M xorp/rip/update_queue.hh M xorp/rip/xorp_rip_main.cc M xorp/rip/xrl_port_io.hh M xorp/rip/xrl_redist_manager.hh M xorp/rip/xrl_rib_notifier.hh M xorp/rtrmgr/cli.cc M xorp/rtrmgr/cli.hh M xorp/rtrmgr/command_tree.hh M xorp/rtrmgr/conf_tree.hh M xorp/rtrmgr/conf_tree_node.cc M xorp/rtrmgr/config_operators.hh M xorp/rtrmgr/generic_module_manager.hh M xorp/rtrmgr/main_rtrmgr.hh M xorp/rtrmgr/master_conf_tree.hh M xorp/rtrmgr/master_conf_tree_node.hh M xorp/rtrmgr/master_template_tree.cc M xorp/rtrmgr/master_template_tree_node.cc M xorp/rtrmgr/master_template_tree_node.hh M xorp/rtrmgr/module_manager.hh M xorp/rtrmgr/op_commands.cc M xorp/rtrmgr/path_segment.hh M xorp/rtrmgr/randomness.cc M xorp/rtrmgr/slave_conf_tree.hh M xorp/rtrmgr/slave_conf_tree_node.hh M xorp/rtrmgr/template_base_command.cc M xorp/rtrmgr/template_base_command.hh M xorp/rtrmgr/template_commands.cc M xorp/rtrmgr/template_commands.hh M xorp/rtrmgr/template_tree.hh M xorp/rtrmgr/template_tree_node.cc M xorp/rtrmgr/template_tree_node.hh M xorp/rtrmgr/tests/test_templates.cc M xorp/rtrmgr/userdb.cc M xorp/rtrmgr/userdb.hh M xorp/rtrmgr/util.cc M xorp/rtrmgr/xorpsh_main.cc M xorp/rtrmgr/xorpsh_main.hh M xorp/rtrmgr/xrl_xorpsh_interface.cc M xorp/static_routes/SConscript M xorp/static_routes/static_routes_node.cc M xorp/static_routes/static_routes_node.hh M xorp/static_routes/xorp_static_routes.cc M xorp/utils/runit.cc M xorp/vrrp/SConscript M xorp/vrrp/arpd.hh M xorp/xrl/tests/test_generated.cc M xorp/xrl/tests/test_tgt.cc M xorp/xrl/tests/test_tgt.hh M xorp/xrl/tests/test_xifs.cc Log Message: ----------- Update copyright for changed files. This change was auto-created by the update_changed_copyright.bash script. It should change the copyright from xorp-inc to xorp-inc & others for files modified since the last release (1a4cdaa30cec4ab15519859df78a462b7ee2a3e1). Signed-off-by: Ben Greear Commit: d13fe6e0906bd2c9c0f48bff4fe86b125af907df https://github.com/greearb/xorp.ct/commit/d13fe6e0906bd2c9c0f48bff4fe86b125af907df Author: Ben Greear Date: 2011-03-16 (Wed, 16 Mar 2011) Changed paths: M xorp/LICENSE.other M xorp/SConscript M xorp/SConstruct M xorp/bgp/bgp.cc M xorp/bgp/bgp.hh M xorp/bgp/crash_dump.hh M xorp/bgp/damping.hh M xorp/bgp/harness/SConscript M xorp/bgp/next_hop_resolver.cc M xorp/bgp/path_attribute.hh M xorp/bgp/peer.cc M xorp/bgp/peer_handler.cc M xorp/bgp/peer_handler.hh M xorp/bgp/plumbing.cc M xorp/bgp/plumbing.hh M xorp/bgp/process_watch.cc M xorp/bgp/profile_vars.hh M xorp/bgp/rib_ipc_handler.cc M xorp/bgp/rib_ipc_handler.hh M xorp/bgp/route_table_nhlookup.cc M xorp/bgp/route_table_ribout.cc M xorp/bgp/socket.cc M xorp/bgp/tools/print_routes.cc M xorp/bgp/tools/xorpsh_print_routes.cc M xorp/bgp/xrl_target.cc M xorp/bgp/xrl_target.hh M xorp/cli/SConscript M xorp/cli/cli_command.cc M xorp/cli/xrl_cli_node.hh M xorp/contrib/olsr/SConscript M xorp/contrib/olsr/neighbor.cc M xorp/contrib/olsr/neighbor.hh M xorp/contrib/olsr/neighborhood.cc M xorp/contrib/olsr/neighborhood.hh M xorp/contrib/olsr/route_manager.cc M xorp/contrib/olsr/tools/SConscript M xorp/contrib/olsr/twohop.cc M xorp/contrib/olsr/twohop.hh M xorp/contrib/olsr/xrl_target.hh M xorp/devnotes/update_changed_copyright.bash M xorp/devnotes/update_copyright.sh M xorp/etc/templates/SConscript M xorp/fea/SConscript M xorp/fea/data_plane/SConscript M xorp/fea/data_plane/control_socket/SConscript M xorp/fea/data_plane/control_socket/click_socket.cc M xorp/fea/data_plane/control_socket/click_socket.hh M xorp/fea/data_plane/control_socket/netlink_socket.cc M xorp/fea/data_plane/control_socket/netlink_socket.hh M xorp/fea/data_plane/control_socket/netlink_socket_utilities.cc M xorp/fea/data_plane/control_socket/netlink_socket_utilities.hh M xorp/fea/data_plane/control_socket/routing_socket.cc M xorp/fea/data_plane/control_socket/routing_socket.hh M xorp/fea/data_plane/control_socket/routing_socket_utilities.cc M xorp/fea/data_plane/control_socket/routing_socket_utilities.hh M xorp/fea/data_plane/fibconfig/SConscript M xorp/fea/data_plane/fibconfig/fibconfig_entry_get_click.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_get_click.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_get_dummy.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_get_netlink_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_get_netlink_socket.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_get_routing_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_get_routing_socket.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_observer_dummy.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_observer_netlink_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_observer_netlink_socket.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_observer_routing_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_observer_routing_socket.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_parse_routing_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_set_click.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_set_click.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_set_dummy.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_set_netlink_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_set_netlink_socket.hh M xorp/fea/data_plane/fibconfig/fibconfig_entry_set_routing_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_entry_set_routing_socket.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_get_click.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_get_click.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_get_dummy.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_get_netlink_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_get_netlink_socket.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_get_sysctl.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_observer_dummy.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_observer_netlink_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_observer_netlink_socket.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_observer_routing_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_observer_routing_socket.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_parse_netlink_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_parse_routing_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_set_click.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_set_click.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_set_dummy.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_set_netlink_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_set_netlink_socket.hh M xorp/fea/data_plane/fibconfig/fibconfig_table_set_routing_socket.cc M xorp/fea/data_plane/fibconfig/fibconfig_table_set_routing_socket.hh M xorp/fea/data_plane/ifconfig/ifconfig_get_click.cc M xorp/fea/data_plane/ifconfig/ifconfig_get_click.hh M xorp/fea/data_plane/ifconfig/ifconfig_get_ioctl.cc M xorp/fea/data_plane/ifconfig/ifconfig_get_ioctl.hh M xorp/fea/data_plane/ifconfig/ifconfig_get_netlink_socket.cc M xorp/fea/data_plane/ifconfig/ifconfig_get_netlink_socket.hh M xorp/fea/data_plane/ifconfig/ifconfig_get_proc_linux.cc M xorp/fea/data_plane/ifconfig/ifconfig_get_proc_linux.hh M xorp/fea/data_plane/ifconfig/ifconfig_get_sysctl.cc M xorp/fea/data_plane/ifconfig/ifconfig_media.cc M xorp/fea/data_plane/ifconfig/ifconfig_observer_netlink_socket.cc M xorp/fea/data_plane/ifconfig/ifconfig_observer_netlink_socket.hh M xorp/fea/data_plane/ifconfig/ifconfig_observer_routing_socket.cc M xorp/fea/data_plane/ifconfig/ifconfig_observer_routing_socket.hh M xorp/fea/data_plane/ifconfig/ifconfig_parse_ioctl.cc M xorp/fea/data_plane/ifconfig/ifconfig_parse_netlink_socket.cc M xorp/fea/data_plane/ifconfig/ifconfig_parse_routing_socket.cc M xorp/fea/data_plane/ifconfig/ifconfig_property_bsd.cc M xorp/fea/data_plane/ifconfig/ifconfig_property_bsd.hh M xorp/fea/data_plane/ifconfig/ifconfig_property_linux.cc M xorp/fea/data_plane/ifconfig/ifconfig_property_linux.hh M xorp/fea/data_plane/ifconfig/ifconfig_property_solaris.cc M xorp/fea/data_plane/ifconfig/ifconfig_property_solaris.hh M xorp/fea/data_plane/ifconfig/ifconfig_set_click.cc M xorp/fea/data_plane/ifconfig/ifconfig_set_click.hh M xorp/fea/data_plane/ifconfig/ifconfig_set_ioctl.cc M xorp/fea/data_plane/ifconfig/ifconfig_set_ioctl.hh M xorp/fea/data_plane/ifconfig/ifconfig_set_netlink_socket.cc M xorp/fea/data_plane/ifconfig/ifconfig_set_netlink_socket.hh M xorp/fea/data_plane/io/io_link_pcap.cc M xorp/fea/data_plane/io/io_tcpudp_socket.cc M xorp/fea/data_plane/managers/SConscript M xorp/fea/data_plane/managers/fea_data_plane_manager_bsd.cc M xorp/fea/data_plane/managers/fea_data_plane_manager_bsd.hh M xorp/fea/data_plane/managers/fea_data_plane_manager_click.cc M xorp/fea/data_plane/managers/fea_data_plane_manager_click.hh M xorp/fea/data_plane/managers/fea_data_plane_manager_dummy.cc M xorp/fea/data_plane/managers/fea_data_plane_manager_linux.cc M xorp/fea/data_plane/managers/fea_data_plane_manager_linux.hh M xorp/fea/fea_data_plane_manager.cc M xorp/fea/fea_data_plane_manager.hh M xorp/fea/fea_io.hh M xorp/fea/fea_node.cc M xorp/fea/fea_node.hh M xorp/fea/fibconfig.cc M xorp/fea/fibconfig.hh M xorp/fea/fibconfig_entry_get.hh M xorp/fea/fibconfig_entry_observer.hh M xorp/fea/fibconfig_entry_set.hh M xorp/fea/fibconfig_table_get.hh M xorp/fea/fibconfig_table_observer.hh M xorp/fea/fibconfig_table_set.hh M xorp/fea/firewall_manager.hh M xorp/fea/ifconfig.cc M xorp/fea/ifconfig.hh M xorp/fea/ifconfig_reporter.cc M xorp/fea/ifconfig_reporter.hh M xorp/fea/ifconfig_transaction.hh M xorp/fea/iftree.cc M xorp/fea/iftree.hh M xorp/fea/io_ip_manager.cc M xorp/fea/io_ip_manager.hh M xorp/fea/io_link.cc M xorp/fea/io_link.hh M xorp/fea/io_link_manager.cc M xorp/fea/io_link_manager.hh M xorp/fea/io_tcpudp_manager.cc M xorp/fea/io_tcpudp_manager.hh M xorp/fea/libfeaclient_bridge.cc M xorp/fea/libfeaclient_bridge.hh M xorp/fea/mfea_mrouter.cc M xorp/fea/mfea_mrouter.hh M xorp/fea/mfea_node.cc M xorp/fea/mfea_node.hh M xorp/fea/mfea_vif.cc M xorp/fea/mfea_vif.hh M xorp/fea/profile_vars.hh M xorp/fea/tests/test_fea_rawlink.cc M xorp/fea/xorp_fea.cc M xorp/fea/xrl_fea_io.cc M xorp/fea/xrl_fea_io.hh M xorp/fea/xrl_fea_node.cc M xorp/fea/xrl_fea_target.cc M xorp/fea/xrl_fea_target.hh M xorp/fea/xrl_fib_client_manager.cc M xorp/fea/xrl_fib_client_manager.hh M xorp/fea/xrl_io_ip_manager.cc M xorp/fea/xrl_io_tcpudp_manager.cc M xorp/fea/xrl_mfea_node.cc M xorp/fea/xrl_mfea_node.hh M xorp/fib2mrib/xrl_fib2mrib_node.cc M xorp/fib2mrib/xrl_fib2mrib_node.hh M xorp/libcomm/tests/test_comm.c M xorp/libfeaclient/ifmgr_atoms.cc M xorp/libfeaclient/ifmgr_atoms.hh M xorp/libfeaclient/ifmgr_cmd_queue.cc M xorp/libfeaclient/ifmgr_cmd_queue.hh M xorp/libfeaclient/ifmgr_cmds.cc M xorp/libfeaclient/ifmgr_cmds.hh M xorp/libfeaclient/ifmgr_xrl_mirror.cc M xorp/libfeaclient/ifmgr_xrl_replicator.cc M xorp/libproto/packet.cc M xorp/libproto/packet.hh M xorp/libproto/spt.hh M xorp/libxipc/SConscript M xorp/libxipc/finder.hh M xorp/libxipc/finder_client.cc M xorp/libxipc/finder_client_xrl_target.hh M xorp/libxipc/finder_tcp.hh M xorp/libxipc/finder_xrl_target.hh M xorp/libxipc/sockutil.cc M xorp/libxipc/tests/SConscript M xorp/libxipc/tests/test_receiver.hh M xorp/libxipc/tests/test_xrl_atom.cc M xorp/libxipc/tests/test_xrl_sender.cc M xorp/libxipc/xrl.hh M xorp/libxipc/xrl_atom.cc M xorp/libxipc/xrl_atom.hh M xorp/libxipc/xrl_cmd_map.hh M xorp/libxipc/xrl_error.cc M xorp/libxipc/xrl_error.hh M xorp/libxipc/xrl_pf.hh M xorp/libxipc/xrl_pf_factory.cc M xorp/libxipc/xrl_pf_stcp.cc M xorp/libxipc/xrl_router.cc M xorp/libxipc/xrl_router.hh M xorp/libxipc/xrl_sender.hh M xorp/libxorp/SConscript M xorp/libxorp/asyncio.cc M xorp/libxorp/asyncio.hh M xorp/libxorp/buffered_asyncio.hh M xorp/libxorp/debug.c M xorp/libxorp/debug.h M xorp/libxorp/eventloop.hh M xorp/libxorp/exceptions.hh M xorp/libxorp/getopt.c M xorp/libxorp/ioevents.hh M xorp/libxorp/ipnet.hh M xorp/libxorp/ipvxnet.hh M xorp/libxorp/profile.hh M xorp/libxorp/safe_callback_obj.hh M xorp/libxorp/selector.cc M xorp/libxorp/selector.hh M xorp/libxorp/strptime.c M xorp/libxorp/task.hh M xorp/libxorp/tests/SConscript M xorp/libxorp/timer.hh M xorp/libxorp/timespent.hh M xorp/libxorp/tokenize.hh M xorp/libxorp/transaction.hh M xorp/libxorp/utils.hh M xorp/libxorp/xlog.c M xorp/libxorp/xlog.h M xorp/libxorp/xorp.h M xorp/libxorp/xorp_noncopyable.hh M xorp/libxorp/xorp_osdep_begin.h M xorp/libxorp/xorp_osdep_end.h M xorp/libxorp/xorp_tests.hh M xorp/mld6igmp/SConscript M xorp/mld6igmp/mld6igmp_node.cc M xorp/mld6igmp/mld6igmp_node.hh M xorp/mld6igmp/mld6igmp_proto.cc M xorp/mld6igmp/mld6igmp_vif.cc M xorp/mld6igmp/mld6igmp_vif.hh M xorp/mld6igmp/xrl_mld6igmp_node.cc M xorp/mld6igmp/xrl_mld6igmp_node.hh M xorp/ospf/SConscript M xorp/ospf/auth.cc M xorp/ospf/ospf.cc M xorp/ospf/peer.cc M xorp/ospf/peer.hh M xorp/ospf/peer_manager.cc M xorp/ospf/tests/test_routing_table.cc M xorp/ospf/tools/SConscript M xorp/ospf/tools/clear_database.cc M xorp/ospf/tools/print_lsas.cc M xorp/ospf/tools/print_neighbours.cc M xorp/ospf/xorp_ospfv3.cc M xorp/ospf/xrl_io.cc M xorp/ospf/xrl_io.hh M xorp/ospf/xrl_target.cc M xorp/ospf/xrl_target.hh M xorp/ospf/xrl_target3.cc M xorp/ospf/xrl_target3.hh M xorp/pim/SConscript M xorp/pim/pim_mrt_mfc.cc M xorp/pim/pim_node.cc M xorp/pim/pim_node.hh M xorp/pim/pim_proto_assert.cc M xorp/pim/pim_proto_bootstrap.cc M xorp/pim/pim_proto_cand_rp_adv.cc M xorp/pim/pim_proto_hello.cc M xorp/pim/pim_proto_join_prune.cc M xorp/pim/pim_proto_register_stop.cc M xorp/pim/pim_vif.cc M xorp/pim/pim_vif.hh M xorp/pim/xrl_pim_node.hh M xorp/policy/backend/SConscript M xorp/policy/backend/instruction.hh M xorp/policy/backend/iv_exec.cc M xorp/policy/backend/iv_exec.hh M xorp/policy/backend/policy_filter.cc M xorp/policy/backend/policy_filter.hh M xorp/policy/backend/policy_filters.hh M xorp/policy/backend/policy_instr.hh M xorp/policy/backend/policy_redist_map.hh M xorp/policy/backend/set_manager.hh M xorp/policy/backend/single_varrw.hh M xorp/policy/backend/term_instr.hh M xorp/policy/backend/version_filter.cc M xorp/policy/backend/version_filter.hh M xorp/policy/backend/version_filters.hh M xorp/policy/code_list.hh M xorp/policy/common/SConscript M xorp/policy/common/elem_bgp.hh M xorp/policy/common/elem_filter.hh M xorp/policy/configuration.cc M xorp/policy/configuration.hh M xorp/policy/dependency.hh M xorp/policy/node.hh M xorp/policy/policy_list.cc M xorp/policy/policy_list.hh M xorp/policy/policy_statement.hh M xorp/policy/protocol_map.hh M xorp/policy/semantic_varrw.hh M xorp/policy/source_match_code_generator.cc M xorp/policy/source_match_code_generator.hh M xorp/policy/term.hh M xorp/policy/tests/compilepolicy.hh M xorp/policy/tests/filter_manager_fake.hh M xorp/policy/tests/process_watch_fake.hh M xorp/policy/var_map.hh M xorp/policy/visitor_semantic.hh M xorp/policy/xrl_target.hh M xorp/rib/SConscript M xorp/rib/main_rib.cc M xorp/rib/profile_vars.hh M xorp/rib/redist_policy.hh M xorp/rib/redist_xrl.cc M xorp/rib/register_server.cc M xorp/rib/register_server.hh M xorp/rib/rib.cc M xorp/rib/rib.hh M xorp/rib/rib_manager.cc M xorp/rib/rib_manager.hh M xorp/rib/rt_tab_pol_redist.cc M xorp/rib/rt_tab_redist.hh M xorp/rib/rt_tab_register.cc M xorp/rib/tools/show_distances.cc M xorp/rib/tools/show_routes.cc M xorp/rib/vifmanager.cc M xorp/rib/xrl_target.cc M xorp/rib/xrl_target.hh M xorp/rip/SConscript M xorp/rip/output.hh M xorp/rip/port.cc M xorp/rip/redist.hh M xorp/rip/route_db.hh M xorp/rip/route_entry.hh M xorp/rip/system.hh M xorp/rip/xrl_port_io.cc M xorp/rip/xrl_port_manager.hh M xorp/rip/xrl_target_common.hh M xorp/rip/xrl_target_rip.cc M xorp/rip/xrl_target_rip.hh M xorp/rip/xrl_target_ripng.cc M xorp/rip/xrl_target_ripng.hh M xorp/rtrmgr/SConscript M xorp/rtrmgr/conf_tree_node.hh M xorp/rtrmgr/main_rtrmgr.cc M xorp/rtrmgr/master_conf_tree.cc M xorp/rtrmgr/master_conf_tree_node.cc M xorp/rtrmgr/module_command.cc M xorp/rtrmgr/module_manager.cc M xorp/rtrmgr/op_commands.hh M xorp/rtrmgr/profiler.cc M xorp/rtrmgr/task.cc M xorp/rtrmgr/task.hh M xorp/rtrmgr/template_tree.cc M xorp/rtrmgr/tests/test_module_manager.hh M xorp/rtrmgr/tests/test_sample_config.hh M xorp/rtrmgr/xorpsh_base.hh M xorp/rtrmgr/xrl_rtrmgr_interface.cc M xorp/rtrmgr/xrl_rtrmgr_interface.hh M xorp/rtrmgr/xrl_xorpsh_interface.hh M xorp/rtrmgr/xrldb.cc M xorp/rtrmgr/xrldb.hh M xorp/site_scons/config/allconfig.py M xorp/static_routes/xrl_static_routes_node.cc M xorp/static_routes/xrl_static_routes_node.hh M xorp/tests/test_main.py M xorp/utils/SConscript M xorp/vrrp/arpd.cc M xorp/vrrp/vrrp.cc M xorp/vrrp/vrrp.hh M xorp/vrrp/vrrp_interface.hh M xorp/vrrp/vrrp_packet.cc M xorp/vrrp/vrrp_packet.hh M xorp/vrrp/vrrp_target.cc M xorp/vrrp/vrrp_target.hh M xorp/vrrp/vrrp_vif.cc M xorp/vrrp/vrrp_vif.hh M xorp/xrl/interfaces/SConscript M xorp/xrl/scripts/Xif/util.py M xorp/xrl/targets/SConscript Log Message: ----------- Update copyright for files with 'and Others' copyright. These files were previously modified and had their copyright updated to 2010 xorp-inc & others. They have been modified again since last release, so update the copyright. Signed-off-by: Ben Greear Compare: https://github.com/greearb/xorp.ct/compare/91ae067...d13fe6e From noreply at github.com Wed Mar 16 21:54:54 2011 From: noreply at github.com (noreply at github.com) Date: Wed, 16 Mar 2011 21:54:54 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] e9deda: Update .deb and rpm build files for rls 1.8.3 Message-ID: <20110317045454.0FE3A422E3@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: e9deda84609ebf580ec41c8c16d2e0e7eca22ae2 https://github.com/greearb/xorp.ct/commit/e9deda84609ebf580ec41c8c16d2e0e7eca22ae2 Author: Ben Greear Date: 2011-03-16 (Wed, 16 Mar 2011) Changed paths: M xorp/Makefile.deb M xorp/package_files/xorp.ct.spec Log Message: ----------- Update .deb and rpm build files for rls 1.8.3 Signed-off-by: Ben Greear From greearb at candelatech.com Thu Mar 17 00:14:12 2011 From: greearb at candelatech.com (Ben Greear) Date: Thu, 17 Mar 2011 00:14:12 -0700 Subject: [Xorp-hackers] Release 1.8.3 is almost done, please test Message-ID: <4D81B4C4.3060601@candelatech.com> I've uploaded xorp 1.8.3 builds to xorp.org: http://www.xorp.org/releases/1.8.3/ There are RPMs for recent Fedora, binary builds for all sorts of Fedora and similar OSs, and source tarball. If anyone can give these some quick testing to basically verify the build and packaging scripts, that would be great help! The naming could perhaps be better, so let me know if you think of something that makes more sense. I'll push these on to github and maybe sourceforge tomorrow if all goes well. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From noreply at github.com Thu Mar 17 00:16:04 2011 From: noreply at github.com (noreply at github.com) Date: Thu, 17 Mar 2011 00:16:04 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 1c318b: package: Add script to build and package xorp rel... Message-ID: <20110317071604.D72A7422F0@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 1c318b30202f3302db3a69daf7de0f67b7186909 https://github.com/greearb/xorp.ct/commit/1c318b30202f3302db3a69daf7de0f67b7186909 Author: Ben Greear Date: 2011-03-17 (Thu, 17 Mar 2011) Changed paths: A xorp/devnotes/pkg_xorp.bash Log Message: ----------- package: Add script to build and package xorp releases. This is only going to work in my environment, but the general idea could work elsewhere if someone sets up a build-farm. Signed-off-by: Ben Greear Commit: a56ba714342f9b8fdc4e752471a88c02a0b4e650 https://github.com/greearb/xorp.ct/commit/a56ba714342f9b8fdc4e752471a88c02a0b4e650 Author: Ben Greear Date: 2011-03-17 (Thu, 17 Mar 2011) Changed paths: M xorp/Makefile.deb M xorp/package_files/xorp.ct.spec Log Message: ----------- Merge branch 'master' of git at github.com:greearb/xorp.ct Compare: https://github.com/greearb/xorp.ct/compare/e9deda8...a56ba71 From ss at comp.lancs.ac.uk Thu Mar 17 05:58:13 2011 From: ss at comp.lancs.ac.uk (ss at comp.lancs.ac.uk) Date: Thu, 17 Mar 2011 12:58:13 +0000 Subject: [Xorp-hackers] [PATCH] Supporting asynchronous method implementations In-Reply-To: <4D500B54.6030707@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> Message-ID: <1300366693-3015-1-git-send-email-ss@comp.lancs.ac.uk> From: Steven Simpson * Command map and dispatcher declare types for callbacks to pass error code and out-arguments. * Handlers in generated targets meet these callback signatures. * Various dispatch methods changed so that out-arguments and error codes are removed from the signature, and the appropriate callback type is added, all to track changes to command map and dispatcher. * Generated targets include default asynchronous implementations which call synchronous (pure virtual) methods. * One finder method FinderClient::dispatch_tunneled_xrl is implemented asynchronously. * Most changes above compiled in only if XORP_ENABLE_ASYNC_SERVER is defined, as set by enable_async_server=True on scons. * STCP changed from using list of RequestStates in seqno order to map indexed by seqno. This allows responses to return out-of-order, which is possible if a server implements a method asynchronously. Signed-off-by: Steven Simpson --- xorp/SConstruct | 13 ++ xorp/libxipc/finder_client.cc | 33 +++++- xorp/libxipc/finder_client.hh | 13 ++- xorp/libxipc/finder_client_xrl_target.cc | 31 +++++ xorp/libxipc/finder_client_xrl_target.hh | 13 ++ xorp/libxipc/finder_messenger.cc | 15 +++ xorp/libxipc/finder_messenger.hh | 7 + xorp/libxipc/xrl_cmd_map.hh | 37 ++++++- xorp/libxipc/xrl_dispatcher.cc | 34 +++++- xorp/libxipc/xrl_dispatcher.hh | 44 +++++++- xorp/libxipc/xrl_pf_stcp.cc | 64 ++++++++--- xorp/libxipc/xrl_pf_stcp.hh | 6 +- xorp/libxipc/xrl_router.cc | 9 +- xorp/libxipc/xrl_router.hh | 6 +- xorp/xrl/scripts/tgt-gen | 179 +++++++++++++++++++++++++++--- 15 files changed, 442 insertions(+), 62 deletions(-) diff --git a/xorp/SConstruct b/xorp/SConstruct index 56d36da..a53aee8 100644 --- a/xorp/SConstruct +++ b/xorp/SConstruct @@ -92,6 +92,7 @@ vars.AddVariables( BoolVariable('enable_tests', 'Build Test Programs', False), BoolVariable('enable_click', 'Build CLICK support', False), BoolVariable('enable_fea_dummy', 'Build fea-dummy target', True), + BoolVariable('enable_async_server', 'Permit asynchronous method implementations', False), BoolVariable('debug_xrldb', 'Build with runtime XRL syntax validation in Router Manager', False), EnumVariable('debug', 'Build with debug symbols', 'full', allowed_values=('no', 'yes', 'full', 'override'), @@ -267,6 +268,7 @@ print 'Enable xorpsh ', env['enable_xorpsh'] print 'Enable Test Programs: ', env['enable_tests'] print 'Enable CLICK: ', env['enable_click'] print 'Enable FEA Dummy: ', env['enable_fea_dummy'] +print 'Enable async method impls: ', env['enable_async_server'] print 'Enable BGP: ', env['enable_bgp'] print 'Try Enable BOOST: ', env['enable_boost'] print 'Try Enable uSTL : ', env['enable_ustl'] @@ -411,6 +413,13 @@ if tst and (tst == "no"): else: env['enable_fea_dummy'] = True +# Default to disabled +tst = ARGUMENTS.get('enable_async_server', False) +if tst and (tst == "no"): + env['enable_async_server'] = False +else: + env['enable_async_server'] = True + # Default to enabled tst = ARGUMENTS.get('enable_bgp', True) if tst and (tst == "no"): @@ -635,6 +644,10 @@ if not env.GetOption('clean') and \ if tst and not (tst == "no"): conf.Define('XORP_USE_FEA_DUMMY') + tst = ARGUMENTS.get('enable_async_server', False) + if tst and not (tst == "no"): + conf.Define('XORP_ENABLE_ASYNC_SERVER') + if env['enable_xorpsh']: conf.Define('XORP_USE_XORPSH') diff --git a/xorp/libxipc/finder_client.cc b/xorp/libxipc/finder_client.cc index 2fe7876..95b484f 100644 --- a/xorp/libxipc/finder_client.cc +++ b/xorp/libxipc/finder_client.cc @@ -961,8 +961,20 @@ FinderClient::uncache_xrls_from_target(const string& target) XORP_UINT_CAST(n), target.c_str()); } -XrlCmdError -FinderClient::dispatch_tunneled_xrl(const string& xrl_str) +#ifdef XORP_ENABLE_ASYNC_SERVER +void +FinderClient::dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs *a, + XrlRespCallback cb) const +{ + UNUSED(e); + UNUSED(a); + cb->dispatch(XrlCmdError::OKAY(), NULL); +} +#endif + +XrlCmdRT +FinderClient::dispatch_tunneled_xrl(const string& xrl_str + XRL_CMD_OPT_CALLBACK(cb)) { finder_trace_init("dispatch_tunneled_xrl(\"%s\")", xrl_str.c_str()); Xrl xrl; @@ -971,16 +983,29 @@ FinderClient::dispatch_tunneled_xrl(const string& xrl_str) InstanceList::iterator i = find_instance(xrl.target()); if (i == _ids.end()) { finder_trace_result("target not found"); - return XrlCmdError::COMMAND_FAILED("target not found"); + XRL_CMD_RETURN_ERROR + (cb, XrlCmdError::COMMAND_FAILED("target not found")); } +#ifdef XORP_ENABLE_ASYNC_SERVER + XrlDispatcherCallback ret_vals = + callback(this, &FinderClient::dispatch_tunneled_xrl_cb, cb); +#else XrlArgs ret_vals; +#endif + i->dispatcher()->dispatch_xrl(xrl.command(), xrl.args(), ret_vals); finder_trace_result("success"); + +#ifdef XORP_ENABLE_ASYNC_SERVER + return; +#else return XrlCmdError::OKAY(); +#endif } catch (InvalidString&) { - return XrlCmdError::COMMAND_FAILED("Bad Xrl string"); + XRL_CMD_RETURN_ERROR + (cb, XrlCmdError::COMMAND_FAILED("Bad Xrl string")); } } diff --git a/xorp/libxipc/finder_client.hh b/xorp/libxipc/finder_client.hh index 21e1f11..a601484 100644 --- a/xorp/libxipc/finder_client.hh +++ b/xorp/libxipc/finder_client.hh @@ -32,6 +32,7 @@ #include "finder_messenger.hh" #include "xrl_pf.hh" +#include "xrl_cmd_map.hh" class FinderClientOp; class FinderClientObserver; @@ -76,7 +77,8 @@ public: virtual ~FinderClientXrlCommandInterface() {} virtual void uncache_xrl(const string& xrl) = 0; virtual void uncache_xrls_from_target(const string& target) = 0; - virtual XrlCmdError dispatch_tunneled_xrl(const string& xrl) = 0; + virtual XrlCmdRT dispatch_tunneled_xrl(const string& xrl + XRL_CMD_OPT_CALLBACK(cb)) = 0; }; /** @@ -312,7 +314,14 @@ protected: // FinderClientXrlCommandInterface void uncache_xrl(const string& xrl); void uncache_xrls_from_target(const string& target); - XrlCmdError dispatch_tunneled_xrl(const string& xrl); + XrlCmdRT dispatch_tunneled_xrl(const string& xrl + XRL_CMD_OPT_CALLBACK(cb)); +#ifdef XORP_ENABLE_ASYNC_SERVER +private: + void + dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs *a, + XrlRespCallback cb) const; +#endif protected: void crank(); diff --git a/xorp/libxipc/finder_client_xrl_target.cc b/xorp/libxipc/finder_client_xrl_target.cc index ce1ca05..eb9e01d 100644 --- a/xorp/libxipc/finder_client_xrl_target.cc +++ b/xorp/libxipc/finder_client_xrl_target.cc @@ -85,6 +85,30 @@ FinderClientXrlTarget::finder_client_0_2_remove_xrls_for_target_from_cache( return XrlCmdError::OKAY(); } +#ifdef XORP_ENABLE_ASYNC_SERVER +void +FinderClientXrlTarget::async_finder_client_0_2_dispatch_tunneled_xrl +(const string& xrl, + FinderClient02DispatchTunneledXrlCB cb) +{ + _client->dispatch_tunneled_xrl + (xrl, + callback(this, + &FinderClientXrlTarget::dispatch_tunneled_xrl_cb, + cb)); +} + +void +FinderClientXrlTarget::dispatch_tunneled_xrl_cb +(const XrlCmdError &e, + const XrlArgs *out, + FinderClient02DispatchTunneledXrlCB cb) const +{ + UNUSED(out); + cb->dispatch(XrlCmdError::OKAY(), e.error_code(), e.note()); +} +#endif + XrlCmdError FinderClientXrlTarget::finder_client_0_2_dispatch_tunneled_xrl( const string& xrl, @@ -92,8 +116,15 @@ FinderClientXrlTarget::finder_client_0_2_dispatch_tunneled_xrl( string& xrl_errtxt ) { +#ifdef XORP_ENABLE_ASYNC_SERVER + UNUSED(xrl); + UNUSED(xrl_errno); + UNUSED(xrl_errtxt); + return XrlCmdError::COMMAND_FAILED("Unreachable"); +#else XrlCmdError e = _client->dispatch_tunneled_xrl(xrl); xrl_errno = e.error_code(); xrl_errtxt = e.note(); return XrlCmdError::OKAY(); +#endif } diff --git a/xorp/libxipc/finder_client_xrl_target.hh b/xorp/libxipc/finder_client_xrl_target.hh index 59cc2b0..be6c664 100644 --- a/xorp/libxipc/finder_client_xrl_target.hh +++ b/xorp/libxipc/finder_client_xrl_target.hh @@ -46,12 +46,25 @@ public: XrlCmdError finder_client_0_2_remove_xrls_for_target_from_cache( const string& target); +#ifdef XORP_ENABLE_ASYNC_SERVER + void async_finder_client_0_2_dispatch_tunneled_xrl + (const string& xrl, + FinderClient02DispatchTunneledXrlCB); +#endif XrlCmdError finder_client_0_2_dispatch_tunneled_xrl(const string& xrl, uint32_t& xrl_errno, string& xrl_errtxt); protected: FinderClientXrlCommandInterface* _client; + +#ifdef XORP_ENABLE_ASYNC_SERVER +private: + void dispatch_tunneled_xrl_cb + (const XrlCmdError &e, + const XrlArgs *out, + FinderClient02DispatchTunneledXrlCB cb) const; +#endif }; #endif // __LIBXIPC_FINDER_CLIENT_XRL_TARGET_HH__ diff --git a/xorp/libxipc/finder_messenger.cc b/xorp/libxipc/finder_messenger.cc index 5e71386..a6aef38 100644 --- a/xorp/libxipc/finder_messenger.cc +++ b/xorp/libxipc/finder_messenger.cc @@ -97,6 +97,10 @@ FinderMessengerBase::dispatch_xrl(uint32_t seqno, const Xrl& xrl) if (manager()) manager()->messenger_active_event(this); +#ifdef XORP_ENABLE_ASYNC_SERVER + ce->dispatch(xrl.args(), + callback(this, &FinderMessengerBase::dispatch_xrl_cb, seqno)); +#else XrlArgs reply_args; XrlError e = ce->dispatch(xrl.args(), &reply_args); if (XrlCmdError::OKAY() == e) { @@ -104,12 +108,23 @@ FinderMessengerBase::dispatch_xrl(uint32_t seqno, const Xrl& xrl) } else { reply(seqno, e, 0); } +#endif // Announce we've dispatched xrl if (manager()) manager()->messenger_inactive_event(this); } +#ifdef XORP_ENABLE_ASYNC_SERVER +void +FinderMessengerBase::dispatch_xrl_cb(const XrlCmdError &e, + const XrlArgs *reply_args, + uint32_t seqno) +{ + reply(seqno, e, XrlCmdError::OKAY() == e ? reply_args : NULL); +} +#endif + void FinderMessengerBase::unhook_manager() { diff --git a/xorp/libxipc/finder_messenger.hh b/xorp/libxipc/finder_messenger.hh index d80405d..d1d4c71 100644 --- a/xorp/libxipc/finder_messenger.hh +++ b/xorp/libxipc/finder_messenger.hh @@ -123,6 +123,13 @@ protected: void response_timeout(uint32_t seqno); private: +#ifdef XORP_ENABLE_ASYNC_SERVER + void + dispatch_xrl_cb(const XrlCmdError &e, + const XrlArgs *reply_args, + uint32_t seqno); +#endif + class ResponseState { public: ResponseState(uint32_t seqno, diff --git a/xorp/libxipc/xrl_cmd_map.hh b/xorp/libxipc/xrl_cmd_map.hh index 45c6bd6..2892b99 100644 --- a/xorp/libxipc/xrl_cmd_map.hh +++ b/xorp/libxipc/xrl_cmd_map.hh @@ -32,9 +32,44 @@ #include "xrl.hh" #include "xrl_error.hh" +#ifdef XORP_ENABLE_ASYNC_SERVER +typedef void XrlCmdRT; + +#define XRL_CMD_RETURN_ERROR(OUT, ERR) \ + do { \ + (OUT)->dispatch((ERR), NULL); \ + return; \ + } while (0) + +typedef +XorpCallback2::RefPtr +XrlRespCallback; + +typedef XrlRespCallback XrlCmdOT; + +#define XRL_CMD_OPT_CALLBACK(V) , const XrlRespCallback& V + +typedef +XorpCallback2::RefPtr XrlRecvCallback; + +#else + +typedef const XrlCmdError XrlCmdRT; + +#define XRL_CMD_RETURN_ERROR(OUT, ERR) \ + do { \ + return (ERR); \ + } while (0) + +typedef XrlArgs* XrlCmdOT; + +#define XRL_CMD_OPT_CALLBACK(V) + typedef XorpCallback2::RefPtr XrlRecvCallback; +#endif + class XrlCmdEntry { public: XrlCmdEntry(const string& s, XrlRecvCallback cb) : @@ -45,7 +80,7 @@ public: const string& name() const { return _name; } - const XrlCmdError dispatch(const XrlArgs& inputs, XrlArgs* outputs) const { + XrlCmdRT dispatch(const XrlArgs& inputs, XrlCmdOT outputs) const { return _cb->dispatch(inputs, outputs); } diff --git a/xorp/libxipc/xrl_dispatcher.cc b/xorp/libxipc/xrl_dispatcher.cc index ead5e09..173b579 100644 --- a/xorp/libxipc/xrl_dispatcher.cc +++ b/xorp/libxipc/xrl_dispatcher.cc @@ -51,20 +51,25 @@ do { \ // ---------------------------------------------------------------------------- // XrlDispatcher methods -XrlError +XrlDispatcherRT XrlDispatcher::dispatch_xrl(const string& method_name, const XrlArgs& inputs, - XrlArgs& outputs) const + XrlDispatcherOT outputs) const { const XrlCmdEntry* c = get_handler(method_name.c_str()); if (c == 0) { trace_xrl_dispatch("dispatch_xrl (invalid) ", method_name); debug_msg("No handler for %s\n", method_name.c_str()); - return XrlError::NO_SUCH_METHOD(); + XRL_DISPATCHER_RETURN_ERROR(outputs, XrlError::NO_SUCH_METHOD()); } trace_xrl_dispatch("dispatch_xrl (valid) ", method_name); - return c->dispatch(inputs, &outputs); +#ifdef XORP_ENABLE_ASYNC_SERVER + XrlCmdOT resp = callback(this, &XrlDispatcher::dispatch_cb, outputs); +#else + XrlCmdOT resp = &outputs; +#endif + return c->dispatch(inputs, resp); } XrlDispatcher::XI* @@ -77,8 +82,23 @@ XrlDispatcher::lookup_xrl(const string& name) const return new XI(c); } -XrlError -XrlDispatcher::dispatch_xrl_fast(const XI& xi, XrlArgs& outputs) const +XrlDispatcherRT +XrlDispatcher::dispatch_xrl_fast(const XI& xi, XrlDispatcherOT outputs) const { - return xi._cmd->dispatch(xi._xrl.args(), &outputs); +#ifdef XORP_ENABLE_ASYNC_SERVER + XrlCmdOT resp = callback(this, &XrlDispatcher::dispatch_cb, outputs); +#else + XrlCmdOT resp = &outputs; +#endif + return xi._cmd->dispatch(xi._xrl.args(), resp); } + +#ifdef XORP_ENABLE_ASYNC_SERVER +void +XrlDispatcher::dispatch_cb(const XrlCmdError &err, + const XrlArgs *outputs, + XrlDispatcherCallback resp) const +{ + resp->dispatch(err, outputs); +} +#endif diff --git a/xorp/libxipc/xrl_dispatcher.hh b/xorp/libxipc/xrl_dispatcher.hh index 6dadb8b..64e7791 100644 --- a/xorp/libxipc/xrl_dispatcher.hh +++ b/xorp/libxipc/xrl_dispatcher.hh @@ -25,6 +25,35 @@ #include "xrl_cmd_map.hh" +#ifdef XORP_ENABLE_ASYNC_SERVER + +#define XRL_DISPATCHER_RETURN_ERROR(OUT, ERR) \ + do { \ + (OUT)->dispatch((ERR), NULL); \ + return; \ + } while (0) + +typedef void XrlDispatcherRT; + +typedef +XorpCallback2::RefPtr +XrlDispatcherCallback; + +typedef XrlDispatcherCallback XrlDispatcherOT; + +#else + +#define XRL_DISPATCHER_RETURN_ERROR(OUT, ERR) \ + do { \ + return (ERR); \ + } while (0) + + +typedef XrlError XrlDispatcherRT; +typedef XrlArgs& XrlDispatcherOT; + +#endif + class XrlDispatcher : public XrlCmdMap { public: struct XI { @@ -41,10 +70,17 @@ public: virtual ~XrlDispatcher() {} virtual XI* lookup_xrl(const string& name) const; - virtual XrlError dispatch_xrl(const string& method_name, - const XrlArgs& in, - XrlArgs& out) const; - XrlError dispatch_xrl_fast(const XI& xi, XrlArgs& out) const; + virtual XrlDispatcherRT dispatch_xrl(const string& method_name, + const XrlArgs& in, + XrlDispatcherOT out) const; + XrlDispatcherRT dispatch_xrl_fast(const XI& xi, + XrlDispatcherOT out) const; + +#ifdef XORP_ENABLE_ASYNC_SERVER +private: + void dispatch_cb(const XrlCmdError &, const XrlArgs *, + XrlDispatcherCallback resp) const; +#endif }; #endif // __LIBXIPC_XRL_DISPATCHER_HH__ diff --git a/xorp/libxipc/xrl_pf_stcp.cc b/xorp/libxipc/xrl_pf_stcp.cc index e441809..1108423 100644 --- a/xorp/libxipc/xrl_pf_stcp.cc +++ b/xorp/libxipc/xrl_pf_stcp.cc @@ -130,6 +130,11 @@ public: void dispatch_request(uint32_t seqno, bool batch, const uint8_t* buffer, size_t bytes); + void transmit_response(const XrlError &e, + const XrlArgs *pResponse, + uint32_t seqno, + bool batch); + void ack_helo(uint32_t seqno); void read_event(BufferedAsyncReader* reader, @@ -151,8 +156,9 @@ public: string toString() const; private: - XrlError do_dispatch(const uint8_t* packed_xrl, size_t packed_xrl_bytes, - XrlArgs& response); + XrlDispatcherRT do_dispatch(const uint8_t* packed_xrl, + size_t packed_xrl_bytes, + XrlDispatcherOT response); XrlPFSTCPListener& _parent; XorpFd _sock; @@ -251,10 +257,10 @@ STCPRequestHandler::read_event(BufferedAsyncReader* /* source */, _reader.set_trigger_bytes(STCPPacketHeader::header_size()); } -XrlError +XrlDispatcherRT STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, size_t packed_xrl_bytes, - XrlArgs& response) + XrlDispatcherOT response) { static XrlError e(XrlError::INTERNAL_ERROR().error_code(), "corrupt xrl"); @@ -264,18 +270,18 @@ STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, string command; size_t cmdsz = Xrl::unpack_command(command, packed_xrl, packed_xrl_bytes); if (!cmdsz) - return e; + XRL_DISPATCHER_RETURN_ERROR(response, e); XrlDispatcher::XI* xi = d->lookup_xrl(command); if (!xi) - return e; + XRL_DISPATCHER_RETURN_ERROR(response, e); Xrl& xrl = xi->_xrl; try { if (xi->_new) { if (xrl.unpack(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) - return e; + XRL_DISPATCHER_RETURN_ERROR(response, e); xi->_new = false; } else { @@ -283,10 +289,10 @@ STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, packed_xrl_bytes -= cmdsz; if (xrl.fill(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) - return e; + XRL_DISPATCHER_RETURN_ERROR(response, e); } } catch (...) { - return e; + XRL_DISPATCHER_RETURN_ERROR(response, e); } return d->dispatch_xrl_fast(*xi, response); @@ -298,10 +304,28 @@ STCPRequestHandler::dispatch_request(uint32_t seqno, const uint8_t* packed_xrl, size_t packed_xrl_bytes) { +#ifdef XORP_ENABLE_ASYNC_SERVER + do_dispatch(packed_xrl, packed_xrl_bytes, + callback(this, &STCPRequestHandler::transmit_response, + seqno, batch)); +#else XrlArgs response; XrlError e; e = do_dispatch(packed_xrl, packed_xrl_bytes, response); + transmit_response(e, &response, seqno, batch); +#endif +} + + +void STCPRequestHandler::transmit_response(const XrlError &e, + const XrlArgs *pResponse, + uint32_t seqno, + bool batch) +{ + // Ensure we have a real arguments object to play with. + XrlArgs dummy; + const XrlArgs &response = pResponse ? *pResponse : dummy; size_t xrl_response_bytes = response.packed_bytes(); size_t note_bytes = e.note().size(); @@ -798,7 +822,10 @@ XrlPFSTCPSender::die(const char* reason, bool verbose) // the lists of callbacks. list > tmp; tmp.splice(tmp.begin(), _requests_waiting); - tmp.splice(tmp.begin(), _requests_sent); + for (RequestMap::iterator iter = _requests_sent.begin(); + iter != _requests_sent.end(); iter++) + tmp.push_back(iter->second); + _requests_sent.clear(); _active_requests = 0; _active_bytes = 0; @@ -877,13 +904,13 @@ XrlPFSTCPSender::send_request(RequestState* rs) } void -XrlPFSTCPSender::dispose_request() +XrlPFSTCPSender::dispose_request(RequestMap::iterator ptr) { assert(_requests_sent.empty() == false); xassert(_requests_sent.size() + _requests_waiting.size() == _active_requests); - _active_bytes -= _requests_sent.front()->size(); + _active_bytes -= ptr->second->size(); _active_requests -= 1; - _requests_sent.pop_front(); + _requests_sent.erase(ptr); xassert(_requests_waiting.size() == _writer->buffers_remaining()); } @@ -914,7 +941,7 @@ XrlPFSTCPSender::update_writer(AsyncFileWriter::Event e, } ref_ptr rrp = _requests_waiting.front(); - _requests_sent.push_back(rrp); + _requests_sent[rrp->seqno()] = rrp; _requests_waiting.pop_front(); } @@ -955,7 +982,8 @@ XrlPFSTCPSender::read_event(BufferedAsyncReader* /* reader */, return; } - if (sph.seqno() != _requests_sent.front()->seqno()) { + RequestMap::iterator stptr = _requests_sent.find(sph.seqno()); + if (stptr == _requests_sent.end()) { die("Bad sequence number"); return; } @@ -963,7 +991,7 @@ XrlPFSTCPSender::read_event(BufferedAsyncReader* /* reader */, if (sph.type() == STCP_PT_HELO_ACK) { debug_msg("Got keep alive ack\n"); _keepalive_sent = false; - dispose_request(); + dispose_request(stptr); _reader->dispose(sph.frame_bytes()); _reader->set_trigger_bytes(sph.header_size()); return; @@ -996,8 +1024,8 @@ XrlPFSTCPSender::read_event(BufferedAsyncReader* /* reader */, } // Get ref_ptr to callback from request state and discard the rest - XrlPFSender::SendCallback cb = _requests_sent.front()->cb(); - dispose_request(); + XrlPFSender::SendCallback cb = stptr->second->cb(); + dispose_request(stptr); xassert(_active_requests == _requests_waiting.size() + _requests_sent.size()); diff --git a/xorp/libxipc/xrl_pf_stcp.hh b/xorp/libxipc/xrl_pf_stcp.hh index 1482719..78f3967 100644 --- a/xorp/libxipc/xrl_pf_stcp.hh +++ b/xorp/libxipc/xrl_pf_stcp.hh @@ -111,8 +111,9 @@ private: uint8_t* buffer, size_t buffer_bytes); + typedef map > RequestMap; void send_request(RequestState*); - void dispose_request(); + void dispose_request(RequestMap::iterator ptr); void start_keepalives(); void stop_keepalives(); @@ -129,7 +130,8 @@ private: AsyncFileWriter* _writer; list > _requests_waiting; // All requests pending - list > _requests_sent; // All requests pending + + RequestMap _requests_sent; // All requests pending uint32_t _current_seqno; size_t _active_bytes; diff --git a/xorp/libxipc/xrl_router.cc b/xorp/libxipc/xrl_router.cc index e547cbf..d457e40 100644 --- a/xorp/libxipc/xrl_router.cc +++ b/xorp/libxipc/xrl_router.cc @@ -650,17 +650,18 @@ XrlRouter::send(const Xrl& xrl, const XrlCallback& user_cb) return true; } -XrlError +XrlDispatcherRT XrlRouter::dispatch_xrl(const string& method_name, const XrlArgs& inputs, - XrlArgs& outputs) const + XrlDispatcherOT outputs) const { string resolved_method; if (_fc->query_self(method_name, resolved_method) == true) { - return XrlDispatcher::dispatch_xrl(resolved_method, inputs, outputs); + return + XrlDispatcher::dispatch_xrl(resolved_method, inputs, outputs); } debug_msg("Could not find mapping for %s\n", method_name.c_str()); - return XrlError::NO_SUCH_METHOD(); + XRL_DISPATCHER_RETURN_ERROR(outputs, XrlError::NO_SUCH_METHOD()); } XrlDispatcher::XI* diff --git a/xorp/libxipc/xrl_router.hh b/xorp/libxipc/xrl_router.hh index 9478f44..b16546b 100644 --- a/xorp/libxipc/xrl_router.hh +++ b/xorp/libxipc/xrl_router.hh @@ -176,9 +176,9 @@ protected: */ virtual void finder_ready_event(const string& tgt_name); - XrlError dispatch_xrl(const string& method_name, - const XrlArgs& inputs, - XrlArgs& outputs) const; + XrlDispatcherRT dispatch_xrl(const string& method_name, + const XrlArgs& inputs, + XrlDispatcherOT outputs) const; /** * Resolve callback (slow path). diff --git a/xorp/xrl/scripts/tgt-gen b/xorp/xrl/scripts/tgt-gen index 899cf13..3c2fc87 100755 --- a/xorp/xrl/scripts/tgt-gen +++ b/xorp/xrl/scripts/tgt-gen @@ -9,7 +9,8 @@ import os, sys import Xif.util from Xif.util import \ - joining_csv, csv, cpp_name, cpp_classname, xorp_indent_string, xorp_indent + joining_csv, csv, cpp_name, caps_cpp_classname, \ + cpp_classname, xorp_indent_string, xorp_indent from Xif.xiftypes import \ XrlArg, XrlMethod, XrlInterface, XrlTarget @@ -69,7 +70,7 @@ def target_declare_handler_table(cls): s = """ struct handler_table { const char *name; - const XrlCmdError (%s::*method)(const XrlArgs&, XrlArgs*); + XrlCmdRT (%s::*method)(const XrlArgs&, XrlCmdOT); }; static const struct handler_table handlers[]; @@ -123,14 +124,47 @@ def target_virtual_fns(methods): args.append(cpa) r += csv(args) - r += ") = 0;\n\n" + r += ") = 0;\n" + + + + r += "#ifdef XORP_ENABLE_ASYNC_SERVER\n" + r += " typedef\n" + r += " XorpCallback%sdispatch(e, NULL); + } else { +""" % m.name() + + s += xorp_indent(2) + "XrlArgs out;\n" + if m.rargs(): + s += "\n /* Marshall return values */\n try {\n" + for r in m.rargs(): + s += xorp_indent(3) + "out.add(\"%s\", rarg_%s);\n" % \ + (r.name(), cpp_name(r.name())) + s += \ +""" } catch (const XrlArgs::XrlAtomFound& ) { + XLOG_FATAL("Duplicate atom name"); /* XXX Should never happen */ + } + +""" + s += " return c_b->dispatch(e, &out);\n }\n}\n\n" + + + + + s += "\nvoid\n%s::async_%s(" \ + % (cls, cpp_name(m.name())) + + # input args + for a in m.args(): + s += "\n%sconst %s&\targ_%s," % \ + (xorp_indent(2), a.cpp_type(), cpp_name(a.name())) + + s += "\n%s%sCB c_b)\n{\n" % \ + (xorp_indent(2), caps_cpp_classname(m.name())) + + s += "\n /* Return value declarations */\n" + for r in m.rargs(): + s += " %s rarg_%s;\n" % (r.cpp_type(), cpp_name(r.name())) + + s += " XrlCmdError e = %s(" % cpp_name(m.name()) + sep = "" + for r in m.args(): + s += "%s\n arg_%s" % (sep, cpp_name(r.name())) + sep = "," + for r in m.rargs(): + s += "%s\n rarg_%s" % (sep, cpp_name(r.name())) + sep = "," + s += ");\n" + s += " return c_b->dispatch(e" + for r in m.rargs(): + s += ",\n rarg_%s" % (cpp_name(r.name())) + sep = "," + s += ");\n" + s += "}\n" + s += "#endif\n\n" + + + + s += "XrlCmdRT\n" + s += "%s::handle_%s(const XrlArgs& xa_inputs, XrlCmdOT pxa_outputs)\n" % \ + (cls, cpp_name(m.name())) s += "{" s += """ if (xa_inputs.size() != %d) { XLOG_ERROR(\"Wrong number of arguments (%%u != %%u) handling %%s\", XORP_UINT_CAST(%d), XORP_UINT_CAST(xa_inputs.size()), \"%s\"); - return XrlCmdError::BAD_ARGS(); + XRL_CMD_RETURN_ERROR(pxa_outputs, XrlCmdError::BAD_ARGS()); } """ % (len(m.args()), len(m.args()), m.name()) if len(m.rargs()): s += """ +#ifndef XORP_ENABLE_ASYNC_SERVER if (pxa_outputs == 0) { XLOG_FATAL(\"Return list empty\"); return XrlCmdError::BAD_ARGS(); } +#endif + +""" + if len(m.rargs()) == 0: + s += """ +#ifndef XORP_ENABLE_ASYNC_SERVER + UNUSED(pxa_outputs); +#endif + +""" + + s += "#ifdef XORP_ENABLE_ASYNC_SERVER\n" + + + s += xorp_indent(1) + "try {\n" + s += xorp_indent(2) + \ + "%sCB mycb =\n%scallback(this, &%s::callback_%s, pxa_outputs);\n" \ + % (caps_cpp_classname(m.name()), xorp_indent(3), \ + cls, cpp_name(m.name())) + + s += xorp_indent(2) + "async_%s(" % cpp_name(m.name()) + i = 0 + for a in m.args(): + s += "\n" + xorp_indent(3) + \ + "xa_inputs.get(%d, \"%s\").%s()," \ + % (i, a.name(), a.accessor()) + i += 1 + s += " mycb);\n" + + + s += \ +""" } catch (const XrlArgs::BadArgs& e) { + XLOG_ERROR(\"Error decoding the arguments: %s\", e.str().c_str()); + return pxa_outputs->dispatch(XrlCmdError::BAD_ARGS(e.str()), NULL); + } """ + + + s += "#else\n" + + s += "\n /* Return value declarations */\n" for r in m.rargs(): - s += " %s %s;\n" % (r.cpp_type(), cpp_name(r.name())) + s += " %s r_%s;\n" % (r.cpp_type(), cpp_name(r.name())) + s += xorp_indent(1) + "try {\n" s += xorp_indent(2) + "XrlCmdError e = %s(" % cpp_name(m.name()) @@ -197,7 +338,7 @@ def target_handler_methods(cls, name, methods): i += 1 ret_vals = [] for r in m.rargs(): - ret_vals.append("\n" + xorp_indent(3) + "%s" % cpp_name(r.name())) + ret_vals.append("\n" + xorp_indent(3) + "r_%s" % cpp_name(r.name())) s += csv(get_reqs + ret_vals, ",") + ");\n" s += \ @@ -218,15 +359,19 @@ def target_handler_methods(cls, name, methods): if m.rargs(): s += "\n /* Marshall return values */\n try {\n" for r in m.rargs(): - s += xorp_indent(2) + "%s->add(\"%s\", %s);\n" % \ - (argarg, r.name(), cpp_name(r.name())) + s += xorp_indent(2) + "pxa_outputs->add(\"%s\", r_%s);\n" % \ + (r.name(), cpp_name(r.name())) s += \ """ } catch (const XrlArgs::XrlAtomFound& ) { XLOG_FATAL("Duplicate atom name"); /* XXX Should never happen */ } """ - s += " return XrlCmdError::OKAY();\n}\n\n" + s += " return XrlCmdError::OKAY();\n" + + + s += "#endif\n" + s += "}\n\n" return s def protect(file): -- 1.7.0.4 From ss at comp.lancs.ac.uk Thu Mar 17 06:07:35 2011 From: ss at comp.lancs.ac.uk (Steven Simpson) Date: Thu, 17 Mar 2011 13:07:35 +0000 Subject: [Xorp-hackers] XORP documentation wiki is online. In-Reply-To: <1300193919.6744.150.camel@matt-uni> References: <4D7E95D3.9070302@candelatech.com> <1300142703.27277.11.camel@matt-desktop> <4D7EE55B.90001@candelatech.com> <1300193919.6744.150.camel@matt-uni> Message-ID: <4D820797.9010401@comp.lancs.ac.uk> On 15/03/11 12:58, Matthew Jakeman wrote: > One problem we have is that because the async stuff Steven has > implemented was not originally in XORP we have implemented our prototype > using the original XORP code. This means that if we wanted to fully > integrate it into XORP properly, we will have the issue of porting the > code to the new style of coding. I doubt this will be such a great problem. We dipped below the RPC abstraction in order to implement a kind of varargs behaviour, and the async changes are visible below that abstraction - but we can use the conditional typedefs and macros to remain compatible in both sync and async cases. -- From ss at comp.lancs.ac.uk Thu Mar 17 06:19:27 2011 From: ss at comp.lancs.ac.uk (Steven Simpson) Date: Thu, 17 Mar 2011 13:19:27 +0000 Subject: [Xorp-hackers] Using results from one XRL to respond to another In-Reply-To: <4D78F849.5070200@candelatech.com> References: <4D500B54.6030707@comp.lancs.ac.uk> <4D763AEE.9060103@comp.lancs.ac.uk> <4D767066.6030104@candelatech.com> <4D78F62B.8010707@comp.lancs.ac.uk> <4D78F849.5070200@candelatech.com> Message-ID: <4D820A5F.6080601@comp.lancs.ac.uk> On 10/03/11 16:11, Ben Greear wrote: > On 03/10/2011 08:02 AM, Steven Simpson wrote: >> I now seem to have managed to >> produce a single patch with all changes, though that may be redundant in >> light of the potential #ifdef requirement... > > 'stg' can help edit existing patch series. > > To combine, I often save the individual patches with format-patch, > reset the tree to before the patches were applied, and manually > apply them with patch -p1 < ... > and then git commit the resulting thing. I'll just mention how I managed to squash the latest patch. I used [git merge --squash ] on a fresh branch from master. It just applies the changes without committing anything, and when you do commit, it defaults to a concatenation of the original commits. Cheers! -- From ss at comp.lancs.ac.uk Thu Mar 17 06:38:47 2011 From: ss at comp.lancs.ac.uk (Steven Simpson) Date: Thu, 17 Mar 2011 13:38:47 +0000 Subject: [Xorp-hackers] [PATCH] Supporting asynchronous method implementations In-Reply-To: <1300366693-3015-1-git-send-email-ss@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> <1300366693-3015-1-git-send-email-ss@comp.lancs.ac.uk> Message-ID: <4D820EE7.4060102@comp.lancs.ac.uk> Hi again, I incorporated changes from the previous patch, as I've undone bits of it. I hope that's acceptable, but I can still provide individual commits if necessary, of course. On 17/03/11 12:58, ss at comp.lancs.ac.uk wrote: > From: Steven Simpson [snip changes incorporated from earlier patch on 2011-03-11] > * STCP changed from using list of RequestStates in seqno order to > map indexed by seqno. This allows responses to return > out-of-order, which is possible if a server implements a method > asynchronously. I believe that that's the last change necessary to make it work. I did [scons check] on both sync and async versions, and got the same set of successes and failures as before. (It's always test26, test28_ipv6 and test28_ipv6_ok that fail, two of each, at the start.) I undid the friendliness of FinderClient to XrlError, when I realised that the async version was relaying the error code, while the sync version just discards it. The macros are now all-caps, plus I paranoically made even the sync versions use [do while(0)] to form a statement, just in case there are places that [return X] can be used where [do while(0)] cannot, or vice versa. Cheers, Steven -- From pierre.lepropre at student.ulg.ac.be Thu Mar 17 06:52:08 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Thu, 17 Mar 2011 14:52:08 +0100 Subject: [Xorp-hackers] RFC: ServiceStatus - status diagram Message-ID: <1300369928.2333.11.camel@pierre-T500> Dear All, I've added a state diagram description of ServiceStatus (/libxorp/service.hh) on the wiki ( http://xorp.run.montefiore.ulg.ac.be/latex2wiki/xorp_libxorp_overview?&#servicehh ) As already reported in bug reports, the specifications are partially inconsistent and incomplete. So, I had to somewhat reverse-engineer the expected behavior with common sense and by taking a look at different built-in XORP modules that use that. Could somebody familiar with it take a quick look and give me his insight ? Thanks, Pierre Lepropre. From Uri.Yanai at ngsoft.com Thu Mar 17 09:03:35 2011 From: Uri.Yanai at ngsoft.com (Uri Yanai) Date: Thu, 17 Mar 2011 18:03:35 +0200 Subject: [Xorp-hackers] %delete in child not called when deleting top parent Message-ID: Hi I am trying to delete a top level tree item with no success For example using the following template file in xorp-ct Version 1.8-CT bridges{ bridge @: txt { } } bridges{ %modinfo:provides brdg; %modinfo:default_targetname "brdg"; bridge @: txt { %create: xrl "brdg/brdg/0.1/bridge_add?bridge:txt=$(@)"; %delete: xrl "brdg/brdg/0.1/bridge_delete?bridge:txt=$(@)"; } } In xorpsh running root at XORP# delete bridges Deleting: bridges { bridge one { } } OK [edit] root at XORP# commit OK [edit] Doesn't call the child's bridge(one) bridge_delete() method has expected On the other hand running root at XORP# delete bridges bridge one Deleting: one { } OK [edit] root at XORP# commit OK [edit] Works OK calling has expected the bridge_delete() method What is wrong here Thanks for your help Uri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110317/319318c5/attachment.html From greearb at candelatech.com Thu Mar 17 09:56:44 2011 From: greearb at candelatech.com (Ben Greear) Date: Thu, 17 Mar 2011 09:56:44 -0700 Subject: [Xorp-hackers] RFC: ServiceStatus - status diagram In-Reply-To: <1300369928.2333.11.camel@pierre-T500> References: <1300369928.2333.11.camel@pierre-T500> Message-ID: <4D823D4C.4050807@candelatech.com> On 03/17/2011 06:52 AM, Pierre Lepropre wrote: > Dear All, > > I've added a state diagram description of ServiceStatus > (/libxorp/service.hh) on the wiki > ( http://xorp.run.montefiore.ulg.ac.be/latex2wiki/xorp_libxorp_overview?&#servicehh ) > > As already reported in bug reports, the specifications are partially > inconsistent and incomplete. So, I had to somewhat reverse-engineer the > expected behavior with common sense and by taking a look at different > built-in XORP modules that use that. > > Could somebody familiar with it take a quick look and give me his > insight ? Likely you know more about this than anyone else at this point. It certainly looks impressive :) Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Thu Mar 17 10:05:33 2011 From: greearb at candelatech.com (Ben Greear) Date: Thu, 17 Mar 2011 10:05:33 -0700 Subject: [Xorp-hackers] %delete in child not called when deleting top parent In-Reply-To: References: Message-ID: <4D823F5D.1000809@candelatech.com> On 03/17/2011 09:03 AM, Uri Yanai wrote: > Hi > I am trying to delete a top level tree item with no success > For example using the following template file in xorp-ct Version 1.8-CT > > bridges{ > bridge @: txt { > } > } > > bridges{ > %modinfo:provides brdg; > %modinfo:default_targetname "brdg"; > bridge @: txt { > %create: xrl "brdg/brdg/0.1/bridge_add?bridge:txt=$(@)"; > %delete: xrl "brdg/brdg/0.1/bridge_delete?bridge:txt=$(@)"; > } > } I'm not sure why you are hitting this bug, but can you explain a bit more about what you are trying to do? I recently added support for creating virtual devices. It currently only works with VLANs, but I think the framework is general enough to work with bridge devices and other virtual interfaces. Are you able to delete some other high-level thing, maybe a routing protocol, and see all the sub-items get destructed properly? Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From pierre.lepropre at student.ulg.ac.be Thu Mar 17 10:29:40 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Thu, 17 Mar 2011 18:29:40 +0100 Subject: [Xorp-hackers] RFC: ServiceStatus - status diagram In-Reply-To: <4D823D4C.4050807@candelatech.com> References: <1300369928.2333.11.camel@pierre-T500> <4D823D4C.4050807@candelatech.com> Message-ID: <1300382980.11964.5.camel@pierre-T500> Hello Ben, > > > > I've added a state diagram description of ServiceStatus > > (/libxorp/service.hh) on the wiki > > ( http://xorp.run.montefiore.ulg.ac.be/latex2wiki/xorp_libxorp_overview?&#servicehh ) > > > > As already reported in bug reports, the specifications are partially > > inconsistent and incomplete. So, I had to somewhat reverse-engineer the > > expected behavior with common sense and by taking a look at different > > built-in XORP modules that use that. > > > > Could somebody familiar with it take a quick look and give me his > > insight ? > > Likely you know more about this than anyone else at this point. > > It certainly looks impressive :) Oups... I didn't realize :) ! Thanks for your input. That's strange because that stuff is used even in the most basic static_routes module... If anybody else wants to speak his mind, feel free to do so ! Thanks, Pierre. From rps at maine.edu Thu Mar 17 10:32:21 2011 From: rps at maine.edu (Ray Soucy) Date: Thu, 17 Mar 2011 13:32:21 -0400 Subject: [Xorp-hackers] Release 1.8.3 is almost done, please test In-Reply-To: <4D81B4C4.3060601@candelatech.com> References: <4D81B4C4.3060601@candelatech.com> Message-ID: I've been out of the loop on CT changes as we are still a 1.6 environment in production. Now that CT is merged into official I have a few questions on 1.8.3 vs 1.7 svn. In 1.7 we saw a lot of work to move to start using Boost. I see that in 1.8.3 it's a build option called "enable_boost" that defaults to False, what's the extent of Boost in 1.8.3? Is it supported, or are we moving away from that change? Pros vs. Cons? Suspect that it was done to cut down the footprint, but will it be actively maintained going forward I guess is my real question. Numbering-wise, I think we might call this release 1.8.0 since 1.8 doesn't exists for XORP (realize it does for CT). Also the version reported by xorp needs to be updated (it's still reporting 1.8-CT). Also think that it would be nice to maintain the same format for RELEASE_NOTES that was previously used by the XORP project. The CT RELEASE_NOTES got a little out of control with the inclusion of the Git log and style changes. Here is an example for 1.8.0 (which would come right before 1.7): Release 1.8.0 (2011/03/17) ============================ ALL: - XORP-CT branch merged into XORP. - New release numbering (1.8.0 vs 1.8) to accomodate more frequent updates. - New build options allow for exclusion of XORP modules. ... Testing looks OK so far in VMs. Init scripts for XORP is still something thats a little flaky. I checked and the xrl sockets are created with the correct permissions now, which keeps xorpsh happy. I tried writing a new init script that sends SIGKILL to xorp_rtrmgr and lets XORP shutdown gracefully, but ran into a bug with it deleting interface configuration when it shuts down for any interface defined in the config, even if "restore-original-config-on-shutdown: true" is set. The result on my test VM is that eth0 and lo no longer have IP addresses. Graceful shutdown does clean up xrl socket files correctly now too. The shutdown process is also very slow, meaning a long restart time. I'm wondering if the work on async methods will help that in any way... I was also unable to get rtrmgr to use syslog. So for an actual production environment, my current preference is to take a huge hammer to XORP any time I need to shut it down or restart it. Here is the latest iteration of my init script: ----8<---- #!/bin/bash function start { # Start XORP in daemon mode /usr/local/xorp/sbin/xorp_rtrmgr -d -P /var/run/xorp.pid -l /var/log/xorp -b /etc/xorp/config.boot # Ensure XORP socket permissions are correct (required for XORP 1.7 fixed in 1.8) sleep 1 chmod 775 /var/tmp/xrl.* chown root:xorp /var/tmp/xrl.* } function stop { # Kill the XORP router manager killall -q -9 xorp_rtrmgr # Kill any lingering XORP sub-processes (updated for 1.8) killall -q -9 xorp_bgp killall -q -9 xorp_fea killall -q -9 xorp_fea_dummy killall -q -9 xorp_fib2mrib killall -q -9 xorp_igmp killall -q -9 xorp_mld killall -q -9 xorp_olsr4 killall -q -9 xorp_ospfv2 killall -q -9 xorp_ospfv3 killall -q -9 xorp_pimsm4 killall -q -9 xorp_pimsm6 killall -q -9 xorp_policy killall -q -9 xorp_rib killall -q -9 xorp_rip killall -q -9 xorp_ripng killall -q -9 xorp_static_routes killall -q -9 xorp_vrrp # Remove xorp routes from the routing table ip route flush proto xorp # Clean up XORP sockets rm /var/tmp/xrl.* # Remove PID file rm /var/run/xorp.pid } function restart { stop sleep 1 start } case "$1" in start) echo -n "Starting XORP: " start echo "Done" ;; restart) echo -n "XORP restarting... " restart echo "done" ;; stop) echo -n "Stopping XORP: " stop echo "Done" ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0 ----8<---- I also wrote a quick companion CRON script that will check if rtrmgr has crashed and attempt to restart XORP if that is the case. I haven't run into XORP crashing while up and running personally, but its a nice "self healing" kind of check, and doesn't cost much of anything to do. Pardon the echo ugliness, I wanted to write the log file in a format consistent with XORP. ----8<---- #!/bin/bash # This script will check to make sure that xorp_rtrmgr is running and restart it if needed. # Should XORP be running? We use the existance of its PID file to find out. if [ -f /var/run/xorp.pid ]; then # Does the PID file point to a running xorp_rtrmgr process? STATUS=$(ps `cat /var/run/xorp.pid` | grep 'xorp_rtrmgr' | wc -l) if [ $STATUS -eq 0 ]; then # XORP should be running but its not: force a restart. echo "[" `date +%Y/%m/%d` `date +%T`.$((10#$(date +%N) / 1000)) "ERROR xorp_monitor ] RTRMGR not running, attempting to restart" >> /var/log/xorp /etc/init.d/xorp restart fi fi ----8<---- I threw this in /usr/local/xorp/sbin/xorp_monitor On Thu, Mar 17, 2011 at 3:14 AM, Ben Greear wrote: > I've uploaded xorp 1.8.3 builds to xorp.org: > > http://www.xorp.org/releases/1.8.3/ > > There are RPMs for recent Fedora, binary builds for all sorts of Fedora > and similar OSs, and source tarball. > > If anyone can give these some quick testing to basically verify the > build and packaging scripts, that would be great help! > > The naming could perhaps be better, so let me know if you think of > something that makes more sense. > > I'll push these on to github and maybe sourceforge tomorrow if all > goes well. > > Thanks, > Ben > > -- > Ben Greear > Candela Technologies Inc ?http://www.candelatech.com > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > -- Ray Soucy Epic Communications Specialist Phone: +1 (207) 561-3526 Networkmaine, a Unit of the University of Maine System http://www.networkmaine.net/ From greearb at candelatech.com Thu Mar 17 10:58:50 2011 From: greearb at candelatech.com (Ben Greear) Date: Thu, 17 Mar 2011 10:58:50 -0700 Subject: [Xorp-hackers] Release 1.8.3 is almost done, please test In-Reply-To: References: <4D81B4C4.3060601@candelatech.com> Message-ID: <4D824BDA.5050901@candelatech.com> On 03/17/2011 10:32 AM, Ray Soucy wrote: > I've been out of the loop on CT changes as we are still a 1.6 > environment in production. Now that CT is merged into official I have > a few questions on 1.8.3 vs 1.7 svn. > > In 1.7 we saw a lot of work to move to start using Boost. I see that > in 1.8.3 it's a build option called "enable_boost" that defaults to > False, what's the extent of Boost in 1.8.3? Is it supported, or are > we moving away from that change? Pros vs. Cons? Suspect that it was > done to cut down the footprint, but will it be actively maintained > going forward I guess is my real question. Boost was never used much, and now by default it isn't used at all. I left it in because some folks liked it, but I'd be happy enough to remove it entirely. If you have a reason to use boost, please do let me know. I'm not going to add external dependencies and big frameworks just for the fun of it though...it has to solve a real problem or provide a measurable benefit worth the overhead. > Numbering-wise, I think we might call this release 1.8.0 since 1.8 > doesn't exists for XORP (realize it does for CT). Also the version > reported by xorp needs to be updated (it's still reporting 1.8-CT). Please let me know what exactly you downloaded and where it reported 1.8-CT: I thought I had that fixed last night. Since I already have 1.8.2 on the github site, I need to bump this to beyond that, so I think we can't re-use 1.8.0. For that matter, 1.7 was never officially released either. It should be smoother going forward, at least. > Also think that it would be nice to maintain the same format for > RELEASE_NOTES that was previously used by the XORP project. The CT > RELEASE_NOTES got a little out of control with the inclusion of the > Git log and style changes. Here is an example for 1.8.0 (which would > come right before 1.7): > > Release 1.8.0 (2011/03/17) > ============================ > ALL: > - XORP-CT branch merged into XORP. > - New release numbering (1.8.0 vs 1.8) to accomodate more frequent > updates. > - New build options allow for exclusion of XORP modules. Well, I think the shortlog could help someone who wanted the details, and when other folks send patches, they'll get their name in there, which is often the only payment rendered :) > ... > > Testing looks OK so far in VMs. > > Init scripts for XORP is still something thats a little flaky. I > checked and the xrl sockets are created with the correct permissions > now, which keeps xorpsh happy. > > I tried writing a new init script that sends SIGKILL to xorp_rtrmgr > and lets XORP shutdown gracefully, but ran into a bug with it deleting > interface configuration when it shuts down for any interface defined > in the config, even if "restore-original-config-on-shutdown: true" is > set. Please open a bug on that, and let me know if it's a regression or not. Probably won't attempt to fix this for 1.8.3, but hopefully next release. > The result on my test VM is that eth0 and lo no longer have IP addresses. > > Graceful shutdown does clean up xrl socket files correctly now too. > > The shutdown process is also very slow, meaning a long restart time. > I'm wondering if the work on async methods will help that in any > way... I haven't done much work to make shutdown fast, and in fact, the work I did to gracefully clean up xrls, etc, means shutdown is slower, often waiting on timers to expire and such. For fast restarts, a kill -9 and manual cleanup of the xrls might be the way to go. > > I was also unable to get rtrmgr to use syslog. Did that used to work? Please open a bug on it either way, with info on how you tried to configure it, etc. > I also wrote a quick companion CRON script that will check if rtrmgr > has crashed and attempt to restart XORP if that is the case. I > haven't run into XORP crashing while up and running personally, but > its a nice "self healing" kind of check, and doesn't cost much of > anything to do. Pardon the echo ugliness, I wanted to write the log > file in a format consistent with XORP. A wrapper script that starts xorp_mgr in non-background mode in a loop (and cleans xrls, logs, etc when rtrmgr dies) is how I handle that. Might be slightly quicker on the restart and less overhead when everything is running smooth... Thanks for the detailed testing! Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Thu Mar 17 11:03:59 2011 From: greearb at candelatech.com (Ben Greear) Date: Thu, 17 Mar 2011 11:03:59 -0700 Subject: [Xorp-hackers] RFC: ServiceStatus - status diagram In-Reply-To: <1300382980.11964.5.camel@pierre-T500> References: <1300369928.2333.11.camel@pierre-T500> <4D823D4C.4050807@candelatech.com> <1300382980.11964.5.camel@pierre-T500> Message-ID: <4D824D0F.5070007@candelatech.com> On 03/17/2011 10:29 AM, Pierre Lepropre wrote: > Hello Ben, > >>> >>> I've added a state diagram description of ServiceStatus >>> (/libxorp/service.hh) on the wiki >>> ( http://xorp.run.montefiore.ulg.ac.be/latex2wiki/xorp_libxorp_overview?&#servicehh ) >>> >>> As already reported in bug reports, the specifications are partially >>> inconsistent and incomplete. So, I had to somewhat reverse-engineer the >>> expected behavior with common sense and by taking a look at different >>> built-in XORP modules that use that. >>> >>> Could somebody familiar with it take a quick look and give me his >>> insight ? >> >> Likely you know more about this than anyone else at this point. >> >> It certainly looks impressive :) > > Oups... I didn't realize :) ! Thanks for your input. > > That's strange because that stuff is used even in the most basic > static_routes module... If anybody else wants to speak his mind, feel > free to do so ! Most xorp core code was written around 2003-2006 it seems (check out the truly ancient 0.1 release I found on some old xorp mirrors!) The folks that wrote it are busy with other things, not on the list at all, or have forgotten, I think :) http://www.xorp.org/releases/old/ Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From rps at maine.edu Thu Mar 17 11:05:12 2011 From: rps at maine.edu (Ray Soucy) Date: Thu, 17 Mar 2011 14:05:12 -0400 Subject: [Xorp-hackers] Release 1.8.3 is almost done, please test In-Reply-To: <4D824BDA.5050901@candelatech.com> References: <4D81B4C4.3060601@candelatech.com> <4D824BDA.5050901@candelatech.com> Message-ID: > Please let me know what exactly you downloaded and where it reported > 1.8-CT: ?I thought I had that fixed last night. ?Since I already have > 1.8.2 on the github site, I need to bump this to beyond that, so I > think we can't re-use 1.8.0. ?For that matter, 1.7 was never officially > released either. ?It should be smoother going forward, at least. Compiled from your 1.8.3 source tar.gz posted earlier. Shows up in xorpsh "show version" as well as the xorpsh-generated config file header. -- Ray Soucy Epic Communications Specialist Phone: +1 (207) 561-3526 Networkmaine, a Unit of the University of Maine System http://www.networkmaine.net/ From greearb at candelatech.com Thu Mar 17 11:07:43 2011 From: greearb at candelatech.com (Ben Greear) Date: Thu, 17 Mar 2011 11:07:43 -0700 Subject: [Xorp-hackers] Release 1.8.3 is almost done, please test In-Reply-To: References: <4D81B4C4.3060601@candelatech.com> <4D824BDA.5050901@candelatech.com> Message-ID: <4D824DEF.3070309@candelatech.com> On 03/17/2011 11:05 AM, Ray Soucy wrote: >> Please let me know what exactly you downloaded and where it reported >> 1.8-CT: I thought I had that fixed last night. Since I already have >> 1.8.2 on the github site, I need to bump this to beyond that, so I >> think we can't re-use 1.8.0. For that matter, 1.7 was never officially >> released either. It should be smoother going forward, at least. > > Compiled from your 1.8.3 source tar.gz posted earlier. > > Shows up in xorpsh "show version" as well as the xorpsh-generated > config file header. Ok, at least part of the problem is that I need to add a 'git pull' in another place in my packaging script. I *think* the binaries will be OK, at least for 'show version'. I'll check for the config file header...you created that by saving a config file in xorpsh? Thanks, Ben > -- Ben Greear Candela Technologies Inc http://www.candelatech.com From rps at maine.edu Thu Mar 17 11:10:54 2011 From: rps at maine.edu (Ray Soucy) Date: Thu, 17 Mar 2011 14:10:54 -0400 Subject: [Xorp-hackers] Release 1.8.3 is almost done, please test In-Reply-To: <4D824DEF.3070309@candelatech.com> References: <4D81B4C4.3060601@candelatech.com> <4D824BDA.5050901@candelatech.com> <4D824DEF.3070309@candelatech.com> Message-ID: > I'll check for the config file header...you created that by saving > a config file in xorpsh? Correct -- Ray Soucy Epic Communications Specialist Phone: +1 (207) 561-3526 Networkmaine, a Unit of the University of Maine System http://www.networkmaine.net/ From pierre.lepropre at student.ulg.ac.be Thu Mar 17 13:32:21 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Thu, 17 Mar 2011 21:32:21 +0100 Subject: [Xorp-hackers] RFC: ServiceStatus - status diagram In-Reply-To: <4D824D0F.5070007@candelatech.com> References: <1300369928.2333.11.camel@pierre-T500> <4D823D4C.4050807@candelatech.com> <1300382980.11964.5.camel@pierre-T500> <4D824D0F.5070007@candelatech.com> Message-ID: <1300393941.2399.1.camel@pierre-T500> Hello Ben, > Most xorp core code was written around 2003-2006 it seems (check out the truly ancient > 0.1 release I found on some old xorp mirrors!) The folks that wrote it > are busy with other things, not on the list at all, or have forgotten, > I think :) > > http://www.xorp.org/releases/old/ OK, that's what I was afraid of unfortunately :(. Thanks for the tip ! Regards, Pierre. From noreply at github.com Thu Mar 17 15:45:27 2011 From: noreply at github.com (noreply at github.com) Date: Thu, 17 Mar 2011 15:45:27 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 02fb88: Copyright script comments. Message-ID: <20110317224527.C03B5422FE@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 02fb88d1e160d9ca42f85a41c2817c992d3cee0f https://github.com/greearb/xorp.ct/commit/02fb88d1e160d9ca42f85a41c2817c992d3cee0f Author: Ben Greear Date: 2011-03-17 (Thu, 17 Mar 2011) Changed paths: M xorp/devnotes/update_changed_copyright.bash Log Message: ----------- Copyright script comments. Signed-off-by: Ben Greear Commit: 26c9f2141b4ba53f5c80f5c3745eac9b92e22a1d https://github.com/greearb/xorp.ct/commit/26c9f2141b4ba53f5c80f5c3745eac9b92e22a1d Author: Ben Greear Date: 2011-03-17 (Thu, 17 Mar 2011) Changed paths: A xorp/devnotes/pkg_xorp.bash Log Message: ----------- Merge branch 'master' of github.com:greearb/xorp.ct Compare: https://github.com/greearb/xorp.ct/compare/a56ba71...26c9f21 From noreply at github.com Thu Mar 17 15:45:38 2011 From: noreply at github.com (noreply at github.com) Date: Thu, 17 Mar 2011 15:45:38 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] e7e2e3: Merge branch 'master' of git@github.com:greearb/xo... Message-ID: <20110317224538.4C436422FE@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: e7e2e3600d179f3690d56ff79d195ebb92666108 https://github.com/greearb/xorp.ct/commit/e7e2e3600d179f3690d56ff79d195ebb92666108 Author: Ben Greear Date: 2011-03-17 (Thu, 17 Mar 2011) Changed paths: M README M www/html_src/index.html M xorp/RELEASE_NOTES M xorp/devnotes/update_changed_copyright.bash M xorp/package_files/xorp.ct.spec Log Message: ----------- Merge branch 'master' of git at github.com:greearb/xorp.ct From noreply at github.com Thu Mar 17 16:24:01 2011 From: noreply at github.com (noreply at github.com) Date: Thu, 17 Mar 2011 16:24:01 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 6ea821: Merge branch 'master' of http://xorp.run.montefior... Message-ID: <20110317232401.4E08B422E5@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 6ea8212dc5eab9dbd0374309c1bed4b4850699e6 https://github.com/greearb/xorp.ct/commit/6ea8212dc5eab9dbd0374309c1bed4b4850699e6 Author: Ben Greear Date: 2011-03-17 (Thu, 17 Mar 2011) Changed paths: A docs/wiki/.htaccess A docs/wiki/_dummy A docs/wiki/media/latex/02e0011ffda313bc5bb897d0398cd957.png A docs/wiki/media/latex/14298cb7493172289773855cb51931a3.png A docs/wiki/media/latex/1f33b04041b0a34564c3fb6732723ac6.png A docs/wiki/media/latex/7b717812b764c5c9081868b14c680e24.png A docs/wiki/media/latex/81a2e02cb4205c2201a3320559c081a1.png A docs/wiki/media/latex/88d04236c38064c6481f71a646e63f85.png A docs/wiki/media/latex/9fe32122bd9f8c3ed4a2f70a0d978d6a.png A docs/wiki/media/latex/a10d522ae8b400faefdc4617861ed711.png A docs/wiki/media/latex/ce093c3689287dd004a1c0833de62130.png A docs/wiki/media/latex/de815b92fec63ff2f7fd0d105187c9cb.png A docs/wiki/media/latex/e102683fdfd090e4e50cccbe1e01faa4.png A docs/wiki/media/latex/ea07788f588c20579a02739211c93da4.png A docs/wiki/media/latex/f6c560b2eaa83c07a8f215a535531e44.png A docs/wiki/media/latex2wiki/bgp_del_table.png A docs/wiki/media/latex2wiki/bgp_dump_table.png A docs/wiki/media/latex2wiki/bgp_harness.png A docs/wiki/media/latex2wiki/bgp_overview.png A docs/wiki/media/latex2wiki/bgp_pipeline.png A docs/wiki/media/latex2wiki/design_overview.png A docs/wiki/media/latex2wiki/error_dependency.png A docs/wiki/media/latex2wiki/hotnets2002paper.pdf A docs/wiki/media/latex2wiki/if_fea_interactions.png A docs/wiki/media/latex2wiki/ifmgmt.png A docs/wiki/media/latex2wiki/mcast_modules_interaction.png A docs/wiki/media/latex2wiki/mcast_protocol_abstraction.png A docs/wiki/media/latex2wiki/mfea_design_overview.png A docs/wiki/media/latex2wiki/mld6igmp_design_overview.png A docs/wiki/media/latex2wiki/pim_design_overview.png A docs/wiki/media/latex2wiki/policy.pdf A docs/wiki/media/latex2wiki/rib_overview.png A docs/wiki/media/latex2wiki/rtrmgr_config.png A docs/wiki/media/latex2wiki/rtrmgr_template.png A docs/wiki/media/latex2wiki/rtrmgr_xorpsh.png A docs/wiki/media/latex2wiki/xrl_fea_ifs.png A docs/wiki/media/latex2wiki/xrl_ifs.png A docs/wiki/media/wiki/dokuwiki-128.png A docs/wiki/media/xorp/201003_-_sophia.tar.gz A docs/wiki/media/xorp/howto-activity.png A docs/wiki/media/xorp/howto-class.png A docs/wiki/media/xorp/xorp_stub.tar.gz A docs/wiki/media/xorp_slides_sophia.pdf A docs/wiki/meta/_dokuwiki.changes A docs/wiki/meta/_dokuwiki.changes.trimmed A docs/wiki/meta/_dummy A docs/wiki/meta/_htcookiesalt A docs/wiki/meta/_media.changes A docs/wiki/meta/_media.changes.trimmed A docs/wiki/meta/do_release.changes A docs/wiki/meta/do_release.indexed A docs/wiki/meta/do_release.meta A docs/wiki/meta/latex2wiki/design_overview.changes A docs/wiki/meta/latex2wiki/design_overview.indexed A docs/wiki/meta/latex2wiki/design_overview.meta A docs/wiki/meta/latex2wiki/dev_getting_started.changes A docs/wiki/meta/latex2wiki/dev_getting_started.indexed A docs/wiki/meta/latex2wiki/dev_getting_started.meta A docs/wiki/meta/latex2wiki/getting_started.changes A docs/wiki/meta/latex2wiki/getting_started.indexed A docs/wiki/meta/latex2wiki/getting_started.meta A docs/wiki/meta/latex2wiki/glossary.changes A docs/wiki/meta/latex2wiki/glossary.indexed A docs/wiki/meta/latex2wiki/glossary.meta A docs/wiki/meta/latex2wiki/introduction_xorp_process.changes A docs/wiki/meta/latex2wiki/introduction_xorp_process.indexed A docs/wiki/meta/latex2wiki/introduction_xorp_process.meta A docs/wiki/meta/latex2wiki/porting-xorp.changes A docs/wiki/meta/latex2wiki/porting-xorp.indexed A docs/wiki/meta/latex2wiki/porting-xorp.meta A docs/wiki/meta/latex2wiki/user_manual.changes A docs/wiki/meta/latex2wiki/user_manual.indexed A docs/wiki/meta/latex2wiki/user_manual.meta A docs/wiki/meta/latex2wiki/user_manual/bgp.changes A docs/wiki/meta/latex2wiki/user_manual/bgp.indexed A docs/wiki/meta/latex2wiki/user_manual/bgp.meta A docs/wiki/meta/latex2wiki/user_manual/command_structure.changes A docs/wiki/meta/latex2wiki/user_manual/command_structure.indexed A docs/wiki/meta/latex2wiki/user_manual/command_structure.meta A docs/wiki/meta/latex2wiki/user_manual/configuration_overview.changes A docs/wiki/meta/latex2wiki/user_manual/configuration_overview.indexed A docs/wiki/meta/latex2wiki/user_manual/configuration_overview.meta A docs/wiki/meta/latex2wiki/user_manual/diagnostics_and_debugging.changes A docs/wiki/meta/latex2wiki/user_manual/diagnostics_and_debugging.indexed A docs/wiki/meta/latex2wiki/user_manual/diagnostics_and_debugging.meta A docs/wiki/meta/latex2wiki/user_manual/firewall.changes A docs/wiki/meta/latex2wiki/user_manual/firewall.indexed A docs/wiki/meta/latex2wiki/user_manual/firewall.meta A docs/wiki/meta/latex2wiki/user_manual/forwarding_engine.changes A docs/wiki/meta/latex2wiki/user_manual/forwarding_engine.indexed A docs/wiki/meta/latex2wiki/user_manual/forwarding_engine.meta A docs/wiki/meta/latex2wiki/user_manual/igmp_and_mld.changes A docs/wiki/meta/latex2wiki/user_manual/igmp_and_mld.indexed A docs/wiki/meta/latex2wiki/user_manual/igmp_and_mld.meta A docs/wiki/meta/latex2wiki/user_manual/multicast_routing.changes A docs/wiki/meta/latex2wiki/user_manual/multicast_routing.indexed A docs/wiki/meta/latex2wiki/user_manual/multicast_routing.meta A docs/wiki/meta/latex2wiki/user_manual/multicast_topology_discovery.changes A docs/wiki/meta/latex2wiki/user_manual/multicast_topology_discovery.indexed A docs/wiki/meta/latex2wiki/user_manual/multicast_topology_discovery.meta A docs/wiki/meta/latex2wiki/user_manual/network_interfaces.changes A docs/wiki/meta/latex2wiki/user_manual/network_interfaces.indexed A docs/wiki/meta/latex2wiki/user_manual/network_interfaces.meta A docs/wiki/meta/latex2wiki/user_manual/ospfv2_and_ospfv3.changes A docs/wiki/meta/latex2wiki/user_manual/ospfv2_and_ospfv3.indexed A docs/wiki/meta/latex2wiki/user_manual/ospfv2_and_ospfv3.meta A docs/wiki/meta/latex2wiki/user_manual/pim_sparse_mode.changes A docs/wiki/meta/latex2wiki/user_manual/pim_sparse_mode.indexed A docs/wiki/meta/latex2wiki/user_manual/pim_sparse_mode.meta A docs/wiki/meta/latex2wiki/user_manual/policy.changes A docs/wiki/meta/latex2wiki/user_manual/policy.indexed A docs/wiki/meta/latex2wiki/user_manual/policy.meta A docs/wiki/meta/latex2wiki/user_manual/rip_and_ripng.changes A docs/wiki/meta/latex2wiki/user_manual/rip_and_ripng.indexed A docs/wiki/meta/latex2wiki/user_manual/rip_and_ripng.meta A docs/wiki/meta/latex2wiki/user_manual/snmp.changes A docs/wiki/meta/latex2wiki/user_manual/snmp.meta A docs/wiki/meta/latex2wiki/user_manual/static_routes.changes A docs/wiki/meta/latex2wiki/user_manual/static_routes.indexed A docs/wiki/meta/latex2wiki/user_manual/static_routes.meta A docs/wiki/meta/latex2wiki/user_manual/unicast_routing.changes A docs/wiki/meta/latex2wiki/user_manual/unicast_routing.indexed A docs/wiki/meta/latex2wiki/user_manual/unicast_routing.meta A docs/wiki/meta/latex2wiki/user_manual/user_management.changes A docs/wiki/meta/latex2wiki/user_manual/user_management.indexed A docs/wiki/meta/latex2wiki/user_manual/user_management.meta A docs/wiki/meta/latex2wiki/user_manual/vrrp.changes A docs/wiki/meta/latex2wiki/user_manual/vrrp.indexed A docs/wiki/meta/latex2wiki/user_manual/vrrp.meta A docs/wiki/meta/latex2wiki/user_manual/xorp_live_cd.changes A docs/wiki/meta/latex2wiki/user_manual/xorp_live_cd.meta A docs/wiki/meta/latex2wiki/xorp_bgp_routing_daemon.changes A docs/wiki/meta/latex2wiki/xorp_bgp_routing_daemon.indexed A docs/wiki/meta/latex2wiki/xorp_bgp_routing_daemon.meta A docs/wiki/meta/latex2wiki/xorp_bgp_test_harness.changes A docs/wiki/meta/latex2wiki/xorp_bgp_test_harness.indexed A docs/wiki/meta/latex2wiki/xorp_bgp_test_harness.meta A docs/wiki/meta/latex2wiki/xorp_error_handling.changes A docs/wiki/meta/latex2wiki/xorp_error_handling.indexed A docs/wiki/meta/latex2wiki/xorp_error_handling.meta A docs/wiki/meta/latex2wiki/xorp_fea.changes A docs/wiki/meta/latex2wiki/xorp_fea.indexed A docs/wiki/meta/latex2wiki/xorp_fea.meta A docs/wiki/meta/latex2wiki/xorp_ipc_lib_overview.changes A docs/wiki/meta/latex2wiki/xorp_ipc_lib_overview.indexed A docs/wiki/meta/latex2wiki/xorp_ipc_lib_overview.meta A docs/wiki/meta/latex2wiki/xorp_libxorp_overview.changes A docs/wiki/meta/latex2wiki/xorp_libxorp_overview.indexed A docs/wiki/meta/latex2wiki/xorp_libxorp_overview.meta A docs/wiki/meta/latex2wiki/xorp_mld_igmp_daemon.changes A docs/wiki/meta/latex2wiki/xorp_mld_igmp_daemon.indexed A docs/wiki/meta/latex2wiki/xorp_mld_igmp_daemon.meta A docs/wiki/meta/latex2wiki/xorp_multicast_fea_abstraction.changes A docs/wiki/meta/latex2wiki/xorp_multicast_fea_abstraction.indexed A docs/wiki/meta/latex2wiki/xorp_multicast_fea_abstraction.meta A docs/wiki/meta/latex2wiki/xorp_multicast_routing.changes A docs/wiki/meta/latex2wiki/xorp_multicast_routing.indexed A docs/wiki/meta/latex2wiki/xorp_multicast_routing.meta A docs/wiki/meta/latex2wiki/xorp_pim_sm_daemon.changes A docs/wiki/meta/latex2wiki/xorp_pim_sm_daemon.indexed A docs/wiki/meta/latex2wiki/xorp_pim_sm_daemon.meta A docs/wiki/meta/latex2wiki/xorp_pim_test_suite.changes A docs/wiki/meta/latex2wiki/xorp_pim_test_suite.indexed A docs/wiki/meta/latex2wiki/xorp_pim_test_suite.meta A docs/wiki/meta/latex2wiki/xorp_rib.changes A docs/wiki/meta/latex2wiki/xorp_rib.indexed A docs/wiki/meta/latex2wiki/xorp_rib.meta A docs/wiki/meta/latex2wiki/xorp_rtrmgr.changes A docs/wiki/meta/latex2wiki/xorp_rtrmgr.indexed A docs/wiki/meta/latex2wiki/xorp_rtrmgr.meta A docs/wiki/meta/latex2wiki/xorp_source_documentation.changes A docs/wiki/meta/latex2wiki/xorp_source_documentation.indexed A docs/wiki/meta/latex2wiki/xorp_source_documentation.meta A docs/wiki/meta/latex2wiki/xrl_interfaces.changes A docs/wiki/meta/latex2wiki/xrl_interfaces.indexed A docs/wiki/meta/latex2wiki/xrl_interfaces.meta A docs/wiki/meta/latex2wiki_3aintroduction_xorp_process.indexed A docs/wiki/meta/playground/playground.changes A docs/wiki/meta/playground/playground.indexed A docs/wiki/meta/playground/playground.meta A docs/wiki/meta/start.changes A docs/wiki/meta/start.indexed A docs/wiki/meta/start.meta A docs/wiki/meta/wiki/dokuwiki.indexed A docs/wiki/meta/wiki/dokuwiki.meta A docs/wiki/meta/wiki/syntax.indexed A docs/wiki/meta/wiki/syntax.meta A docs/wiki/meta/xorp/big-picture.changes A docs/wiki/meta/xorp/big-picture.meta A docs/wiki/meta/xorp/common_classes.changes A docs/wiki/meta/xorp/common_classes.indexed A docs/wiki/meta/xorp/common_classes.meta A docs/wiki/meta/xorp/compile.changes A docs/wiki/meta/xorp/compile.meta A docs/wiki/meta/xorp/event_loop.changes A docs/wiki/meta/xorp/event_loop.meta A docs/wiki/meta/xorp/getting_started.changes A docs/wiki/meta/xorp/getting_started.meta A docs/wiki/meta/xorp/module_stub.changes A docs/wiki/meta/xorp/module_stub.indexed A docs/wiki/meta/xorp/module_stub.meta A docs/wiki/meta/xorp/socket_programming.changes A docs/wiki/meta/xorp/socket_programming.indexed A docs/wiki/meta/xorp/socket_programming.meta A docs/wiki/meta/xorp/writing_a_process.changes A docs/wiki/meta/xorp/writing_a_process.indexed A docs/wiki/meta/xorp/writing_a_process.meta A docs/wiki/pages/do_release.txt A docs/wiki/pages/latex2wiki/design_overview.txt A docs/wiki/pages/latex2wiki/dev_getting_started.txt A docs/wiki/pages/latex2wiki/getting_started.txt A docs/wiki/pages/latex2wiki/glossary.txt A docs/wiki/pages/latex2wiki/introduction_xorp_process.txt A docs/wiki/pages/latex2wiki/porting-xorp.txt A docs/wiki/pages/latex2wiki/user_manual.txt A docs/wiki/pages/latex2wiki/user_manual/bgp.txt A docs/wiki/pages/latex2wiki/user_manual/command_structure.txt A docs/wiki/pages/latex2wiki/user_manual/configuration_overview.txt A docs/wiki/pages/latex2wiki/user_manual/diagnostics_and_debugging.txt A docs/wiki/pages/latex2wiki/user_manual/firewall.txt A docs/wiki/pages/latex2wiki/user_manual/forwarding_engine.txt A docs/wiki/pages/latex2wiki/user_manual/igmp_and_mld.txt A docs/wiki/pages/latex2wiki/user_manual/multicast_routing.txt A docs/wiki/pages/latex2wiki/user_manual/multicast_topology_discovery.txt A docs/wiki/pages/latex2wiki/user_manual/network_interfaces.txt A docs/wiki/pages/latex2wiki/user_manual/ospfv2_and_ospfv3.txt A docs/wiki/pages/latex2wiki/user_manual/pim_sparse_mode.txt A docs/wiki/pages/latex2wiki/user_manual/policy.txt A docs/wiki/pages/latex2wiki/user_manual/rip_and_ripng.txt A docs/wiki/pages/latex2wiki/user_manual/static_routes.txt A docs/wiki/pages/latex2wiki/user_manual/unicast_routing.txt A docs/wiki/pages/latex2wiki/user_manual/user_management.txt A docs/wiki/pages/latex2wiki/user_manual/vrrp.txt A docs/wiki/pages/latex2wiki/xorp_bgp_routing_daemon.txt A docs/wiki/pages/latex2wiki/xorp_bgp_test_harness.txt A docs/wiki/pages/latex2wiki/xorp_error_handling.txt A docs/wiki/pages/latex2wiki/xorp_fea.txt A docs/wiki/pages/latex2wiki/xorp_ipc_lib_overview.txt A docs/wiki/pages/latex2wiki/xorp_libxorp_overview.txt A docs/wiki/pages/latex2wiki/xorp_mld_igmp_daemon.txt A docs/wiki/pages/latex2wiki/xorp_multicast_fea_abstraction.txt A docs/wiki/pages/latex2wiki/xorp_multicast_routing.txt A docs/wiki/pages/latex2wiki/xorp_pim_sm_daemon.txt A docs/wiki/pages/latex2wiki/xorp_pim_test_suite.txt A docs/wiki/pages/latex2wiki/xorp_rib.txt A docs/wiki/pages/latex2wiki/xorp_rtrmgr.txt A docs/wiki/pages/latex2wiki/xorp_source_documentation.txt A docs/wiki/pages/latex2wiki/xrl_interfaces.txt A docs/wiki/pages/start.txt A docs/wiki/pages/wiki/dokuwiki.txt A docs/wiki/pages/wiki/syntax.txt A docs/wiki/pages/xorp/common_classes.txt A docs/wiki/pages/xorp/module_stub.txt A docs/wiki/pages/xorp/socket_programming.txt A docs/wiki/pages/xorp/writing_a_process.txt A docs/wiki/security.png A docs/wiki/security.xcf Log Message: ----------- Merge branch 'master' of http://xorp.run.montefiore.ulg.ac.be/xorp.ct From greearb at candelatech.com Thu Mar 17 16:47:05 2011 From: greearb at candelatech.com (Ben Greear) Date: Thu, 17 Mar 2011 16:47:05 -0700 Subject: [Xorp-hackers] Release 1.8.3 is almost done, please test In-Reply-To: References: <4D81B4C4.3060601@candelatech.com> <4D824BDA.5050901@candelatech.com> <4D824DEF.3070309@candelatech.com> Message-ID: <4D829D79.7080106@candelatech.com> On 03/17/2011 11:10 AM, Ray Soucy wrote: >> I'll check for the config file header...you created that by saving >> a config file in xorpsh? > > Correct > New files uploaded to: http://www.xorp.org/releases/1.8.3/ Should fix the version issue in xorpsh and saved config files. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Thu Mar 17 16:52:19 2011 From: greearb at candelatech.com (Ben Greear) Date: Thu, 17 Mar 2011 16:52:19 -0700 Subject: [Xorp-hackers] [PATCH] Supporting asynchronous method implementations In-Reply-To: <4D820EE7.4060102@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> <1300366693-3015-1-git-send-email-ss@comp.lancs.ac.uk> <4D820EE7.4060102@comp.lancs.ac.uk> Message-ID: <4D829EB3.5040805@candelatech.com> On 03/17/2011 06:38 AM, Steven Simpson wrote: > Hi again, > > I incorporated changes from the previous patch, as I've undone bits of > it. I hope that's acceptable, but I can still provide individual > commits if necessary, of course. > > On 17/03/11 12:58, ss at comp.lancs.ac.uk wrote: >> From: Steven Simpson > [snip changes incorporated from earlier patch on 2011-03-11] >> * STCP changed from using list of RequestStates in seqno order to >> map indexed by seqno. This allows responses to return >> out-of-order, which is possible if a server implements a method >> asynchronously. > > I believe that that's the last change necessary to make it work. I did > [scons check] on both sync and async versions, and got the same set of > successes and failures as before. (It's always test26, test28_ipv6 and > test28_ipv6_ok that fail, two of each, at the start.) > > I undid the friendliness of FinderClient to XrlError, when I realised > that the async version was relaying the error code, while the sync > version just discards it. > > The macros are now all-caps, plus I paranoically made even the sync > versions use [do while(0)] to form a statement, just in case there are > places that [return X] can be used where [do while(0)] cannot, or vice > versa. I'll work on applying this as soon as I can get the 1.8.3 release done. Probably another few days. Thanks, Ben > > Cheers, > > Steven > -- Ben Greear Candela Technologies Inc http://www.candelatech.com From pierre.lepropre at student.ulg.ac.be Fri Mar 18 12:08:26 2011 From: pierre.lepropre at student.ulg.ac.be (Pierre Lepropre) Date: Fri, 18 Mar 2011 20:08:26 +0100 Subject: [Xorp-hackers] RFC: ServiceStatus - status diagram In-Reply-To: References: <1300369928.2333.11.camel@pierre-T500> <4D823D4C.4050807@candelatech.com> <1300382980.11964.5.camel@pierre-T500> <4D824D0F.5070007@candelatech.com> Message-ID: <1300475306.2326.1.camel@pierre-T500> Hello Atanu, Thank you for your answer. I actually used the static_routes module as my main source of inspiration. So I guess that's probably good news ! Thanks, Pierre. On Fri, 2011-03-18 at 10:17 -0700, Atanu Ghosh wrote: > Hi, > > The static route module was intended to be the example routing module, > a starting point for writing a new routing module. Hence it attempts > to demonstrate all the interfaces that a routing module should use. > > Atanu. > > On Thu, Mar 17, 2011 at 11:03 AM, Ben Greear wrote: > > On 03/17/2011 10:29 AM, Pierre Lepropre wrote: > >> Hello Ben, > >> > >>>> > >>>> I've added a state diagram description of ServiceStatus > >>>> (/libxorp/service.hh) on the wiki > >>>> ( http://xorp.run.montefiore.ulg.ac.be/latex2wiki/xorp_libxorp_overview?&#servicehh ) > >>>> > >>>> As already reported in bug reports, the specifications are partially > >>>> inconsistent and incomplete. So, I had to somewhat reverse-engineer the > >>>> expected behavior with common sense and by taking a look at different > >>>> built-in XORP modules that use that. > >>>> > >>>> Could somebody familiar with it take a quick look and give me his > >>>> insight ? > >>> > >>> Likely you know more about this than anyone else at this point. > >>> > >>> It certainly looks impressive :) > >> > >> Oups... I didn't realize :) ! Thanks for your input. > >> > >> That's strange because that stuff is used even in the most basic > >> static_routes module... If anybody else wants to speak his mind, feel > >> free to do so ! > > > > Most xorp core code was written around 2003-2006 it seems (check out the truly ancient > > 0.1 release I found on some old xorp mirrors!) The folks that wrote it > > are busy with other things, not on the list at all, or have forgotten, > > I think :) > > > > http://www.xorp.org/releases/old/ > > > > Thanks, > > Ben > > > > -- > > Ben Greear > > Candela Technologies Inc http://www.candelatech.com > > > > _______________________________________________ > > Xorp-hackers mailing list > > Xorp-hackers at icir.org > > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > > From wxh585 at 126.com Sat Mar 19 18:49:29 2011 From: wxh585 at 126.com (wxh585 at 126.com) Date: Sun, 20 Mar 2011 09:49:29 +0800 (CST) Subject: [Xorp-hackers] vlan is not setup? for debian 5 linux ,on 1.82-ct Message-ID: <160f6e6.3ac7.12ed0f3e88d.Coremail.wxh585@126.com> root at router# set interfaces interface eth2 vif vlan101 address 192.168.3.1 prefix-length 24 [edit] root at router# commit Commit Failed 102 Command failed push_config failed: Interface/Vif error on eth2/vlan101: Failed to add VLAN to interface eth2 vlan vlan101: Failed to add VLAN vlan101 to interface eth2: Cannot create VLAN interface vlan101 (parent = eth2 VLAN ID = 101): File exists [edit] root at router# .... root at router> show version Version 1.8-CT root at router> ....... router:/home/zs# uname -a Linux router 2.6.26-2-686 #1 SMP Thu Jan 27 00:28:05 UTC 2011 i686 GNU/Linux router:/home/zs# router:/home/zs#lsmod |grep -i 8021q 8021q 16064 0 -- ??? ???13312601392 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110320/9618522d/attachment.html From greearb at candelatech.com Sat Mar 19 21:35:40 2011 From: greearb at candelatech.com (Ben Greear) Date: Sat, 19 Mar 2011 21:35:40 -0700 Subject: [Xorp-hackers] vlan is not setup? for debian 5 linux , on 1.82-ct In-Reply-To: <160f6e6.3ac7.12ed0f3e88d.Coremail.wxh585@126.com> References: <160f6e6.3ac7.12ed0f3e88d.Coremail.wxh585@126.com> Message-ID: <4D85841C.3020303@candelatech.com> On 03/19/2011 06:49 PM, wxh585 at 126.com wrote: > > root at router # set interfaces interface eth2 vif vlan101 address 192.168.3.1 prefix-length 24 > [edit] > root at router # commit > Commit Failed > 102 Command failed push_config failed: Interface/Vif error on eth2/vlan101: Failed to add VLAN to interface eth2 vlan vlan101: Failed to add VLAN vlan101 to > interface eth2: Cannot create VLAN interface vlan101 (parent = eth2 VLAN ID = 101): File exists > [edit] Please try 1.8.3, and see the new user-guide for the new VLAN API: http://www.xorp.org/releases/1.8.3/ http://xorp.run.montefiore.ulg.ac.be/latex2wiki/user_manual Thanks, Ben > root at router # > .... > root at router > show version > Version 1.8-CT > root at router > > ....... > router:/home/zs# uname -a > Linux router 2.6.26-2-686 #1 SMP Thu Jan 27 00:28:05 UTC 2011 i686 GNU/Linux > router:/home/zs# > router:/home/zs#lsmod |grep -i 8021q > 8021q 16064 0 > > -- > > ?????? > > ??????13312601392 > > > > > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers -- Ben Greear Candela Technologies Inc http://www.candelatech.com From wxh585 at 126.com Sun Mar 20 03:23:38 2011 From: wxh585 at 126.com (wxh585 at 126.com) Date: Sun, 20 Mar 2011 18:23:38 +0800 (CST) Subject: [Xorp-hackers] xorp1.8.3 build error on debian 5, but xorp1.8.2 build pass on my computer Message-ID: <64619011.7e29.12ed2caa2c1.Coremail.wxh585@126.com> /home/zs/xorp# scons scons: `obj/i686-pc-linux-gnu/etc/templates/fea.tp' is up to date. scons: `obj/i686-pc-linux-gnu/fea/data_plane/ifconfig/libxorp_fea_ifconfig.so' is up to date. scons: `obj/i686-pc-linux-gnu/fea/data_plane/fibconfig/libxorp_fea_fibconfig.so' is up to date. scons: `obj/i686-pc-linux-gnu/fea/data_plane/io/libxorp_fea_io.so' is up to date. scons: `obj/i686-pc-linux-gnu/fea/data_plane/control_socket/libxorp_fea_control_socket.so' is up to date. scons: `obj/i686-pc-linux-gnu/fea/data_plane/managers/libxorp_fea_data_plane_managers.so' is up to date. g++ -o obj/i686-pc-linux-gnu/fea/data_plane/firewall/firewall_get_netfilter.os -c -O1 -g3 -Werror -W -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith -Wcast-align -Woverloaded-virtual -ftemplate-depth-25 -pipe -fPIC -DXRL_PF=120 -D_FORTIFY_SOURCE=0 -Iobj/i686-pc-linux-gnu -I. -I. fea/data_plane/firewall/firewall_get_netfilter.cc In file included from fea/data_plane/firewall/firewall_get_netfilter.cc:51: /usr/include/linux/netfilter_ipv4/ip_tables.h: In function ?t_entry_target* ipt_get_target(ipt_entry*)? /usr/include/linux/netfilter_ipv4/ip_tables.h:221: error: pointer of type ?oid *?used in arithmetic /usr/include/linux/netfilter_ipv4/ip_tables.h:221: error: invalid conversion from ?oid*?to ?t_entry_target*? fea/data_plane/firewall/firewall_get_netfilter.cc: In member function ?irtual int FirewallGetNetfilter::get_table6(std::list >&, std::string&)? fea/data_plane/firewall/firewall_get_netfilter.cc:346: error: aggregate ?p6t_getinfo info6?has incomplete type and cannot be defined fea/data_plane/firewall/firewall_get_netfilter.cc:357: error: ?P6T_SO_GET_INFO?was not declared in this scope fea/data_plane/firewall/firewall_get_netfilter.cc:366: error: invalid application of ?izeof?to incomplete type ?p6t_get_entries? fea/data_plane/firewall/firewall_get_netfilter.cc:368: error: ?P6T_SO_GET_ENTRIES?was not declared in this scope fea/data_plane/firewall/firewall_get_netfilter.cc:387: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:413: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:416: error: invalid use of incomplete type ?truct ip6t_entry_target? fea/data_plane/firewall/firewall_get_netfilter.cc:382: error: forward declaration of ?truct ip6t_entry_target? fea/data_plane/firewall/firewall_get_netfilter.cc:416: error: ?P6T_STANDARD_TARGET?was not declared in this scope fea/data_plane/firewall/firewall_get_netfilter.cc:417: error: invalid use of incomplete type ?truct ip6t_entry_target? fea/data_plane/firewall/firewall_get_netfilter.cc:382: error: forward declaration of ?truct ip6t_entry_target? fea/data_plane/firewall/firewall_get_netfilter.cc:419: error: invalid use of incomplete type ?truct ip6t_entry_target? fea/data_plane/firewall/firewall_get_netfilter.cc:382: error: forward declaration of ?truct ip6t_entry_target? fea/data_plane/firewall/firewall_get_netfilter.cc:423: error: invalid use of incomplete type ?truct ip6t_entry_target? fea/data_plane/firewall/firewall_get_netfilter.cc:382: error: forward declaration of ?truct ip6t_entry_target? fea/data_plane/firewall/firewall_get_netfilter.cc:424: error: invalid use of incomplete type ?truct ip6t_standard_target? fea/data_plane/firewall/firewall_get_netfilter.cc:383: error: forward declaration of ?truct ip6t_standard_target? fea/data_plane/firewall/firewall_get_netfilter.cc:432: error: invalid use of incomplete type ?truct ip6t_standard_target? fea/data_plane/firewall/firewall_get_netfilter.cc:383: error: forward declaration of ?truct ip6t_standard_target? fea/data_plane/firewall/firewall_get_netfilter.cc:441: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:442: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:448: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:449: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:450: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:451: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:459: error: invalid application of ?izeof?to incomplete type ?p6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:459: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:463: error: invalid use of incomplete type ?truct ip6t_entry_match? fea/data_plane/firewall/firewall_get_netfilter.cc:381: error: forward declaration of ?truct ip6t_entry_match? fea/data_plane/firewall/firewall_get_netfilter.cc:464: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:468: error: invalid use of incomplete type ?truct ip6t_entry_match? fea/data_plane/firewall/firewall_get_netfilter.cc:381: error: forward declaration of ?truct ip6t_entry_match? fea/data_plane/firewall/firewall_get_netfilter.cc:469: error: invalid use of incomplete type ?truct ip6t_tcp? fea/data_plane/firewall/firewall_get_netfilter.cc:467: error: forward declaration of ?truct ip6t_tcp? fea/data_plane/firewall/firewall_get_netfilter.cc:470: error: invalid use of incomplete type ?truct ip6t_tcp? fea/data_plane/firewall/firewall_get_netfilter.cc:467: error: forward declaration of ?truct ip6t_tcp? fea/data_plane/firewall/firewall_get_netfilter.cc:471: error: invalid use of incomplete type ?truct ip6t_tcp? fea/data_plane/firewall/firewall_get_netfilter.cc:467: error: forward declaration of ?truct ip6t_tcp? fea/data_plane/firewall/firewall_get_netfilter.cc:472: error: invalid use of incomplete type ?truct ip6t_tcp? fea/data_plane/firewall/firewall_get_netfilter.cc:467: error: forward declaration of ?truct ip6t_tcp? fea/data_plane/firewall/firewall_get_netfilter.cc:478: error: invalid use of incomplete type ?truct ip6t_entry_match? fea/data_plane/firewall/firewall_get_netfilter.cc:381: error: forward declaration of ?truct ip6t_entry_match? fea/data_plane/firewall/firewall_get_netfilter.cc:479: error: invalid use of incomplete type ?truct ip6t_udp? fea/data_plane/firewall/firewall_get_netfilter.cc:477: error: forward declaration of ?truct ip6t_udp? fea/data_plane/firewall/firewall_get_netfilter.cc:480: error: invalid use of incomplete type ?truct ip6t_udp? fea/data_plane/firewall/firewall_get_netfilter.cc:477: error: forward declaration of ?truct ip6t_udp? fea/data_plane/firewall/firewall_get_netfilter.cc:481: error: invalid use of incomplete type ?truct ip6t_udp? fea/data_plane/firewall/firewall_get_netfilter.cc:477: error: forward declaration of ?truct ip6t_udp? fea/data_plane/firewall/firewall_get_netfilter.cc:482: error: invalid use of incomplete type ?truct ip6t_udp? fea/data_plane/firewall/firewall_get_netfilter.cc:477: error: forward declaration of ?truct ip6t_udp? fea/data_plane/firewall/firewall_get_netfilter.cc:493: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:494: error: invalid use of incomplete type ?truct ip6t_entry? fea/data_plane/firewall/firewall_get_netfilter.cc:380: error: forward declaration of ?truct ip6t_entry? scons: *** [obj/i686-pc-linux-gnu/fea/data_plane/firewall/firewall_get_netfilter.os] Error 1 scons: building terminated because of errors. 55:/home/zs/xorp# -- ??? ???13312601392 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110320/f6515266/attachment-0001.html From wxh585 at 126.com Sun Mar 20 07:48:03 2011 From: wxh585 at 126.com (wxh585 at 126.com) Date: Sun, 20 Mar 2011 22:48:03 +0800 (CST) Subject: [Xorp-hackers] xorp 1.83 build ok, but , after config vlan, xorp no start in system up, Message-ID: <1f39938.4e28.12ed3bcb7da.Coremail.wxh585@126.com> for debian 5.0 -- ??? ???13312601392 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110320/2bb090f5/attachment.html From greearb at candelatech.com Sun Mar 20 08:52:10 2011 From: greearb at candelatech.com (Ben Greear) Date: Sun, 20 Mar 2011 08:52:10 -0700 Subject: [Xorp-hackers] xorp1.8.3 build error on debian 5, but xorp1.8.2 build pass on my computer In-Reply-To: <64619011.7e29.12ed2caa2c1.Coremail.wxh585@126.com> References: <64619011.7e29.12ed2caa2c1.Coremail.wxh585@126.com> Message-ID: <4D8622AA.20101@candelatech.com> On 03/20/2011 03:23 AM, wxh585 at 126.com wrote: > /home/zs/xorp# scons > scons: `obj/i686-pc-linux-gnu/etc/templates/fea.tp' is up to date. > scons: `obj/i686-pc-linux-gnu/fea/data_plane/ifconfig/libxorp_fea_ifconfig.so' is up to date. > scons: `obj/i686-pc-linux-gnu/fea/data_plane/fibconfig/libxorp_fea_fibconfig.so' is up to date. > scons: `obj/i686-pc-linux-gnu/fea/data_plane/io/libxorp_fea_io.so' is up to date. > scons: `obj/i686-pc-linux-gnu/fea/data_plane/control_socket/libxorp_fea_control_socket.so' is up to date. > scons: `obj/i686-pc-linux-gnu/fea/data_plane/managers/libxorp_fea_data_plane_managers.so' is up to date. > g++ -o obj/i686-pc-linux-gnu/fea/data_plane/firewall/firewall_get_netfilter.os -c -O1 -g3 -Werror -W -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith > -Wcast-align -Woverloaded-virtual -ftemplate-depth-25 -pipe -fPIC -DXRL_PF=120 -D_FORTIFY_SOURCE=0 -Iobj/i686-pc-linux-gnu -I. -I. > fea/data_plane/firewall/firewall_get_netfilter.cc > In file included from fea/data_plane/firewall/firewall_get_netfilter.cc:51: > /usr/include/linux/netfilter_ipv4/ip_tables.h: In function ?xt_entry_target* ipt_get_target(ipt_entry*)? > /usr/include/linux/netfilter_ipv4/ip_tables.h:221: error: pointer of type ?void *?used in arithmetic > /usr/include/linux/netfilter_ipv4/ip_tables.h:221: error: invalid conversion from ?void*?to ?xt_entry_target*? You probably need to edit your ip_tables.h file. Scons should have refused to try compiling the firewall, but maybe that logic is broken on your system. print "\nWARNING: Netfilter include files are broken or do not exist." print " This means the Linux firewall support will not be compiled in." print " To fix, you may edit: /usr/include/linux/netfilter_ipv4/ip_tables.h" print " line 222 or so, to look like this:" print " /* Helper functions */" print " static __inline__ struct ipt_entry_target *" print " ipt_get_target(struct ipt_entry *e)" print "{" print " /* BEN: Was void* */" print " return (struct ipt_entry_target *)((char*)e + e->target_offset);" print "}" print "\nYou will also want to edit similar code around line 282 of:" print "/usr/include/linux/netfilter_ipv6/ip6_tables.h" Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Sun Mar 20 08:57:02 2011 From: greearb at candelatech.com (Ben Greear) Date: Sun, 20 Mar 2011 08:57:02 -0700 Subject: [Xorp-hackers] xorp 1.83 build ok, but , after config vlan, xorp no start in system up, In-Reply-To: <1f39938.4e28.12ed3bcb7da.Coremail.wxh585@126.com> References: <1f39938.4e28.12ed3bcb7da.Coremail.wxh585@126.com> Message-ID: <4D8623CE.4080908@candelatech.com> On 03/20/2011 07:48 AM, wxh585 at 126.com wrote: > for debian 5.0 You have to provide more details if you want any of us to fix this. Maybe logs, or error messages at the least? Thanks, Ben > > > -- > > ?????? > > ??????13312601392 > > > > > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers -- Ben Greear Candela Technologies Inc http://www.candelatech.com From wxh585 at 126.com Sun Mar 20 19:10:06 2011 From: wxh585 at 126.com (wxh585 at 126.com) Date: Mon, 21 Mar 2011 10:10:06 +0800 (CST) Subject: [Xorp-hackers] xorp 1.83 is not work on freebsd 7.3, when config vlan Message-ID: <95ead6.14d6.12ed62d27e5.Coremail.wxh585@126.com> FreeBSD 7.3-RELEASE (GENERIC) #0: Sun Mar 21 06:15:01 UTC 2010 $ xorpsh Welcome to XORP on r.d admin at r.d> configure Entering configuration mode. There are no other users in configuration mode. [edit] admin at r.d# quit admin at r.d> quit $ uname -a FreeBSD r.d 7.3-RELEASE FreeBSD 7.3-RELEASE #0: Sun Mar 21 06:15:01 UTC 2010 root at walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 $ netstat -an Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 127.0.0.1.61150 127.0.0.1.19999 TIME_WAIT tcp4 0 48 116.55.13.55.22 116.55.13.212.1816 ESTABLISHED tcp4 0 0 127.0.0.1.25 *.* LISTEN tcp4 0 0 *.22 *.* LISTEN tcp6 0 0 *.22 *.* LISTEN tcp4 0 0 127.0.0.1.19999 127.0.0.1.64903 ESTABLISHED tcp4 0 0 127.0.0.1.64903 127.0.0.1.19999 ESTABLISHED tcp4 0 0 127.0.0.1.19999 *.* LISTEN udp4 0 0 *.514 *.* udp6 0 0 *.514 *.* Active UNIX domain sockets Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr c4555000 stream 0 0 0 c4556738 0 0 c4556738 stream 0 0 0 c4555000 0 0 c4555888 stream 0 0 c457a450 0 0 0 /var/tmp/xrl.xlpzOw c4555930 stream 0 0 c457a78c 0 0 0 /var/tmp/xrl.Ro92Hr c4555dc8 stream 0 0 c4547cf0 0 0 0 /var/run/devd.pipe c4556b28 dgram 0 0 0 c4556e70 0 0 c4556bd0 dgram 0 0 0 c4556dc8 0 0 c4556dc8 dgram 0 0 c45e433c 0 c4556bd0 0 /var/run/logpriv c4556e70 dgram 0 0 c45e4450 0 c4556b28 0 /var/run/log $ vty Welcome to XORP on r.d admin at r.d> configure Entering configuration mode. There are no other users in configuration mode. [edit] admin at r.d# set interfaces interface fxp1 [edit] admin at r.d# commit OK [edit] admin at r.d# save /router/run.conf ERROR: Save failed. File /router/run.conf exists, but an error occured when trying to check that it was OK to overwrite it File was NOT overwritten admin at r.d# save /router/run.conf Save done. admin at r.d# set interfaces interface fxp1.5 ? Possible completions: <[Enter]> Execute this command default-system-config Use default values from the system description Add a human-readable description of an interface disable Disable a network interface discard Configure a discard interface iface-type Interface-type: VLAN. mac Set the MAC address management Configure a management interface mtu Set the MTU parent-ifname Parent interface this virtual belongs to. unreachable Configure an unreachable interface vid Virtual Interface Identifier: VLAN-ID for VLANs. vif Configure a virtual interface { Enter text on multiple lines admin at r.d# set interfaces interface fxp1.5 iface-type VLAN [edit] admin at r.d# commit OK [edit] admin at r.d# set interfaces interface fxp1.5 vi `vi' is ambiguous. Possible completions: vid Virtual Interface Identifier: VLAN-ID for VLANs. vif Configure a virtual interface admin at r.d# set interfaces interface fxp1.5 vid 5 [edit] admin at r.d# set interfaces interface fxp1.5 parent-ifname fxp1 [edit] admin at r.d# commit Commit Failed 210 Transport failed[edit] admin at r.d# Finder disconnected. No Finder? admin at r.d# exit discard [ 2011/03/21 02:04:39.342980 ERROR xorpsh:1125 XRL libxipc/xrl_router.cc:588 send ] NO FINDER ERROR: failed to inform rtrmgr of leaving config mode. No Finder? admin at r.d> quit [ 2011/03/21 02:04:41.150857 ERROR xorpsh:1125 XRL libxipc/xrl_router.cc:588 send ] NO FINDER $ netstat -an Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 116.55.13.55.22 116.55.13.212.1817 ESTABLISHED tcp4 0 0 127.0.0.1.64029 127.0.0.1.19999 TIME_WAIT tcp4 0 0 127.0.0.1.64875 127.0.0.1.19999 TIME_WAIT tcp4 0 0 127.0.0.1.60620 127.0.0.1.19999 TIME_WAIT tcp4 0 0 127.0.0.1.50171 127.0.0.1.19999 TIME_WAIT tcp4 0 0 127.0.0.1.19999 127.0.0.1.50475 TIME_WAIT tcp4 0 48 116.55.13.55.22 116.55.13.212.1816 ESTABLISHED tcp4 0 0 127.0.0.1.25 *.* LISTEN tcp4 0 0 *.22 *.* LISTEN tcp6 0 0 *.22 *.* LISTEN tcp4 0 0 127.0.0.1.19999 127.0.0.1.64903 TIME_WAIT udp4 0 0 *.514 *.* udp6 0 0 *.514 *.* Active UNIX domain sockets Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr c4555c78 stream 0 0 0 c4555bd0 0 0 c4555bd0 stream 0 0 0 c4555c78 0 0 c4555000 stream 0 0 0 c4556738 0 0 c4556738 stream 0 0 0 c4555000 0 0 c4555dc8 stream 0 0 c4547cf0 0 0 0 /var/run/devd.pipe c4556b28 dgram 0 0 0 c4556e70 0 0 c4556bd0 dgram 0 0 0 c4556dc8 0 0 c4556dc8 dgram 0 0 c45e433c 0 c4556bd0 0 /var/run/logpriv c4556e70 dgram 0 0 c45e4450 0 c4556b28 0 /var/run/log $ xorpsh [ 2011/03/21 02:04:52.7276 WARNING xorpsh LIBXORP ] read error: _fd: 25 offset: 0 total-len: 4 error: Connection refused [ 2011/03/21 02:04:52.111592 WARNING xorpsh LIBXORP ] read error: _fd: 25 offset: 0 total-len: 4 error: Connection refused [ 2011/03/21 02:04:52.215830 WARNING xorpsh LIBXORP ] read error: _fd: 25 offset: 0 total-len: 4 error: Connection refused [ 2011/03/21 02:04:52.320123 WARNING xorpsh LIBXORP ] read error: _fd: 25 offset: 0 total-len: 4 error: Connection refused [ 2011/03/21 02:04:52.424408 WARNING xorpsh LIBXORP ] read error: _fd: 25 offset: 0 total-len: 4 error: Connection refused -- ??? ???13312601392 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110321/85f02bd9/attachment-0001.html From wxh585 at 126.com Sun Mar 20 22:03:00 2011 From: wxh585 at 126.com (wxh585 at 126.com) Date: Mon, 21 Mar 2011 13:03:00 +0800 (CST) Subject: [Xorp-hackers] xorp 1.83 is not start when system up, after config vlan Message-ID: <7315f6b6.4a4c.12ed6cb7017.Coremail.wxh585@126.com> h-3.2$ netstat -an Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:45105 127.0.0.1:19999 TIME_WAIT tcp 0 0 127.0.0.1:45102 127.0.0.1:19999 TIME_WAIT tcp 0 48 116.55.13.55:22 116.55.9.67:1051 ESTABLISHED tcp 0 0 127.0.0.1:45103 127.0.0.1:19999 TIME_WAIT tcp 0 0 127.0.0.1:45104 127.0.0.1:19999 TIME_WAIT tcp6 0 0 :::22 :::* LISTEN Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State I-Node Path unix 4 [ ] DGRAM 5119 /dev/log unix 2 [ ] DGRAM 2546 @/org/kernel/udev/udevd unix 2 [ ACC ] STREAM LISTENING 5135 /var/run/acpid.socket unix 3 [ ] STREAM CONNECTED 5485 unix 3 [ ] STREAM CONNECTED 5484 unix 2 [ ] DGRAM 5483 unix 2 [ ] DGRAM 5137 sh-3.2$ /usr/local/xorp/sbin/xorpsh Waiting for xorp_rtrmgr... ^C sh-3.2$ su root Password: type "/etc/init.d/xorp start",xorp 1.83 is work well. 55:/home/zs# /etc/init.d/xorp start Starting eXtensible Open Router Platform : xorp. 55:/home/zs# su admin 55:/home/zs$ /usr/local/xorp/sbin/xorpsh Welcome to XORP on 55 admin at 55> configure Entering configuration mode. There are no other users in configuration mode. [edit] admin at 55# show -all interfaces { restore-original-config-on-shutdown: false interface eth3 { description: "" disable: false discard: false unreachable: false management: false parent-ifname: "" iface-type: "" vid: "" } interface "eth3.101" { description: "" disable: false discard: false unreachable: false management: false parent-ifname: "eth3" iface-type: "VLAN" vid: "101" vif "eth3.101" { disable: false address 192.168.0.1 { prefix-length: 24 disable: false } } } } [edit] admin at 55# uname -a ^ unknown command. admin at 55# quit admin at 55> quit 55:/home/zs$ uname -a Linux 55 2.6.26-2-686 #1 SMP Thu Jan 27 00:28:05 UTC 2011 i686 GNU/Linux 55:/home/zs$ -- ??? ???13312601392 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110321/58f571e0/attachment.html From greearb at candelatech.com Sun Mar 20 22:57:17 2011 From: greearb at candelatech.com (Ben Greear) Date: Sun, 20 Mar 2011 22:57:17 -0700 Subject: [Xorp-hackers] xorp 1.83 is not work on freebsd 7.3, when config vlan In-Reply-To: <95ead6.14d6.12ed62d27e5.Coremail.wxh585@126.com> References: <95ead6.14d6.12ed62d27e5.Coremail.wxh585@126.com> Message-ID: <4D86E8BD.80008@candelatech.com> On 03/20/2011 07:10 PM, wxh585 at 126.com wrote: > FreeBSD 7.3-RELEASE (GENERIC) #0: Sun Mar 21 06:15:01 UTC 2010 > $ xorpsh > Welcome to XORP on r.d > admin at r.d > configure > Entering configuration mode. > There are no other users in configuration mode. > [edit] > admin at r.d # quit > admin at r.d > quit > $ uname -a > FreeBSD r.d 7.3-RELEASE FreeBSD 7.3-RELEASE #0: Sun Mar 21 06:15:01 UTC 2010 root at walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > i386 > $ netstat -an > Active Internet connections (including servers) > Proto Recv-Q Send-Q Local Address Foreign Address (state) > tcp4 0 0 127.0.0.1.61150 127.0.0.1.19999 TIME_WAIT > tcp4 0 48 116.55.13.55.22 116.55.13.212.1816 ESTABLISHED > tcp4 0 0 127.0.0.1.25 *.* LISTEN > tcp4 0 0 *.22 *.* LISTEN > tcp6 0 0 *.22 *.* LISTEN > tcp4 0 0 127.0.0.1.19999 127.0.0.1.64903 ESTABLISHED > tcp4 0 0 127.0.0.1.64903 127.0.0.1.19999 ESTABLISHED > tcp4 0 0 127.0.0.1.19999 *.* LISTEN > udp4 0 0 *.514 *.* > udp6 0 0 *.514 *.* > Active UNIX domain sockets > Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr > c4555000 stream 0 0 0 c4556738 0 0 > c4556738 stream 0 0 0 c4555000 0 0 > c4555888 stream 0 0 c457a450 0 0 0 /var/tmp/xrl.xlpzOw > c4555930 stream 0 0 c457a78c 0 0 0 /var/tmp/xrl.Ro92Hr > c4555dc8 stream 0 0 c4547cf0 0 0 0 /var/run/devd.pipe > c4556b28 dgram 0 0 0 c4556e70 0 0 > c4556bd0 dgram 0 0 0 c4556dc8 0 0 > c4556dc8 dgram 0 0 c45e433c 0 c4556bd0 0 /var/run/logpriv > c4556e70 dgram 0 0 c45e4450 0 c4556b28 0 /var/run/log > $ vty > Welcome to XORP on r.d > admin at r.d > configure > Entering configuration mode. > There are no other users in configuration mode. > [edit] > admin at r.d # set interfaces interface fxp1 > [edit] > admin at r.d # commit > OK > [edit] > admin at r.d # save /router/run.conf > ERROR: Save failed. > File /router/run.conf exists, but an error occured when trying to check that it was OK to overwrite it > File was NOT overwritten > admin at r.d # save /router/run.conf > Save done. > admin at r.d # set interfaces interface fxp1.5 ? > Possible completions: > <[Enter]> Execute this command > default-system-config Use default values from the system > description Add a human-readable description of an interface > disable Disable a network interface > discard Configure a discard interface > iface-type Interface-type: VLAN. > mac Set the MAC address > management Configure a management interface > mtu Set the MTU > parent-ifname Parent interface this virtual belongs to. > unreachable Configure an unreachable interface > vid Virtual Interface Identifier: VLAN-ID for VLANs. > vif Configure a virtual interface > { Enter text on multiple lines > admin at r.d # set interfaces interface fxp1.5 iface-type VLAN > [edit] > admin at r.d # commit > OK > [edit] > admin at r.d # set interfaces interface fxp1.5 vi > `vi' is ambiguous. > Possible completions: > vid Virtual Interface Identifier: VLAN-ID for VLANs. > vif Configure a virtual interface > admin at r.d # set interfaces interface fxp1.5 vid 5 > [edit] > admin at r.d # set interfaces interface fxp1.5 parent-ifname fxp1 > [edit] > admin at r.d # commit > Commit Failed > 210 Transport failed[edit] > admin at r.d # Finder disconnected. No Finder? Looks like the VLAN code must crash on BSD. I'll see if I can reproduce that and fix it. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Sun Mar 20 23:01:18 2011 From: greearb at candelatech.com (Ben Greear) Date: Sun, 20 Mar 2011 23:01:18 -0700 Subject: [Xorp-hackers] xorp 1.83 is not start when system up, after config vlan In-Reply-To: <7315f6b6.4a4c.12ed6cb7017.Coremail.wxh585@126.com> References: <7315f6b6.4a4c.12ed6cb7017.Coremail.wxh585@126.com> Message-ID: <4D86E9AE.6020300@candelatech.com> On 03/20/2011 10:03 PM, wxh585 at 126.com wrote: > h-3.2$ netstat -an > Active Internet connections (servers and established) > Proto Recv-Q Send-Q Local Address Foreign Address State > tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN > tcp 0 0 127.0.0.1:45105 127.0.0.1:19999 TIME_WAIT > tcp 0 0 127.0.0.1:45102 127.0.0.1:19999 TIME_WAIT > tcp 0 48 116.55.13.55:22 116.55.9.67:1051 ESTABLISHED > tcp 0 0 127.0.0.1:45103 127.0.0.1:19999 TIME_WAIT > tcp 0 0 127.0.0.1:45104 127.0.0.1:19999 TIME_WAIT > tcp6 0 0 :::22 :::* LISTEN > Active UNIX domain sockets (servers and established) > Proto RefCnt Flags Type State I-Node Path > unix 4 [ ] DGRAM 5119 /dev/log > unix 2 [ ] DGRAM 2546 @/org/kernel/udev/udevd > unix 2 [ ACC ] STREAM LISTENING 5135 /var/run/acpid.socket > unix 3 [ ] STREAM CONNECTED 5485 > unix 3 [ ] STREAM CONNECTED 5484 > unix 2 [ ] DGRAM 5483 > unix 2 [ ] DGRAM 5137 > sh-3.2$ /usr/local/xorp/sbin/xorpsh > Waiting for xorp_rtrmgr... So, the problem is that xorp isn't started on system bootup? What scripts are you using to start xorp? Do you see any failure messages in it's logs, or any core files? Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From wxh585 at 126.com Mon Mar 21 02:24:57 2011 From: wxh585 at 126.com (wxh585 at 126.com) Date: Mon, 21 Mar 2011 17:24:57 +0800 (CST) Subject: [Xorp-hackers] xorp isn't started on system bootup. Message-ID: <537919cc.8b4d.12ed7bb45dd.Coremail.wxh585@126.com> scripts : xorp-1.8.2b-CT\xorp\contrib\init_scripts\debian\xorp -- ??? ???13312601392 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110321/4c4b7efb/attachment.html From wxh585 at 126.com Mon Mar 21 02:26:53 2011 From: wxh585 at 126.com (wxh585 at 126.com) Date: Mon, 21 Mar 2011 17:26:53 +0800 (CST) Subject: [Xorp-hackers] xorp 1.6 isn't started on system bootup too, when config vlan on xorp.for linux Message-ID: <58066200.8bbd.12ed7bd0888.Coremail.wxh585@126.com> -- ??? ???13312601392 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110321/b9efeda0/attachment-0001.html From rps at maine.edu Mon Mar 21 06:42:18 2011 From: rps at maine.edu (Ray Soucy) Date: Mon, 21 Mar 2011 09:42:18 -0400 Subject: [Xorp-hackers] xorp 1.6 isn't started on system bootup too, when config vlan on xorp.for linux In-Reply-To: <58066200.8bbd.12ed7bd0888.Coremail.wxh585@126.com> References: <58066200.8bbd.12ed7bd0888.Coremail.wxh585@126.com> Message-ID: ???, This is not the appropriate list for this nature of question. Please use the xorp-users list instead for help on running XORP. Also, I think many of your questions will be answered by reading the Wiki, at: http://xorp.run.montefiore.ulg.ac.be/latex2wiki/getting_started?&#prepare_the_system_to_run_xorp 2011/3/21 wxh585 at 126.com : > > > > -- > > ??? > > ???13312601392 > > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > > -- Ray Soucy Epic Communications Specialist Phone: +1 (207) 561-3526 Networkmaine, a Unit of the University of Maine System http://www.networkmaine.net/ From noreply at github.com Mon Mar 21 14:49:12 2011 From: noreply at github.com (noreply at github.com) Date: Mon, 21 Mar 2011 14:49:12 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] a1d126: bsd: Fix VLAN creation and deletion. Message-ID: <20110321214912.7E43D422C6@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: a1d12694637682944b6993095e10c2be24c19f0a https://github.com/greearb/xorp.ct/commit/a1d12694637682944b6993095e10c2be24c19f0a Author: Ben Greear Date: 2011-03-21 (Mon, 21 Mar 2011) Changed paths: M xorp/fea/data_plane/ifconfig/ifconfig_parse_routing_socket.cc M xorp/fea/data_plane/ifconfig/ifconfig_vlan_set_linux.cc Log Message: ----------- bsd: Fix VLAN creation and deletion. There was a bug in deletion logic that I introduced recently: It would recurse until it ran out of stack and then crash. There were more bugs with creating interfaces: The ioctl call to configure the VID was returning EBUSY. Changing to use system("ifconfig ed0.5 create") fixes this problem, so ignoring root cause of that ioctl failure. Fix a third bug that caused xorp to assert and crash when a vlan device (or any other device) is removed. Signed-off-by: Ben Greear From greearb at candelatech.com Mon Mar 21 16:29:36 2011 From: greearb at candelatech.com (Ben Greear) Date: Mon, 21 Mar 2011 16:29:36 -0700 Subject: [Xorp-hackers] xorp 1.83 is not work on freebsd 7.3, when config vlan In-Reply-To: <4D86E8BD.80008@candelatech.com> References: <95ead6.14d6.12ed62d27e5.Coremail.wxh585@126.com> <4D86E8BD.80008@candelatech.com> Message-ID: <4D87DF60.4090700@candelatech.com> On 03/20/2011 10:57 PM, Ben Greear wrote: >> 210 Transport failed[edit] >> admin at r.d # Finder disconnected. No Finder? > > Looks like the VLAN code must crash on BSD. I'll see if I can > reproduce that and fix it. I fixed this, and a few other FreeBSD & VLAN related bugs. Please try the latest at: http://www.xorp.org/releases/1.8.3/ As for the debian startup problems, based on your reports, this seems to have been broken since 1.6, so I'm not going to bother dealing with it for release 1.8.3. Probably the problem is just a start-script problem, so maybe someone that uses Debian regularly will fix that one.... Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From Uri.Yanai at ngsoft.com Tue Mar 22 01:19:39 2011 From: Uri.Yanai at ngsoft.com (Uri Yanai) Date: Tue, 22 Mar 2011 10:19:39 +0200 Subject: [Xorp-hackers] %delete in child not called when deleting top parent Message-ID: This is my second post on this subject. According to XORP documentation ?If a node that is deleted does not have a %delete command, then the %delete commands of its children are called instead. This rule is applied recursively for each child that does not have a %delete command? I have noticed that this isn't the case. For example, in interfaces.tp I change delete_interface to delete_interfacex interface @: txt { %delete: xrl "$(interfaces.targetname)/ifmgr/0.1/delete_interfacex?tid:u32=$ (interfaces.TID)&ifname:txt=$(@)"; In xorpsh I run the following root at Me# set interfaces interface eth1 [edit] root at Me# commit OK [edit] root at Me# delete interfaces interface eth1 Deleting: eth1 { } OK [edit] root at Me# commit Commit Failed 201 Resolve failed[edit] But I do succeed when I run root at Me# delete interfaces Deleting: interfaces { - interface eth1 { - } } OK [edit] root at Me# commit OK [edit] Thanks for your help Uri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110322/34eb97d6/attachment.html From greearb at candelatech.com Tue Mar 22 10:58:09 2011 From: greearb at candelatech.com (Ben Greear) Date: Tue, 22 Mar 2011 10:58:09 -0700 Subject: [Xorp-hackers] %delete in child not called when deleting top parent In-Reply-To: References: Message-ID: <4D88E331.5030509@candelatech.com> On 03/22/2011 01:19 AM, Uri Yanai wrote: > This is my second post on this subject. > According to XORP documentation > ?If a node that is deleted does not have a %delete command, then the > %delete commands of its children are called instead. This rule is > applied recursively for each child that does not have a %delete command? > > I have noticed that this isn't the case. You might try digging into the xorp_rtrmgr code and adding debugging (or enable existing tracing) to see what is happening... Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From noreply at github.com Tue Mar 22 11:01:32 2011 From: noreply at github.com (noreply at github.com) Date: Tue, 22 Mar 2011 11:01:32 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 9d2b66: Wiki backup on Tue, 22 Mar 2011 03:00:01 +0100... Message-ID: <20110322180132.C3499422E7@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 9d2b66468ec1a409b2f26daf5a8c64d38bfa034b https://github.com/greearb/xorp.ct/commit/9d2b66468ec1a409b2f26daf5a8c64d38bfa034b Author: RUN Admin Team Date: 2011-03-21 (Mon, 21 Mar 2011) Changed paths: M docs/wiki/meta/_dokuwiki.changes M docs/wiki/meta/latex2wiki/getting_started.changes M docs/wiki/meta/latex2wiki/getting_started.meta M docs/wiki/meta/latex2wiki/xorp_error_handling.meta M docs/wiki/pages/latex2wiki/getting_started.txt Log Message: ----------- Wiki backup on Tue, 22 Mar 2011 03:00:01 +0100... Commit: 9062ba8bcfca7222b316e31f3736638623b8c500 https://github.com/greearb/xorp.ct/commit/9062ba8bcfca7222b316e31f3736638623b8c500 Author: RUN Admin Team Date: 2011-03-21 (Mon, 21 Mar 2011) Changed paths: M xorp/fea/data_plane/ifconfig/ifconfig_parse_routing_socket.cc M xorp/fea/data_plane/ifconfig/ifconfig_vlan_set_linux.cc Log Message: ----------- Merge branch 'master' of https://github.com/greearb/xorp.ct Compare: https://github.com/greearb/xorp.ct/compare/a1d1269...9062ba8 From noreply at github.com Tue Mar 22 13:01:59 2011 From: noreply at github.com (noreply at github.com) Date: Tue, 22 Mar 2011 13:01:59 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] e05e95: Update debian xorp start file. Message-ID: <20110322200159.3CBD3422D2@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: e05e950120f01ede4ada93ab78b4f034d629ef1f https://github.com/greearb/xorp.ct/commit/e05e950120f01ede4ada93ab78b4f034d629ef1f Author: Ben Greear Date: 2011-03-22 (Tue, 22 Mar 2011) Changed paths: M xorp/contrib/init_scripts/debian/xorp Log Message: ----------- Update debian xorp start file. Warn users if 'daemon' doesn't exist. Use /etc/xorp.conf for config file by default. Use /usr/local/xorp/sbin for default xorp binary location. Signed-off-by: Ben Greear Commit: 6f0890b35697718e4a48f06c1148792aca1091c8 https://github.com/greearb/xorp.ct/commit/6f0890b35697718e4a48f06c1148792aca1091c8 Author: Ben Greear Date: 2011-03-22 (Tue, 22 Mar 2011) Changed paths: M xorp/site_scons/config/allconfig.py Log Message: ----------- config: Add suggestions for installing debian packages. Signed-off-by: Ben Greear Compare: https://github.com/greearb/xorp.ct/compare/9062ba8...6f0890b From greearb at candelatech.com Tue Mar 22 15:33:35 2011 From: greearb at candelatech.com (Ben Greear) Date: Tue, 22 Mar 2011 15:33:35 -0700 Subject: [Xorp-hackers] XORP 1.8.3 is officially released. Message-ID: <4D8923BF.30606@candelatech.com> I have uploaded the official XORP 1.8.3 packages to various places: https://sourceforge.net/projects/xorp/files/xorp/1.8.3/ https://github.com/greearb/xorp.ct/downloads http://www.xorp.org/releases/1.8.3/ I uploaded a large number of pre-compiled binaries for various systems. I'm not sure if that helps or hinders. Please let me know if you find any troubles, broken links on the web page, etc. Release 1.8.3 (March 16, 2011) * Change the way VLANs are created. This changes the config file syntax (though the original syntax didn't actually work right..so probably no one is actually using it.) * Re-add support for XORP on Microsoft Windows. Add instructions to BUILD_NOTES for cross-compiling with mingw. * Add more options for disabling compile of certain modules. See: scons --help * Add support for IPv6 multicast with virtual routing tables. Requires Linux kernel 2.6.35 or higher. * Support compiling with clang + llvm compiler: Install latest clang and llvm from their SVN repositories and: scons CC=clang CXX=clang++ * Add some changes to make it easier to support uSTL, but it does not actually work as uSTL had too many limitations and bugs, and didn't seem to gain much space improvements anyway. See BUILD_NOTES for more info. * Support cross-compiling. See BUILD_NOTES. * BSD: Don't crash FEA when interface disappears. * BSD: Don't fail commit if cannot remove route that doesn't exist. * Add signal handling for more graceful exit. Helps clean up /var/tmp/xrl.* files and lets valgrind report more useful information. * timers: Fix memory leak related to the Heap class. * BGP: Fix up tear-down logic to make sure it exits promptly in all cases. * pim: Fix a recursive delete issue in pim code, exposed by the ability to gracefully shut down processes with SIGTERM. * rtrmgr: Allow starting helper processes under valgrind. Just create a file called XORP_USE_VALGRIND in the working directory. If you want xorp_rtrmgr to use valgrind, you have to start it under valgrind manually. * FEA: Properly clean up all sockets and remove them from the eventloop callback when cleaing up io_ip_socket objects. * firewall: Support compiling netlink firewall support on Linux, if kernel headers are properly modified to compile with c++. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From noreply at github.com Tue Mar 22 15:46:45 2011 From: noreply at github.com (noreply at github.com) Date: Tue, 22 Mar 2011 15:46:45 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 5a19f9: www: Update downloads & release links on web page... Message-ID: <20110322224645.1D5A742399@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 5a19f94fdff9571ace9bce878931ede4560604ce https://github.com/greearb/xorp.ct/commit/5a19f94fdff9571ace9bce878931ede4560604ce Author: Ben Greear Date: 2011-03-22 (Tue, 22 Mar 2011) Changed paths: M www/scripts/XorpOrgGenerator.py Log Message: ----------- www: Update downloads & release links on web page. Signed-off-by: Ben Greear From noreply at github.com Tue Mar 22 16:37:32 2011 From: noreply at github.com (noreply at github.com) Date: Tue, 22 Mar 2011 16:37:32 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 619aad: Supporting asynchronous method implementations Message-ID: <20110322233732.3E6C84202F@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 619aad8bf05c1c65b127cfe157f0d2333e716d3e https://github.com/greearb/xorp.ct/commit/619aad8bf05c1c65b127cfe157f0d2333e716d3e Author: Steven Simpson Date: 2011-03-22 (Tue, 22 Mar 2011) Changed paths: M xorp/SConstruct M xorp/libxipc/finder_client.cc M xorp/libxipc/finder_client.hh M xorp/libxipc/finder_client_xrl_target.cc M xorp/libxipc/finder_client_xrl_target.hh M xorp/libxipc/finder_messenger.cc M xorp/libxipc/finder_messenger.hh M xorp/libxipc/xrl_cmd_map.hh M xorp/libxipc/xrl_dispatcher.cc M xorp/libxipc/xrl_dispatcher.hh M xorp/libxipc/xrl_pf_stcp.cc M xorp/libxipc/xrl_pf_stcp.hh M xorp/libxipc/xrl_router.cc M xorp/libxipc/xrl_router.hh M xorp/xrl/scripts/tgt-gen Log Message: ----------- Supporting asynchronous method implementations * Command map and dispatcher declare types for callbacks to pass error code and out-arguments. * Handlers in generated targets meet these callback signatures. * Various dispatch methods changed so that out-arguments and error codes are removed from the signature, and the appropriate callback type is added, all to track changes to command map and dispatcher. * Generated targets include default asynchronous implementations which call synchronous (pure virtual) methods. * One finder method FinderClient::dispatch_tunneled_xrl is implemented asynchronously. * Most changes above compiled in only if XORP_ENABLE_ASYNC_SERVER is defined, as set by enable_async_server=True on scons. * STCP changed from using list of RequestStates in seqno order to map indexed by seqno. This allows responses to return out-of-order, which is possible if a server implements a method asynchronously. Signed-off-by: Steven Simpson From greearb at candelatech.com Tue Mar 22 16:48:25 2011 From: greearb at candelatech.com (Ben Greear) Date: Tue, 22 Mar 2011 16:48:25 -0700 Subject: [Xorp-hackers] [PATCH] Supporting asynchronous method implementations In-Reply-To: <1300366693-3015-1-git-send-email-ss@comp.lancs.ac.uk> References: <4D500B54.6030707@comp.lancs.ac.uk> <1300366693-3015-1-git-send-email-ss@comp.lancs.ac.uk> Message-ID: <4D893549.1090907@candelatech.com> On 03/17/2011 05:58 AM, ss at comp.lancs.ac.uk wrote: > From: Steven Simpson > > * Command map and dispatcher declare types for callbacks to pass > error code and out-arguments. > > * Handlers in generated targets meet these callback signatures. > > * Various dispatch methods changed so that out-arguments and > error codes are removed from the signature, and the appropriate > callback type is added, all to track changes to command map and > dispatcher. > > * Generated targets include default asynchronous implementations > which call synchronous (pure virtual) methods. > > * One finder method FinderClient::dispatch_tunneled_xrl is > implemented asynchronously. > > * Most changes above compiled in only if XORP_ENABLE_ASYNC_SERVER > is defined, as set by enable_async_server=True on scons. > > * STCP changed from using list of RequestStates in seqno order to > map indexed by seqno. This allows responses to return > out-of-order, which is possible if a server implements a method > asynchronously. This patch has been pushed to xorp.ct with a bit of whitespace cleanup. I dislike the typedefs and #ifdef'd return values on principle, but I couldn't think up something better, so it goes in as is. If you ever find a way to get rid of some of the preprocessor code and typedefs, that would be welcome. Perhaps by making all calls async at the lower levels, but in the middle layers, always block until you get the result for sync calls? Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From 43026437 at qq.com Wed Mar 23 06:19:23 2011 From: 43026437 at qq.com (=?gbk?B?y67Jz7fJ?=) Date: Wed, 23 Mar 2011 21:19:23 +0800 Subject: [Xorp-hackers] I had try xorp-1.8.3, it is work well on freebsd 7.3, config vlan well. Message-ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20110323/b744c010/attachment.html From greearb at candelatech.com Wed Mar 23 10:22:52 2011 From: greearb at candelatech.com (Ben Greear) Date: Wed, 23 Mar 2011 10:22:52 -0700 Subject: [Xorp-hackers] Debugging XORP with valgrind. Message-ID: <4D8A2C6C.3080104@candelatech.com> For anyone developing on the latest XORP, you may be interested in testing your changes under valgrind. This often finds all sorts of interesting memory usage errors and such. I put up a brief page describing how to do this here: http://xorp.run.montefiore.ulg.ac.be/debug_xorp After a graceful exit of XORP, you will see log files in the current directory. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From ss at comp.lancs.ac.uk Fri Mar 25 05:29:04 2011 From: ss at comp.lancs.ac.uk (Steven Simpson) Date: Fri, 25 Mar 2011 12:29:04 +0000 Subject: [Xorp-hackers] Remote finder: XRLs, or local ports? In-Reply-To: <4D64F4CC.6070504@comp.lancs.ac.uk> References: <4D628D33.6070600@comp.lancs.ac.uk> <4D64F4CC.6070504@comp.lancs.ac.uk> Message-ID: <4D8C8A90.3070803@comp.lancs.ac.uk> On 23/02/11 11:51, Steven Simpson wrote: > All our node needs to do now is iterate over the protected _listeners > member inherited from XrlRouter, and get out the results of protocol() > (e.g. "stcp") and address() (e.g. "127.0.0.1:1234"). These are sent to > the resolver (e.g. as "stcp://127.0.0.1:1234"), which will discard items > it can't use ("unix:...."), and translate 127.0.0.1 to the remote > address of the calling connection. It turns out that XrlStdRouter can't handle "stcp://" addresses. It seems to forward them to the finder, which has no knowledge of them, of course. *Is there a direct way of invoking an "stcp://" address?* Here's one we're actually trying: stcp://192.168.1.75:41706/eua_tci/0.1/dispatch?tci_id:bool=true&euaxrl:txt=finder://eua_ping_mp/eua_ping_mp/0.1/ping?address:ipv4%3D148.88.1.1&cbxrl:txt=stcp://127.0.0.1:49098/eua_tci/0.1/dispatch_callback?id:u32%3D0&cbpfx:bool=true&errxrl:bool=true&errpfx:bool=true But we get: WARNING xorp_rtrmgr:9371 XrlFinderTarget obj/i686-pc-linux-gnu/xrl/targets/finder_base.cc:482 handle_finder_0_2_resolve_xrl ] Handling method for finder/0.2/resolve_xrl failed: XrlCmdError 102 Command failed Target "192.168.1.75:41706" does not exist or is not enabled. We're calling this from a target implementation class: class XrlEuaTciNode : public XrlStdRouter, DispatchCBs, public XrlEuaTciTargetBase, public ServiceBase ... That is, a method of this class calls: this->send(the_xrl_above, our_callback) ...so we're using the inherited XrlStdRouter, which is configured to talk to the local finder. Even the stcp:// XRL is submitted to the finder, giving the error. So, if it's possible, this doesn't seem to be the right way to call stcp directly. > This method will allow us to progress, but the remote finder:// option > might still be useful to us, btw, if there's an answer to that. This option doesn't seem to exist, but I had a look at "xorp/libxipc/call_xrl.cc". It creates an XrlStdRouter for a given finder address. If there's no direct way to call an stcp XRL, we will resort to using something like this instead. I think we will have to create a map, and cache existing XrlStdRouters, so their callbacks remain valid. Cheers, Steven -- From ss at comp.lancs.ac.uk Thu Mar 31 04:17:58 2011 From: ss at comp.lancs.ac.uk (Steven Simpson) Date: Thu, 31 Mar 2011 12:17:58 +0100 Subject: [Xorp-hackers] [PATCH] Supporting asynchronous method implementations In-Reply-To: <4D893549.1090907@candelatech.com> References: <4D500B54.6030707@comp.lancs.ac.uk> <1300366693-3015-1-git-send-email-ss@comp.lancs.ac.uk> <4D893549.1090907@candelatech.com> Message-ID: <4D9462E6.2020704@comp.lancs.ac.uk> On 22/03/11 23:48, Ben Greear wrote: > If you ever find a way to get rid of some of the preprocessor > code and typedefs, that would be welcome. Perhaps by making > all calls async at the lower levels, but in the middle layers, > always block until you get the result for sync calls? I had a go... A good dividing line seems to be between XrlDispatcher (lower level) and XrlCmdMap (middle level). So, XrlCmdMap retains its conditional declarations, but XrlDispatcher's interface is now unconditionally asynchronous. I think if I went further, and made XrlCmdMap unconditionally asynchronous, it would unconditionally spill into the tgt-gen-erated code, and bloat the binaries. Internally, XrlDispatcher calls XrlCmdMap, so it must still use conditionals from xrl_cmd_map.hh. I'm afraid I made the issue with FinderClient more complicated than necessary. FinderClient::dispatch_tunneled_xrl calls a dispatcher. It has now had three forms wrt my patches: 1. Originally, it called a synchronous dispatcher, but if it got as far as that, it ignored the out-args and return code from the dispatcher, and always returned OKAY. 2. My previous patch allowed it to call either sync or async dispatcher, with some ugly macros. In the async case, it used the return code from the dispatcher (passed through a private callback supplied to the dispatcher) as its own result, and had to report this in turn through a callback argument supplied by its own caller, so it had an async interface. 3. Now it only ever calls an async dispatcher, and unconditionally needs to supply it with a callback. Note that, when I wrote the first patch, I hadn't understood that the original version discarded all results from the dispatcher, and so I had made the conditional version unnecessarily complex in trying to preserve that information. In version 3, the callback doesn't actually do anything - all results are dropped as before - and that means dispatch_tunneled_xrl can return OKAY immediately after calling the dispatcher. It therefore doesn't require a callback from its own caller, so now it has its original (synchronous) interface. In turn, this means that the FinderClientXrlTarget, which calls dispatch_tunneled_xrl, is totally reverted to version 1, as it uses FinderClient's reverted synchronous signature. Blind alley - sorry about that. Stripped binary sizes: async version adds about 2MB, as before. [scons check] has the same results, for most lines containing "Test" (only diffs are timestamps, PIDs, etc). Patch soon... Cheers, Steven -- From ss at comp.lancs.ac.uk Thu Mar 31 04:43:03 2011 From: ss at comp.lancs.ac.uk (ss at comp.lancs.ac.uk) Date: Thu, 31 Mar 2011 12:43:03 +0100 Subject: [Xorp-hackers] [PATCH] Simplifying (a)synchronous conditional compilation: In-Reply-To: <4D9462E6.2020704@comp.lancs.ac.uk> References: <4D9462E6.2020704@comp.lancs.ac.uk> Message-ID: <1301571783-15504-1-git-send-email-ss@comp.lancs.ac.uk> From: Steven Simpson * XrlDispatcher is unconditionally asynchronous - all its conditional macros and typedefs are dropped. Where XrlRouter derives from it, it is also unconditionally asynchronous. * Many callback functions, that were conditionally added in order to interface with asynchronous dispatchers and command maps, are now compiled unconditionally. * FinderClient's dispatch_tunneled_xrl uses XrlDispatcher's asynchronous interface, but ignores the results as its synchronous version always did, so its own synchronous interface is now presented unconditionally, obviating the inelegant XRL_CMD_OPT_CALLBACK macro. * FinderClientXrlTarget is reverted to its fully synchronous form, as it can now use FinderClient's unconditionally synchronous interface. * Synchronous code in FinderMessengerBase::dispatch_xrl uses (now unconditionally compiled) callback required for asynchronous version. * Re-organized conditional command-map typedefs to make callback type unconditional. Signed-off-by: Steven Simpson --- xorp/libxipc/finder_client.cc | 29 +++++----------------- xorp/libxipc/finder_client.hh | 13 +++------- xorp/libxipc/finder_client_xrl_target.cc | 30 ------------------------ xorp/libxipc/finder_client_xrl_target.hh | 11 --------- xorp/libxipc/finder_messenger.cc | 10 +------ xorp/libxipc/finder_messenger.hh | 2 - xorp/libxipc/xrl_cmd_map.hh | 11 +------- xorp/libxipc/xrl_dispatcher.cc | 29 +++++++++++++---------- xorp/libxipc/xrl_dispatcher.hh | 37 ++++------------------------- xorp/libxipc/xrl_pf_stcp.cc | 28 ++++++++-------------- xorp/libxipc/xrl_router.cc | 10 ++++---- xorp/libxipc/xrl_router.hh | 6 ++-- 12 files changed, 54 insertions(+), 162 deletions(-) diff --git a/xorp/libxipc/finder_client.cc b/xorp/libxipc/finder_client.cc index 4c3b122..2cc8822 100644 --- a/xorp/libxipc/finder_client.cc +++ b/xorp/libxipc/finder_client.cc @@ -961,20 +961,16 @@ FinderClient::uncache_xrls_from_target(const string& target) XORP_UINT_CAST(n), target.c_str()); } -#ifdef XORP_ENABLE_ASYNC_SERVER void -FinderClient::dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs *a, - XrlRespCallback cb) const +FinderClient::dispatch_tunneled_xrl_cb(const XrlError &e, + const XrlArgs *a) const { UNUSED(e); UNUSED(a); - cb->dispatch(XrlCmdError::OKAY(), NULL); } -#endif -XrlCmdRT -FinderClient::dispatch_tunneled_xrl(const string& xrl_str - XRL_CMD_OPT_CALLBACK(cb)) +XrlCmdError +FinderClient::dispatch_tunneled_xrl(const string& xrl_str) { finder_trace_init("dispatch_tunneled_xrl(\"%s\")", xrl_str.c_str()); Xrl xrl; @@ -983,29 +979,18 @@ FinderClient::dispatch_tunneled_xrl(const string& xrl_str InstanceList::iterator i = find_instance(xrl.target()); if (i == _ids.end()) { finder_trace_result("target not found"); - XRL_CMD_RETURN_ERROR - (cb, XrlCmdError::COMMAND_FAILED("target not found")); + return XrlCmdError::COMMAND_FAILED("target not found"); } -#ifdef XORP_ENABLE_ASYNC_SERVER XrlDispatcherCallback ret_vals = - callback(this, &FinderClient::dispatch_tunneled_xrl_cb, cb); -#else - XrlArgs ret_vals; -#endif + callback(this, &FinderClient::dispatch_tunneled_xrl_cb); i->dispatcher()->dispatch_xrl(xrl.command(), xrl.args(), ret_vals); finder_trace_result("success"); - -#ifdef XORP_ENABLE_ASYNC_SERVER - return; -#else return XrlCmdError::OKAY(); -#endif } catch (InvalidString&) { - XRL_CMD_RETURN_ERROR - (cb, XrlCmdError::COMMAND_FAILED("Bad Xrl string")); + return XrlCmdError::COMMAND_FAILED("Bad Xrl string"); } } diff --git a/xorp/libxipc/finder_client.hh b/xorp/libxipc/finder_client.hh index 21f3ed5..ce97f9c 100644 --- a/xorp/libxipc/finder_client.hh +++ b/xorp/libxipc/finder_client.hh @@ -32,7 +32,6 @@ #include "finder_messenger.hh" #include "xrl_pf.hh" -#include "xrl_cmd_map.hh" class FinderClientOp; class FinderClientObserver; @@ -77,8 +76,7 @@ public: virtual ~FinderClientXrlCommandInterface() {} virtual void uncache_xrl(const string& xrl) = 0; virtual void uncache_xrls_from_target(const string& target) = 0; - virtual XrlCmdRT dispatch_tunneled_xrl(const string& xrl - XRL_CMD_OPT_CALLBACK(cb)) = 0; + virtual XrlCmdError dispatch_tunneled_xrl(const string& xrl) = 0; }; /** @@ -314,14 +312,11 @@ protected: // FinderClientXrlCommandInterface void uncache_xrl(const string& xrl); void uncache_xrls_from_target(const string& target); - XrlCmdRT dispatch_tunneled_xrl(const string& xrl - XRL_CMD_OPT_CALLBACK(cb)); -#ifdef XORP_ENABLE_ASYNC_SERVER + XrlCmdError dispatch_tunneled_xrl(const string& xrl); + private: void - dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs *a, - XrlRespCallback cb) const; -#endif + dispatch_tunneled_xrl_cb(const XrlError &e, const XrlArgs *a) const; protected: void crank(); diff --git a/xorp/libxipc/finder_client_xrl_target.cc b/xorp/libxipc/finder_client_xrl_target.cc index 66a39fd..0181260 100644 --- a/xorp/libxipc/finder_client_xrl_target.cc +++ b/xorp/libxipc/finder_client_xrl_target.cc @@ -85,29 +85,6 @@ FinderClientXrlTarget::finder_client_0_2_remove_xrls_for_target_from_cache( return XrlCmdError::OKAY(); } -#ifdef XORP_ENABLE_ASYNC_SERVER -void -FinderClientXrlTarget::async_finder_client_0_2_dispatch_tunneled_xrl( - const string& xrl, - FinderClient02DispatchTunneledXrlCB cb) -{ - _client->dispatch_tunneled_xrl(xrl, - callback(this, - &FinderClientXrlTarget::dispatch_tunneled_xrl_cb, - cb)); -} - -void -FinderClientXrlTarget::dispatch_tunneled_xrl_cb( - const XrlCmdError &e, - const XrlArgs *out, - FinderClient02DispatchTunneledXrlCB cb) const -{ - UNUSED(out); - cb->dispatch(XrlCmdError::OKAY(), e.error_code(), e.note()); -} -#endif - XrlCmdError FinderClientXrlTarget::finder_client_0_2_dispatch_tunneled_xrl( const string& xrl, @@ -115,15 +92,8 @@ FinderClientXrlTarget::finder_client_0_2_dispatch_tunneled_xrl( string& xrl_errtxt ) { -#ifdef XORP_ENABLE_ASYNC_SERVER - UNUSED(xrl); - UNUSED(xrl_errno); - UNUSED(xrl_errtxt); - return XrlCmdError::COMMAND_FAILED("Unreachable"); -#else XrlCmdError e = _client->dispatch_tunneled_xrl(xrl); xrl_errno = e.error_code(); xrl_errtxt = e.note(); return XrlCmdError::OKAY(); -#endif } diff --git a/xorp/libxipc/finder_client_xrl_target.hh b/xorp/libxipc/finder_client_xrl_target.hh index 79fa55c..23eb309 100644 --- a/xorp/libxipc/finder_client_xrl_target.hh +++ b/xorp/libxipc/finder_client_xrl_target.hh @@ -46,23 +46,12 @@ public: XrlCmdError finder_client_0_2_remove_xrls_for_target_from_cache( const string& target); -#ifdef XORP_ENABLE_ASYNC_SERVER - void async_finder_client_0_2_dispatch_tunneled_xrl(const string& xrl, - FinderClient02DispatchTunneledXrlCB); -#endif XrlCmdError finder_client_0_2_dispatch_tunneled_xrl(const string& xrl, uint32_t& xrl_errno, string& xrl_errtxt); protected: FinderClientXrlCommandInterface* _client; - -#ifdef XORP_ENABLE_ASYNC_SERVER -private: - void dispatch_tunneled_xrl_cb(const XrlCmdError &e, - const XrlArgs *out, - FinderClient02DispatchTunneledXrlCB cb) const; -#endif }; #endif // __LIBXIPC_FINDER_CLIENT_XRL_TARGET_HH__ diff --git a/xorp/libxipc/finder_messenger.cc b/xorp/libxipc/finder_messenger.cc index a6aef38..5ee4353 100644 --- a/xorp/libxipc/finder_messenger.cc +++ b/xorp/libxipc/finder_messenger.cc @@ -102,12 +102,8 @@ FinderMessengerBase::dispatch_xrl(uint32_t seqno, const Xrl& xrl) callback(this, &FinderMessengerBase::dispatch_xrl_cb, seqno)); #else XrlArgs reply_args; - XrlError e = ce->dispatch(xrl.args(), &reply_args); - if (XrlCmdError::OKAY() == e) { - reply(seqno, e, &reply_args); - } else { - reply(seqno, e, 0); - } + XrlCmdError e = ce->dispatch(xrl.args(), &reply_args); + dispatch_xrl_cb(e, &reply_args, seqno); #endif // Announce we've dispatched xrl @@ -115,7 +111,6 @@ FinderMessengerBase::dispatch_xrl(uint32_t seqno, const Xrl& xrl) manager()->messenger_inactive_event(this); } -#ifdef XORP_ENABLE_ASYNC_SERVER void FinderMessengerBase::dispatch_xrl_cb(const XrlCmdError &e, const XrlArgs *reply_args, @@ -123,7 +118,6 @@ FinderMessengerBase::dispatch_xrl_cb(const XrlCmdError &e, { reply(seqno, e, XrlCmdError::OKAY() == e ? reply_args : NULL); } -#endif void FinderMessengerBase::unhook_manager() diff --git a/xorp/libxipc/finder_messenger.hh b/xorp/libxipc/finder_messenger.hh index 7201cc9..88942a7 100644 --- a/xorp/libxipc/finder_messenger.hh +++ b/xorp/libxipc/finder_messenger.hh @@ -123,12 +123,10 @@ protected: void response_timeout(uint32_t seqno); private: -#ifdef XORP_ENABLE_ASYNC_SERVER void dispatch_xrl_cb(const XrlCmdError &e, const XrlArgs *reply_args, uint32_t seqno); -#endif class ResponseState { public: diff --git a/xorp/libxipc/xrl_cmd_map.hh b/xorp/libxipc/xrl_cmd_map.hh index 0e91ccc..33b8d7d 100644 --- a/xorp/libxipc/xrl_cmd_map.hh +++ b/xorp/libxipc/xrl_cmd_map.hh @@ -47,11 +47,6 @@ XrlRespCallback; typedef XrlRespCallback XrlCmdOT; -#define XRL_CMD_OPT_CALLBACK(V) , const XrlRespCallback& V - -typedef -XorpCallback2::RefPtr XrlRecvCallback; - #else typedef const XrlCmdError XrlCmdRT; @@ -63,12 +58,10 @@ typedef const XrlCmdError XrlCmdRT; typedef XrlArgs* XrlCmdOT; -#define XRL_CMD_OPT_CALLBACK(V) +#endif typedef -XorpCallback2::RefPtr XrlRecvCallback; - -#endif +XorpCallback2::RefPtr XrlRecvCallback; class XrlCmdEntry { public: diff --git a/xorp/libxipc/xrl_dispatcher.cc b/xorp/libxipc/xrl_dispatcher.cc index 173b579..c9a556e 100644 --- a/xorp/libxipc/xrl_dispatcher.cc +++ b/xorp/libxipc/xrl_dispatcher.cc @@ -51,25 +51,27 @@ do { \ // ---------------------------------------------------------------------------- // XrlDispatcher methods -XrlDispatcherRT +void XrlDispatcher::dispatch_xrl(const string& method_name, const XrlArgs& inputs, - XrlDispatcherOT outputs) const + XrlDispatcherCallback outputs) const { const XrlCmdEntry* c = get_handler(method_name.c_str()); if (c == 0) { trace_xrl_dispatch("dispatch_xrl (invalid) ", method_name); debug_msg("No handler for %s\n", method_name.c_str()); - XRL_DISPATCHER_RETURN_ERROR(outputs, XrlError::NO_SUCH_METHOD()); + return outputs->dispatch(XrlError::NO_SUCH_METHOD(), NULL); } trace_xrl_dispatch("dispatch_xrl (valid) ", method_name); #ifdef XORP_ENABLE_ASYNC_SERVER - XrlCmdOT resp = callback(this, &XrlDispatcher::dispatch_cb, outputs); + XrlRespCallback resp = callback(this, &XrlDispatcher::dispatch_cb, outputs); + return c->dispatch(inputs, resp); #else - XrlCmdOT resp = &outputs; + XrlArgs resp; + XrlCmdError e = c->dispatch(inputs, &resp); + outputs->dispatch(e, &resp); #endif - return c->dispatch(inputs, resp); } XrlDispatcher::XI* @@ -82,18 +84,20 @@ XrlDispatcher::lookup_xrl(const string& name) const return new XI(c); } -XrlDispatcherRT -XrlDispatcher::dispatch_xrl_fast(const XI& xi, XrlDispatcherOT outputs) const +void +XrlDispatcher::dispatch_xrl_fast(const XI& xi, + XrlDispatcherCallback outputs) const { #ifdef XORP_ENABLE_ASYNC_SERVER - XrlCmdOT resp = callback(this, &XrlDispatcher::dispatch_cb, outputs); + XrlRespCallback resp = callback(this, &XrlDispatcher::dispatch_cb, outputs); + return xi._cmd->dispatch(xi._xrl.args(), resp); #else - XrlCmdOT resp = &outputs; + XrlArgs resp; + XrlCmdError e = xi._cmd->dispatch(xi._xrl.args(), &resp); + return outputs->dispatch(e, &resp); #endif - return xi._cmd->dispatch(xi._xrl.args(), resp); } -#ifdef XORP_ENABLE_ASYNC_SERVER void XrlDispatcher::dispatch_cb(const XrlCmdError &err, const XrlArgs *outputs, @@ -101,4 +105,3 @@ XrlDispatcher::dispatch_cb(const XrlCmdError &err, { resp->dispatch(err, outputs); } -#endif diff --git a/xorp/libxipc/xrl_dispatcher.hh b/xorp/libxipc/xrl_dispatcher.hh index 0cf4b41..9d7a8a5 100644 --- a/xorp/libxipc/xrl_dispatcher.hh +++ b/xorp/libxipc/xrl_dispatcher.hh @@ -25,35 +25,10 @@ #include "xrl_cmd_map.hh" -#ifdef XORP_ENABLE_ASYNC_SERVER - -#define XRL_DISPATCHER_RETURN_ERROR(OUT, ERR) \ - do { \ - (OUT)->dispatch((ERR), NULL); \ - return; \ - } while (0) - -typedef void XrlDispatcherRT; - typedef XorpCallback2::RefPtr XrlDispatcherCallback; -typedef XrlDispatcherCallback XrlDispatcherOT; - -#else - -#define XRL_DISPATCHER_RETURN_ERROR(OUT, ERR) \ - do { \ - return (ERR); \ - } while (0) - - -typedef XrlError XrlDispatcherRT; -typedef XrlArgs& XrlDispatcherOT; - -#endif - class XrlDispatcher : public XrlCmdMap { public: struct XI { @@ -70,17 +45,15 @@ public: virtual ~XrlDispatcher() {} virtual XI* lookup_xrl(const string& name) const; - virtual XrlDispatcherRT dispatch_xrl(const string& method_name, - const XrlArgs& in, - XrlDispatcherOT out) const; - XrlDispatcherRT dispatch_xrl_fast(const XI& xi, - XrlDispatcherOT out) const; + virtual void dispatch_xrl(const string& method_name, + const XrlArgs& in, + XrlDispatcherCallback out) const; + void dispatch_xrl_fast(const XI& xi, + XrlDispatcherCallback out) const; -#ifdef XORP_ENABLE_ASYNC_SERVER private: void dispatch_cb(const XrlCmdError &, const XrlArgs *, XrlDispatcherCallback resp) const; -#endif }; #endif // __LIBXIPC_XRL_DISPATCHER_HH__ diff --git a/xorp/libxipc/xrl_pf_stcp.cc b/xorp/libxipc/xrl_pf_stcp.cc index 3ab358c..4e4e1ba 100644 --- a/xorp/libxipc/xrl_pf_stcp.cc +++ b/xorp/libxipc/xrl_pf_stcp.cc @@ -156,9 +156,9 @@ public: string toString() const; private: - XrlDispatcherRT do_dispatch(const uint8_t* packed_xrl, - size_t packed_xrl_bytes, - XrlDispatcherOT response); + void do_dispatch(const uint8_t* packed_xrl, + size_t packed_xrl_bytes, + XrlDispatcherCallback response); XrlPFSTCPListener& _parent; XorpFd _sock; @@ -257,10 +257,10 @@ STCPRequestHandler::read_event(BufferedAsyncReader* /* source */, _reader.set_trigger_bytes(STCPPacketHeader::header_size()); } -XrlDispatcherRT +void STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, size_t packed_xrl_bytes, - XrlDispatcherOT response) + XrlDispatcherCallback response) { static XrlError e(XrlError::INTERNAL_ERROR().error_code(), "corrupt xrl"); @@ -270,18 +270,18 @@ STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, string command; size_t cmdsz = Xrl::unpack_command(command, packed_xrl, packed_xrl_bytes); if (!cmdsz) - XRL_DISPATCHER_RETURN_ERROR(response, e); + return response->dispatch(e, NULL); XrlDispatcher::XI* xi = d->lookup_xrl(command); if (!xi) - XRL_DISPATCHER_RETURN_ERROR(response, e); + return response->dispatch(e, NULL); Xrl& xrl = xi->_xrl; try { if (xi->_new) { if (xrl.unpack(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) - XRL_DISPATCHER_RETURN_ERROR(response, e); + return response->dispatch(e, NULL); xi->_new = false; } else { @@ -289,10 +289,10 @@ STCPRequestHandler::do_dispatch(const uint8_t* packed_xrl, packed_xrl_bytes -= cmdsz; if (xrl.fill(packed_xrl, packed_xrl_bytes) != packed_xrl_bytes) - XRL_DISPATCHER_RETURN_ERROR(response, e); + return response->dispatch(e, NULL); } } catch (...) { - XRL_DISPATCHER_RETURN_ERROR(response, e); + return response->dispatch(e, NULL); } return d->dispatch_xrl_fast(*xi, response); @@ -304,17 +304,9 @@ STCPRequestHandler::dispatch_request(uint32_t seqno, const uint8_t* packed_xrl, size_t packed_xrl_bytes) { -#ifdef XORP_ENABLE_ASYNC_SERVER do_dispatch(packed_xrl, packed_xrl_bytes, callback(this, &STCPRequestHandler::transmit_response, seqno, batch)); -#else - XrlArgs response; - XrlError e; - - e = do_dispatch(packed_xrl, packed_xrl_bytes, response); - transmit_response(e, &response, seqno, batch); -#endif } diff --git a/xorp/libxipc/xrl_router.cc b/xorp/libxipc/xrl_router.cc index b0edc18..ed66b66 100644 --- a/xorp/libxipc/xrl_router.cc +++ b/xorp/libxipc/xrl_router.cc @@ -650,10 +650,10 @@ XrlRouter::send(const Xrl& xrl, const XrlCallback& user_cb) return true; } -XrlDispatcherRT -XrlRouter::dispatch_xrl(const string& method_name, - const XrlArgs& inputs, - XrlDispatcherOT outputs) const +void +XrlRouter::dispatch_xrl(const string& method_name, + const XrlArgs& inputs, + XrlDispatcherCallback outputs) const { string resolved_method; if (_fc->query_self(method_name, resolved_method) == true) { @@ -661,7 +661,7 @@ XrlRouter::dispatch_xrl(const string& method_name, XrlDispatcher::dispatch_xrl(resolved_method, inputs, outputs); } debug_msg("Could not find mapping for %s\n", method_name.c_str()); - XRL_DISPATCHER_RETURN_ERROR(outputs, XrlError::NO_SUCH_METHOD()); + return outputs->dispatch(XrlError::NO_SUCH_METHOD(), NULL); } XrlDispatcher::XI* diff --git a/xorp/libxipc/xrl_router.hh b/xorp/libxipc/xrl_router.hh index 8477667..5de0194 100644 --- a/xorp/libxipc/xrl_router.hh +++ b/xorp/libxipc/xrl_router.hh @@ -176,9 +176,9 @@ protected: */ virtual void finder_ready_event(const string& tgt_name); - XrlDispatcherRT dispatch_xrl(const string& method_name, - const XrlArgs& inputs, - XrlDispatcherOT outputs) const; + void dispatch_xrl(const string& method_name, + const XrlArgs& inputs, + XrlDispatcherCallback outputs) const; /** * Resolve callback (slow path). -- 1.7.0.4 From noreply at github.com Thu Mar 31 14:35:57 2011 From: noreply at github.com (noreply at github.com) Date: Thu, 31 Mar 2011 14:35:57 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 350e78: Simplifying (a)synchronous conditional compilation... Message-ID: <20110331213557.9E5A2423DF@smtp1.rs.github.com> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 350e78bdb86f58f0bc46cc4f0548c0ec598b732c https://github.com/greearb/xorp.ct/commit/350e78bdb86f58f0bc46cc4f0548c0ec598b732c Author: Steven Simpson Date: 2011-03-31 (Thu, 31 Mar 2011) Changed paths: M xorp/libxipc/finder_client.cc M xorp/libxipc/finder_client.hh M xorp/libxipc/finder_client_xrl_target.cc M xorp/libxipc/finder_client_xrl_target.hh M xorp/libxipc/finder_messenger.cc M xorp/libxipc/finder_messenger.hh M xorp/libxipc/xrl_cmd_map.hh M xorp/libxipc/xrl_dispatcher.cc M xorp/libxipc/xrl_dispatcher.hh M xorp/libxipc/xrl_pf_stcp.cc M xorp/libxipc/xrl_router.cc M xorp/libxipc/xrl_router.hh Log Message: ----------- Simplifying (a)synchronous conditional compilation: * XrlDispatcher is unconditionally asynchronous - all its conditional macros and typedefs are dropped. Where XrlRouter derives from it, it is also unconditionally asynchronous. * Many callback functions, that were conditionally added in order to interface with asynchronous dispatchers and command maps, are now compiled unconditionally. * FinderClient's dispatch_tunneled_xrl uses XrlDispatcher's asynchronous interface, but ignores the results as its synchronous version always did, so its own synchronous interface is now presented unconditionally, obviating the inelegant XRL_CMD_OPT_CALLBACK macro. * FinderClientXrlTarget is reverted to its fully synchronous form, as it can now use FinderClient's unconditionally synchronous interface. * Synchronous code in FinderMessengerBase::dispatch_xrl uses (now unconditionally compiled) callback required for asynchronous version. * Re-organized conditional command-map typedefs to make callback type unconditional. Signed-off-by: Steven Simpson