Protocols

Parses /etc/protocols

Author: Raphael Pinson rap.nosp@m.hink@gmai.nosp@m.l.com

Summary
ProtocolsParses /etc/protocols
ReferenceThis lens tries to keep as close as possible to `man 5 protocols` where possible.
LicenseThis file is licenced under the LGPL v2+, like the rest of Augeas.
Lens UsageTo be documented
Configuration filesThis lens applies to /etc/protocols.
ExamplesThe Test_Protocols file contains various examples and tests.
Augeas Lenses
entry
lnsThe protocols lens
Augeas Variables
filter

Reference

This lens tries to keep as close as possible to `man 5 protocols` where possible.

License

This file is licenced under the LGPL v2+, like the rest of Augeas.

Lens Usage

To be documented

Configuration files

This lens applies to /etc/protocols.  See filter.

Examples

The Test_Protocols file contains various examples and tests.

Augeas Lenses

entry

let entry = let protocol = [ label "protocol" . store protoname ] in let number = [ label "number" . store Rx.integer ] in let alias = [ label "alias" . store protoname ] in [ seq "protocol" . protocol . Sep.space . number . (Sep.space . Build.opt_list alias Sep.space)? . Util.comment_or_eol ]

lns

let lns = (Util.empty | Util.comment | entry)*

The protocols lens

Augeas Variables

filter

Provides unit tests and examples for the Protocols lens.
let entry = let protocol = [ label "protocol" . store protoname ] in let number = [ label "number" . store Rx.integer ] in let alias = [ label "alias" . store protoname ] in [ seq "protocol" . protocol . Sep.space . number . (Sep.space . Build.opt_list alias Sep.space)? . Util.comment_or_eol ]
let lns = (Util.empty | Util.comment | entry)*
The protocols lens
Close