syslog-ng source
host-id.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Balabit
3  * Copyright (c) 2014 Laszlo Budai
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * As an additional exemption you are allowed to compile & link against the
20  * OpenSSL libraries as published by the OpenSSL project. See the file
21  * COPYING for details.
22  *
23  */
24 
25 #ifndef HOST_ID_H
26 #define HOST_ID_H
27 #include "persist-state.h"
29 
30 #define HOST_ID_PERSIST_KEY "host_id"
31 #define HOST_ID_LEGACY_PERSIST_KEY "hostid"
32 
33 typedef struct _HostIdState
34 {
36  guint32 host_id;
37 } HostIdState;
38 
39 gboolean host_id_init(PersistState *state);
40 void host_id_deinit(void);
41 guint32 host_id_get(void);
42 void host_id_append_formatted_id(GString *str, guint32 id);
43 
44 #endif
gboolean host_id_init(PersistState *state)
Definition: host-id.c:66
void host_id_deinit(void)
guint32 host_id_get(void)
Definition: host-id.c:111
void host_id_append_formatted_id(GString *str, guint32 id)
Definition: host-id.c:117
Definition: host-id.h:34
PersistableStateHeader header
Definition: host-id.h:35
guint32 host_id
Definition: host-id.h:36
Definition: persistable-state-header.h:31
struct @95 state