illidan <[email protected]> wrote: > Pavlin Radoslavov wrote: > > illidan <[email protected]> wrote: > > > > > >> Hello. > >> > >> I'm writing a routing protocol in Xorp, and I use socket4 library. > >> > >> I use tcp connection, so I used "send_tcp_open_bind_connect" function. > >> But I get a little problem with this function, It ask two local > >> arguments : IP and Port. > >> > >> But in my case, I don't use the local socket which is open with this > >> function ( I have already another connection running ). > >> And my routers in general have more than one interface, which means > >> more than one local IP. > >> > >> Would it be possible to create a TCP connection without create a > >> local socket like this? > >> > > > > Try setting the local_addr and local_port to zero. > > > > Regards, > > Pavlin > > > > > >> Thanks for your help. > >> > >> Best regards, > >> Michael > >> > >> _______________________________________________ > >> Xorp-hackers mailing list > >> [email protected] > >> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > >> > Hello, > Thanks for your answer. > I try this : > send_tcp_open_and_bind("fea",_rtr.instance_name(),NULL,NULL,cb) > > But I get this error : > InvalidString from line 77 of ipv4.cc -> Null value > terminate called after throwing an instance of 'InvalidString' > [ 2009/03/21 16:11:41 ERROR xorp_rtrmgr:14823 RTRMGR +1405 task.cc > execute_done ] 210 Transport failed
You should use IPv4::ZERO() and the number 0 for the local_addr and local_port respectively instead of NULL. Hope that helps, Pavlin > :( > Best regards, > Michael > > _______________________________________________ > Xorp-hackers mailing list > [email protected] > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers _______________________________________________ Xorp-hackers mailing list [email protected] http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
