packet max size

This is a discussion on packet max size within the Networking/Device Communication forums, part of the General Programming Boards category; 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 ...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    192

    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

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,246
    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.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    192
    So does C in linux not provide a way to create jumbo size frames

  4. #4
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,246
    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.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

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

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