VirtualBox

source: vbox/trunk/src/VBox/NetworkServices/Dhcpd/Defs.h@ 75614

最後變更 在這個檔案從75614是 75614,由 vboxsync 提交於 6 年 前

Main/DHCPD: bugref:9288 Use new implementation of DHCP server (VCC 10 and GCC 4.4.4 support).

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 1.4 KB
 
1/* $Id: Defs.h 75614 2018-11-20 11:41:35Z vboxsync $ */
2/** @file
3 * DHCP server - common definitions
4 */
5
6/*
7 * Copyright (C) 2017-2018 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.alldomusa.eu.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 _DHCPD_DEFS_H_
19#define _DHCPD_DEFS_H_
20
21#include <iprt/stdint.h>
22#include <iprt/string.h>
23#include <VBox/log.h>
24
25#include <map>
26#include <vector>
27
28#if __cplusplus >= 199711
29#include <memory>
30using std::shared_ptr;
31#else
32#include <tr1/memory>
33using std::tr1::shared_ptr;
34#endif
35
36#ifdef _MSC_VER
37# define __func__ __FUNCTION__
38#endif
39
40typedef std::vector<uint8_t> octets_t;
41
42typedef std::map<uint8_t, octets_t> rawopts_t;
43
44class DhcpOption;
45typedef std::map<uint8_t, std::shared_ptr<DhcpOption> > optmap_t;
46
47inline bool operator==(const RTMAC &l, const RTMAC &r)
48{
49 return memcmp(&l, &r, sizeof(RTMAC)) == 0;
50}
51
52inline bool operator<(const RTMAC &l, const RTMAC &r)
53{
54 return memcmp(&l, &r, sizeof(RTMAC)) < 0;
55}
56
57#if 1
58#define LogDHCP LogRel
59#else
60#define LogDHCP(args) RTPrintf args
61#endif
62
63#endif /* _DHCPD_DEFS_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette