C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 08-24-2009, 11:20 AM   #1
Registered User
 
Join Date: Aug 2009
Posts: 107
packet max size

I wanted to know since in
#include <linux/if_ether.h>

ETH_FRAME_LEN the max size is 1514 but I want to send something bigger in each packet probably 2114. Is there any way to do this I keep getting

sendto():: Message too long
kiros88 is offline   Reply With Quote
Old 08-24-2009, 11:21 AM   #2
Senior software engineer
 
brewbuck's Avatar
 
Join Date: Mar 2007
Location: Portland, OR
Posts: 5,381
Ethernet is physically incapable of that. You cannot have a frame of that size. The hardware can't do it.

Are you really using raw frames? Then you will be restricted by the limitations of the lower network layers. If, in the other hand, you are using UDP, then the IP stack should handle frame fragmentation for you -- each UDP "packet" will be transparently split into multiple frames and put back together on the other side, transparently.
__________________
"Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot
brewbuck is offline   Reply With Quote
Old 08-24-2009, 11:43 AM   #3
Registered User
 
Join Date: Aug 2009
Posts: 107
So does C in linux not provide a way to create jumbo size frames
kiros88 is offline   Reply With Quote
Old 08-24-2009, 11:49 AM   #4
Senior software engineer
 
brewbuck's Avatar
 
Join Date: Mar 2007
Location: Portland, OR
Posts: 5,381
Quote:
Originally Posted by kiros88 View Post
So does C in linux not provide a way to create jumbo size frames
If you have a Gigabit Ethernet card you can enable jumbo frames by setting the interface MTU to whatever you need (up to about 9000 bytes I believe).

But your application will be limited to gigabit Ethernet only. Fast Ethernet (100 megabit) does not support it period.
__________________
"Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot
brewbuck is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
udp max datagram size baccardi Windows Programming 3 03-19-2009 03:39 AM
Error with a vector Tropicalia C++ Programming 20 09-28-2006 07:45 PM
Passing a 2d array by Reference loko C Programming 8 07-23-2005 06:19 AM
char problem eXistenZ Windows Programming 36 02-21-2005 06:32 AM
Max size of an INT Thantos C Programming 5 08-11-2003 07:43 AM


All times are GMT -6. The time now is 01:31 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22