[Xorp-hackers] Events and sockets in XORP

Victor Faion vfaion at gmail.com
Tue Feb 3 11:58:30 PST 2009


On Tue, Feb 3, 2009 at 19:23, Pavlin Radoslavov
<pavlin at icsi.berkeley.edu> wrote:
> Victor Faion <vfaion at gmail.com> wrote:
>
>> Hmm, when I changed the first parameter to be "fea" I get pretty much
>> the same error, even though xorp_fea seems to startup:
>>
>> [ 2009/02/03 18:29:02  INFO xorp_rtrmgr:8229 RTRMGR +249
>> master_conf_tree.cc execute ] Changed modules: bpsf, interfaces,
>> firewall, fea
>> [ 2009/02/03 18:29:02  INFO xorp_rtrmgr:8229 RTRMGR +101
>> module_manager.cc execute ] Executing module: bpsf (bpsf/xorp_bpsf)
>> [ 2009/02/03 18:29:02 INFO xorp_bpsf XrlBpsfTarget ] creating XrlBpsfNode
>> [ 2009/02/03 18:29:02 INFO xorp_bpsf XrlBpsfTarget ] Starting up XrlBpsfNode
>> [ 2009/02/03 18:29:02  WARNING xorp_rtrmgr:8229 XrlFinderTarget +407
>> ../xrl/targets/finder_base.cc handle_finder_0_2_resolve_xrl ] Handling
>> method for finder/0.2/resolve_xrl failed: XrlCmdError 102 Command
>> failed Target "fea" does not exist or is not enabled.
>> [ 2009/02/03 18:29:02  ERROR xorp_bpsf:8230 XrlBpsfTarget +277
>> xrl_bpsf_node.cc bind_cb ] Xrl Error: 201 Resolve failed
>> [ 2009/02/03 18:29:04  INFO xorp_rtrmgr:8229 RTRMGR +101
>> module_manager.cc execute ] Executing module: interfaces
>> (fea/xorp_fea)
>> [ 2009/02/03 18:29:05 INFO xorp_fea MFEA ] MFEA enabled
>> [ 2009/02/03 18:29:05 INFO xorp_fea MFEA ] CLI enabled
>> [ 2009/02/03 18:29:05 INFO xorp_fea MFEA ] CLI started
>> [ 2009/02/03 18:29:05 INFO xorp_fea MFEA ] MFEA enabled
>> [ 2009/02/03 18:29:05 INFO xorp_fea MFEA ] CLI enabled
>> [ 2009/02/03 18:29:05 INFO xorp_fea MFEA ] CLI started
>> [ 2009/02/03 18:29:06  INFO xorp_rtrmgr:8229 RTRMGR +101
>> module_manager.cc execute ] Executing module: firewall (fea/xorp_fea)
>> [ 2009/02/03 18:29:10  INFO xorp_rtrmgr:8229 RTRMGR +101
>> module_manager.cc execute ] Executing module: fea (fea/xorp_fea)
>> [ 2009/02/03 18:29:16  INFO xorp_rtrmgr:8229 RTRMGR +2233 task.cc
>> run_task ] No more tasks to run
>>
>> Not sure how to control the order of the process startups, seems the
>> fea is starting after my process.
>
> You must add the following line in your bpfs.tp template file:
>
>        %modinfo:       depends         fea;
>
> See some of the other protocol templates if in doubt about the
> details.
>
>> I changed bind_cb to call listen directly. Does it matter that I call
>> send_tcp_open_and_bind and send_tcp_listen on two different instances
>> of XrlSocket4V0p1Client? I tried to declare XrlSocket4V0p1Client in
>> the header and initialize it in the constructor but I got an error:
>> "XrlSocket4V0p1Client does not name a type"
>
> No, it shouldn't matter even if you use two different instances.
> For performance reasons though you might have a single instance in
> the corresponding class so you can avoid the create/destroy
> overhead.
> In the header file for your class you must include the corresponding
> xrl/interfaces/*.hh header file that declares class
> XrlSocket4V0p1Client.
>
>> Also, I was passing in the instance of the eventloop to the
>> constructor, but I guess I don't need to do this. Do I need to do
>> anything directly with it besides call its run function in my main
>> function?
>
> If you don't use the eventloop directly, then you don't need to pass
> it. If you pass it, make sure you pass it by reference, because the
> process cannot have more than one eventloop instances.
>
> Pavlin
>

Sorry, I forgot about the template file. My little experiment is
working, I should start making the protocol now. Many thanks once
again!

Victor



More information about the Xorp-hackers mailing list