From: Sridhar S. <sr...@us...> - 2004-09-30 21:51:27
|
SCTP kernel interfaces are designed to support socket API. I don't think there is a well defined interface that can be used to access SCTP services from another kernel module although the routines in net/sctp/socket.c should be a good starting point. Take a look at sctp_wait_for_connect(), sctp_wait_for_accept() and sctp_wait_for_packet() on how we handle non-blocking calls. sctp_cmd_new_state() should give you some ideas on how you can get notification on certain state changes. -Sridhar On Thu, 30 Sep 2004, Anatoly Khusid wrote: > Hello, > > I am writing a Kernel driver (LiS Streams based) which will sit on top of > SCTP. > I am trying to find a way to do non-blocking connect(), accept(), and > recvmsg(). > For recvmsg() I had some ideas to use sk->data_ready call back function, and > then do skb_dequeue() to get sk_buff (I would have to do few other things > done by sctp_recvmsg() ). I can't se sctp_recvmsg() as it is, I need to get > sk_buff pointer to avoid memcpy(). > > But what do I do for accept and connect? Is there a way to register a call > back to notify me whenever connect() or accept() is successful? > What about flow control, how can my kernel module determine if SCTP can't > keep up with me doing sctp_sendmsg() too fast? > > > > I have Solaris SCTP Kernel Interface, which answers my questions for > recvmsg, connect, and accept. Basically it will not block on anything, and > all of the asynchronous events are notified through call backs. > > Is there even a well defined SCTP Linux Kernel interface? Or you basically > have to hack into SCTP internals/private interface to get the things you > want? > > > I appreciate your help and comments. > > Anatoly > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Lksctp-developers mailing list > Lks...@li... > https://lists.sourceforge.net/lists/listinfo/lksctp-developers > |