Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional RF information options for EPBs #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryankurte
Copy link

@ryankurte ryankurte commented Jan 5, 2019

Following from #48, this PR is to add per-packet options for capture information to the EPB, alongside the per-interface options introduced in #51.

This PR is a work in progress and requires further discussion, opening now so there is a clear delineation between this and #51.

TODO:

  • What RF options do we want?
  • How do we want to represent them?
    • I am in favour of 32-bit IEEE-754 floats where sensible, rather than defining our own fixed-point approximations (and we have already accepted the inclusion of this for location information)

Options:

  • RSSI per antenna

The updated RFC can be viewed here

Please read the RFC or check out the diff for an up to date view of the changes

@jkcko
Copy link

jkcko commented Jan 18, 2019

Please include the following EPBs options for time-slotted radios.

Start of slot timestamp.
The start of slot timestamp for this packet. The start of slot preceeds the
start of frame timestamp in the EPB header. Format and resolution follows
that used for the EPB timestamp.

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      epb_startofslot_ts       |                8              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Start of slot timestamp (high)                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Start of slot timestamp (low)                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Timeslot size.
Duration of active timeslot from the start of slot timestamp.
Resolution is the same as timestamps.

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      epb_timeslot_size        |                4              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Timeslot size                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

End of Frame Timestamp.
The end of frame timestamp marks the completion of a received packet. Useful
for tracking packets that overrun a timeslot or where there are timing
constraints on the ACK sent in response to a data frame.

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      epb_endofframe_ts        |                8              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                  End of frame timestamp (high)                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                  End of frame timestamp (low)                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Absolute Slot number
The absolute slot number is a monotonically increasing number for each
timeslot. The ASN may be used in the nonce for packet decrytion.

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         epb_slot_number       |                8              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Slot number (high)                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Slot number (low)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

@jkcko
Copy link

jkcko commented Jan 18, 2019

I would also like to see standardized options for.
Channel center frequency and Bit-rate.

@ryankurte
Copy link
Author

Those seem like good options to me! Any thoughts @guyharris @packetfoo ? Otherwise I will add them when I can.

@guyharris
Copy link
Collaborator

Absolute Slot number
The absolute slot number is a monotonically increasing number for each
timeslot. The ASN may be used in the nonce for packet decrytion.

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         epb_slot_number       |                8              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Slot number (high)                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Slot number (low)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

I presume from the "monotonically increasing" and the 64-bit size that the slot number doesn't cycle around, i.e. it's not as if you have a fixed number of slots like the time slots in a TDM network.

@jkcko
Copy link

jkcko commented Jan 24, 2019

I presume from the "monotonically increasing" and the 64-bit size that the slot number doesn't cycle around, i.e. it's not as if you have a fixed number of slots like the time slots in a TDM network.

Right. This could be called "absolute slot number" instead so "slot number" in a "timeslot set" could be used for relative timeslots.

@packetfoo
Copy link
Contributor

I presume from the "monotonically increasing" and the 64-bit size that the slot number doesn't cycle around, i.e. it's not as if you have a fixed number of slots like the time slots in a TDM network.

Right. This could be called "absolute slot number" instead so "slot number" in a "timeslot set" could be used for relative timeslots.

Sounds good to me.

@jkcko
Copy link

jkcko commented Feb 12, 2019

It has become apparent that extrapolating the start of frame timestamp from the epb timestamp is not an accurate reference for computing relative times from the start of slot and end of frame timestamps. The timestamps for comparison should all reference the same monotonically increasing clock.
So it is worth also including a Start of Frame timestamp in the same format as the End of Frame timestamp.

@guyharris
Copy link
Collaborator

This should probably be converted to a change to the extended Markdown version of the spec at pcapng/draft-tuexen-opsawg-pcapng.md, as that's now the source for the spec. See cabo/kramdown-rfc2629 for the extensions.

@ryankurte
Copy link
Author

(sorry i should have tested that on one of my own repos)

@mcr
Copy link
Collaborator

mcr commented Jul 23, 2023

@ryankurte please rebase.

@mcr mcr added the pcapv3 aka pcapng label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pcapv3 aka pcapng
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants