[nexus] add SRP-TC-1 for SRP registration and discovery (#12755)

This commit adds a new Nexus test case 1_3_SRP_TC_1 which verifies
SRP registration and discovery in a topology with a Border Router.

The test covers:
- SRP server registration in Thread Network Data.
- SRP service registration by a Thread End Device.
- Unicast DNS queries over the Thread interface.
- mDNS discovery over the Infrastructure interface.

Changes:
- Add tests/nexus/test_1_3_SRP_TC_1.cpp for test execution.
- Add tests/nexus/verify_1_3_SRP_TC_1.py for pcap verification.
- Update tests/nexus/CMakeLists.txt and run_nexus_tests.sh.
- Extend pktverify library (consts.py, layer_fields.py) to support
  DNS/mDNS and SRP-specific fields.
This commit is contained in:
Jonathan Hui
2026-03-25 16:14:23 -05:00
committed by GitHub
parent 9b00c024a8
commit 07cb0ebd5b
8 changed files with 867 additions and 3 deletions
@@ -351,6 +351,7 @@ WIRESHARK_OVERRIDE_PREFS = {
}
WIRESHARK_DECODE_AS_ENTRIES = {
'udp.port==53': 'dns',
'udp.port==61631': 'coap',
# SRP server ports for dissecting SRP requests and responses
'udp.port==53535': 'dns',
@@ -646,6 +646,9 @@ _LAYER_FIELDS = {
'thread_nwd.tlv.stable': _list(_auto),
'thread_nwd.tlv.service.t': _auto,
'thread_nwd.tlv.service.s_id': _auto,
'thread_nwd.tlv.service.s_enterprise_number': _list(_auto),
'thread_nwd.tlv.service.srp_dataset_identifier': _list(_hex),
'thread_nwd.tlv.service.s_data_bin': _list(_bytes),
'thread_nwd.tlv.service.s_data_len': _auto,
'thread_nwd.tlv.service.s_data.seqno': _auto,
'thread_nwd.tlv.service.s_data.rrdelay': _auto,
@@ -677,22 +680,32 @@ _LAYER_FIELDS = {
'thread_diagnostic.tlv.general': _list(_str),
# DNS
'dns.resp.ttl': _auto,
'dns.flags.opcode': _auto,
'dns.flags.rcode': _auto,
'dns.flags.response': _auto,
'dns.count.answers': _auto,
'dns.qry.name': _list(_str),
'dns.qry.type': _list(_auto),
'dns.resp.ttl': _auto,
'dns.resp.name': _list(_str),
'dns.resp.type': _list(_auto),
'dns.aaaa': _list(_ipv6_addr),
'dns.txt': _list(_bytes),
'dns.srv.port': _list(_auto),
'dns.srv.target': _list(_str),
'dns.ptr.domain_name': _list(_str),
# MDNS
'mdns.resp.ttl': _auto,
'mdns.flags.opcode': _auto,
'mdns.flags.rcode': _auto,
'mdns.flags.response': _auto,
'mdns.count.answers': _auto,
'mdns.qry.name': _list(_str),
'mdns.qry.type': _list(_auto),
'mdns.resp.ttl': _auto,
'mdns.resp.name': _list(_str),
'mdns.resp.type': _list(_auto),
'mdns.aaaa': _list(_ipv6_addr),
'mdns.txt': _list(_bytes),
'mdns.srv.port': _list(_auto),
'mdns.srv.target': _list(_str),