Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-27-2005, 01:23 AM   #1
LQ Newbie
Registered: Dec 2005
Posts: 2

Rep: Reputation: 0
Invalid argument runtime error on sendmsg().

Hi everyone,

I am currently trying to run a client/server program using Fedora Core 2, kernel version 2.6.5. The program compiles without any warning and/or errors but during runtime, an "Invalid argument" error occurs during the call to sendmsg(int fd, const struct msghdr *msghdr, int flags).

I am quite sure that my arguments to sendmsg() are correct ... but why do I get the said error during runtime? Is this a bug? Do I need to update/configure my current kernel settings?

Im a newbie in both linux and networking. Please feel free to post questions/clarifications so I can provide more details regarding the said problem. Any assistance would be greatly appreciated . Thank you very much.

P.S. Merry Christmas and a Happy New Year to all.
Old 12-27-2005, 05:41 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Look at the "man 3p sendmsg" man-page:

EINVAL The sum of the iov_len values overflows an ssize_t.
Old 12-28-2005, 12:05 AM   #3
LQ Newbie
Registered: Dec 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Hi jschiwal,

Thanks for helping ... I was able to point out the source of the problem. Thanks a lot ^_^.

Old 08-30-2010, 10:44 AM   #4
LQ Newbie
Registered: Aug 2010
Posts: 5

Rep: Reputation: 0


I am a newbie into networking and unfortuntely I am facing a similar problem where, sendmsg() fails saying invalid argument. The iov_len and io_vec fields are memset to 0, so the problem of io_len values summation overflowing shouldn't occur. But still, am I missing any other setting over here? Any pointers would be helpful.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting a "KDSETKEYCODE: Invalid argument" error. sk545 Ubuntu 1 11-12-2005 06:42 AM
C(sockets): 'Invalid argument' error when using MSG_OOB elluva Programming 6 06-08-2005 10:16 AM
installation Error mounting sda1: Invalid Argument sadirmata Linux - Software 4 01-31-2002 11:37 AM
installation error: Error mounting sda1: Invalid Argument sadirmata Linux - Newbie 1 01-29-2002 03:28 AM
invalid numeric argument Copenhagen Cowboy Linux - General 4 03-29-2001 03:01 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration