Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
openapi_bonjour.h
Go to the documentation of this file.
1 
9 /**********************************************************************
10 *
11 * Copyright 2022-2023 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 ***********************************************************************
26 *
27 * @filename openapi_bonjour.h
28 *
29 * @purpose OpEN bonjour API
30 *
31 * @component OPEN
32 *
33 * @create 11/25/2022
34 *
35 * @end
36 *
37 *********************************************************************/
38 #ifndef OPENAPI_BONJOUR_H_INCLUDED
39 #define OPENAPI_BONJOUR_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
43 /* Bonjour Network Service Types */
44 typedef enum
45 {
46  OPEN_BONJOUR_SERVICE_FIRST = 0,
47  OPEN_BONJOUR_SERVICE_GENERIC = OPEN_BONJOUR_SERVICE_FIRST,
48  OPEN_BONJOUR_SERVICE_HTTP,
49  OPEN_BONJOUR_SERVICE_HTTPS,
50  OPEN_BONJOUR_SERVICE_TELNET,
51  OPEN_BONJOUR_SERVICE_SSH,
52  OPEN_BONJOUR_SERVICE_LAST,
53 } OPEN_BONJOUR_SERVICE_TYPE_t;
54 
55 /* These values shouldn't be changed -> */
56 #define OPEN_BONJOUR_SERVICE_NAME_MAX_LEN 64
57 #define OPEN_BONJOUR_SERVICE_TYPE_MAX_LEN 1005
58 #define OPEN_BONJOUR_SERVICE_DOMAIN_MAX_LEN 1005
59 #define OPEN_BONJOUR_SERVICE_TXT_MAX_LEN 256
60 /* <-These values shouldn't be changed */
61 
62 
63 /* Published Service Entry */
64 typedef struct
65 {
66  OPEN_BONJOUR_SERVICE_TYPE_t service;
67  OPEN_BOOL_t published;
68  unsigned char serviceName[OPEN_BONJOUR_SERVICE_NAME_MAX_LEN];
69  unsigned char serviceType[OPEN_BONJOUR_SERVICE_TYPE_MAX_LEN];
70  unsigned char serviceDomain[OPEN_BONJOUR_SERVICE_DOMAIN_MAX_LEN];
71  uint32_t servicePort;
72  unsigned char serviceText[OPEN_BONJOUR_SERVICE_TXT_MAX_LEN];
74 
75 /*************************************************************************/
92 
93 /*************************************************************************/
109 
110 /*************************************************************************/
127 
128 /*************************************************************************/
144 
145 /*************************************************************************/
162 
163 /*************************************************************************/
179 
180 /*************************************************************************/
196 
197 /*************************************************************************/
213 
214 /*************************************************************************/
230 open_error_t openapiBonjourServiceIndexGetNext(openapiClientHandle_t *client_handle, uint32_t index, uint32_t *pNextIndex);
231 
232 /*************************************************************************/
249 
250 
251 #endif /* OPENAPI_BONJOUR_H_INCLUDED */
252 
open_error_t openapiBonjourServiceGetByIndex(openapiClientHandle_t *client_handle, uint32_t index, OPEN_BONJOUR_SERVICE_INFO_t *pServiceEntry)
Gets information about the published service corresponding to index.
open_error_t openapiBonjourPublishedServiceGetNext(openapiClientHandle_t *client_handle, OPEN_BONJOUR_SERVICE_INFO_t *pServiceEntry)
Gets information about the next published service.
open_error_t openapiBonjourDebugLevel1Get(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *pMode)
Gets the level-1 tracing mode of Bonjour responder.
open_error_t openapiBonjourAdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *pMode)
Gets admin mode of Bonjour responder.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiBonjourAdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
Sets admin mode of Bonjour responder.
open_error_t openapiBonjourPublishedServiceGet(openapiClientHandle_t *client_handle, OPEN_BONJOUR_SERVICE_INFO_t *pServiceEntry)
Gets information about the published service.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiBonjourDebugLevel2Set(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
Sets the level-2 tracing mode of Bonjour responder.
open_error_t openapiBonjourDebugLevel1Set(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
Sets the level-1 tracing mode of Bonjour responder.
open_error_t openapiBonjourDebugLevel2Get(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *pMode)
Gets the level-2 tracing mode of Bonjour responder.
open_error_t openapiBonjourServiceIndexGetNext(openapiClientHandle_t *client_handle, uint32_t index, uint32_t *pNextIndex)
Gets information about the next published service index.