.TH ser2net.yaml 5 06/02/01 "Serial to network proxy configuration file" .SH NAME /etc/ser2net/ser2net.yaml \- Serial to network proxy configuration file .SH DESCRIPTION ser2net used to be a program for connection network connections to serial ports. It's now a program for connecting accepter gensio to connecting gensios. See gensio(5) for details on gensios. ser2net is configured with YAML, which is flexible and easy to use. Look at yaml documentation on the internet for how that works. However, there are two types of YAML files that ser2net can use: version 1 and version 2. Version 1 YAML files have more capability than version 2 files, but they are non-standard YAML, a standard YAML parser cannot read them. ser2net will autodetect the version based upon what it finds. In version 2, you can have multiple documents in a file and ser2net will read all of them. YAML separates documents in a file with a single "---" by itself at the beginning of a line. Though you can only have one set of defaults, defines, connections, etc. in a document, you can have multiple documents in a file to allow more than one. You might, for instance, group all the connections with a certain set of defaults into its own document. .SH DEFINE SPECIFICATION YAML has the ability to create aliases that can be used elsewhere in the configuration file. These can be used for tying things together between parts of the file, or (as an extension to YAML) for string substitution. You define an alias in version 1 with the following: .IP define: &aliasname alias text .PP This will create an alias with the given name. Then you can use it elsewhere like: .IP banner: *aliasname .PP and the banner will be "alias text". Unlike standard YAML, you can also use this inside strings using .IP *(aliasname) .PP so if you have .IP banner: My banner *(aliasname) is here .PP The banner will be "My banner alias text is here". See the YAML documentation for how spaces are handled, but as a note, use quotes if you are not sure, like: .IP define: &aliasname "alias text" .br banner: "My banner *(aliasname) is here" .PP If you for some reason need "*(" in your text, use "*(*" for that. For version 2 YAML files, the definition is: .IP defines: .br aliasname: alias text .br aliasname2: alias text 2 .PP where you can list as many aliases as you like. In version 2, you always refer to an alias with "=" instead of "*", like: .IP .br banner: "My banner =(aliasname) is here" .PP and if you for some reason need "=(" in your text, use "=(=" for that. In version 2, per standard YAML, you can only have one defines section, so they must all be together. .SH INCLUDING OTHER FILES A YAML file may include another file at the main level, with: .IP include: .PP This filename can include globs, and all referenced files are included. These must be full yaml files, but are included in context at this point, with all the defines, connection names, etc. This can let you have individual connections in individual files to ease management. In version 2, You can only have one include in each document for legal YAML, so if you need multiple includes you will have to have multiple documents. .SH USING EXTERNAL FILES You may want to store passwords and such in external files for better security. For version 1, putting "*{filename}" in a YAML scalar will put the file's contents into the scalar at that point. If you need a "*{" in the string for some reason, use "*{*". For version 2, use "={filename}" instead. And "={=" to include a "={" in a file. .SH CONNECTION SPECIFICATION A connection is a structure that describes how to connect an accepting gensio to a connecting gensio. An connection specification in version 1 starts with: .RS connection: & .RS .RE .RE In version 2, it's specified as: .RS connections: .RS : .RS .RE .RE .RE In version 2, all the connections must occur together in one place. The of a connection is the same for version 1 and version 2: .RS accepter: .br timeout: .br enable: on|off .br connector: .br options: .RS