[SAMBA4][PATCH] Add hooks to take over KDC socket routines
Stefan Metzmacher
metze at samba.org
Tue Sep 27 17:42:34 GMT 2005
On Tue, Sep 27, 2005 at 11:56:01PM +1000, Andrew Bartlett wrote:
> I've hacked the socket layer out of cldap.c to instead handle this very
> specific case of one udp packet and reply, but I hope that the socket
> infrastructure might improve before I need to seriously handle TCP.
> Because there is only every one packet, there is no send queue.
do you want sento() and recvfrom() on tcp sockets?
>
> This same plugin system might also be useful for a self-contained
> testing mode in Heimdal, in conjunction with libkdc. I would suggest
> using socket-wrapper instead however.
+ smb_krb5->fde = event_add_fd(ev, smb_krb5,
+ socket_get_fd(smb_krb5->sock), 0,
+ smb_krb5_socket_handler, smb_krb5);
+
+ event_add_timed(ev, smb_krb5,
+ timeval_current_ofs(context->kdc_timeout, 0),
+ smb_krb5_request_timeout, smb_krb5);
+
+ EVENT_FD_WRITEABLE(smb_krb5->fde);
+ EVENT_FD_READABLE(smb_krb5->fde);
why READABLE here?
the rest looks ok
metze
More information about the samba-technical
mailing list