forked from richardcochran/linuxptp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: introduce a new API for reading configuration settings.
This patch introduces generic code for adding and parsing new options. The public 'get' methods return option values directly. Although the API is easy to use, it does not provide error checking in case the option does not exist or if there is a type mismatch. Therefore the code performs a BIST to ensure that the options are properly populated. In addition, the code terminates the program in case of missing options or type mismatches. This heavy handed approach is meant to catch errors during development and should never trigger during normal usage. As a first element, we include an option for specifying the UDP TTL. Users are required to call 'config_init', and so this patch add that into all three programs, ptp4l, phc2sys and pmc. Signed-off-by: Richard Cochran <[email protected]>
- Loading branch information
1 parent
8f5344e
commit e7dbc06
Showing
6 changed files
with
272 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.