VirtualBox

source: vbox/trunk/src/VBox/NetworkServices/NAT/pxremap.h@ 78395

Last change on this file since 78395 was 76576, checked in by vboxsync, 6 years ago

NetworkServices: scm header guard alignment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.7 KB
Line 
1/* $Id: pxremap.h 76576 2019-01-01 06:05:25Z vboxsync $ */
2/** @file
3 * NAT Network - Loopback remapping, declarations and definitions.
4 */
5
6/*
7 * Copyright (C) 2013-2019 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 VBOX_INCLUDED_SRC_NAT_pxremap_h
19#define VBOX_INCLUDED_SRC_NAT_pxremap_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include "lwip/err.h"
25#include "lwip/ip_addr.h"
26
27struct netif;
28
29
30#define PXREMAP_FAILED (-1)
31#define PXREMAP_ASIS 0
32#define PXREMAP_MAPPED 1
33
34/* IPv4 */
35#if ARP_PROXY
36int pxremap_proxy_arp(struct netif *netif, ip_addr_t *dst);
37#endif
38int pxremap_ip4_divert(struct netif *netif, ip_addr_t *dst);
39int pxremap_outbound_ip4(ip_addr_t *dst, ip_addr_t *src);
40int pxremap_inbound_ip4(ip_addr_t *dst, ip_addr_t *src);
41
42/* IPv6 */
43int pxremap_proxy_na(struct netif *netif, ip6_addr_t *dst);
44int pxremap_ip6_divert(struct netif *netif, ip6_addr_t *dst);
45int pxremap_outbound_ip6(ip6_addr_t *dst, ip6_addr_t *src);
46int pxremap_inbound_ip6(ip6_addr_t *dst, ip6_addr_t *src);
47
48#define pxremap_outbound_ipX(is_ipv6, dst, src) \
49 ((is_ipv6) ? pxremap_outbound_ip6(&(dst)->ip6, &(src)->ip6) \
50 : pxremap_outbound_ip4(&(dst)->ip4, &(src)->ip4))
51
52#endif /* !VBOX_INCLUDED_SRC_NAT_pxremap_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