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

DID-SDID format subtly different than RFC 8331 #121

Open
garethsb opened this issue Aug 9, 2019 · 1 comment
Open

DID-SDID format subtly different than RFC 8331 #121

garethsb opened this issue Aug 9, 2019 · 1 comment

Comments

@garethsb
Copy link
Contributor

garethsb commented Aug 9, 2019

flow_sdianc_data.json has the regex pattern for both DID and SDID as ^0x[0-9a-fA-F]{2}$. There are no examples in the spec repo, but it is clear this requires exactly two hex digits but accepts upper- and lower-case.

On the other hand, the representation in SDP files is governed by RFC 8331 which uses the ABNF:

TwoHex = "0x" 1*2(HEXDIG)
DidSdid = "DID_SDID={" TwoHex "," TwoHex "}"

Where HEXDIG is defined in RFC 2234 by:

DIGIT          =  %x30-39
                       ; 0-9
HEXDIG         =  DIGIT / "A" / "B" / "C" / "D" / "E" / "F"

Therefore, though the examples given in RFC 8331 are like "DID_SDID={0x61,0x02};DID_SDID={0x41,0x05}" which suggests two hex digits is good form, the TwoHex production allows a single hex digit, but requires uppercase for A-F.


This makes the values "0x41", "0x0c" valid in IS-04 but "{0x41,0x0c}" not valid in SDP, while "{0x41,0xC}" is valid in SDP but "0x41", "0xC" is not valid in IS-04.

This is probably worth at least a little note somewhere.

@peterbrightwell
Copy link
Contributor

Something for a future INFO- implementation guide, assuming that has a section on SDP attributes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants