VirtualBox

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

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

NetworkServices: scm --fix-header-guards. bugref:9344

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.6 KB
Line 
1/* $Id: pxremap.h 76525 2018-12-30 05:51:31Z vboxsync $ */
2/** @file
3 * NAT Network - Loopback remapping, declarations and definitions.
4 */
5
6/*
7 * Copyright (C) 2013-2017 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 _pxremap_h_
19#define _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 /* _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