libptpmgmt 2.0
libptpmgmt library that provides the functionality of linuxptp pmc
Loading...
Searching...
No Matches
init.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-3.0-or-later
2 SPDX-FileCopyrightText: Copyright © 2021 Erez Geva <ErezGeva2@gmail.com> */
3
12#ifndef __PTPMGMT_INIT_H
13#define __PTPMGMT_INIT_H
14
15#ifdef __cplusplus
16#include "msg.h"
17#include "opt.h"
18#include "sock.h"
19
20__PTPMGMT_NAMESPACE_BEGIN
21
26class Init
27{
28 private:
29 ConfigFile m_cfg;
30 SaFile m_sa;
31 Message m_msg;
32 std::unique_ptr<SockBase> m_sk;
33 char m_net_select = 0;
34 bool m_use_uds = false;
35 uint8_t m_allow_unauth = 0;
36
37 public:
41 void close();
42
49 int process(const Options &opt);
50
55 const ConfigFile &cfg() const;
56
61 const SaFile &sa() const;
62
68
74 SockBase *sk() const;
75
84 char getNetSelect() const;
85
90 bool use_uds() const;
91
96 uint8_t allow_unauth() const;
97};
98
99__PTPMGMT_NAMESPACE_END
100#else /* __cplusplus */
101#include "c/init.h"
102#endif /* __cplusplus */
103
104#endif /* __PTPMGMT_INIT_H */
C interface to initialize a pmc application class.
Hold configuration parameters.
Definition cfg.h:34
Definition init.h:27
uint8_t allow_unauth() const
char getNetSelect() const
int process(const Options &opt)
const ConfigFile & cfg() const
const SaFile & sa() const
void close()
bool use_uds() const
SockBase * sk() const
Message & msg()
Handle PTP management message.
Definition msg.h:215
Definition opt.h:47
authentication security association file
Definition cfg.h:308
Base class for all sockets.
Definition sock.h:44
Create and parse PTP management messages.
Handle command line options.
Provide sockets to communicate with a PTP daemon.