1 | /* $Id: ClientDataInt.h 50213 2014-01-24 08:23:12Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * Config.h
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2013 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef __CLIENT_DATA_INT_H__
|
---|
19 | #define __CLIENT_DATA_INT_H__
|
---|
20 |
|
---|
21 | class ClientData
|
---|
22 | {
|
---|
23 | public:
|
---|
24 | ClientData()
|
---|
25 | {
|
---|
26 | m_address.u = 0;
|
---|
27 | m_network.u = 0;
|
---|
28 | fHasLease = false;
|
---|
29 | fHasClient = false;
|
---|
30 | fBinding = true;
|
---|
31 | u64TimestampBindingStarted = 0;
|
---|
32 | u64TimestampLeasingStarted = 0;
|
---|
33 | u32LeaseExpirationPeriod = 0;
|
---|
34 | u32BindExpirationPeriod = 0;
|
---|
35 | pCfg = NULL;
|
---|
36 |
|
---|
37 | }
|
---|
38 | ~ClientData(){}
|
---|
39 |
|
---|
40 | /* client information */
|
---|
41 | RTNETADDRIPV4 m_address;
|
---|
42 | RTNETADDRIPV4 m_network;
|
---|
43 | RTMAC m_mac;
|
---|
44 |
|
---|
45 | bool fHasClient;
|
---|
46 |
|
---|
47 | /* Lease part */
|
---|
48 | bool fHasLease;
|
---|
49 | /** lease isn't commited */
|
---|
50 | bool fBinding;
|
---|
51 |
|
---|
52 | /** Timestamp when lease commited. */
|
---|
53 | uint64_t u64TimestampLeasingStarted;
|
---|
54 | /** Period when lease is expired in secs. */
|
---|
55 | uint32_t u32LeaseExpirationPeriod;
|
---|
56 |
|
---|
57 | /** timestamp when lease was bound */
|
---|
58 | uint64_t u64TimestampBindingStarted;
|
---|
59 | /* Period when binding is expired in secs. */
|
---|
60 | uint32_t u32BindExpirationPeriod;
|
---|
61 |
|
---|
62 | MapOptionId2RawOption options;
|
---|
63 |
|
---|
64 | NetworkConfigEntity *pCfg;
|
---|
65 | };
|
---|
66 |
|
---|
67 | #endif
|
---|