Merge "master" branch into "db".
[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""\fBidlPrefix\fR"" member of <database-schema>"
38 This member, which is required, specifies a string that is prefixed to
39 top-level names in C bindings.  It should probably end in an
40 underscore.
41 .
42 .IP "\fB""\fBidlHeader\fR"" member of <database-schema>"
43 This member, which is required, specifies the name of the IDL header.
44 It will be output on an \fB#include\fR line in the source file
45 generated by the C bindings.  It should include the bracketing
46 \fB""\fR or \fB<>\fR.
47 .
48 .IP "\fB""\fBkeyRefTable\fR"" member of <type>"
49 A <type> whose \fBkey\fR is \fB"uuid"\fR may have an additional member
50 named \fB"keyRefTable"\fR, whose value is a table name.  This
51 expresses the constraint that keys of the given <type> are UUIDs that
52 reference rows in the named table.  This allows the IDL to supply a
53 structure pointer in place of a raw UUID in its marshalled version of
54 the given type.
55 .
56 .IP "\fB""valueRefTable""\fR member of <type>"
57 Analogous to \fB"keyRefTable"\fR in meaning and effect, except that it
58 applies to the \fB"value"\fR member of the <type>.
59 .SS "Commands"
60 .
61 .IP "\fBvalidate\fI schema\fR"
62 Reads \fIschema\fR and checks its format, without producing any output.
63 .
64 .IP "\fBovsdb\-schema\fI schema\fR"
65 Reads \fIschema\fR and prints it on standard output with the parts
66 that are not part of the OVSDB schema specification stripped out.
67 .
68 .IP "\fBc\-idl\-header\fI schema\fR"
69 Reads \fIschema\fR and prints on standard output a C header file that
70 defines a structure for each table defined by the schema.
71 .
72 .IP "\fBc\-idl\-source\fI schema\fR"
73 Reads \fIschema\fR and prints on standard output a C source file that
74 implements C bindings for the database defined by the schema.
75 .
76 .SS "Options"
77 .so lib/common.man
78 .
79 .SH "BUGS"
80 \fBovsdb\-idlc\fR is more lenient about the format of OVSDB schemas
81 than other OVSDB tools, so the \fBovsdb\-schema\fR command may output
82 schemas that other programs refuse to read.
83 .
84 .SH "SEE ALSO"
85 The OVSDB specification.