www.usr.com/support/gpl/USR9113_release1.0.tar.gz
[bcm963xx.git] / userapps / broadcom / cfm / inc / psixml.h
1 /*****************************************************************************
2 //
3 //  Copyright (c) 2004  Broadcom Corporation
4 //  All Rights Reserved
5 //  No portions of this material may be reproduced in any form without the
6 //  written permission of:
7 //          Broadcom Corporation
8 //          16215 Alton Parkway
9 //          Irvine, California 92619
10 //  All information contained in this document is Broadcom Corporation
11 //  company private, proprietary, and trade secret.
12 //
13 ******************************************************************************
14 //
15 //  Filename:       psixml.h
16 //  Author:         yt
17 //  Creation Date:  05/11/04
18 //
19 ******************************************************************************
20 //  Description:
21 //      Define the global types, enums. and constants for PSI in XML format
22 //
23 *****************************************************************************/
24
25 #ifndef __PSIXML_H__
26 #define __PSIXML_H__
27
28 #include "bcmtypes.h"
29 #include "psidefs.h"
30 #include "objectdefs.h"
31 #include "wldefs.h"
32 #include "nanoxml.h"
33
34 #define PSX_NAME_LEN                   24
35 #define PSX_MAGIC_LEN                  16
36 #define PSX_MAGIC_VALUE                "-$-PSI-$02.12r01"
37 #define PSX_CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */
38 #define PSX_CRC32_GOOD_VALUE 0xdebb20e3 /* Good final CRC32 checksum value */
39 #define PSX_STR_LEN                    50 
40 #define PSX_VERIFY                     1
41 #define PSX_STORE                      0
42 #define PSX_TABLE_TYPE                 2
43 #define PSX_APP_TYPE                   1
44 #define PSX_OBJ_TYPE                   0
45
46 #define MONDAY        0x1
47 #define TUESDAY       0x2
48 #define WEDNSDAY      0x4
49 #define THURSDAY      0x8
50 #define FRIDAY        0x10
51 #define SATURDAY      0x20
52 #define SUNDAY        0x40
53
54 #define XML_PSI_START_TAG      "<psitree>"
55 #define XML_PSI_END_TAG        "</psitree>"
56
57 #define XML_PORT_RANGE_MIN     1
58 #define XML_PORT_RANGE_MAX     65535
59 #define XML_MAX_SNMP_STR_LEN   15
60 #define XML_MAX_TOD_ENTRY      16
61
62 /* string  */
63 #define PSX_ATTRNAME_SET       1
64 #define PSX_ATTRSTR_SET        2
65
66 /* object and attribute names definitions */
67 #define PSX_ATTR_STATE             "state"
68
69 typedef enum {
70    PSX_STS_OK = 0,
71    PSX_STS_ERR_GENERAL,
72    PSX_STS_ERR_MEMORY,
73    PSX_STS_ERR_FIND_APP,
74    PSX_STS_ERR_FIND_OBJ,
75    PSX_STS_ERR_FIND_HDL_FNC,
76    PSX_STS_ERR_FATAL,
77    PSX_STS_ERR_MILD
78 } PSX_STATUS;
79
80 /* internal callback statemachine */
81 typedef enum {
82    state_start,
83    state_psi_begin,  
84    state_psi_end
85 } xml_state;
86
87
88 typedef struct xmlParseState {
89    xml_state state;
90    char appName[32];
91    PSI_HANDLE appHandle;
92    char objName[32];
93    char attrName[32];
94    char tableName[32];
95    int tableSize;
96    int tableIndex;
97    PSX_STATUS errorFlag;
98    int verify;                    /* verify=1 verifcation only, verfify=0 conversion only */
99 } XML_PARSE_STATE, *pXML_PARSE_STATE;
100
101 typedef PSX_STATUS (*PSX_SET_OBJ_FNC) (FILE *file, const char *appName, const UINT16 id,
102                                        const PSI_VALUE value, const UINT16 length);
103 typedef PSX_STATUS (*PSX_GET_OBJ_FNC) (char *appName, char *objName, char *attrName,
104                                        char* attrValue);
105 typedef void (*PSX_SET_ATTR_FNC) (FILE *file, const char *name, const UINT16 id,
106                                   const PSI_VALUE value, const UINT16 length);
107
108 typedef PSX_STATUS (*PSX_GET_ATTR_FNC) (char *attrName, char *attrValue);
109 typedef PSX_STATUS (*PSX_OBJ_FNC) (char *appName,  char *objName);
110
111
112
113 typedef struct {
114    char  appName[PSX_NAME_LEN];
115    PSX_SET_OBJ_FNC setObjFnc;
116    PSX_GET_OBJ_FNC getObjFnc;     /* base on appName, find the object's getObjFnc */
117    PSX_OBJ_FNC startObjFnc;       /* base on appName, find the object's startObjFnc */
118    PSX_OBJ_FNC endObjFnc;         /* base on appName, find the object's endObjFnc */
119 } PSX_APP_ITEM, *PPSX_APP_ITEM;
120
121 typedef struct {
122    char  objName[PSX_NAME_LEN];
123    PSX_SET_ATTR_FNC setAttrFnc;
124    PSX_GET_ATTR_FNC getAttrFnc;  /* getting object from XML file, do verification/store */
125    PSX_OBJ_FNC startObjFnc;     /* beginning of object, resource allocated */
126    PSX_OBJ_FNC endObjFnc;       /* end of object, do verification/storeToPSI, oresource deallocated */
127 } PSX_OBJ_ITEM, *PPSX_OBJ_ITEM;
128
129 #if defined(__cplusplus)
130 extern "C" {
131 #endif
132 extern PSX_STATUS xmlSetObjNode(FILE* file, const char *appName, const UINT16 id,
133                          const PSI_VALUE value, const UINT16 length);
134 extern PSX_STATUS xmlSetSysObjNode(FILE* file, const char *appName, const UINT16 id,
135                             const PSI_VALUE value, const UINT16 length);
136 extern PSX_STATUS xmlSetRouteObjNode(FILE* file, const char *appName, const UINT16 id,
137                             const PSI_VALUE value, const UINT16 length);
138 extern PSX_STATUS xmlSetPMapObjNode(FILE* file, const char *appName, const UINT16 id,
139                             const PSI_VALUE value, const UINT16 length);
140 extern PSX_STATUS xmlSetLanNode(FILE* file, const char *appName, const UINT16 id,
141                          const PSI_VALUE value, const UINT16 length);
142 extern PSX_STATUS xmlSetWirelessNode(FILE* file, const char *appName, const UINT16 id,
143                               const PSI_VALUE value, const UINT16 length);
144 extern PSX_STATUS xmlSetWanNode(FILE* file, const char *appName, const UINT16 id,
145                          const PSI_VALUE value, const UINT16 length);
146 extern PSX_STATUS xmlSetAtmTdNode(FILE* file, const char *appName, const UINT16 id,
147                            const PSI_VALUE value, const UINT16 length);
148 extern PSX_STATUS xmlSetAtmVccNode(FILE* file, const char *appName, const UINT16 id,
149                             const PSI_VALUE value, const UINT16 length);
150 extern PSX_STATUS xmlSetAtmCfgNode(FILE* file, const char *appName, const UINT16 id,
151                             const PSI_VALUE value, const UINT16 length);
152 extern PSX_STATUS xmlSetSecObjNode(FILE* file, const char *appName, const UINT16 id,
153                             const PSI_VALUE value, const UINT16 length);
154 extern PSX_STATUS xmlSetAdslObjNode(FILE* file, const char *appName, const UINT16 id,
155                              const PSI_VALUE value, const UINT16 length);
156 extern PSX_STATUS xmlSetSntpNode(FILE* file, const char *appName, const UINT16 id,
157                           const PSI_VALUE value, const UINT16 length);
158 extern PSX_STATUS xmlSetToDNode(FILE* file, const char *appName, const UINT16 id,
159                          const PSI_VALUE value, const UINT16 length);
160 extern PSX_STATUS xmlSetDhcpClntNode(FILE* file, const char *appName, const UINT16 id,
161                               const PSI_VALUE value, const UINT16 length);
162 extern PSX_STATUS xmlSetPppNode(FILE* file, const char *appName, const UINT16 id,
163                          const PSI_VALUE value, const UINT16 length);
164 extern PSX_STATUS xmlSetDdnsNode(FILE* file, const char *appName, const UINT16 id,
165                           const PSI_VALUE value, const UINT16 length);
166
167 extern void xmlSetTr69cAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
168                  const UINT16 length);
169 extern void xmlSetMgmtLockAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
170                  const UINT16 length);
171 extern void xmlSetStrObjAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
172                       const UINT16 length);
173 extern void xmlSetSysLogAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
174                       const UINT16 length);
175 extern void xmlSetDftGwAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
176                      const UINT16 length);
177 extern void xmlSetDnsAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
178                    const UINT16 length);
179 extern void xmlSetOtherSysAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
180                         const UINT16 length);
181 extern void xmlSetSnmpAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
182                     const UINT16 length);
183 extern void xmlSetRouteAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
184                            const UINT16 length);
185 extern void xmlSetRipIfcAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
186                       const UINT16 length);
187 extern void xmlSetRipAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
188                    const UINT16 length);
189 extern void xmlSetPMapAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
190                    const UINT16 length);
191 extern void xmlSetLanAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
192                    const UINT16 length);
193 extern void xmlWlSetWebAttr(FILE *file, PWIRELESS_VAR wlVars);
194 extern void xmlWlSetEncrytionAttr(FILE *file, PWIRELESS_VAR wlVars);
195 extern void xmlWlSetEncryptionStrengthAttr(FILE *file, PWIRELESS_VAR wlVars);
196 extern void xmlWlSetRadiusServerAttr(FILE *file, PWIRELESS_VAR wlVars);
197 extern void xmlSetWirelessVarsAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
198                            const UINT16 length);
199 extern void xmlSetWirelessMacFilterAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
200                                 const UINT16 length);
201 extern void xmlSetAtmInitAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
202                        const UINT16 length);
203 extern void xmlSetAtmPortAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
204                        const UINT16 length);
205 extern void xmlSetAtmTdNumAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
206                         const UINT16 length);
207 extern void xmlSetAtmTdTblAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
208                         const UINT16 length);
209 extern void xmlSetAtmIfcAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
210                       const UINT16 length);
211 extern void xmlSetAtmVccNumAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
212                          const UINT16 length);
213 extern void xmlSetAtmVccTblAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
214                         const UINT16 length);
215 extern void xmlSetDmzHostAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
216                        const UINT16 length);
217 extern void xmlSetServiceCtrlAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
218                            const UINT16 length);
219 extern void xmlSetVirtualSrvAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
220                       const UINT16 length);
221 extern void xmlSetIpFilterAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
222                       const UINT16 length);
223 extern void xmlSetPrtTriggerAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
224                           const UINT16 length);
225 extern void xmlSetMacFilterAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
226                          const UINT16 length);
227 extern void xmlSetAccessControlAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
228                              const UINT16 length);
229 extern void xmlSetAccessControlModeAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
230                                  const UINT16 length);
231 extern void xmlSetQosAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
232                    const UINT16 length);
233 extern void xmlSetToDCntrlAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
234                         const UINT16 length);
235 extern void xmlSetDdnsAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
236                     const UINT16 length);
237 extern void xmlSetEthAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
238                    const UINT16 length);
239 extern PSX_STATUS xmlParse(char *xmlBuffer, int xmlSize, int verify);
240 extern void xmlTagBegin(nxml_t handle, const char *tag_name, unsigned len);
241 extern void xmlTagEnd(nxml_t handle, const char *tag_name, unsigned len);
242 extern void xmlAttrBegin(nxml_t handle, const char *tag_name, unsigned len);
243 extern void xmlAttrValue(nxml_t handle, const char *tag_name, unsigned len);
244 extern void xmlData(nxml_t handle, const char *tag_name, unsigned len);
245 extern PSX_STATUS xmlGetObjNode(char *appName, char *objTagName,
246                                 char *attrName, char *value);
247 extern PSX_STATUS xmlVerifyObjNode(char *appName, char *objTagName,
248                             char *attrName, char *value);
249 extern PSX_STATUS xmlStartObjNode(char *appName, char *objTagName);
250 extern PSX_STATUS xmlEndObjNode(char *appName, char *objTagName);
251
252 extern PSX_STATUS xmlGetSysObjNode(char *appName, char *objName, char *attrName, char* attrValue);
253 extern PSX_STATUS xmlStartSysObjNode(char *appName, char *objName);
254 extern PSX_STATUS xmlEndSysObjNode(char *appName, char *objName);
255 extern PSX_STATUS xmlGetSysUserNameAttr(char *attrName, char* attrValue);
256 extern PSX_STATUS xmlGetSysPasswordAttr(char *attrName, char* attrValue);
257 extern PSX_STATUS xmlStartSysUserNamePasswordObj(char *appName, char *objName);
258 extern PSX_STATUS xmlEndSysUserNamePasswordObj(char *appName, char *objName);
259 extern PSX_STATUS xmlGetTr69cAttr(char *attrName, char* attrValue);
260 extern PSX_STATUS xmlStartTr69cObj(char *appName, char *objName);
261 extern PSX_STATUS xmlEndTr69cObj(char *appName, char *objName);
262 extern PSX_STATUS xmlGetMgmtLockAttr(char *attrName, char* attrValue);
263 extern PSX_STATUS xmlStartMgmtLockObj(char *appName, char *objName);
264 extern PSX_STATUS xmlEndMgmtLockObj(char *appName, char *objName);
265 extern PSX_STATUS xmlGetDftGwAttr(char *attrName, char* attrValue);
266 extern PSX_STATUS xmlStartDftGwObj(char *appName, char *objName);
267 extern PSX_STATUS xmlEndDftGwObj(char *appName, char *objName);
268 extern PSX_STATUS xmlGetDnsAttr(char *attrName, char* attrValue);
269 extern PSX_STATUS xmlStartDnsObj(char *appName, char *objName);
270 extern PSX_STATUS xmlEndDnsObj(char *appName, char *objName);
271 extern PSX_STATUS xmlGetSyslogAttr(char *attrName, char* attrValue);
272 extern PSX_STATUS xmlStartSyslogObj(char *appName, char *objName);
273 extern PSX_STATUS xmlEndSyslogObj(char *appName, char *objName);
274 extern PSX_STATUS xmlGetSnmpAttr(char *attrName, char* attrValue);
275 extern PSX_STATUS xmlStartSnmpObj(char *appName, char *objName);
276 extern PSX_STATUS xmlEndSnmpObj(char *appName, char *objName);
277 extern PSX_STATUS xmlGetOtherSysAttr(char *attrName, char* attrValue);
278 extern PSX_STATUS xmlStartOtherSysObj(char *appName, char *objName);
279 extern PSX_STATUS xmlEndOtherSysObj(char *appName, char *objName);
280 extern PSX_STATUS xmlGetAtmVccObjNode(char *appName, char *objName, char *attrName,
281                                       char* attrValue);
282 extern PSX_STATUS xmlGetAtmVccAttr(char *attrName, char* attrValue);
283 extern PSX_STATUS xmlStartAtmVccObjNode(char *appName, char *objName);
284 extern PSX_STATUS xmlEndAtmVccObjNode(char *appName, char *objName);
285 extern PSX_STATUS xmlGetWanObjNode(char *appName, char *objName, char *attrName,
286                                    char* attrValue);
287 extern PSX_STATUS xmlGetWanAttr(char *attrName, char* attrValue);
288 extern PSX_STATUS xmlStartWanObjNode(char *appName, char *objName);
289 extern PSX_STATUS xmlEndWanObjNode(char *appName, char *objName);
290 extern PSX_STATUS xmlGetPppObjNode(char *appName, char *objName, char *attrName,
291                                    char* attrValue);
292 extern PSX_STATUS xmlGetPppAttr(char *attrName, char* attrValue);
293 extern PSX_STATUS xmlStartPppObjNode(char *appName, char *objName);
294 extern PSX_STATUS xmlEndPppObjNode(char *appName, char *objName);
295 extern PSX_STATUS xmlGetSecObjNode(char *appName, char *objName, char *attrName, char* attrValue);
296 extern PSX_STATUS xmlStartSecObjNode(char *appName, char *objName);
297 extern PSX_STATUS xmlEndSecObjNode(char *appName, char *objName);
298 extern PSX_STATUS xmlGetVrtSrvAttr(char *attrName, char* attrValue);
299 extern PSX_STATUS xmlEndVrtSrvObj(char *appName, char *objName);
300 extern PSX_STATUS xmlGetVrtSrvEntryAttr(char *attrName, char* attrValue);
301 extern PSX_STATUS xmlEndVrtSrvEntryObj(char *appName, char *objName);
302 extern PSX_STATUS xmlGetIpFilterAttr(char *attrName, char* attrValue);
303 extern PSX_STATUS xmlEndIpFilterObj(char *appName, char *objName);
304 extern PSX_STATUS xmlGetIpFilterEntryAttr(char *attrName, char* attrValue);
305 extern PSX_STATUS xmlEndIpFilterEntryObj(char *appName, char *objName);
306 extern PSX_STATUS xmlGetPrtTriggerAttr(char *attrName, char* attrValue);
307 extern PSX_STATUS xmlEndPrtTriggerObj(char *appName, char *objName);
308 extern PSX_STATUS xmlGetPrtTriggerEntryAttr(char *attrName, char* attrValue);
309 extern PSX_STATUS xmlEndPrtTriggerEntryObj(char *appName, char *objName);
310 extern PSX_STATUS xmlGetMacFilterAttr(char *attrName, char* attrValue);
311 extern PSX_STATUS xmlEndMacFilterObj(char *appName, char *objName);
312 extern PSX_STATUS xmlGetMacFilterEntryAttr(char *attrName, char* attrValue);
313 extern PSX_STATUS xmlEndMacFilterEntryObj(char *appName, char *objName);
314 extern PSX_STATUS xmlGetQosClsAttr(char *attrName, char* attrValue);
315 extern PSX_STATUS xmlStartQosClsEntryObj(char *appName, char *objName);
316 extern PSX_STATUS xmlEndQosClsObj(char *appName, char *objName);
317 extern PSX_STATUS xmlGetQosClsEntryAttr(char *attrName, char* attrValue);
318 extern PSX_STATUS xmlEndQosClsEntryObj(char *appName, char *objName);
319 extern PSX_STATUS xmlGetAccCntrlAttr(char *attrName, char* attrValue);
320 extern PSX_STATUS xmlEndAccCntrlObj(char *appName, char *objName);
321 extern PSX_STATUS xmlGetAccCntrlEntryAttr(char *attrName, char* attrValue);
322 extern PSX_STATUS xmlEndAccCntrlEntryObj(char *appName, char *objName);
323 extern PSX_STATUS xmlGetAccCntrlModeAttr(char *attrName, char* attrValue);
324 extern PSX_STATUS xmlStartAccCntrlModeObj(char *appName, char *objName);
325 extern PSX_STATUS xmlEndAccCntrlModeObj(char *appName, char *objName);
326 extern PSX_STATUS xmlGetDmzHostAttr(char *attrName, char* attrValue);
327 extern PSX_STATUS xmlStartDmzHostObj(char *appName, char *objName);
328 extern PSX_STATUS xmlEndDmzHostObj(char *appName, char *objName);
329 extern PSX_STATUS xmlGetServiceCtrlAttr(char *attrName, char* attrValue);
330 extern PSX_STATUS xmlStartServiceCtrlObj(char *appName, char *objName);
331 extern PSX_STATUS xmlEndServiceCtrlObj(char *appName, char *objName);
332 extern PSX_STATUS xmlGetDhcpClntNode(char *appName, char *objName, char *attrName,
333                                    char* attrValue);
334 extern PSX_STATUS xmlGetDhcpClntAttr(char *attrName, char* attrValue);
335 extern PSX_STATUS xmlStartDhcpClntNode(char *appName, char *objName);
336 extern PSX_STATUS xmlEndDhcpClntNode(char *appName, char *objName);
337 extern PSX_STATUS xmlGetAtmTdObjNode(char *appName, char *objName, char *attrName,
338                                    char* attrValue);
339 extern PSX_STATUS xmlGetAtmTdAttr(char *attrName, char* attrValue);
340 extern PSX_STATUS xmlStartAtmTdObjNode(char *appName, char *objName);
341 extern PSX_STATUS xmlEndAtmTdObjNode(char *appName, char *objName);
342 extern PSX_STATUS xmlGetLanNode(char *appName, char *objName, char *attrName,
343                                 char* attrValue);
344 extern PSX_STATUS xmlGetLanAttr(char *attrName, char* attrValue);
345 extern PSX_STATUS xmlStartLanObj(char *appName, char *objName);
346 extern PSX_STATUS xmlEndLanObj(char *appName, char *objName);
347 extern PSX_STATUS xmlGetWirelessObjNode(char *appName, char *objName, char *attrName,
348                                         char* attrValue);
349 extern PSX_STATUS xmlStartWirelessObjNode(char *appName, char *objName);
350 extern PSX_STATUS xmlEndWirelessObjNode(char *appName, char *objName);
351 extern PSX_STATUS xmlGetWirelessVarsAttr(char *attrName, char* attrValue);
352 extern PSX_STATUS xmlStartWirelessVarsObj(char *appName, char *objName);
353 extern PSX_STATUS xmlEndWirelessVarsObj(char *appName, char *objName);
354 extern PSX_STATUS xmlGetWirelessMacFilterEntryAttr(char *attrName, char* attrValue);
355 extern PSX_STATUS xmlEndWirelessMacFilterEntryObj(char *appName, char *objName);
356 extern PSX_STATUS xmlGetWirelessMacFilterAttr(char *attrName, char* attrValue);
357 extern PSX_STATUS xmlEndWirelessMacFilterObj(char *appName, char *objName);
358 extern void xmlSetWirelessMssidVarsAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value, const UINT16 length);
359 extern PSX_STATUS xmlGetWirelessMssidVarsAttr(char * attrName, char * attrValue);
360 extern PSX_STATUS xmlEndWirelessMssidVarsObj(char *appName, char *objName);
361 extern PSX_STATUS xmlGetWirelessMssidVarsEntryAttr(char *attrName, char* attrValue);
362 extern PSX_STATUS xmlEndWirelessMssidVarsEntryObj(char *appName, char *objName);
363 extern PSX_STATUS xmlGetRouteObjNode(char *appName, char *objName, char *attrName, char* attrValue);
364 extern PSX_STATUS xmlStartRouteObjNode(char *appName, char *objName);
365 extern PSX_STATUS xmlEndRouteObjNode(char *appName, char *objName);
366 extern PSX_STATUS xmlGetRouteAttr(char *attrName, char* attrValue);
367 extern PSX_STATUS xmlEndRouteObj(char *appName, char *objName);
368 extern PSX_STATUS xmlGetRouteEntryAttr(char *attrName, char* attrValue);
369 extern PSX_STATUS xmlEndRouteEntryObj(char *appName, char *objName);
370 extern PSX_STATUS xmlGetRipAttr(char *attrName, char* attrValue);
371 extern PSX_STATUS xmlStartRipObj(char *appName, char *objName);
372 extern PSX_STATUS xmlEndRipObj(char *appName, char *objName);
373 extern PSX_STATUS xmlGetRipIfcAttr(char *attrName, char* attrValue);
374 extern PSX_STATUS xmlEndRipIfcObj(char *appName, char *objName);
375 extern PSX_STATUS xmlGetRipIfcEntryAttr(char *attrName, char* attrValue);
376 extern PSX_STATUS xmlEndRipIfcEntryObj(char *appName, char *objName);
377
378 extern PSX_STATUS xmlGetPMapObjNode(char *appName, char *objName, char *attrName, char* attrValue);
379 extern PSX_STATUS xmlStartPMapObjNode(char *appName, char *objName);
380 extern PSX_STATUS xmlEndPMapObjNode(char *appName, char *objName);
381 extern PSX_STATUS xmlGetPMapAttr(char *attrName, char* attrValue);
382 extern PSX_STATUS xmlEndPMapObj(char *appName, char *objName);
383 extern PSX_STATUS xmlGetPMapEntryAttr(char *attrName, char* attrValue);
384 extern void xmlSetPMapIfcCfgAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
385                    const UINT16 length);
386 extern PSX_STATUS xmlGetPMapIfcCfgAttr(char *attrName, char* attrValue);
387 extern PSX_STATUS xmlStartPMapIfcCfgObj(char *appName, char *objName);
388 extern PSX_STATUS xmlEndPMapIfcCfgObj(char *appName, char *objName);
389 extern PSX_STATUS xmlEndPMapEntryObj(char *appName, char *objName);
390
391 extern PSX_STATUS xmlGetDdnsObjNode(char *appName, char *objName, char *attrName, char* attrValue);
392 extern PSX_STATUS xmlStartDdnsObjNode(char *appName, char *objName);
393 extern PSX_STATUS xmlEndDdnsObjNode(char *appName, char *objName);
394 extern PSX_STATUS xmlGetDdnsAttr(char *attrName, char* attrValue);
395 extern PSX_STATUS xmlEndDdnsObj(char *appName, char *objName);
396 extern PSX_STATUS xmlGetDdnsEntryAttr(char *attrName, char* attrValue);
397 extern PSX_STATUS xmlEndDdnsEntryObj(char *appName, char *objName);
398 extern PSX_STATUS xmlGetAtmCfgNode(char *appName, char *objName, char *attrName,
399                                    char* attrValue);
400 extern PSX_STATUS xmlStartAtmCfgNode(char *appName, char *objName);
401 extern PSX_STATUS xmlEndAtmCfgNode(char *appName, char *objName);
402 extern PSX_STATUS xmlGetAtmInitAttr(char *attrName, char* attrValue);
403 extern PSX_STATUS xmlStartAtmInitObj(char *appName, char *objName);
404 extern PSX_STATUS xmlEndAtmInitObj(char *appName, char *objName);
405
406 extern PSX_STATUS xmlGetAdslNode(char *appName, char *objName, char *attrName,
407                                  char* attrValue);
408 extern PSX_STATUS xmlGetAdslAttr(char *attrName, char* attrValue);
409 extern PSX_STATUS xmlStartAdslObj(char *appName, char *objName);
410 extern PSX_STATUS xmlEndAdslObj(char *appName, char *objName);
411
412 extern PSX_STATUS xmlGetSntpNode(char *appName, char *objName, char *attrName,
413                                  char* attrValue);
414 extern PSX_STATUS xmlGetSntpAttr(char *attrName, char* attrValue);
415 extern PSX_STATUS xmlStartSntpObj(char *appName, char *objName);
416 extern PSX_STATUS xmlEndSntpObj(char *appName, char *objName);
417 extern PSX_STATUS xmlGetToDObjNode(char *appName, char *objName, char *attrName, char* attrValue);
418 extern PSX_STATUS xmlStartToDObjNode(char *appName, char *objName);
419 extern PSX_STATUS xmlEndToDObjNode(char *appName, char *objName);
420 extern PSX_STATUS xmlGetToDAttr(char *attrName, char* attrValue);
421 extern PSX_STATUS xmlEndToDObj(char *appName, char *objName);
422 extern PSX_STATUS xmlGetToDEntryAttr(char *attrName, char* attrValue);
423 extern PSX_STATUS xmlEndToDEntryObj(char *appName, char *objName);
424 extern PSX_STATUS xmlSetVoiceNode(FILE* file, const char *appName, const UINT16 id,
425                                   const PSI_VALUE value, const UINT16 length);
426
427 extern PSX_STATUS xmlGetVoiceNode(char *appName, char *objName, char *attrName, char* attrValue);
428 extern PSX_STATUS xmlStartVoiceNode(char *appName, char *objName);
429 extern PSX_STATUS xmlEndVoiceNode(char *appName, char *objName);
430 extern void  xmlSetMgcpAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
431                             const UINT16 length);
432 extern void  xmlSetSipAttr(FILE* file, const char *appName, const UINT16 id,
433                            const PSI_VALUE value, const UINT16 length);
434 extern PSX_STATUS xmlStartMgcpObjNode(char *appName, char *objName);
435 extern PSX_STATUS xmlEndMgcpObjNode(char *appName, char *objName);
436 extern PSX_STATUS xmlGetMgcpAttr(char *attrName, char* attrValue);
437 extern PSX_STATUS xmlStartSipObjNode(char *appName, char *objName);
438 extern PSX_STATUS xmlEndSipObjNode(char *appName, char *objName);
439 extern PSX_STATUS xmlGetSipAttr(char *attrName, char* attrValue);
440
441 extern PSX_STATUS xmlGetEthAttr(char *attrName, char* attrValue);
442 extern PSX_STATUS xmlSetIppNode(FILE* file, const char *appName, const UINT16 id,
443                                 const PSI_VALUE value, const UINT16 length);
444 extern PSX_STATUS xmlGetIppNode(char *appName, char *objName, char *attrName, char* attrValue);
445 extern PSX_STATUS xmlGetIppAttr(char *attrName, char* attrValue);
446 extern PSX_STATUS xmlStartIppObj(char *appName, char *objName);
447 extern PSX_STATUS xmlEndIppObj(char *appName, char *objName);
448 extern PSX_STATUS xmlSetIPSecNode(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value, const UINT16 length);
449 extern PSX_STATUS xmlGetIPSecNode(char *appName, char *objName, char *attrName, char* attrValue);
450 extern PSX_STATUS xmlStartIPSecNode(char *appName, char *objName);
451 extern PSX_STATUS xmlEndIPSecNode(char *appName, char *objName);
452 extern PSX_STATUS xmlSetCertNode(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value, const UINT16 length);
453 extern PSX_STATUS xmlGetCertNode(char *appName, char *objName, char *attrName, char* attrValue);
454 extern PSX_STATUS xmlStartCertNode(char *appName, char *objName);
455 extern PSX_STATUS xmlEndCertNode(char *appName, char *objName);
456
457
458 extern char *xmlWirelessGetPhyType(void);
459 extern int xmlWirelessGetCoreRev(void);
460 extern int xmlWirelessGetBands(void);
461 extern int xmlWirelessGetValidBand(int band);
462
463
464 extern PSX_STATUS xmlGetPortMirrorCfgAttr(char *attrName, char* attrValue) ;
465 extern PSX_STATUS xmlEndPortMirrorCfgObj(char *appName, char *objName) ;
466 extern void xmlSetPortMirrorStatusAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value, const UINT16 length) ;
467 extern PSX_STATUS xmlGetPortMirrorStatusAttr(char *attrName, char* attrValue) ;
468 extern PSX_STATUS xmlStartPortMirrorStatusAttr(char *appName, char *objName) ;
469 extern PSX_STATUS xmlEndPortMirrorStatusAttr(char *appName, char *objName) ;
470 extern void xmlSetPortMirrorCfgEntryAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value, const UINT16 length) ;
471 extern PSX_STATUS xmlGetPortMirrorCfgEntryAttr(char *attrName, char* attrValue) ;
472 extern PSX_STATUS xmlEndPortMirrorCfgEntryAttrObj(char *appName, char *objName) ;
473 extern PSX_STATUS xmlSetPortMirrorObjNode (FILE* file, const char *appName, const UINT16 id, const PSI_VALUE value, const UINT16 length) ;
474 extern PSX_STATUS xmlGetPortMirrorObjNode(char *appName, char *objName, char *attrName, char* attrValue) ;
475 extern PSX_STATUS xmlStartPortMirrorObjNode(char *appName, char *objName) ;
476 extern PSX_STATUS xmlEndPortMirrorObjNode(char *appName, char *objName) ;
477
478 extern int base64Encode(const void *inp, int insize, char **outptr);
479 extern void base64Decode(unsigned char *dest, char *src, int *rawLength);
480 #if defined(__cplusplus)
481 }
482 #endif
483
484 #endif /* __PSIXML_H__ */