Debian Codegraph @

include/toolsysinfo.h

raw symbols SCIP
1 // ****************************************************************************
2 // Project: libguytools
3 // ****************************************************************************
4 // Programmer: Guy Voncken
5 // Police Grand-Ducale
6 // Service de Police Judiciaire
7 // Section Nouvelles Technologies
8 // ****************************************************************************
9 // Module: System information
10 // ****************************************************************************
11
12 // Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
13 // 2018, 2019
14 // Guy Voncken
15 //
16 // This file is part of libguytools.
17 //
18 // libguytools is free software: you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation, either version 2 of the License, or
21 // (at your option) any later version.
22 //
23 // libguytools is distributed in the hope that it will be useful,
24 // but WITHOUT ANY WARRANTY; without even the implied warranty of
25 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 // GNU General Public License for more details.
27 //
28 // You should have received a copy of the GNU General Public License
29 // along with libguytools. If not, see <http://www.gnu.org/licenses/>.
30
31 #ifndef __TOOLSYSINFO_H__
32 #define __TOOLSYSINFO_H__
33
34 // ------------------------------
35 // Constants and Structures
36 // ------------------------------
37
38 const int TOOLSYSINFO_MACADDRLEN_VAL = 6;
39 const int TOOLSYSINFO_MACADDRLEN_STR = 2*TOOLSYSINFO_MACADDRLEN_VAL;
40
41 typedef struct
42 {
43 unsigned char AddrVal [TOOLSYSINFO_MACADDRLEN_VAL ];
44 char AddrStr [TOOLSYSINFO_MACADDRLEN_STR+1];
45 } t_ToolSysInfoMacAddr, *t_pToolSysInfoMacAddr;
46
47 // ------------------------------
48 // Functions
49 // ------------------------------
50
51 APIRET ToolSysInfoGetMacAddr (t_pToolSysInfoMacAddr pMacAddr);
52 APIRET ToolSysInfoUname (QString &Uname);
53
54 APIRET ToolSysInfoInit (void);
55 APIRET ToolSysInfoDeInit (void);
56
57
58 // ------------------------------
59 // Error codes
60 // ------------------------------
61
62 enum
63 {
64 TOOLSYSINFO_ALREADY_INITIALISED = ERROR_BASE_TOOL_SYSINFO + 1,
65 TOOLSYSINFO_ERROR_SOCKET,
66 TOOLSYSINFO_ERROR_NO_ADDR,
67 TOOLSYSINFO_ERROR_UNAME
68 };
69
70 #endif
71