ALLJoyn_NS - AllJoyn Name Service
What is ALLJoyn_NS?
AllJoyn-NS stands for AllJoyn Name Service. It is a core component of the AllJoyn framework, responsible for discovering and resolving device and service names on a local network. It allows devices to advertise their presence and discover other devices using human-readable names.
Why is ALLJoyn_NS useful?
Service discovery - Devices can find each other without manual configuration.
Dynamic networking - Supports environments where devices frequently join or leave the network.
Interoperability - Enables seamless communication between devices from different manufacturers.
Simplified addressing - Uses friendly names instead of IP addresses or MAC addresses.
How it works?
Device joins the network - It registers a well-known name (e.g., org.alljoyn.sample.chat) with the AllJoyn Name Service.
Name is advertised - The name is broadcasted on the local network so other devices can discover it.
Other devices resolve the name - They use the name to establish a session with the service provider.
Communication begins - Once resolved, devices can interact using the AllJoyn messaging system.
Where is ALLJoyn_NS used?
Smart home ecosystems - For discovering and connecting to lights, thermostats, and appliances.
IoT environments - Where devices need to find and interact with each other dynamically.
Consumer electronics - TVs, speakers, and mobile devices that support AllJoyn.
Cross-platform applications - That need to work across Android, Windows, Linux, and more.
Which OSI layer does this protocol belong to?
It provides naming and discovery services directly to applications.
It uses application-level protocols to manage service registration and lookup.
It abstracts lower-level networking details, allowing developers to focus on functionality.
Topics in this section,
In this section, you are going to learn
Terminology
Version Info
Version & RFC Details |
|||
---|---|---|---|
ALLJOYN-NS Version |
Spec |
Year |
Core Idea / Contribution |
14.06 |
|||
Internal Spec (AllSeen Alliance) |
2014 |
Initial release of AllJoyn system; introduced core services including Name Service (NS). |
|
14.12 |
|||
Internal Spec (AllSeen Alliance) |
2014 |
Added mDNS-based discovery, TCP/UDP transport logic, and router probing mechanisms. |
|
15.04 |
|||
Internal Spec (AllSeen Alliance) |
2015 |
Enhanced security, router selection, and removed deprecated authentication methods. |
|
16.1 |
|||
Internal Spec (AllSeen Alliance) |
2016 |
Last major release before project sunset; included full NS support and cross-platform stability. |
|
oneM2M Interworking |
|||
ETSI TS 118 121 V2.0.1 |
2020 |
Defined interworking between AllJoyn and oneM2M systems, including NS mapping and discovery. |
|
Setup
Setup
ALLJoyn_NS Is-At Packet
S.No |
Protocol Packets |
Description |
Size(Bytes) |
---|---|---|---|
1 |
Is-At Packet |
Sent by a device to advertise its presence and services on the network. |
~60100 bytes |
Header |
|||
Endian |
Byte order indicator |
1 |
|
Message Type |
Signal, method call, etc. |
1 |
|
Flags |
Message flags (e.g., encrypted, broadcast) |
1 |
|
Major Version |
Protocol version |
1 |
|
Body Length |
Length of the message body |
4 |
|
Serial |
Serial number of the message |
4 |
|
Header Length |
Length of the header |
4 |
|
Body |
|||
Version |
Protocol version |
1 |
|
Message Type |
Indicates “Is-At” message |
1 |
|
Flags |
Bitmask for options (e.g., TCP support, complete message) |
1 |
|
GUID |
Unique identifier for the advertising device |
16 |
|
IPv4 Address |
IP address of the device |
4 |
|
IPv6 Address |
Optional, if supported |
16 |
|
Port |
Port number for service communication |
2 |
|
Name Count |
Number of advertised names |
1 |
|
Names |
List of service names (null-terminated strings) |
variable |
ALLJoyn_NS Who-Has Packet
S.No |
Protocol Packets |
Description |
Size(Bytes) |
---|---|---|---|
2 |
Who-Has Packet |
Sent by a device to discover services or other devices on the network. |
(~4080 bytes) |
Header |
|||
Endian |
Byte order indicator |
1 |
|
Message Type |
Signal, method call, etc. |
1 |
|
Flags |
Message flags (e.g., encrypted, broadcast) |
1 |
|
Major Version |
Protocol version |
1 |
|
Body Length |
Length of the message body |
4 |
|
Serial |
Serial number of the message |
4 |
|
Header Length |
Length of the header |
4 |
|
Body |
|||
Version |
Protocol version |
1 |
|
Message Type |
Indicates “Who-Has” message |
1 |
|
Flags |
Bitmask for options |
1 |
|
GUID |
Unique identifier of the sender |
16 |
|
Name Count |
Number of names being queried |
1 |
|
Names |
List of names being searched for |
Variable |
ALLJOYN-NS - Use Cases |
||
---|---|---|
S.no |
Use Case |
Description |
1 |
Local Device Discovery |
Enables devices on the same network to discover each other without a central server. |
2 |
Service Advertisement |
Allows devices to advertise their services (e.g., media sharing, lighting control) to others. |
3 |
Peer-to-Peer Communication Setup |
Facilitates initial handshake between devices for secure and direct communication. |
4 |
IoT Ecosystem Integration |
Supports seamless integration of smart home or industrial IoT devices using a common framework. |
5 |
Cross-Platform Interoperability |
Enables discovery across different OS platforms (e.g., Android, Linux, Windows) using AllJoyn. |
6 |
Routerless Network Operation |
Operates in networks without a dedicated router or DNS infrastructure. |
7 |
oneM2M Interworking |
Supports interworking with oneM2M architecture for broader IoT interoperability. |
ALLJOYN-NS - Basic Features |
||
---|---|---|
S.no |
Features |
Description |
1 |
UDP-Based Discovery |
Uses UDP multicast for lightweight and efficient service discovery. |
2 |
Name Advertisement |
Devices can advertise their unique names and services to others on the network. |
3 |
Multicast and Unicast Support |
Supports both multicast for discovery and unicast for direct responses. |
4 |
Platform Agnostic |
Works across multiple platforms including Android, Linux, and Windows. |
5 |
No Central Server Required |
Operates in a decentralized manner without needing a DNS or directory server. |
6 |
Dynamic Service Resolution |
Allows real-time resolution of services as devices join or leave the network. |
7 |
Integration with AllJoyn Router |
Works with the AllJoyn Router to manage routing and discovery across devices. |
UDP-Based Discovery - Testcases
UDP-Based Discovery - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Valid WHO-HAS Message |
Send a valid WHO-HAS message for a known service name |
IS-AT response is received from the advertising node |
2 |
Invalid WHO-HAS Message |
Send a WHO-HAS message with a malformed header |
No response is received; error is logged |
3 |
Valid IS-AT Message |
Send a valid IS-AT message advertising a service |
Service becomes discoverable on the network |
4 |
Duplicate IS-AT Message |
Send duplicate IS-AT messages for the same service |
Only one service entry is maintained in the discovery cache |
5 |
WHO-HAS for Unknown Service |
Send WHO-HAS for a non-existent service |
No IS-AT response is received |
6 |
Multicast WHO-HAS |
Send WHO-HAS over multicast to 224.0.0.113 |
All listening nodes receive the message |
7 |
Unicast WHO-HAS |
Send WHO-HAS over unicast to a specific node |
Only the targeted node processes the message |
8 |
IS-AT TTL Expiry |
Send IS-AT with a short TTL and wait for expiry |
Service is removed from discovery cache after TTL |
9 |
WHO-HAS with Wildcard |
Send WHO-HAS with wildcard service name |
All matching services respond with IS-AT |
10 |
IS-AT with Multiple Names |
Send IS-AT advertising multiple service names |
All names are registered and discoverable |
11 |
WHO-HAS with Empty Name |
Send WHO-HAS with an empty service name |
No IS-AT response is received |
12 |
IS-AT with Invalid TTL |
Send IS-AT with a negative TTL |
Message is ignored or error is logged |
13 |
WHO-HAS with Long Name |
Send WHO-HAS with a service name exceeding max length |
Message is ignored or error is logged |
14 |
IS-AT with Expired Timestamp |
Send IS-AT with a timestamp in the past |
Message is ignored |
15 |
WHO-HAS with Future Timestamp |
Send WHO-HAS with a timestamp in the future |
Message is ignored |
16 |
IS-AT with No Names |
Send IS-AT with no service names |
Message is ignored |
17 |
WHO-HAS with Multiple Names |
Send WHO-HAS for multiple service names |
IS-AT responses are received for all matching services |
18 |
IS-AT with Invalid Format |
Send IS-AT with incorrect message format |
Message is ignored or error is logged |
19 |
WHO-HAS with Invalid Format |
Send WHO-HAS with incorrect message format |
Message is ignored or error is logged |
20 |
IS-AT with Duplicate Names |
Send IS-AT with duplicate service names |
Only unique names are registered |
21 |
WHO-HAS with TTL |
Send WHO-HAS with a TTL field |
TTL is ignored; WHO-HAS is processed normally |
22 |
IS-AT with Large Payload |
Send IS-AT with a large number of service names |
All names are processed if within limits |
23 |
WHO-HAS with Large Payload |
Send WHO-HAS with many service names |
All names are processed if within limits |
24 |
IS-AT with Special Characters |
Send IS-AT with service names containing special characters |
Names are registered if valid |
25 |
WHO-HAS with Special Characters |
Send WHO-HAS with service names containing special characters |
Matching services respond |
26 |
IS-AT with Unicode Names |
Send IS-AT with Unicode service names |
Names are registered and discoverable |
27 |
WHO-HAS with Unicode Names |
Send WHO-HAS with Unicode service names |
Matching services respond |
28 |
IS-AT with Null Characters |
Send IS-AT with null characters in names |
Message is ignored or error is logged |
29 |
WHO-HAS with Null Characters |
Send WHO-HAS with null characters in names |
Message is ignored or error is logged |
30 |
IS-AT with Max TTL |
Send IS-AT with maximum TTL value |
Service remains discoverable for the full TTL duration |
31 |
WHO-HAS with Max Length Name |
Send WHO-HAS with a name at max allowed length |
Matching services respond |
32 |
IS-AT with Max Length Name |
Send IS-AT with a name at max allowed length |
Name is registered and discoverable |
33 |
WHO-HAS with Invalid Multicast Address |
Send WHO-HAS to an invalid multicast address |
Message is not received by any node |
34 |
IS-AT with Invalid Multicast Address |
Send IS-AT to an invalid multicast address |
Message is not received by any node |
35 |
WHO-HAS with Broadcast |
Send WHO-HAS using broadcast address |
All nodes receive the message |
36 |
IS-AT with Broadcast |
Send IS-AT using broadcast address |
All nodes receive the message |
37 |
WHO-HAS with No Network |
Send WHO-HAS with no network connectivity |
No response is received |
38 |
IS-AT with No Network |
Send IS-AT with no network connectivity |
Message is not received |
39 |
WHO-HAS with Delayed Response |
Send WHO-HAS and simulate delayed IS-AT response |
IS-AT is accepted if within timeout |
40 |
IS-AT with Delayed Send |
Delay sending IS-AT after WHO-HAS |
WHO-HAS requester receives IS-AT if within timeout |
41 |
WHO-HAS with Repeated Requests |
Send repeated WHO-HAS messages |
Multiple IS-AT responses may be received |
42 |
IS-AT with Repeated Advertisements |
Send repeated IS-AT messages |
Service remains discoverable |
43 |
WHO-HAS with Network Congestion |
Send WHO-HAS during network congestion |
IS-AT may be delayed or lost |
44 |
IS-AT with Network Congestion |
Send IS-AT during network congestion |
Message may be delayed or lost |
45 |
WHO-HAS with Packet Loss |
Simulate packet loss for WHO-HAS |
IS-AT may not be received |
46 |
IS-AT with Packet Loss |
Simulate packet loss for IS-AT |
Service may not be discovered |
47 |
WHO-HAS with Firewall |
Send WHO-HAS with firewall blocking UDP |
No IS-AT response is received |
48 |
IS-AT with Firewall |
Send IS-AT with firewall blocking UDP |
Message is not received |
49 |
WHO-HAS with NAT |
Send WHO-HAS from behind NAT |
IS-AT may not be received unless NAT traversal is supported |
50 |
IS-AT with NAT |
Send IS-AT from behind NAT |
Message may not reach external nodes |
Name Advertisement - Testcases
Name Advertisement - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Valid Name Advertisement |
Advertise a valid service name using IS-AT |
Service is advertised and discoverable |
2 |
Duplicate Name Advertisement |
Advertise the same name multiple times |
Only one entry is maintained in the discovery cache |
3 |
Advertisement with Empty Name |
Send IS-AT with an empty service name |
Message is ignored or error is logged |
4 |
Advertisement with Special Characters |
Advertise a name with special characters |
Name is registered if valid |
5 |
Advertisement with Unicode Characters |
Advertise a name with Unicode characters |
Name is registered and discoverable |
6 |
Advertisement with Max Length Name |
Advertise a name at maximum allowed length |
Name is registered and discoverable |
7 |
Advertisement with Exceeding Length |
Advertise a name exceeding maximum length |
Message is ignored or error is logged |
8 |
Advertisement with Null Characters |
Advertise a name containing null characters |
Message is ignored or error is logged |
9 |
Advertisement with Multiple Names |
Advertise multiple names in a single IS-AT |
All names are registered and discoverable |
10 |
Advertisement with TTL |
Advertise a name with a valid TTL |
Name is discoverable for the TTL duration |
11 |
Advertisement with Zero TTL |
Advertise a name with TTL set to zero |
Name is not registered |
12 |
Advertisement with Negative TTL |
Advertise a name with negative TTL |
Message is ignored or error is logged |
13 |
Advertisement with Max TTL |
Advertise a name with maximum TTL |
Name is discoverable for the full TTL duration |
14 |
Advertisement with Expired Timestamp |
Send IS-AT with a timestamp in the past |
Message is ignored |
15 |
Advertisement with Future Timestamp |
Send IS-AT with a timestamp in the future |
Message is ignored |
16 |
Advertisement with Invalid Format |
Send IS-AT with incorrect message format |
Message is ignored or error is logged |
17 |
Advertisement with Missing Fields |
Send IS-AT missing required fields |
Message is ignored or error is logged |
18 |
Advertisement with Extra Fields |
Send IS-AT with extra unexpected fields |
Message is processed if valid |
19 |
Advertisement with Invalid Header |
Send IS-AT with a malformed header |
Message is ignored or error is logged |
20 |
Advertisement with Valid Header |
Send IS-AT with a valid header |
Message is processed successfully |
21 |
Advertisement with Broadcast |
Send IS-AT using broadcast address |
All nodes receive the advertisement |
22 |
Advertisement with Multicast |
Send IS-AT using multicast address |
All listening nodes receive the advertisement |
23 |
Advertisement with Unicast |
Send IS-AT to a specific node |
Only the targeted node receives the advertisement |
24 |
Advertisement with Network Congestion |
Send IS-AT during network congestion |
Message may be delayed or lost |
25 |
Advertisement with Packet Loss |
Simulate packet loss during IS-AT transmission |
Message may not be received |
26 |
Advertisement with Firewall |
Send IS-AT with firewall blocking UDP |
Message is not received |
27 |
Advertisement with NAT |
Send IS-AT from behind NAT |
Message may not reach external nodes |
28 |
Advertisement with Repeated Messages |
Send repeated IS-AT messages |
Service remains discoverable |
29 |
Advertisement with Delayed Send |
Delay sending IS-AT after startup |
Service becomes discoverable after delay |
30 |
Advertisement with Invalid TTL Format |
Send IS-AT with TTL in invalid format |
Message is ignored or error is logged |
31 |
Advertisement with Valid TTL Format |
Send IS-AT with TTL in correct format |
Message is processed successfully |
32 |
Advertisement with Service Metadata |
Include metadata in IS-AT message |
Metadata is registered if supported |
33 |
Advertisement with Conflicting Names |
Advertise names that conflict with existing ones |
Conflict is resolved or logged |
34 |
Advertisement with Service Version |
Include version info in IS-AT |
Version is registered if supported |
35 |
Advertisement with Service Priority |
Include priority in IS-AT |
Priority is respected if supported |
36 |
Advertisement with Invalid Priority |
Send IS-AT with invalid priority value |
Message is ignored or error is logged |
37 |
Advertisement with TTL Expiry |
Wait for TTL to expire after advertisement |
Service is removed from cache |
38 |
Advertisement with TTL Refresh |
Re-advertise before TTL expiry |
TTL is refreshed and service remains discoverable |
39 |
Advertisement with Service Removal |
Send IS-AT with TTL=0 to remove service |
Service is removed from cache |
40 |
Advertisement with Service Update |
Send IS-AT with updated service info |
Service info is updated in cache |
41 |
Advertisement with Invalid Encoding |
Send IS-AT with invalid character encoding |
Message is ignored or error is logged |
42 |
Advertisement with Valid Encoding |
Send IS-AT with UTF-8 encoding |
Message is processed successfully |
43 |
Advertisement with High Frequency |
Send IS-AT messages at high frequency |
System handles or throttles messages |
44 |
Advertisement with Low Frequency |
Send IS-AT messages at low frequency |
Service remains discoverable if TTL is sufficient |
45 |
Advertisement with Service Grouping |
Advertise services grouped by category |
Groups are registered if supported |
46 |
Advertisement with Invalid Grouping |
Send IS-AT with invalid group format |
Message is ignored or error is logged |
47 |
Advertisement with Logging Enabled |
Enable logging during advertisement |
Logs show advertisement activity |
48 |
Advertisement with Logging Disabled |
Disable logging during advertisement |
No logs are generated |
49 |
Advertisement with Debug Mode |
Enable debug mode during advertisement |
Detailed logs are generated |
50 |
Advertisement with Production Mode |
Send IS-AT in production mode |
Minimal logs and optimized performance |
Multicast and Unicast Support - Testcases
Multicast and Unicast Support - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Multicast WHO-HAS |
Send WHO-HAS over multicast to 224.0.0.113 |
All listening nodes receive the message |
2 |
Unicast WHO-HAS |
Send WHO-HAS over unicast to a specific node |
Only the targeted node processes the message |
3 |
Multicast IS-AT |
Send IS-AT over multicast |
All nodes receive the advertisement |
4 |
Unicast IS-AT |
Send IS-AT over unicast |
Only the targeted node receives the advertisement |
5 |
Invalid Multicast Address |
Send WHO-HAS to an invalid multicast address |
Message is not received by any node |
6 |
Invalid Unicast Address |
Send WHO-HAS to an invalid unicast address |
Message is not received |
7 |
Multicast with TTL |
Send multicast WHO-HAS with TTL set |
Message is received within TTL scope |
8 |
Unicast with TTL |
Send unicast WHO-HAS with TTL set |
TTL is ignored; message is delivered |
9 |
Multicast with Packet Loss |
Simulate packet loss during multicast |
Some nodes may not receive the message |
10 |
Unicast with Packet Loss |
Simulate packet loss during unicast |
Target node may not receive the message |
11 |
Multicast with Congestion |
Send multicast during network congestion |
Message may be delayed or dropped |
12 |
Unicast with Congestion |
Send unicast during network congestion |
Message may be delayed or dropped |
13 |
Multicast with Firewall |
Send multicast with firewall blocking UDP |
Message is blocked |
14 |
Unicast with Firewall |
Send unicast with firewall blocking UDP |
Message is blocked |
15 |
Multicast with NAT |
Send multicast from behind NAT |
Message may not reach external nodes |
16 |
Unicast with NAT |
Send unicast from behind NAT |
Message may not reach external nodes |
17 |
Multicast with Valid Header |
Send multicast with valid message header |
Message is processed successfully |
18 |
Unicast with Valid Header |
Send unicast with valid message header |
Message is processed successfully |
19 |
Multicast with Invalid Header |
Send multicast with malformed header |
Message is ignored |
20 |
Unicast with Invalid Header |
Send unicast with malformed header |
Message is ignored |
21 |
Multicast with Large Payload |
Send multicast with large message payload |
Message is processed if within limits |
22 |
Unicast with Large Payload |
Send unicast with large message payload |
Message is processed if within limits |
23 |
Multicast with Empty Payload |
Send multicast with empty payload |
Message is ignored |
24 |
Unicast with Empty Payload |
Send unicast with empty payload |
Message is ignored |
25 |
Multicast with Special Characters |
Send multicast with special characters in name |
Message is processed if valid |
26 |
Unicast with Special Characters |
Send unicast with special characters in name |
Message is processed if valid |
27 |
Multicast with Unicode |
Send multicast with Unicode characters |
Message is processed if valid |
28 |
Unicast with Unicode |
Send unicast with Unicode characters |
Message is processed if valid |
29 |
Multicast with Repeated Messages |
Send repeated multicast messages |
All messages are processed |
30 |
Unicast with Repeated Messages |
Send repeated unicast messages |
All messages are processed |
31 |
Multicast with Delay |
Send multicast with intentional delay |
Message is received after delay |
32 |
Unicast with Delay |
Send unicast with intentional delay |
Message is received after delay |
33 |
Multicast with Broadcast Address |
Send multicast using broadcast address |
Message is received by all nodes |
34 |
Unicast with Broadcast Address |
Send unicast using broadcast address |
Message is not processed |
35 |
Multicast with Invalid Format |
Send multicast with invalid format |
Message is ignored |
36 |
Unicast with Invalid Format |
Send unicast with invalid format |
Message is ignored |
37 |
Multicast with Logging Enabled |
Enable logging during multicast |
Logs show multicast activity |
38 |
Unicast with Logging Enabled |
Enable logging during unicast |
Logs show unicast activity |
39 |
Multicast with Logging Disabled |
Disable logging during multicast |
No logs are generated |
40 |
Unicast with Logging Disabled |
Disable logging during unicast |
No logs are generated |
41 |
Multicast with Debug Mode |
Enable debug mode during multicast |
Detailed logs are generated |
42 |
Unicast with Debug Mode |
Enable debug mode during unicast |
Detailed logs are generated |
43 |
Multicast with Production Mode |
Send multicast in production mode |
Minimal logs and optimized performance |
44 |
Unicast with Production Mode |
Send unicast in production mode |
Minimal logs and optimized performance |
45 |
Multicast with Service Discovery |
Use multicast for service discovery |
All services respond with IS-AT |
46 |
Unicast with Service Discovery |
Use unicast for service discovery |
Targeted service responds with IS-AT |
47 |
Multicast with TTL Expiry |
Send multicast with short TTL and wait |
Message expires and is not received |
48 |
Unicast with TTL Expiry |
Send unicast with short TTL and wait |
Message is delivered before expiry |
49 |
Multicast with Invalid Encoding |
Send multicast with invalid encoding |
Message is ignored |
50 |
Unicast with Invalid Encoding |
Send unicast with invalid encoding |
Message is ignored |
Platform Agnostic - Testcases
Platform Agnostic - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Cross-Platform WHO-HAS |
Send WHO-HAS from Linux and receive on Windows |
IS-AT response is received on Windows |
2 |
Cross-Platform IS-AT |
Send IS-AT from Android and receive on iOS |
Service is discoverable on iOS |
3 |
Endian Compatibility |
Send messages from big-endian system to little-endian |
Messages are correctly interpreted |
4 |
Byte Order Consistency |
Verify byte order in message headers across platforms |
Headers are parsed correctly |
5 |
Multicast Support on All Platforms |
Send multicast WHO-HAS from Windows |
All platforms receive the message |
6 |
Unicast Support on All Platforms |
Send unicast IS-AT from Linux |
Target platform receives the message |
7 |
TTL Handling Across Platforms |
Send IS-AT with TTL from Android |
TTL is respected on all platforms |
8 |
Service Discovery on Mixed OS |
Advertise service on Linux, discover on Windows and Android |
Service is discovered on all platforms |
9 |
Unicode Name Advertisement |
Advertise Unicode name from iOS |
Name is correctly displayed on all platforms |
10 |
Special Characters in Names |
Advertise name with special characters from Windows |
Name is correctly parsed on all platforms |
11 |
Max Length Name Advertisement |
Advertise max length name from Linux |
Name is accepted and discoverable |
12 |
Invalid Name Format |
Send IS-AT with invalid name format from Android |
Message is ignored on all platforms |
13 |
TTL Expiry Handling |
Send IS-AT with short TTL from iOS |
Service is removed after TTL on all platforms |
14 |
Simultaneous Discovery |
Send WHO-HAS from multiple platforms |
All receive appropriate IS-AT responses |
15 |
Simultaneous Advertisement |
Send IS-AT from multiple platforms |
All services are discoverable |
16 |
Firewall Compatibility |
Send WHO-HAS through platform-specific firewall |
Message is received if firewall allows |
17 |
NAT Traversal |
Send IS-AT from behind NAT on Android |
Message reaches external platforms if NAT supports |
18 |
IPv6 Compatibility |
Send WHO-HAS over IPv6 from Linux |
All IPv6-capable platforms receive it |
19 |
IPv4 Compatibility |
Send IS-AT over IPv4 from Windows |
All IPv4-capable platforms receive it |
20 |
Mixed Protocol Stack |
Use different network stacks on platforms |
Messages are interoperable |
21 |
Platform-Specific Encoding |
Send IS-AT with UTF-8 encoding from iOS |
Correctly decoded on all platforms |
22 |
Platform-Specific Decoding |
Receive WHO-HAS with UTF-8 encoding on Android |
Correctly decoded |
23 |
Cross-Platform Logging |
Enable logging on all platforms |
Logs show consistent message flow |
24 |
Cross-Platform Debugging |
Enable debug mode on all platforms |
Debug output is consistent |
25 |
Platform-Specific Packet Size |
Send large IS-AT from Windows |
Message is accepted if within limits |
26 |
Platform-Specific Buffer Size |
Receive large WHO-HAS on Android |
Message is processed if buffer allows |
27 |
Platform-Specific Timeouts |
Send WHO-HAS and wait for IS-AT |
Timeout behavior is consistent |
28 |
Cross-Platform Service Removal |
Send IS-AT with TTL=0 from Linux |
Service is removed on all platforms |
29 |
Cross-Platform Service Update |
Send updated IS-AT from Android |
Service info is updated on all platforms |
30 |
Cross-Platform Service Refresh |
Re-advertise service before TTL expiry |
TTL is refreshed on all platforms |
31 |
Platform-Specific Network Stack |
Use BSD sockets on Unix and Winsock on Windows |
Messages are interoperable |
32 |
Cross-Platform Packet Loss Handling |
Simulate packet loss on Android |
System retries or logs error |
33 |
Cross-Platform Congestion Handling |
Send messages during congestion |
Messages are delayed or retried |
34 |
Cross-Platform Duplicate Handling |
Send duplicate IS-AT from iOS |
Only one entry is maintained |
35 |
Cross-Platform Wildcard WHO-HAS |
Send WHO-HAS with wildcard from Linux |
All matching services respond |
36 |
Cross-Platform Service Grouping |
Advertise grouped services from Android |
Groups are recognized on all platforms |
37 |
Cross-Platform Metadata Support |
Include metadata in IS-AT from Windows |
Metadata is parsed on all platforms |
38 |
Cross-Platform Versioning |
Include version info in IS-AT |
Version is recognized on all platforms |
39 |
Cross-Platform Priority Handling |
Advertise services with priority |
Priority is respected on all platforms |
40 |
Cross-Platform Header Validation |
Send IS-AT with valid header |
Header is validated on all platforms |
41 |
Cross-Platform Header Corruption |
Send IS-AT with corrupted header |
Message is ignored |
42 |
Cross-Platform Field Validation |
Send IS-AT with missing fields |
Message is ignored |
43 |
Cross-Platform Extra Fields |
Send IS-AT with extra fields |
Message is processed if valid |
44 |
Cross-Platform Service Conflict |
Advertise conflicting names |
Conflict is resolved or logged |
45 |
Cross-Platform Service Discovery Timeout |
Send WHO-HAS and wait |
Timeout is consistent across platforms |
46 |
Cross-Platform Service Cache |
Cache discovered services |
Cache is consistent across platforms |
47 |
Cross-Platform Service Expiry |
Wait for TTL expiry |
Service is removed from cache |
48 |
Cross-Platform Service Re-registration |
Re-advertise expired service |
Service is re-added to cache |
49 |
Cross-Platform Service Filtering |
Filter services by name |
Only matching services are shown |
50 |
Cross-Platform Service Logging |
Log service discovery events |
Logs are consistent across platforms |
No Central Server Required - Testcases
No Central Server Required - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Peer-to-Peer Discovery |
Verify that nodes can discover each other without a central server |
Nodes successfully discover each other |
2 |
Service Advertisement Without Server |
Advertise a service without any central registry |
Service is discoverable by other peers |
3 |
WHO-HAS Without Server |
Send WHO-HAS message in a decentralized network |
IS-AT response is received from matching peers |
4 |
IS-AT Without Server |
Send IS-AT message without central coordination |
Peers receive and cache the service info |
5 |
Multiple Peers Discovery |
Start multiple peers and verify mutual discovery |
All peers discover each other |
6 |
Peer Restart |
Restart a peer and verify rediscovery |
Peer is rediscovered by others |
7 |
Peer Join Late |
Start a new peer after others are running |
New peer discovers existing services |
8 |
Peer Leave |
Stop a peer and verify removal from discovery cache |
Peer is removed from cache after TTL |
9 |
TTL Expiry Without Server |
Verify TTL expiry works without central server |
Expired services are removed from cache |
10 |
Simultaneous Advertisements |
Multiple peers advertise services at the same time |
All services are discoverable |
11 |
Decentralized WHO-HAS Flood |
WHO-HAS messages are propagated without central routing |
All peers receive the message |
12 |
Decentralized IS-AT Propagation |
IS-AT messages are distributed without a central node |
All peers update their cache |
13 |
Peer-to-Peer TTL Refresh |
Refresh TTL from one peer to another |
TTL is extended in peer cache |
14 |
Peer-to-Peer TTL Expiry |
Allow TTL to expire naturally |
Service is removed from all caches |
15 |
Peer-to-Peer Conflict Resolution |
Two peers advertise same name |
Conflict is resolved or logged |
16 |
Peer-to-Peer Duplicate Detection |
Same service advertised twice |
Only one entry is maintained |
17 |
Peer-to-Peer Wildcard WHO-HAS |
WHO-HAS with wildcard name |
All matching services respond |
18 |
Peer-to-Peer Metadata Sharing |
Share metadata in IS-AT |
Metadata is received and parsed |
19 |
Peer-to-Peer Versioning |
Include version info in IS-AT |
Version is recognized by peers |
20 |
Peer-to-Peer Priority Handling |
Include priority in IS-AT |
Priority is respected |
21 |
Peer-to-Peer Logging |
Enable logs on all peers |
Logs show consistent discovery |
22 |
Peer-to-Peer Debugging |
Enable debug mode |
Detailed logs are generated |
23 |
Peer-to-Peer Packet Loss |
Simulate packet loss |
Discovery still works via retries |
24 |
Peer-to-Peer Congestion |
Simulate network congestion |
Messages are delayed but received |
25 |
Peer-to-Peer NAT Traversal |
Peer behind NAT advertises service |
External peers discover it if NAT allows |
26 |
Peer-to-Peer IPv6 Support |
Use IPv6 for discovery |
Peers discover each other |
27 |
Peer-to-Peer IPv4 Support |
Use IPv4 for discovery |
Peers discover each other |
28 |
Peer-to-Peer Mixed Stack |
Use different network stacks |
Messages are interoperable |
29 |
Peer-to-Peer Encoding |
Use UTF-8 encoding |
Messages are correctly parsed |
30 |
Peer-to-Peer Decoding |
Decode UTF-8 messages |
Messages are correctly interpreted |
31 |
Peer-to-Peer Service Removal |
Send IS-AT with TTL=0 |
Service is removed from all caches |
32 |
Peer-to-Peer Service Update |
Send updated IS-AT |
Cache is updated |
33 |
Peer-to-Peer Service Refresh |
Re-advertise before TTL expiry |
TTL is refreshed |
34 |
Peer-to-Peer Header Validation |
Validate IS-AT headers |
Headers are parsed correctly |
35 |
Peer-to-Peer Header Corruption |
Send corrupted IS-AT |
Message is ignored |
36 |
Peer-to-Peer Field Validation |
Send IS-AT with missing fields |
Message is ignored |
37 |
Peer-to-Peer Extra Fields |
Send IS-AT with extra fields |
Message is processed if valid |
38 |
Peer-to-Peer Service Filtering |
Filter services by name |
Only matching services are shown |
39 |
Peer-to-Peer Service Logging |
Log service discovery events |
Logs are consistent |
40 |
Peer-to-Peer Service Cache |
Cache discovered services |
Cache is consistent |
41 |
Peer-to-Peer Cache Expiry |
Wait for TTL to expire |
Service is removed |
42 |
Peer-to-Peer Re-registration |
Re-advertise expired service |
Service is re-added |
43 |
Peer-to-Peer Multicast WHO-HAS |
Send WHO-HAS via multicast |
All peers receive it |
44 |
Peer-to-Peer Unicast IS-AT |
Send IS-AT via unicast |
Target peer receives it |
45 |
Peer-to-Peer Broadcast WHO-HAS |
Send WHO-HAS via broadcast |
All peers receive it |
46 |
Peer-to-Peer Invalid Format |
Send malformed IS-AT |
Message is ignored |
47 |
Peer-to-Peer Empty Payload |
Send IS-AT with no names |
Message is ignored |
48 |
Peer-to-Peer Large Payload |
Send IS-AT with many names |
All names are processed |
49 |
Peer-to-Peer Special Characters |
Use special characters in names |
Names are parsed correctly |
50 |
Peer-to-Peer Unicode Names |
Use Unicode in service names |
Names are discoverable |
Dynamic Service Resolution - Testcases
Dynamic Service Resolution - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Dynamic Discovery on Startup |
Start a peer and dynamically discover available services |
All active services are discovered without manual configuration |
2 |
Service Joins After Startup |
Start a new service after peers are running |
Peers dynamically discover the new service |
3 |
Service Leaves Network |
Stop a service and observe resolution behavior |
Service is removed from discovery cache after TTL |
4 |
Service Rejoins Network |
Restart a previously stopped service |
Service is rediscovered dynamically |
5 |
Multiple Services Join |
Start multiple services simultaneously |
All services are dynamically resolved |
6 |
Service Name Change |
Change the name of an advertised service |
New name is resolved and old name is removed |
7 |
Service Metadata Update |
Update metadata of a service |
Updated metadata is reflected in resolution |
8 |
Service TTL Expiry |
Wait for TTL to expire |
Service is removed from resolution cache |
9 |
Service TTL Refresh |
Re-advertise service before TTL expiry |
TTL is refreshed and service remains discoverable |
10 |
Wildcard Service Query |
Query for services using wildcard |
All matching services are resolved |
11 |
Service Priority Resolution |
Advertise services with different priorities |
Higher priority services are resolved first |
12 |
Service Version Resolution |
Advertise services with version info |
Correct version is resolved based on query |
13 |
Service Group Resolution |
Group services and query by group |
All services in group are resolved |
14 |
Service Conflict Resolution |
Advertise conflicting service names |
Conflict is resolved and correct service is resolved |
15 |
Service Resolution with Delay |
Delay service advertisement |
Service is resolved after delay |
16 |
Service Resolution with Packet Loss |
Simulate packet loss during advertisement |
Service is resolved if retry succeeds |
17 |
Service Resolution with Congestion |
Simulate network congestion |
Resolution may be delayed but succeeds |
18 |
Service Resolution with NAT |
Advertise service behind NAT |
Service is resolved if NAT traversal is supported |
19 |
Service Resolution with Firewall |
Advertise service with firewall blocking UDP |
Service is not resolved |
20 |
Service Resolution with IPv6 |
Advertise service over IPv6 |
Service is resolved on IPv6-capable peers |
21 |
Service Resolution with IPv4 |
Advertise service over IPv4 |
Service is resolved on IPv4-capable peers |
22 |
Service Resolution with Unicode Name |
Advertise service with Unicode name |
Service is resolved correctly |
23 |
Service Resolution with Special Characters |
Advertise service with special characters |
Service is resolved if valid |
24 |
Service Resolution with Max Length Name |
Advertise service with max allowed name length |
Service is resolved |
25 |
Service Resolution with Invalid Name |
Advertise service with invalid name |
Service is not resolved |
26 |
Service Resolution with Duplicate Names |
Advertise duplicate service names |
Only one instance is resolved |
27 |
Service Resolution with TTL=0 |
Advertise service with TTL=0 |
Service is not resolved |
28 |
Service Resolution with Negative TTL |
Advertise service with negative TTL |
Service is ignored |
29 |
Service Resolution with Max TTL |
Advertise service with max TTL |
Service remains resolvable for full TTL |
30 |
Service Resolution with Invalid Format |
Advertise service with malformed IS-AT |
Service is not resolved |
31 |
Service Resolution with Extra Fields |
Advertise service with extra fields |
Service is resolved if fields are valid |
32 |
Service Resolution with Missing Fields |
Advertise service missing required fields |
Service is not resolved |
33 |
Service Resolution with Broadcast |
Advertise service using broadcast |
All peers resolve the service |
34 |
Service Resolution with Multicast |
Advertise service using multicast |
All listening peers resolve the service |
35 |
Service Resolution with Unicast |
Advertise service using unicast |
Only targeted peer resolves the service |
36 |
Service Resolution with Logging Enabled |
Enable logging during resolution |
Logs show resolution activity |
37 |
Service Resolution with Logging Disabled |
Disable logging during resolution |
No logs are generated |
38 |
Service Resolution with Debug Mode |
Enable debug mode during resolution |
Detailed logs are generated |
39 |
Service Resolution with Production Mode |
Use production mode during resolution |
Minimal logs and optimized performance |
40 |
Service Resolution with High Frequency |
Advertise services at high frequency |
Resolution system handles or throttles |
41 |
Service Resolution with Low Frequency |
Advertise services at low frequency |
Service remains resolvable if TTL is sufficient |
42 |
Service Resolution with Service Removal |
Send IS-AT with TTL=0 to remove service |
Service is removed from resolution cache |
43 |
Service Resolution with Service Update |
Send IS-AT with updated service info |
Service info is updated in resolution cache |
44 |
Service Resolution with Service Re-registration |
Re-advertise expired service |
Service is re-added to resolution cache |
45 |
Service Resolution with Service Filtering |
Filter services by name or group |
Only matching services are resolved |
46 |
Service Resolution with Service Caching |
Cache resolved services |
Cache is updated dynamically |
47 |
Service Resolution with Service Expiry |
Wait for service TTL to expire |
Service is removed from cache |
48 |
Service Resolution with Platform Interoperability |
Resolve services across platforms |
Services are resolved regardless of OS |
49 |
Service Resolution with Network Interface Change |
Change network interface during resolution |
Resolution adapts to new interface |
50 |
Service Resolution with Simultaneous Queries |
Send multiple WHO-HAS queries |
All matching services are resolved |
Integration with AllJoyn Router - Testcases
Integration with AllJoyn Router - Test Cases |
|||
---|---|---|---|
# |
Test Case |
Description |
Expected Result |
1 |
Start AllJoyn Router |
Verify NS protocol initialization |
NS protocol initializes successfully |
2 |
WHO-HAS via Router |
Send WHO-HAS through AllJoyn Router |
Router forwards WHO-HAS to appropriate peers |
3 |
IS-AT via Router |
Send IS-AT through AllJoyn Router |
Router broadcasts IS-AT to all listening peers |
4 |
Service Discovery |
Verify service discovery via router |
Service is discovered through router mediation |
5 |
Router Restart |
Restart router and verify NS recovery |
NS protocol resumes and reinitializes |
6 |
Advertise with Router Active |
Advertise service with router active |
Service is advertised and discoverable |
7 |
Advertise with Router Inactive |
Advertise service with router inactive |
Service is not discoverable |
8 |
WHO-HAS with Filtering |
Send WHO-HAS with router filtering enabled |
Router filters and forwards WHO-HAS correctly |
9 |
IS-AT with Filtering |
Send IS-AT with router filtering enabled |
Router filters and forwards IS-AT correctly |
10 |
TTL Expiry |
Verify TTL expiry managed by router |
Router removes expired services from cache |
11 |
Malformed WHO-HAS |
Send WHO-HAS with malformed header via router |
Router drops malformed message |
12 |
Malformed IS-AT |
Send IS-AT with malformed payload via router |
Router logs and drops message |
13 |
WHO-HAS Logging |
Verify router logs WHO-HAS traffic |
WHO-HAS messages are logged |
14 |
IS-AT Logging |
Verify router logs IS-AT traffic |
IS-AT messages are logged |
15 |
Wildcard WHO-HAS |
Send WHO-HAS with wildcard via router |
Router forwards to all matching services |
16 |
Multiple Names in IS-AT |
Send IS-AT with multiple names via router |
Router registers all names |
17 |
Duplicate IS-AT |
Verify router handles duplicate IS-AT |
Only one entry is maintained |
18 |
Duplicate WHO-HAS |
Verify router handles duplicate WHO-HAS |
Message is processed once |
19 |
Congestion WHO-HAS |
Send WHO-HAS during router congestion |
Message is delayed or dropped |
20 |
Congestion IS-AT |
Send IS-AT during router congestion |
Message is delayed or dropped |
21 |
NAT Traversal WHO-HAS |
Send WHO-HAS with router NAT traversal |
Router forwards message across NAT |
22 |
NAT Traversal IS-AT |
Send IS-AT with router NAT traversal |
Router forwards message across NAT |
23 |
IPv6 WHO-HAS |
Verify router supports IPv6 WHO-HAS |
WHO-HAS is forwarded over IPv6 |
24 |
IPv6 IS-AT |
Verify router supports IPv6 IS-AT |
IS-AT is forwarded over IPv6 |
25 |
Debug WHO-HAS |
Send WHO-HAS with router debug mode |
Detailed logs are generated |
26 |
Debug IS-AT |
Send IS-AT with router debug mode |
Detailed logs are generated |
27 |
Logging Disabled WHO-HAS |
Send WHO-HAS with router logging disabled |
No logs are generated |
28 |
Logging Disabled IS-AT |
Send IS-AT with router logging disabled |
No logs are generated |
29 |
Production Mode WHO-HAS |
Send WHO-HAS with router in production mode |
Minimal logs and optimized performance |
30 |
Production Mode IS-AT |
Send IS-AT with router in production mode |
Minimal logs and optimized performance |
31 |
Service Removal |
Verify router handles service removal |
Service is removed from cache |
32 |
Service Update |
Verify router handles service update |
Service info is updated |
33 |
Service Refresh |
Verify router handles service refresh |
TTL is refreshed |
34 |
Invalid Encoding WHO-HAS |
Send WHO-HAS with invalid encoding via router |
Message is dropped |
35 |
Invalid Encoding IS-AT |
Send IS-AT with invalid encoding via router |
Message is dropped |
36 |
UTF-8 WHO-HAS |
Send WHO-HAS with UTF-8 encoding via router |
Message is processed |
37 |
UTF-8 IS-AT |
Send IS-AT with UTF-8 encoding via router |
Message is processed |
38 |
Special Characters WHO-HAS |
Send WHO-HAS with special characters via router |
Message is parsed correctly |
39 |
Special Characters IS-AT |
Send IS-AT with special characters via router |
Message is parsed correctly |
40 |
Unicode WHO-HAS |
Send WHO-HAS with Unicode via router |
Message is parsed correctly |
41 |
Unicode IS-AT |
Send IS-AT with Unicode via router |
Message is parsed correctly |
42 |
Large WHO-HAS Payload |
Verify router handles large WHO-HAS payload |
Message is processed if within limits |
43 |
Large IS-AT Payload |
Verify router handles large IS-AT payload |
Message is processed if within limits |
44 |
Empty WHO-HAS Payload |
Send WHO-HAS with empty payload via router |
Message is ignored |
45 |
Empty IS-AT Payload |
Send IS-AT with empty payload via router |
Message is ignored |
46 |
Broadcast WHO-HAS |
Send WHO-HAS with broadcast via router |
All peers receive the message |
47 |
Broadcast IS-AT |
Send IS-AT with broadcast via router |
All peers receive the message |
48 |
Service Conflict |
Verify router handles service conflict |
Conflict is resolved or logged |
49 |
Service Grouping |
Verify router handles service grouping |
Groups are registered if supported |
50 |
Metadata and Versioning |
Verify router handles metadata and versioning in IS-AT |
Metadata and version are parsed and stored |
Reference links