This document provides a brief description of the Bonjour OpEN APIs. It provides the following services:
- Sets admin mode of Bonjour responder.
- Gets admin mode of Bonjour responder.
- Sets the level-1 tracing mode of Bonjour responder.
- Gets the level-1 tracing mode of Bonjour responder.
- Sets the level-2 tracing mode of Bonjour responder.
- Gets the level-2 tracing mode of Bonjour responder.
- Gets information about the next published service.
- Gets information about the published service.
- Gets information about the next published service index.
- Gets information about the published service corresponding to index.
Example C Application bonjour_example
Initialization
In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.
bonjour_example
bonjour_example.c is a sample application that demonstrates the use of OpEN's Bonjour APIs. bonjour_example is started from the command line and can be used to exercise the various APIs by specifying arguments on the command line.
Sample Output
- Usage: ./bonjour_example <test#> <arg1> <arg2> ...
- Test 1: Sets admin mode of Bonjour responder: bonjour_example 1 <mode>
- Test 2: Gets admin mode of Bonjour responder: bonjour_example 2
- Test 3: Sets the level-1 tracing mode of Bonjour responder: bonjour_example 3 <mode>
- Test 4: Gets the level-1 tracing mode of Bonjour responder: bonjour_example 4
- Test 5: Sets the level-2 tracing mode of Bonjour responder: bonjour_example 5 <mode>
- Test 6: Gets the level-2 tracing mode of Bonjour responder: bonjour_example 6
- Test 7: Gets information about the next published service: bonjour_example 7 <serviceNum>
- Test 8: Gets information about the published service: bonjour_example 8 <serviceNum>
- Test 9: Gets information about the next published service index: bonjour_example 9 <index>
- Test 10: Gets information about the published service corresponding to index: bonjour_example 10 <index>
- Test 11: Run API sanity checks: bonjour_example 11
Bonjour CLI/API Cross Reference