20#ifndef NETWORKINGPLUGINCOMMON_H
21#define NETWORKINGPLUGINCOMMON_H
23#include <netinet/in.h>
25#define BRIDGE_NAME "dobby0"
28#define PEER_NAME "enp0s3"
30#define PEER_NAME "eth0"
37#define INADDR_CREATE(a, b, c, d) \
38 ( ((((in_addr_t)(a)) << 24) & 0xff000000) | \
39 ((((in_addr_t)(b)) << 16) & 0x00ff0000) | \
40 ((((in_addr_t)(c)) << 8) & 0x0000ff00) | \
41 ((((in_addr_t)(d)) << 0) & 0x000000ff) )
44#define INADDR_BRIDGE INADDR_CREATE( 100, 64, 11, 1 )
45#define INADDR_BRIDGE_NETMASK INADDR_CREATE( 255, 255, 255, 0 )
46#define INADDR_LO INADDR_CREATE( 127, 0, 0, 1 )
47#define INADDR_LO_NETMASK INADDR_CREATE( 255, 0, 0, 0 )
51#define BRIDGE_ADDRESS_RANGE "100.64.11.0"
52#define BRIDGE_ADDRESS "100.64.11.1"
53#define LOCALHOST "127.0.0.1"
60static const struct in6_addr IN6ADDR_BASE = {{
61 0x20, 0x80, 0xd0, 0xbb,
62 0x00, 0x1e, 0x00, 0x00,
63 0x00, 0x00, 0x00, 0x00,
64 0x00, 0x00, 0x00, 0x00,
68static const struct in6_addr IN6ADDR_ANY = {{
69 0x00, 0x00, 0x00, 0x00,
70 0x00, 0x00, 0x00, 0x00,
71 0x00, 0x00, 0x00, 0x00,
72 0x00, 0x00, 0x00, 0x00,
75#define BRIDGE_ADDRESS_RANGE_IPV6 "2080:d0bb:1e::6440:b00"
76#define BRIDGE_ADDRESS_IPV6 "2080:d0bb:1e::6440:b01"
77#define LOCALHOST_IPV6 "::1"
80enum class NetworkType { None, Nat, Open };