Kea
2.7.7
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
a
b
c
d
e
f
h
i
k
m
n
o
p
r
s
t
u
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Typedefs
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
v
w
y
Enumerations
a
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
y
Related Symbols
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
y
Functions
a
b
c
d
e
g
h
i
l
m
n
p
q
r
s
u
v
w
y
Variables
b
c
d
e
f
h
l
n
o
p
q
r
s
t
u
y
Typedefs
Enumerations
Enumerator
d
s
Macros
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
y
▼
Kea
►
Kea Developer's Guide
►
Kea Bootp Hooks Library
►
Kea Flexible Option Hooks Library
►
Kea PerfMon Hooks Library
►
libkea-d2srv - Kea D2 Server Library
►
libkea-kea_tcp - TCP Listener Library
Todo List
►
Topics
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
src
▼
bin
►
agent
►
d2
►
dhcp4
►
dhcp6
▼
lfc
lfc_controller.cc
►
lfc_controller.h
►
lfc_log.cc
lfc_log.h
►
lfc_messages.cc
lfc_messages.h
►
main.cc
►
netconf
►
perfdhcp
►
hooks
►
lib
►
File Members
lfc/main.cc
Go to the documentation of this file.
1
// Copyright (C) 2015-2021 Internet Systems Consortium, Inc. ("ISC")
2
//
3
// This Source Code Form is subject to the terms of the Mozilla Public
4
// License, v. 2.0. If a copy of the MPL was not distributed with this
5
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7
#include <config.h>
8
#include <
lfc/lfc_controller.h
>
9
#include <
exceptions/exceptions.h
>
10
#include <
log/logger_support.h
>
11
#include <
log/logger_manager.h
>
12
#include <boost/exception/diagnostic_information.hpp>
13
#include <boost/exception_ptr.hpp>
14
#include <iostream>
15
#include <sys/resource.h>
16
17
using namespace
std;
18
using namespace
isc::lfc
;
19
26
int
main
(
int
argc,
char
* argv[]) {
27
int
ret = EXIT_SUCCESS;
28
try
{
29
// Ask scheduling to not give too much resources to LFC.
30
// First parameter means to change only the process priority.
31
// Second parameter (0) means the calling process.
32
// Third parameter 4 is a bit below the default priority of 0 in
33
// a range of -20 (highest priority) and 19 or 20 (lowest priority).
34
static_cast<
void
>
(setpriority(PRIO_PROCESS, 0, 4));
35
36
LFCController
lfc_controller;
37
38
// Launch the controller passing in command line arguments.
39
// Exit program with the controller's return code.
40
41
// 'false' value disables test mode.
42
lfc_controller.
launch
(argc, argv,
false
);
43
44
}
catch
(
const
boost::exception& ex) {
45
std::cerr << boost::diagnostic_information(ex) << std::endl;
46
ret = EXIT_FAILURE;
47
}
catch
(
const
std::exception& ex) {
48
std::cerr <<
"Service failed: "
<< ex.what() << std::endl;
49
ret = EXIT_FAILURE;
50
}
catch
(...) {
51
std::cerr <<
"Service failed"
<< std::endl;
52
ret = EXIT_FAILURE;
53
}
54
55
return
(ret);
56
}
26
int
main
(
int
argc,
char
* argv[]) {
…
}
isc::lfc::LFCController
Process controller for LFC process.
Definition
lfc_controller.h:37
isc::lfc::LFCController::launch
void launch(int argc, char *argv[], const bool test_mode)
Acts as the primary entry point to start execution of the process.
Definition
lfc_controller.cc:59
exceptions.h
main
int main(int argc, char *argv[])
This file contains the entry point (main() function) for the standard LFC process,...
Definition
lfc/main.cc:26
lfc_controller.h
logger_manager.h
logger_support.h
Logging initialization functions.
isc::lfc
Definition
lfc_controller.cc:41
src
bin
lfc
main.cc
Generated on Thu Mar 13 2025 17:22:01 for Kea by
1.12.0