site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com I am writing a kernel mode driver for a modem.I am using TCP implementation for the same. The API sock_receive() and sock_receivembuf() are both returning error no 22 i.e EINVAL (Invalid argument).Can anyone please tell me the reason for the same.. I am attaching the code below for reference.. o In the simplest case, you can just pass NULL to msg. o msg_iov is ignored. S+E -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... At 6:36 +0100 11/9/06, sanjay yaragatti wrote: [Please don't cross post to mailing lists. As I'm not a member of darwin-drivers, I have no idea whether you got an answer on that mailing list, so I could be wasting my time be writing the following. And I kinda hate the thought that I'm wasting my time )-: ] Did you read the header doc comments in <sys/kpi_socket.h>? There are certain key statements that you seem to be ignoring. For example: o On entry, *recvlen is "Maximum number of bytes to receive in the mbuf chain.", and you've set it to zero. Finally, my reading of your email indicates that you're receiving from a TCP socket. If so, you don't need to ask for the sender of the data (that is, fill out msg_name and msg_namelen); it's going to be the same as the person you connected to. This email sent to site_archiver@lists.apple.com