VirtualBox

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

Last change on this file since 74978 was 70836, checked in by vboxsync, 7 years ago

NetworkServices/Dhcpd: export fix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1/* $Id: Defs.h 70836 2018-01-31 14:55:44Z 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.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 _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 <memory>
27#include <vector>
28
29typedef std::vector<uint8_t> octets_t;
30
31typedef std::map<uint8_t, octets_t> rawopts_t;
32
33class DhcpOption;
34typedef std::map<uint8_t, std::shared_ptr<DhcpOption>> optmap_t;
35
36inline bool operator==(const RTMAC &l, const RTMAC &r)
37{
38 return memcmp(&l, &r, sizeof(RTMAC)) == 0;
39}
40
41inline bool operator<(const RTMAC &l, const RTMAC &r)
42{
43 return memcmp(&l, &r, sizeof(RTMAC)) < 0;
44}
45
46#if 1
47#define LogDHCP(args) LogRel(args)
48#else
49#define LogDHCP(args) RTPrintf args
50#endif
51
52#endif /* _DHCPD_DEFS_H_ */
Note: See TracBrowser for help on using the repository browser.

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