ovsdb: Add ovsdb IDL compiler to build system.
[cascardo/ovs.git] / ovsdb / ovsdb-idlc.1
1 .\" -*- nroff -*-
2 .TH ovsdb\-idlc 1 "November 2009" "Open vSwitch" "Open vSwitch Manual"
3 .ds PN ovsdb\-idlc
4 .
5 .SH NAME
6 ovsdb\-idlc \- Open vSwitch IDL (Interface Definition Language) compiler
7 .
8 .SH SYNOPSIS
9 \fBovsdb\-idlc \fBvalidate\fI schema\fR
10 .br
11 \fBovsdb\-idlc \fBovsdb\-schema\fI schema\fR
12 .br
13 \fBovsdb\-idlc \fBc\-idl\-header\fI schema\fR
14 .br
15 \fBovsdb\-idlc \fBc\-idl\-source\fI schema\fR
16 .br
17 \fBovsdb\-idlc --help\fR
18 .br
19 \fBovsdb\-idlc --version\fR
20 .
21 .SH DESCRIPTION
22 The \fBovsdb\-idlc\fR program is a command-line tool for translating
23 Open vSwitch database interface definition language (IDL) schemas into
24 other formats.  It is used while building Open vSwitch, not at
25 installation or configuration time.  Thus, it is not normally
26 installed as part of Open vSwitch.
27 .
28 .PP
29 The \fIschema\fR files used as \fBovsdb\-idlc\fR input have the same
30 format as the OVSDB schemas, specified in the OVSDB specification,
31 with a few additions:
32 .
33 .IP "\fB//\fR comments"
34 Lines that begin with \fB//\fR (two forward slashes) are ignored and
35 thus can be used for comments.
36 .
37 .IP "\fB""\fBkeyRefTable\fR"" member of <type>"
38 A <type> whose \fBkey\fR is \fB"uuid"\fR may have an additional member
39 named \fB"keyRefTable"\fR, whose value is a table name.  This
40 expresses the constraint that keys of the given <type> are UUIDs that
41 reference rows in the named table.  This allows the IDL to supply a
42 structure pointer in place of a raw UUID in its marshalled version of
43 the given type.
44 .
45 .IP "\fB""valueRefTable""\fR member of <type>"
46 Analogous to \fB"keyRefTable"\fR in meaning and effect, except that it
47 applies to the \fB"value"\fR member of the <type>.
48 .SS "Commands"
49 .
50 .IP "\fBvalidate\fI schema\fR"
51 Reads \fIschema\fR and checks its format, without producing any output.
52 .
53 .IP "\fBovsdb\-schema\fI schema\fR"
54 Reads \fIschema\fR and prints it on standard output with the parts
55 that are not part of the OVSDB schema specification stripped out.
56 .
57 .IP "\fBc\-idl\-header\fI schema\fR"
58 Reads \fIschema\fR and prints on standard output a C header file that
59 defines a structure for each table defined by the schema.
60 .
61 .IP "\fBc\-idl\-source\fI schema\fR"
62 Reads \fIschema\fR and prints on standard output a C source file that
63 implements C bindings for the database defined by the schema.
64 .
65 .SS "Options"
66 .so lib/common.man
67 .
68 .SH "BUGS"
69 \fBovsdb\-idlc\fR is more lenient about the format of OVSDB schemas
70 than other OVSDB tools, so the \fBovsdb\-schema\fR command may output
71 schemas that other programs refuse to read.
72 .
73 .SH "SEE ALSO"
74 The OVSDB specification.