From: Jon M. <jon...@er...> - 2004-05-19 15:48:21
|
Ok, If you get "Invalid argument" with size > 66000 and SOCK_STREAM that means there is a bug. For the other types it is the correct behaviour. If you look into the function "send_stream()" in socket.c you will see how a big message is fragmented into smaller chunks of 66000 bytes (which in their turn are fragmented into ethernet packets further down in the stack). If you follow the logics of send_stream() you may find out what is wrong. I am not at all surprised that this does not work right away. /jon Nick Yin wrote: > Hi, Jon and Mark > > In fact i have tested all kinds of socket type, including SOCK_STREAM, > SOCK_SEQPACKET, SOCK_RDM and SOCK_DGRAM, and two connection styles ( > connection-based, connectionless). The tests all failed. Whichever i > using sendto or send to send big message ( > 66000 bytes), they always > return -1 and the errno will be 22 ( that is, "Invalid argument"). > > And i also tested the big size message using TCP/IP protocol, it works > well. > > Would you like to give me some suggestion to fix this bug? > > Have a nice day! > > Best regards, > > Nick Yin > > (BTW: this is another account of mine :-) ) > >> From: Jon Maloy <jon...@er...> >> To: "Yin, Hu" <hu...@in...> >> CC: tipc <tip...@li...> >> Subject: Re: [Tipc-discussion] [BUG]send function cannot send >> messages whose size are more than 66000 bytes >> Date: Wed, 19 May 2004 09:55:21 -0400 >> >> Hi Hu, >> It does fragment/defragment messages, but only up to a limit, depending >> on the socket type you are using. If you use message oriented sockets, >> i.e., SOCK_SEQPACKET,SOCK_RDM or SOCK_DGRAM, it will >> only fragment up to MAX_MSG_SIZE, which is indeed 66000 bytes. >> >> If you use SOCK_STREAM, it will fragment up to a size of 100 Mbyte >> per sent "chunk". I must admit that I have still not tested this feature >> beyond 66k (this is on my TODO list), so you may quite well run into >> bugs here. Any feedback on this is welcome. >> >> Regards /Jon >> >> Yin, Hu wrote: >> >>> Hi Jon, >>> >>> I'm a intern of Intel China Software Lab. Now I'm doing TIPC's >>> validation job here. >>> >>> Today I meet a problem. When I write a little program to send/receive >>> different sizes message between two programs there will be error( >>> errno: >>> 22, "Invalid argument") when the size of message is more than 66000 >>> bytes. >>> >>> Doesn't TIPC fragment and defragment messages? >>> >>> Best regards, >>> >>> Nick Yin >>> >>> Intel China Software Lab >>> >>> The content of this email message solely contains my own personal >>> views, >>> and not those of my employer. >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: SourceForge.net Broadband >>> Sign-up now for SourceForge Broadband and get the fastest >>> 6.0/768 connection for only $19.95/mo for the first 3 months! >>> http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click >>> _______________________________________________ >>> TIPC-discussion mailing list >>> TIP...@li... >>> https://lists.sourceforge.net/lists/listinfo/tipc-discussion >>> >>> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: SourceForge.net Broadband >> Sign-up now for SourceForge Broadband and get the fastest >> 6.0/768 connection for only $19.95/mo for the first 3 months! >> http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click >> _______________________________________________ >> TIPC-discussion mailing list >> TIP...@li... >> https://lists.sourceforge.net/lists/listinfo/tipc-discussion > > > _________________________________________________________________ > The new MSN 8: advanced junk mail protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail |