I'm a little confused, as it appears you are using some version of the newer
code, but not the latest. And what OS are you using?
The latest version does set the ss_family, but still uses 0 in the call to
socket(), which has worked on the platforms I worked with in the past. A 0
in that parameter indicates that the network stack should select the
system's default for the given combination of the family and type
parameters.
More importantly, the latest version of the code does not use TCP by
default, rather it favors UDP for all point-to-point communication -- so
this function wouldn't even be called in the normal case.
If those were the only two changes to get things working, I'd suggest trying
each change individually to determine what actually fixed the problem.
--Nick
On 7/6/07, Romain FLACHAIRE <[EMAIL PROTECTED]> wrote:
Hello,
I use SLP to discover printers in a network. I want to use SLPD as a
Directory Agent in some PCs which will be print server...
In the slp.conf, I put "net.slp.isDA = true", but when I register a
service nearby slpd in an other PC,it launches a DA Discovery and receives
a DA Advert. After that, it does anything : NO REGISTRATION is
sent...........
After long researches and debugging, I found the solution :
in slpd_socket.c :
In the function SLPDSocketCreateConnected():
When we create the socket stream, with the function socket();
The last parameter was 0(protocol undefined).
I put IPPROTO_TCP instead of 0 because for the registration, a TCP
connection is made according to the RFC.
/* create the stream socket */
if (addr->ss_family == AF_INET)
sock->fd = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
else if (addr->ss_family == AF_INET6)
sock->fd = socket(AF_INET6,SOCK_STREAM,IPPROTO_TCP);
Moreover in the data sock, they also use 0(family undefined) for the
ss_family. I put AF_INET instead of.
sock->peeraddr.ss_family = AF_INET;
Since that, it works well.......
I think it's due ton the fact that before my change, the socket wasn't
initialized good !!!!
Is people use slpd as DA without these changes???
Otherwise, try to do this and tell me your answers...
Thanks
Romain
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openslp-users mailing list
Openslp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-users
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openslp-users mailing list
Openslp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-users