VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/slirp/ctl.h

Last change on this file was 106061, checked in by vboxsync, 3 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1/* $Id: ctl.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * NAT - IP subnet constants.
4 */
5
6/*
7 * Copyright (C) 2006-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef _SLIRP_CTL_H_
29#define _SLIRP_CTL_H_
30
31#define CTL_CMD 0
32#define CTL_EXEC 1
33#define CTL_ALIAS 2
34#define CTL_DNS 3
35#define CTL_TFTP 4
36#define CTL_GUEST 15
37#define CTL_BROADCAST 255
38
39
40#define CTL_CHECK_NETWORK(x) (((x) & RT_H2N_U32(pData->netmask)) == pData->special_addr.s_addr)
41
42#define CTL_CHECK(x, ctl) ( ((RT_N2H_U32((x)) & ~pData->netmask) == (ctl)) \
43 && CTL_CHECK_NETWORK(x))
44
45#define CTL_CHECK_MINE(x) ( CTL_CHECK(x, CTL_ALIAS) \
46 || CTL_CHECK(x, CTL_DNS) \
47 || CTL_CHECK(x, CTL_TFTP))
48
49#define CTL_CHECK_BROADCAST(x) CTL_CHECK((x), ~pData->netmask)
50
51
52#endif /* _SLIRP_CTL_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