Skip to content

test: routed 6-byte VMAC address round-trip (#27)#197

Merged
gralin merged 1 commit into
masterfrom
test-vmac-routed-address
Jul 3, 2026
Merged

test: routed 6-byte VMAC address round-trip (#27)#197
gralin merged 1 commit into
masterfrom
test-vmac-routed-address

Conversation

@gralin

@gralin gralin commented Jul 3, 2026

Copy link
Copy Markdown
Member

#27 asked whether 6-byte VMAC/SADR addresses (devices behind a router) are supported. They are in 4.0 — BacnetAddress has net + arbitrary-length adr + RoutedSource/RoutedDestination, and NPDU.Encode/Decode read/write the address for any MAC length.

Verified with a round-trip test: a routed destination address with 1-, 6- and 18-byte MACs, and a 6-byte VMAC source, all survive encode→decode intact (net + MAC bytes).

Closes #27.

BacnetAddress supports net + arbitrary-length adr + RoutedSource/RoutedDestination, and
NPDU.Encode/Decode handle any MAC length. Add a regression test round-tripping routed
addresses with 1-, 6- and 18-byte MACs through the NPDU, covering the 6-byte VMAC of
devices reached through a router.
@gralin gralin merged commit 2d7e577 into master Jul 3, 2026
4 checks passed
@gralin gralin deleted the test-vmac-routed-address branch July 3, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VMAC length 6 support

1 participant