# BRCM_VERSION=3
[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 "wldefs.h"
31 #include "nanoxml.h"
32
33 //Added by echo
34 //#define BUG
35 #ifdef BUG
36 #define DB_BUG(a,...) printf(a,...)
37 #else
38 #define DB_BUG(a,...) 
39 #endif
40
41 #define PSX_NAME_LEN                   16
42 #define PSX_MAGIC_LEN                  16
43 #define PSX_MAGIC_VALUE                "-$-PSI-$02.12r01"
44 #define PSX_CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */
45 #define PSX_CRC32_GOOD_VALUE 0xdebb20e3 /* Good final CRC32 checksum value */
46 #define PSX_STR_LEN                    50 
47 #define PSX_VERIFY                     1
48 #define PSX_STORE                      0
49 #define PSX_TABLE_TYPE                 2
50 #define PSX_APP_TYPE                   1
51 #define PSX_OBJ_TYPE                   0
52
53 #define MONDAY        0x1
54 #define TUESDAY       0x2
55 #define WEDNSDAY      0x4
56 #define THURSDAY      0x8
57 #define FRIDAY        0x10
58 #define SATURDAY      0x20
59 #define SUNDAY        0x40
60
61 /* important limitation: when adding the appName or objectName in either direction, it is 
62 important not to have appName and objName having the same prefix.   The table entry search
63 only compare strings up to the prefix length, case not sensitive, to cover situation
64 such as APP_ID wan_vpi_vci, only wan is searched in the table.    Therefore, it is not
65 okay to have Lan as the appId, and objectName as lanSomethingSomething.    The search
66 entry would think lanSomethingSomething is an appId name. */
67
68 #define APPNAME_WAN_PREFIX           "wan"
69 #define APPNAME_IPSRV_PREFIX         "ipsrv"
70 #define APPNAME_PPPSRV_PREFIX        "pppsrv"
71 #define APPNAME_PPP_FORMAT           "pppsrv_%d_%d"
72 #define APPNAME_IPSRV_ENTRY_FORMAT   "ipsrv_%d_%d"
73 #define OBJNAME_LAN_ENTRY_FORMAT     "entry%d"   /* cannot be lan, need to change */
74 #define OBJNAME_PPP_ENTRY_FORMAT     "ppp_conId%d"
75 #define OBJNAME_IPSRV_ENTRY_FORMAT   "dhcpc_conId%d"
76 #define OBJNAME_WAN_ENTRY_FORMAT     "entry%d"   /* cannot be wan, need to change */
77 #define OBJNAME_GEN_ENTRY_FORMAT     "entry" 
78
79 #define XML_PSI_START_TAG      "<psitree>"
80 #define XML_PSI_END_TAG        "</psitree>"
81
82 #define XML_PORT_RANGE_MIN     1
83 #define XML_PORT_RANGE_MAX     65535
84 #define XML_MAX_SNMP_STR_LEN   31         /* Tommy, 15->31 */
85 #define XML_MAX_TOD_ENTRY      16
86
87 /* string  */
88 #define PSX_ATTRNAME_SET       1
89 #define PSX_ATTRSTR_SET        2
90
91 typedef enum {
92    PSX_STS_OK = 0,
93    PSX_STS_ERR_GENERAL,
94    PSX_STS_ERR_MEMORY,
95    PSX_STS_ERR_FIND_APP,
96    PSX_STS_ERR_FIND_OBJ,
97    PSX_STS_ERR_FIND_HDL_FNC,
98    PSX_STS_ERR_FATAL,
99    PSX_STS_ERR_MILD
100 } PSX_STATUS;
101
102 /* internal callback statemachine */
103 typedef enum {
104    state_start,
105    state_psi_begin,  
106    state_psi_end
107 } xml_state;
108
109
110 typedef struct xmlParseState {
111    xml_state state;
112    char appName[32];
113    PSI_HANDLE appHandle;
114    char objName[32];
115    char attrName[32];
116    char tableName[32];
117    int tableSize;
118    int tableIndex;
119    PSX_STATUS errorFlag;
120    int verify;                    /* verify=1 verifcation only, verfify=0 conversion only */
121 } XML_PARSE_STATE, *pXML_PARSE_STATE;
122
123 typedef PSX_STATUS (*PSX_SET_OBJ_FNC) (FILE *file, const char *appName, const UINT16 id,
124                                        const PSI_VALUE value, const UINT16 length);
125 typedef PSX_STATUS (*PSX_GET_OBJ_FNC) (char *appName, char *objName, char *attrName,
126                                        char* attrValue);
127 typedef void (*PSX_SET_ATTR_FNC) (FILE *file, const char *name, const UINT16 id,
128                                   const PSI_VALUE value, const UINT16 length);
129
130 typedef PSX_STATUS (*PSX_GET_ATTR_FNC) (char *attrName, char *attrValue);
131 typedef PSX_STATUS (*PSX_OBJ_FNC) (char *appName,  char *objName);
132
133
134
135 typedef struct {
136    char  appName[PSX_NAME_LEN];
137    PSX_SET_OBJ_FNC setObjFnc;
138    PSX_GET_OBJ_FNC getObjFnc;     /* base on appName, find the object's getObjFnc */
139    PSX_OBJ_FNC startObjFnc;       /* base on appName, find the object's startObjFnc */
140    PSX_OBJ_FNC endObjFnc;         /* base on appName, find the object's endObjFnc */
141 } PSX_APP_ITEM, *PPSX_APP_ITEM;
142
143 typedef struct {
144    char  objName[PSX_NAME_LEN];
145    PSX_SET_ATTR_FNC setAttrFnc;
146    PSX_GET_ATTR_FNC getAttrFnc;  /* getting object from XML file, do verification/store */
147    PSX_OBJ_FNC startObjFnc;     /* beginning of object, resource allocated */
148    PSX_OBJ_FNC endObjFnc;       /* end of object, do verification/storeToPSI, oresource deallocated */
149 } PSX_OBJ_ITEM, *PPSX_OBJ_ITEM;
150
151 /* object and attribute names definitions */
152 #define PSX_ATTR_STATE             "state"
153 /* system info */
154 #define PSX_OBJ_SYS_USER_NAME      "sysUserName"
155 #define PSX_OBJ_SYS_PASSWORD       "sysPassword"
156 #define PSX_OBJ_SYS_AUTH_TIME      "sysAuthTime"
157 #define PSX_OBJ_SPT_USER_NAME      "sptUserName"
158 #define PSX_OBJ_ETHCFG             "ethCfg"
159 #define PSX_OBJ_SPT_PASSWORD       "sptPassword"
160 #define PSX_OBJ_USR_USER_NAME      "usrUserName"
161 #define PSX_OBJ_USR_PASSWORD       "usrPassword"
162 #define PSX_OBJ_DEF_GATEWAY        "defaultGateway"
163 #define PSX_OBJ_DNS                "dns"
164 #define PSX_OBJ_SYSLOG             "sysLog"
165 #define PSX_OBJ_SNMP               "snmp"
166 #define PSX_OBJ_PROTOCOL           "protocol"
167 #define PSX_OBJ_ACTIVE_SERVICE     "activeService"
168 #define PSX_OBJ_UPNP               "upnp"
169
170 #define PSX_OBJ_MGCP_CFG           "mgcpCfg"
171 #define PSX_OBJ_SIP_CFG            "sipCfg"
172
173
174 #define PSX_ATTR_DNS_PRIMARY       "primary"
175 #define PSX_ATTR_DNS_SECONDARY     "secondary"
176 #define PSX_ATTR_DNS_DYNAMIC       "dynamic"
177
178 #define PSX_ATTR_SYSLOG_DISPLAY_LEVEL "displayLevel"
179 #define PSX_ATTR_SYSLOG_LOG_LEVEL     "logLevel"
180 #define PSX_ATTR_SYSLOG_OPTION        "option"
181 #define PSX_ATTR_SYSLOG_SERVER_IP     "serverIP"
182 #define PSX_ATTR_SYSLOG_SERVER_PORT   "serverPort"
183
184 #define PSX_ATTR_PMAP_IFC_NAME        "pmapIfName"
185 #define PSX_ATTR_PMAP_IFC_STATUS      "pmapIfcStatus"
186
187 #define PSX_ATTR_VOICE_MGCP_TAG            "mgcpCfg"
188 #define PSX_ATTR_VOICE_MGCP_CA_ADDR        "caAddr"
189 #define PSX_ATTR_VOICE_MGCP_GW_NAME        "gwName"
190 #define PSX_ATTR_VOICE_MGCP_IF_NAME        "ifName"
191 #define PSX_ATTR_VOICE_MGCP_PREF_CODEC     "prefCodec"
192 /* Tommy */
193 #define PSX_ATTR_VOICE_MGCP_COUNTRY        "country"
194 #define PSX_ATTR_VOICE_MGCP_AALN           "aaln"
195 #define PSX_ATTR_VOICE_MGCP_CA_PORT        "caPort"
196 #define PSX_ATTR_VOICE_MGCP_CLIENT_PORT    "clientPort"
197 #define PSX_ATTR_VOICE_MGCP_TX_GAIN        "txGain"
198 #define PSX_ATTR_VOICE_MGCP_RX_GAIN        "rxGain"
199 #define PSX_ATTR_VOICE_MGCP_PSTN_CODE      "pstnCode"
200 #define PSX_ATTR_VOICE_MGCP_HB_TIMER       "hbTimer"
201 #define PSX_ATTR_VOICE_MGCP_EMERGENCY      "emergency"
202 /*#define PSX_ATTR_VOICE_MGCP_EMERGENCY0     "emergency0"
203 #define PSX_ATTR_VOICE_MGCP_EMERGENCY1     "emergency1"
204 #define PSX_ATTR_VOICE_MGCP_EMERGENCY2     "emergency2"
205 #define PSX_ATTR_VOICE_MGCP_EMERGENCY3     "emergency3"
206 #define PSX_ATTR_VOICE_MGCP_EMERGENCY4     "emergency4"
207 #define PSX_ATTR_VOICE_MGCP_EMERGENCY5     "emergency5"
208 #define PSX_ATTR_VOICE_MGCP_EMERGENCY6     "emergency6"
209 #define PSX_ATTR_VOICE_MGCP_EMERGENCY7     "emergency7"
210 #define PSX_ATTR_VOICE_MGCP_EMERGENCY8     "emergency8"
211 #define PSX_ATTR_VOICE_MGCP_EMERGENCY9     "emergency9"*/
212
213 #define PSX_ATTR_VOICE_SIP_TAG             "sipCfg"
214 #define PSX_ATTR_VOICE_SIP_PROXY_ADDR      "proxyAddr"
215 #define PSX_ATTR_VOICE_SIP_PROXY_PORT      "proxyPort"
216 #define PSX_ATTR_VOICE_SIP_REGISTRAR_ADDR  "registrarAddr"
217 #define PSX_ATTR_VOICE_SIP_REGISTRAR_PORT  "registrarPort"
218 #define PSX_ATTR_VOICE_SIP_LOG_ADDR        "logAddr"
219 #define PSX_ATTR_VOICE_SIP_LOG_PORT        "logPort"
220 #define PSX_ATTR_VOICE_SIP_EXT1            "ext1"
221 #define PSX_ATTR_VOICE_SIP_PASSWORD1       "password1"
222 #define PSX_ATTR_VOICE_SIP_EXT2            "ext2"
223 #define PSX_ATTR_VOICE_SIP_PASSWORD2       "password2"
224 #define PSX_ATTR_VOICE_SIP_EXT3            "ext3"
225 #define PSX_ATTR_VOICE_SIP_PASSWORD3       "password3"
226 #define PSX_ATTR_VOICE_SIP_EXT4            "ext4"
227 #define PSX_ATTR_VOICE_SIP_PASSWORD4       "password4"
228 #define PSX_ATTR_VOICE_SIP_IF_NAME         "ifName"
229 #define PSX_ATTR_VOICE_SIP_AUTH_NAME       "authName"
230
231 #define PSX_ATTR_ETH_CFG_SPEED        "speed"
232 #define PSX_ATTR_ETH_CFG_TYPE         "type"
233 #define PSX_ATTR_ETH_CFG_MTU          "MTU"
234 #define PSX_ATTR_IPP_MAKE             "make"
235 #define PSX_ATTR_IPP_DEV              "dev"
236 #define PSX_ATTR_IPP_NAME             "name"
237 #if defined(__cplusplus)
238 extern "C" {
239 #endif
240 extern PSX_STATUS xmlSetObjNode(FILE* file, const char *appName, const UINT16 id,
241                          const PSI_VALUE value, const UINT16 length);
242 extern PSX_STATUS xmlSetSysObjNode(FILE* file, const char *appName, const UINT16 id,
243                             const PSI_VALUE value, const UINT16 length);
244 extern PSX_STATUS xmlSetRouteObjNode(FILE* file, const char *appName, const UINT16 id,
245                             const PSI_VALUE value, const UINT16 length);
246 extern PSX_STATUS xmlSetPMapObjNode(FILE* file, const char *appName, const UINT16 id,
247                             const PSI_VALUE value, const UINT16 length);
248 extern PSX_STATUS xmlSetLanNode(FILE* file, const char *appName, const UINT16 id,
249                          const PSI_VALUE value, const UINT16 length);
250 extern PSX_STATUS xmlSetWirelessNode(FILE* file, const char *appName, const UINT16 id,
251                               const PSI_VALUE value, const UINT16 length);
252 extern PSX_STATUS xmlSetWanNode(FILE* file, const char *appName, const UINT16 id,
253                          const PSI_VALUE value, const UINT16 length);
254 extern PSX_STATUS xmlSetAtmTdNode(FILE* file, const char *appName, const UINT16 id,
255                            const PSI_VALUE value, const UINT16 length);
256 extern PSX_STATUS xmlSetAtmVccNode(FILE* file, const char *appName, const UINT16 id,
257                             const PSI_VALUE value, const UINT16 length);
258 extern PSX_STATUS xmlSetAtmCfgNode(FILE* file, const char *appName, const UINT16 id,
259                             const PSI_VALUE value, const UINT16 length);
260 extern PSX_STATUS xmlSetSecObjNode(FILE* file, const char *appName, const UINT16 id,
261                             const PSI_VALUE value, const UINT16 length);
262 extern PSX_STATUS xmlSetAdslObjNode(FILE* file, const char *appName, const UINT16 id,
263                              const PSI_VALUE value, const UINT16 length);
264 extern PSX_STATUS xmlSetSntpNode(FILE* file, const char *appName, const UINT16 id,
265                           const PSI_VALUE value, const UINT16 length);
266 extern PSX_STATUS xmlSetToDNode(FILE* file, const char *appName, const UINT16 id,
267                          const PSI_VALUE value, const UINT16 length);
268 extern PSX_STATUS xmlSetDhcpClntNode(FILE* file, const char *appName, const UINT16 id,
269                               const PSI_VALUE value, const UINT16 length);
270 extern PSX_STATUS xmlSetSpiNode(FILE* file, const char *appName, const UINT16 id,
271                                 const PSI_VALUE value, const UINT16 length);
272 extern PSX_STATUS xmlSetPppNode(FILE* file, const char *appName, const UINT16 id,
273                          const PSI_VALUE value, const UINT16 length);
274 extern PSX_STATUS xmlSetDatetimeObjNode(FILE *file, const char *appName, const UINT16 id,
275                                         const PSI_VALUE value, const UINT16 length);
276 extern PSX_STATUS  xmlSetRadiusObjNode(FILE *file, const char *appName, const UINT16 id,
277                                       const PSI_VALUE value, const UINT16 length);
278 extern PSX_STATUS xmlSetDdnsNode(FILE* file, const char *appName, const UINT16 id,
279                           const PSI_VALUE value, const UINT16 length);
280 extern void  xmlSetAuthTimeAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
281                       const UINT16 length);
282
283 extern void  xmlSetActiveSvrAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
284                       const UINT16 length);
285
286 extern void xmlSetStrObjAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
287                       const UINT16 length);
288 extern void xmlSetSysLogAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
289                       const UINT16 length);
290 extern void xmlSetDftGwAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
291                      const UINT16 length);
292 extern void xmlSetDnsAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
293                    const UINT16 length);
294 extern void xmlSetOtherSysAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
295                         const UINT16 length);
296 extern void xmlSetSnmpAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
297                     const UINT16 length);
298 extern void xmlSetRouteAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
299                            const UINT16 length);
300 extern void xmlSetRipIfcAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
301                       const UINT16 length);
302 extern void xmlSetRipAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
303                    const UINT16 length);
304 extern void xmlSetPMapAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
305                    const UINT16 length);
306 extern void xmlSetLanAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
307                    const UINT16 length);
308 extern void xmlWlSetWebAttr(FILE *file, PWIRELESS_VAR wlVars);
309 extern void xmlWlSetEncrytionAttr(FILE *file, PWIRELESS_VAR wlVars);
310 extern void xmlWlSetEncryptionStrengthAttr(FILE *file, PWIRELESS_VAR wlVars);
311 extern void xmlWlSetRadiusServerAttr(FILE *file, PWIRELESS_VAR wlVars);
312 extern void xmlSetWirelessVarsAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
313                            const UINT16 length);
314
315 extern void xmlSetWirelessMacFilterAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value
316                            ,const UINT16 length);
317 extern void xmlSetRadiusAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
318                                          const UINT16 length);
319 extern void xmlSetAtmInitAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
320                        const UINT16 length);
321 extern void xmlSetAtmPortAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
322                        const UINT16 length);
323 extern void xmlSetAtmTdNumAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
324                         const UINT16 length);
325 extern void xmlSetAtmTdTblAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
326                         const UINT16 length);
327 extern void xmlSetAtmIfcAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
328                       const UINT16 length);
329 extern void xmlSetAtmVccNumAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
330                          const UINT16 length);
331 extern void xmlSetAtmVccTblAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
332                         const UINT16 length);
333 extern void xmlSetDmzHostAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
334                        const UINT16 length);
335 extern void xmlSetServiceCtrlAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
336                            const UINT16 length);
337 extern void xmlSetVirtualSrvAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
338                       const UINT16 length);
339 extern void xmlSetIpFilterAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
340                       const UINT16 length);
341 extern void xmlSetPrtTriggerAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
342                           const UINT16 length);
343 extern void xmlSetMacFilterAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
344                          const UINT16 length);
345 extern void xmlSetAccessControlAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
346                              const UINT16 length);
347 extern void xmlSetAccessControlModeAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
348                                  const UINT16 length);
349 extern void xmlSetQosAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
350                    const UINT16 length);
351 extern void xmlSetToDCntrlAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
352                         const UINT16 length);
353 extern void xmlSetDdnsAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
354                     const UINT16 length);
355 extern void xmlSetEthAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
356                    const UINT16 length);
357 extern PSX_STATUS xmlParse(char *xmlBuffer, int xmlSize, int verify);
358 extern void xmlTagBegin(nxml_t handle, const char *tag_name, unsigned len);
359 extern void xmlTagEnd(nxml_t handle, const char *tag_name, unsigned len);
360 extern void xmlAttrBegin(nxml_t handle, const char *tag_name, unsigned len);
361 extern void xmlAttrValue(nxml_t handle, const char *tag_name, unsigned len);
362 extern void xmlData(nxml_t handle, const char *tag_name, unsigned len);
363 extern PSX_STATUS xmlGetObjNode(char *appName, char *objTagName,
364                                 char *attrName, char *value);
365 extern PSX_STATUS xmlVerifyObjNode(char *appName, char *objTagName,
366                             char *attrName, char *value);
367 extern PSX_STATUS xmlStartObjNode(char *appName, char *objTagName);
368 extern PSX_STATUS xmlEndObjNode(char *appName, char *objTagName);
369
370 extern PSX_STATUS xmlGetSysObjNode(char *appName, char *objName, char *attrName, char* attrValue);
371 extern PSX_STATUS xmlStartSysObjNode(char *appName, char *objName);
372 extern PSX_STATUS xmlEndSysObjNode(char *appName, char *objName);
373 extern PSX_STATUS xmlGetSysUserNameAttr(char *attrName, char* attrValue);
374 extern PSX_STATUS xmlGetSysPasswordAttr(char *attrName, char* attrValue);
375 extern PSX_STATUS xmlGetSysAuthTimeAttr(char *attrName, char* attrValue);
376 extern PSX_STATUS xmlGetActiveSvrAttr(char *attrName, char* attrValue);
377 extern PSX_STATUS xmlStartSysUserNamePasswordObj(char *appName, char *objName);
378 extern PSX_STATUS xmlEndSysUserNamePasswordObj(char *appName, char *objName);
379 extern PSX_STATUS xmlStartSysAuthTimeObj(char *appName, char *objName);
380 extern PSX_STATUS xmlEndSysAuthTimeObj(char *appName, char *objName);
381 extern PSX_STATUS xmlStartActiveSvrObj(char *appName, char *objName);
382 extern PSX_STATUS xmlEndActiveSvrObj(char *appName, char *objName);
383
384 extern PSX_STATUS xmlGetDftGwAttr(char *attrName, char* attrValue);
385 extern PSX_STATUS xmlStartDftGwObj(char *appName, char *objName);
386 extern PSX_STATUS xmlEndDftGwObj(char *appName, char *objName);
387 extern PSX_STATUS xmlGetDnsAttr(char *attrName, char* attrValue);
388 extern PSX_STATUS xmlStartDnsObj(char *appName, char *objName);
389 extern PSX_STATUS xmlEndDnsObj(char *appName, char *objName);
390 extern PSX_STATUS xmlGetSyslogAttr(char *attrName, char* attrValue);
391 extern PSX_STATUS xmlStartSyslogObj(char *appName, char *objName);
392 extern PSX_STATUS xmlEndSyslogObj(char *appName, char *objName);
393 extern PSX_STATUS xmlGetSnmpAttr(char *attrName, char* attrValue);
394 extern PSX_STATUS xmlStartSnmpObj(char *appName, char *objName);
395 extern PSX_STATUS xmlEndSnmpObj(char *appName, char *objName);
396 extern PSX_STATUS xmlGetOtherSysAttr(char *attrName, char* attrValue);
397 extern PSX_STATUS xmlStartOtherSysObj(char *appName, char *objName);
398 extern PSX_STATUS xmlEndOtherSysObj(char *appName, char *objName);
399 extern PSX_STATUS xmlGetAtmVccObjNode(char *appName, char *objName, char *attrName,
400                                       char* attrValue);
401 extern PSX_STATUS xmlGetAtmVccAttr(char *attrName, char* attrValue);
402 extern PSX_STATUS xmlStartAtmVccObjNode(char *appName, char *objName);
403 extern PSX_STATUS xmlEndAtmVccObjNode(char *appName, char *objName);
404 extern PSX_STATUS xmlGetWanObjNode(char *appName, char *objName, char *attrName,
405                                    char* attrValue);
406 extern PSX_STATUS xmlGetWanAttr(char *attrName, char* attrValue);
407 extern PSX_STATUS xmlStartWanObjNode(char *appName, char *objName);
408 extern PSX_STATUS xmlEndWanObjNode(char *appName, char *objName);
409 extern PSX_STATUS xmlGetPppObjNode(char *appName, char *objName, char *attrName,
410                                    char* attrValue);
411 extern PSX_STATUS xmlGetDatetimeObjNode(char *appName, char *objName, char *attrName,
412                                         char *attrValue);
413 extern PSX_STATUS xmlGetRadiusObjNode(char *attrName,char *attrValue);
414 extern PSX_STATUS xmlGetPppAttr(char *attrName, char* attrValue);
415 extern PSX_STATUS xmlStartDatetimeObjNode(char *appName, char *attrValue);
416 extern PSX_STATUS xmlStartPppObjNode(char *appName, char *objName);
417 extern PSX_STATUS xmlEndPppObjNode(char *appName, char *objName);
418 extern PSX_STATUS xmlEndRadiusAttr(char *appName, char *objName);
419 extern PSX_STATUS xmlEndDatetimeObjNode(char *appName, char *objName);
420 extern PSX_STATUS xmlGetSecObjNode(char *appName, char *objName, char *attrName, char* attrValue);
421 extern PSX_STATUS xmlStartSecObjNode(char *appName, char *objName);
422 extern PSX_STATUS xmlEndSecObjNode(char *appName, char *objName);
423 extern PSX_STATUS xmlGetVrtSrvAttr(char *attrName, char* attrValue);
424 extern PSX_STATUS xmlEndVrtSrvObj(char *appName, char *objName);
425 extern PSX_STATUS xmlGetVrtSrvEntryAttr(char *attrName, char* attrValue);
426 extern PSX_STATUS xmlEndVrtSrvEntryObj(char *appName, char *objName);
427 extern PSX_STATUS xmlGetIpFilterAttr(char *attrName, char* attrValue);
428 extern PSX_STATUS xmlEndIpFilterObj(char *appName, char *objName);
429 extern PSX_STATUS xmlGetIpFilterEntryAttr(char *attrName, char* attrValue);
430 extern PSX_STATUS xmlEndIpFilterEntryObj(char *appName, char *objName);
431 extern PSX_STATUS xmlGetPrtTriggerAttr(char *attrName, char* attrValue);
432 extern PSX_STATUS xmlEndPrtTriggerObj(char *appName, char *objName);
433 extern PSX_STATUS xmlGetPrtTriggerEntryAttr(char *attrName, char* attrValue);
434 extern PSX_STATUS xmlEndPrtTriggerEntryObj(char *appName, char *objName);
435 extern PSX_STATUS xmlGetMacFilterAttr(char *attrName, char* attrValue);
436 extern PSX_STATUS xmlEndMacFilterObj(char *appName, char *objName);
437 extern PSX_STATUS xmlGetMacFilterEntryAttr(char *attrName, char* attrValue);
438 extern PSX_STATUS xmlEndMacFilterEntryObj(char *appName, char *objName);
439 extern PSX_STATUS xmlGetQosClsAttr(char *attrName, char* attrValue);
440 extern PSX_STATUS xmlEndQosClsObj(char *appName, char *objName);
441 extern PSX_STATUS xmlGetQosClsEntryAttr(char *attrName, char* attrValue);
442 extern PSX_STATUS xmlEndQosClsEntryObj(char *appName, char *objName);
443 extern PSX_STATUS xmlGetAccCntrlAttr(char *attrName, char* attrValue);
444 extern PSX_STATUS xmlEndAccCntrlObj(char *appName, char *objName);
445 extern PSX_STATUS xmlGetAccCntrlEntryAttr(char *attrName, char* attrValue);
446 extern PSX_STATUS xmlEndAccCntrlEntryObj(char *appName, char *objName);
447 extern PSX_STATUS xmlGetAccCntrlModeAttr(char *attrName, char* attrValue);
448 extern PSX_STATUS xmlStartAccCntrlModeObj(char *appName, char *objName);
449 extern PSX_STATUS xmlEndAccCntrlModeObj(char *appName, char *objName);
450 extern PSX_STATUS xmlGetDmzHostAttr(char *attrName, char* attrValue);
451 extern PSX_STATUS xmlStartDmzHostObj(char *appName, char *objName);
452 extern PSX_STATUS xmlEndDmzHostObj(char *appName, char *objName);
453 extern PSX_STATUS xmlGetServiceCtrlAttr(char *attrName, char* attrValue);
454 extern PSX_STATUS xmlStartServiceCtrlObj(char *appName, char *objName);
455 extern PSX_STATUS xmlEndServiceCtrlObj(char *appName, char *objName);
456 extern PSX_STATUS xmlGetDhcpClntNode(char *appName, char *objName, char *attrName,
457                                    char* attrValue);
458 extern PSX_STATUS xmlGetDhcpClntAttr(char *attrName, char* attrValue);
459 extern PSX_STATUS xmlStartDhcpClntNode(char *appName, char *objName);
460 extern PSX_STATUS xmlEndDhcpClntNode(char *appName, char *objName);
461 extern PSX_STATUS xmlGetAtmTdObjNode(char *appName, char *objName, char *attrName,
462                                    char* attrValue);
463 /*Added by echo for spi*/
464 extern PSX_STATUS xmlGetSpiNode(char *appName, char *objName, char *attrName,
465                                 char *attrValue);
466 extern PSX_STATUS xmlStartSpiNode(char *appName, char *objName);
467 extern PSX_STATUS xmlEndSpiNode(char *appName, char *objName);
468
469 extern PSX_STATUS xmlGetAtmTdAttr(char *attrName, char* attrValue);
470 extern PSX_STATUS xmlStartAtmTdObjNode(char *appName, char *objName);
471 extern PSX_STATUS xmlEndAtmTdObjNode(char *appName, char *objName);
472 extern PSX_STATUS xmlGetLanNode(char *appName, char *objName, char *attrName,
473                                 char* attrValue);
474 extern PSX_STATUS xmlGetLanAttr(char *attrName, char* attrValue);
475 extern PSX_STATUS xmlStartLanObj(char *appName, char *objName);
476 extern PSX_STATUS xmlEndLanObj(char *appName, char *objName);
477 extern PSX_STATUS xmlGetWirelessObjNode(char *appName, char *objName, char *attrName,
478                                         char* attrValue);
479 //for address translation
480 extern void xmlSetAddrTransAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value, const UINT16 length) ;
481 extern PSX_STATUS xmlGetAddrTransAttr(char *attrName, char *attrValue) ;
482 extern PSX_STATUS xmlGetAddrTransEntryAttr(char *attrName, char *attrValue) ;
483 extern PSX_STATUS xmlEndAddrTransObj(char *appName, char *objName) ;
484 extern PSX_STATUS xmlEndAddrTransEntryObj(char *appName, char *objName) ;
485
486 //for wireless repeater
487 extern void xmlSetWirelessWdsAttr(FILE *file, const char *name, const UINT16 id,
488                                 const PSI_VALUE value, const UINT16 length ) ;
489 extern PSX_STATUS xmlGetWirelessWdsAttr(char *attrName, char *attrValue) ;
490 extern PSX_STATUS xmlGetWirelessWdsEntryAttr(char *attrName, char *attrValue) ;
491 extern PSX_STATUS xmlEndWirelessWdsObj(char *appName, char *objName) ;
492 extern PSX_STATUS xmlEndWirelessWdsEntryObj(char *appName, char *objName) ;
493
494 extern PSX_STATUS xmlEndWirelessRadiusUserObject(char *appName, char *objName);
495 extern PSX_STATUS xmlGetRadiusEntryAttr(char *attrName, char *attrValue);
496 extern PSX_STATUS xmlEndRadiusEntryAttr(char *appName, char *objName);
497 extern PSX_STATUS xmlGetRadiusAttr(char *attrName, char *attrValue);
498
499 extern PSX_STATUS xmlStartWirelessObjNode(char *appName, char *objName);
500 extern PSX_STATUS xmlEndWirelessObjNode(char *appName, char *objName);
501 extern PSX_STATUS xmlGetWirelessVarsAttr(char *attrName, char* attrValue);
502 extern PSX_STATUS xmlStartWirelessVarsObj(char *appName, char *objName);
503 extern PSX_STATUS xmlEndWirelessVarsObj(char *appName, char *objName);
504 extern PSX_STATUS xmlGetWirelessMacFilterEntryAttr(char *attrName, char* attrValue);
505 extern PSX_STATUS xmlEndWirelessMacFilterEntryObj(char *appName, char *objName);
506 extern PSX_STATUS xmlGetWirelessMacFilterAttr(char *attrName, char* attrValue);
507 extern PSX_STATUS xmlEndWirelessMacFilterObj(char *appName, char *objName);
508 extern PSX_STATUS xmlGetRouteObjNode(char *appName, char *objName, char *attrName, char* attrValue);
509 extern PSX_STATUS xmlStartRouteObjNode(char *appName, char *objName);
510 extern PSX_STATUS xmlEndRouteObjNode(char *appName, char *objName);
511 extern PSX_STATUS xmlGetRouteAttr(char *attrName, char* attrValue);
512 extern PSX_STATUS xmlEndRouteObj(char *appName, char *objName);
513 extern PSX_STATUS xmlGetRouteEntryAttr(char *attrName, char* attrValue);
514 extern PSX_STATUS xmlEndRouteEntryObj(char *appName, char *objName);
515 extern PSX_STATUS xmlGetRipAttr(char *attrName, char* attrValue);
516 extern PSX_STATUS xmlStartRipObj(char *appName, char *objName);
517 extern PSX_STATUS xmlEndRipObj(char *appName, char *objName);
518 extern PSX_STATUS xmlGetRipIfcAttr(char *attrName, char* attrValue);
519 extern PSX_STATUS xmlEndRipIfcObj(char *appName, char *objName);
520 extern PSX_STATUS xmlGetRipIfcEntryAttr(char *attrName, char* attrValue);
521 extern PSX_STATUS xmlEndRipIfcEntryObj(char *appName, char *objName);
522 extern PSX_STATUS xmlGetDdnsNode(char *appName, char *objName, char *attrName, char* attrValue);
523 extern PSX_STATUS xmlStartDdnsObj(char *appName, char *objName);
524
525 extern PSX_STATUS xmlGetPMapObjNode(char *appName, char *objName, char *attrName, char* attrValue);
526 extern PSX_STATUS xmlStartPMapObjNode(char *appName, char *objName);
527 extern PSX_STATUS xmlEndPMapObjNode(char *appName, char *objName);
528 extern PSX_STATUS xmlGetPMapAttr(char *attrName, char* attrValue);
529 extern PSX_STATUS xmlEndPMapObj(char *appName, char *objName);
530 extern PSX_STATUS xmlGetPMapEntryAttr(char *attrName, char* attrValue);
531 extern void xmlSetPMapIfcCfgAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
532                    const UINT16 length);
533 extern PSX_STATUS xmlGetPMapIfcCfgAttr(char *attrName, char* attrValue);
534 extern PSX_STATUS xmlStartPMapIfcCfgObj(char *appName, char *objName);
535 extern PSX_STATUS xmlEndPMapIfcCfgObj(char *appName, char *objName);
536 extern PSX_STATUS xmlEndPMapEntryObj(char *appName, char *objName);
537
538 //extern PSX_STATUS xmlGetDdnsObjNode(char *appName, char *objName, char *attrName, char* attrValue);
539 //extern PSX_STATUS xmlStartDdnsObjNode(char *appName, char *objName);
540 //extern PSX_STATUS xmlEndDdnsObjNode(char *appName, char *objName);
541 extern PSX_STATUS xmlGetDdnsAttr(char *attrName, char* attrValue);
542 extern PSX_STATUS xmlEndDdnsObj(char *appName, char *objName);
543 //extern PSX_STATUS xmlGetDdnsEntryAttr(char *attrName, char* attrValue);
544 //extern PSX_STATUS xmlEndDdnsEntryObj(char *appName, char *objName);
545 extern PSX_STATUS xmlGetAtmCfgNode(char *appName, char *objName, char *attrName,
546                                    char* attrValue);
547 extern PSX_STATUS xmlStartAtmCfgNode(char *appName, char *objName);
548 extern PSX_STATUS xmlEndAtmCfgNode(char *appName, char *objName);
549 extern PSX_STATUS xmlGetAtmInitAttr(char *attrName, char* attrValue);
550 extern PSX_STATUS xmlStartAtmInitObj(char *appName, char *objName);
551 extern PSX_STATUS xmlEndAtmInitObj(char *appName, char *objName);
552
553 extern PSX_STATUS xmlGetAdslNode(char *appName, char *objName, char *attrName,
554                                  char* attrValue);
555 extern PSX_STATUS xmlGetAdslAttr(char *attrName, char* attrValue);
556 extern PSX_STATUS xmlStartAdslObj(char *appName, char *objName);
557 extern PSX_STATUS xmlEndAdslObj(char *appName, char *objName);
558
559 extern PSX_STATUS xmlGetSntpNode(char *appName, char *objName, char *attrName,
560                                  char* attrValue);
561 extern PSX_STATUS xmlGetSntpAttr(char *attrName, char* attrValue);
562 extern PSX_STATUS xmlStartSntpObj(char *appName, char *objName);
563 extern PSX_STATUS xmlEndSntpObj(char *appName, char *objName);
564 extern PSX_STATUS xmlGetToDObjNode(char *appName, char *objName, char *attrName, char* attrValue);
565 extern PSX_STATUS xmlStartToDObjNode(char *appName, char *objName);
566 extern PSX_STATUS xmlEndToDObjNode(char *appName, char *objName);
567 extern PSX_STATUS xmlGetToDAttr(char *attrName, char* attrValue);
568 extern PSX_STATUS xmlEndToDObj(char *appName, char *objName);
569 extern PSX_STATUS xmlGetToDEntryAttr(char *attrName, char* attrValue);
570 extern PSX_STATUS xmlEndToDEntryObj(char *appName, char *objName);
571 extern PSX_STATUS xmlSetVoiceNode(FILE* file, const char *appName, const UINT16 id,
572                                   const PSI_VALUE value, const UINT16 length);
573
574 extern PSX_STATUS xmlGetVoiceNode(char *appName, char *objName, char *attrName, char* attrValue);
575 extern PSX_STATUS xmlStartVoiceNode(char *appName, char *objName);
576 extern PSX_STATUS xmlEndVoiceNode(char *appName, char *objName);
577 extern void  xmlSetMgcpAttr(FILE *file, const char *name, const UINT16 id, const PSI_VALUE value,
578                             const UINT16 length);
579 extern void  xmlSetSipAttr(FILE* file, const char *appName, const UINT16 id,
580                            const PSI_VALUE value, const UINT16 length);
581 extern PSX_STATUS xmlStartMgcpObjNode(char *appName, char *objName);
582 extern PSX_STATUS xmlEndMgcpObjNode(char *appName, char *objName);
583 extern PSX_STATUS xmlGetMgcpAttr(char *attrName, char* attrValue);
584 extern PSX_STATUS xmlStartSipObjNode(char *appName, char *objName);
585 extern PSX_STATUS xmlEndSipObjNode(char *appName, char *objName);
586 extern PSX_STATUS xmlGetSipAttr(char *attrName, char* attrValue);
587
588 extern PSX_STATUS xmlGetEthAttr(char *attrName, char* attrValue);
589 extern PSX_STATUS xmlSetIppNode(FILE* file, const char *appName, const UINT16 id,
590                                 const PSI_VALUE value, const UINT16 length);
591 extern PSX_STATUS xmlGetIppNode(char *appName, char *objName, char *attrName, char* attrValue);
592 extern PSX_STATUS xmlGetIppAttr(char *attrName, char* attrValue);
593 extern PSX_STATUS xmlStartIppObj(char *appName, char *objName);
594 extern PSX_STATUS xmlEndIppObj(char *appName, char *objName);
595 #if defined(__cplusplus)
596 }
597 #endif
598
599 #endif /* __PSIXML_H__ */