OpenSDN source code
thrift_xml_protocol.h
Go to the documentation of this file.
1
/*
2
* Copyright 2019, Juniper Networks Inc.
3
* Copyright Contributors to the OpenSDN project
4
*/
5
6
#ifndef _THRIFT_XML_PROTOCOL_H
7
#define _THRIFT_XML_PROTOCOL_H
8
9
#ifdef __cplusplus
10
extern
"C"
{
11
#endif
12
13
#ifndef __KERNEL__
14
15
#define TRUE 1
16
#define FALSE 0
17
18
#define MAX_XML_BUFFER_SIZE 256
19
#define MAX_XML_TAG_SIZE 128
20
#define MAX_TAG_STACK_SIZE 100
21
22
typedef
enum
{
23
TAG_SANDESH
,
24
TAG_FIELD
,
25
TAG_LIST
,
26
TAG_MAX
,
27
}
tag_type_t
;
28
29
typedef
struct
{
30
char
stack[
MAX_TAG_STACK_SIZE
][
MAX_XML_TAG_SIZE
];
31
int
tos
;
32
}
tag_stack_t
;
33
34
typedef
struct
{
35
/* Must be the first element */
36
ThriftProtocol
proto
;
37
/* Private data */
38
tag_stack_t
tag_stacks[
TAG_MAX
];
39
}
ThriftXMLProtocol
;
40
41
void
thrift_xml_protocol_init
(
ThriftProtocol
*protocol);
42
43
#endif
44
45
#ifdef __cplusplus
46
}
47
#endif
48
49
#endif
/* _THRIFT_XML_PROTOCOL_H */
ThriftXMLProtocol
Definition:
thrift_xml_protocol.h:34
ThriftXMLProtocol::proto
ThriftProtocol proto
Definition:
thrift_xml_protocol.h:36
_ThriftProtocol
Definition:
thrift_protocol.h:92
tag_stack_t
Definition:
thrift_xml_protocol.h:29
tag_stack_t::tos
int tos
Definition:
thrift_xml_protocol.h:31
tag_type_t
tag_type_t
Definition:
thrift_xml_protocol.h:22
TAG_FIELD
@ TAG_FIELD
Definition:
thrift_xml_protocol.h:24
TAG_MAX
@ TAG_MAX
Definition:
thrift_xml_protocol.h:26
TAG_SANDESH
@ TAG_SANDESH
Definition:
thrift_xml_protocol.h:23
TAG_LIST
@ TAG_LIST
Definition:
thrift_xml_protocol.h:25
MAX_XML_TAG_SIZE
#define MAX_XML_TAG_SIZE
Definition:
thrift_xml_protocol.h:19
MAX_TAG_STACK_SIZE
#define MAX_TAG_STACK_SIZE
Definition:
thrift_xml_protocol.h:20
thrift_xml_protocol_init
void thrift_xml_protocol_init(ThriftProtocol *protocol)
contrail
src
contrail-common
sandesh
library
c
protocol
thrift_xml_protocol.h
Generated by
1.9.1