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