tcpdump mailing list archives

Re: DLT_ request


From: Scott Deandrea <sdeandrea () apple com>
Date: Thu, 05 Jan 2017 20:42:53 -0800

The frameNumber is a USB spec defined value that correlates with the start-of-frame packets frame number as defined in 
section 8.4.3 Start-of-Frame Packets.

The ioTimestamp is in the same Mach Absolute Time.

Yes, the way you have described the padding is correct.

—scott


On Jan 5, 2017, at 8:08 PM, Guy Harris <guy () alum mit edu> wrote:

On Dec 12, 2016, at 6:11 PM, Scott Deandrea <sdeandrea () apple com> wrote:

I decided to implement isochronous transfers today and changed the structure slightly:
struct
{
  // Control information
  uint32_t frameHeaderLength;  // 28

  // Frame information
  uint32_t frameLength;   // Amount of data sent/received this frame
  uint32_t frameStatus;    // IOReturn result of the I/O this frame 
  uint64_t frameNumber; // Frame number on which this was scheduled/executed by the controller

Is that a value specified by the USB standard or is it something specified by the Darwin USB stack?

  uint64_t ioTimestamp;  // Time in which the frame completed

"In which" sounds like a relative time; is it a relative time or an absolute time?

Therefore, the isochronous format for a request with type kAppleUSBHostPacketFilterRequestComplete is as follows:
Link Header
padding, if required to force 4-byte alignment

Presumably that padding will not be required with the current link header format, as that header's length is a 
multiple of 4 bytes.  (If a future version isn't a multiple of 4 bytes in length, it would be required.)

Isochronous Frame[0] Header (frameHeaderLength bytes in length)
Isochronous Frame[0] Data (frameLength bytes)
…
padding, if required to force 4-byte alignment
Isochronous Frame[linkHeader.ioFrameCount - 1] Header (aligned to 4 bytes, frameHeaderLength bytes in length)
Isochronous Frame[linkHeader.ioFrameCount - 1] Data (frameLength bytes)

The isochronous format for a request with type kAppleUSBHostPacketFilterRequestSubmit is similar (no data following 
the isochronous frame header):
Link Header
padding, if required to force 4-byte alignment
Isochronous Frame[0] Header (frameHeaderLength bytes in length)
…
padding, if required to force 4-byte alignment
Isochronous Frame[linkHeader.ioFrameCount - 1] Header (aligned to 4 bytes, frameHeaderLength bytes in length)

So no padding after the last frame, as it wouldn't be necessary (there's nothing to align on a 4-byte boundary).

_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Current thread: