Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Ethereal: dev

Length/Type field in MAC frames

 

 

Ethereal dev RSS feed   Index | Next | Previous | View Threaded


edu.kungfu at gmail

Jul 30, 2006, 2:49 AM

Post #1 of 2 (1360 views)
Permalink
Length/Type field in MAC frames

Hi i have a problem with MAC frames.
Suppose you have to build a MAC frame which has to transmit a bunch of data
with a length value less than 46 octets.
The MAC layer has to put a pad in order the frame can reach the minimum
length value of 46.
But in that case...¿Which value will you put in the length / type field of
the frame (suppose that the meaning of the field is the length one)??: 46 or
the real value of the data?

Many thanks


guy at alum

Jul 30, 2006, 12:18 PM

Post #2 of 2 (1249 views)
Permalink
Re: Length/Type field in MAC frames [In reply to]

-------------------
The Ethereal project is being continued at a new site. Please go to
http://www.wireshark.org and subscribe to wireshark-dev [at] wireshark
Don't forget to unsubscribe from this list at
http://www.ethereal.com/mailman/listinfo/ethereal-dev
-------------------

Eduardo Escudero Sánchez wrote:
> Hi i have a problem with MAC frames.
> Suppose you have to build a MAC frame which has to transmit a bunch of
> data with a length value less than 46 octets.
> The MAC layer has to put a pad in order the frame can reach the minimum
> length value of 46.

Presumably you mean "in order that the frame can reach the minimum
length of 64 octets"; 46 octets is the minimum amount of payload
(including any 802.2 header) in a 64-octet frame, after you subtract out
the 14-octet MAC-layer header and 4-octet CRC.

> But in that case...¿Which value will you put in the length / type field
> of the frame (suppose that the meaning of the field is the length
> one)??: 46 or the real value of the data?

The real value of the data. The purpose of the length field in the
header is to let the service running atop the MAC service be provided
the real amount of data, with the padding removed.

Furthermore, I would not even add the padding myself, if I'm handing it
to libpcap/WinPcap to be transmitted. The adapter driver, or common
802.3 code used by the adapter driver, should handle that. I would, for
example, call pcap_sendpacket() or pcap_inject() with a size value that
includes the padding; the adapter driver might, for better or worse,
"fix" the outgoing MAC header to use the size value as the length field.
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev [at] ethereal
http://www.ethereal.com/mailman/listinfo/ethereal-dev

Ethereal dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.