Structure of Configuration Files

Enhanced PTP User Guide (UG1602)

Document ID
UG1602
Release Date
2023-04-07
Revision
1.1 English

sfptpd configuration files use a simple INI file format. Options are grouped under labelled sections enclosed in square brackets. For example:

[general]

Sync modules are created in the [general] section.

Add a single sync_module option per type of sync module that is required. The first parameter identifies the type of sync module, and following parameters provide the name of each instance of the module.

The following example creates two PTP sync module instances, named ptp1 and ptp2:

sync_module ptp   ptp1   ptp2
             |     |      |
            type   |      |
                  name    |
                         name

A sync module can have generic options that apply to all instances of the sync_module type, and further instance-specific options that apply only to a specific instance of the sync_module:

  • Generic options are set in a section of the configuration file labeled with the type of sync module. For example:
    [ptp]
  • Instance-specific options are set in a section of the configuration file labeled with the instance name. For example:
    [ptp1]

Example of Structure

The following is an example of the structure in a configuration file:

[general]
# specify instances of the PTP sync module named ptp1 and ptp2
sync_module ptp ptp1 ptp2
# other generic sfptpd options
[ptp]
# generic PTP options, applied to all ptp instances
[ptp1]
# instance-specific PTP options, applied to the instance named ptp1
[ptp2]
# instance-specific PTP options, applied to the instance named ptp2