Update to GeoNet with current standards (Version 1)#1392
Open
danieluliedguevara wants to merge 1 commit intothe-tcpdump-group:masterfrom
Open
Update to GeoNet with current standards (Version 1)#1392danieluliedguevara wants to merge 1 commit intothe-tcpdump-group:masterfrom
danieluliedguevara wants to merge 1 commit intothe-tcpdump-group:masterfrom
Conversation
This PR updates ETSI GeoNetworking protocol to version 1 (ETSI EN 302 636-4-1 V1.4.1 (2020-01)). The update includes dissectors for GeoNet Beacon messages and TopoScopeBcast-SH. Additionally, the Basic Transport Protocol (ETSI EN 302 636-5-1 V2.2.1 (2019-05)) has also been updated. It includes BTP-A and BTP-B in all its variants.
Author
|
@infrastation just a reminder of this PR! Thank you! |
| case HT_BEACON: | ||
| process_beacon_header_from_bytes(ndo, bp, length); | ||
| return; | ||
| break; |
| lon = GET_BE_S_4(*bp); | ||
| *bp += 4; | ||
| *length -= 4; | ||
| uint32_t value = GET_BE_U_4(*bp); |
Member
There was a problem hiding this comment.
I remember commenting on this before: would it be simpler to fetch one field at a time?
| } | ||
|
|
||
| /* Process Long Position Vector as per Section 9.5.2 of ETSI EN 302 636-4-1 V1.4.1 (2020-01)*/ | ||
| static void process_long_position_vector_from_bytes(netdissect_options *ndo, const u_char **bp, u_int *length) |
Member
There was a problem hiding this comment.
Here and elsewhere: the common convention is to return the processed/consumed number of bytes from a helper function, then the calling function can increment bp and decrement length once.
| (*bp)++; | ||
| (*length)--; | ||
| version = (value >> 4) & FOUR_BITS_MASK; | ||
| if (!is_value_in_list(version, implemented_gn_versions, IMPLEMENTED_GN_VERSIONS_NUM)) |
Member
There was a problem hiding this comment.
Please do not over-engineer this, an if would do the job just fine.
| const char *next_header_text = tok2str(common_header_next_header_values, "Unknown", *next_header); | ||
| const char *header_type_text = tok2str(header_type_tok, "Unknown", HT_HST(*header_type, *header_subtype)); | ||
| const char *flags_text = tok2str(flags_text_from_bytes, "Unknown", flags); | ||
| if (ndo->ndo_vflag == 1) |
Member
There was a problem hiding this comment.
This looks like a switch block.
infrastation
requested changes
Jan 30, 2026
Member
infrastation
left a comment
There was a problem hiding this comment.
Thank you for waiting. This requires a bit more work, as noted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates ETSI GeoNetworking protocol to version 1 (ETSI EN 302 636-4-1 V1.4.1 (2020-01)).
The update includes dissectors for GeoNet Beacon messages and TopoScopeBcast-SH. Additionally, the Basic Transport Protocol (ETSI EN 302 636-5-1 V2.2.1 (2019-05)) has also been updated. It includes BTP-A and BTP-B in all its variants.