aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-light/src/config')
-rw-r--r--hicn-light/src/config/configuration.c6
-rw-r--r--hicn-light/src/config/configurationListeners.c13
2 files changed, 9 insertions, 10 deletions
diff --git a/hicn-light/src/config/configuration.c b/hicn-light/src/config/configuration.c
index 865dbca4d..48c26b4a2 100644
--- a/hicn-light/src/config/configuration.c
+++ b/hicn-light/src/config/configuration.c
@@ -310,8 +310,8 @@ static void configuration_SendResponse(Configuration *config, struct iovec *msg,
}
connection_SendCommandResponse(conn, msg);
- //IoOperations *ops = connection_GetIoOperations(conn);
- //streamState_SendCommandResponse(ops, msg);
+ // IoOperations *ops = connection_GetIoOperations(conn);
+ // streamState_SendCommandResponse(ops, msg);
}
struct iovec *configuration_ProcessCreateTunnel(Configuration *config,
@@ -370,7 +370,7 @@ struct iovec *configuration_ProcessCreateTunnel(Configuration *config,
logger_Log(config->logger, LoggerFacility_Config, PARCLogLevel_Error,
__func__, "Unsupported tunnel protocol: GRE");
break;
-#if !defined(__APPLE__) && !defined(_WIN32)
+#if !defined(__APPLE__) && !defined(_WIN32) && defined(PUNTING)
case HICN_CONN:
ops = hicnTunnel_Create(config->forwarder, source, destination);
break;
diff --git a/hicn-light/src/config/configurationListeners.c b/hicn-light/src/config/configurationListeners.c
index 6539e8c9f..3024d7bba 100644
--- a/hicn-light/src/config/configurationListeners.c
+++ b/hicn-light/src/config/configurationListeners.c
@@ -42,7 +42,7 @@
static bool _setupHicnListenerOnInet4(Forwarder *forwarder,
const char *symbolic, Address *address) {
bool success = false;
-#if !defined(__APPLE__) && !defined(_WIN32)
+#if !defined(__APPLE__) && !defined(_WIN32) && defined(PUNTING)
ListenerOps *ops =
hicnListener_CreateInet(forwarder, (char *)symbolic, address);
if (ops != NULL) {
@@ -57,7 +57,7 @@ static bool _setupHicnListenerOnInet4(Forwarder *forwarder,
static bool _setupHicnListenerOnInet6(Forwarder *forwarder,
const char *symbolic, Address *address) {
bool success = false;
-#if !defined(__APPLE__) && !defined(_WIN32)
+#if !defined(__APPLE__) && !defined(_WIN32) && defined(PUNTING)
ListenerOps *ops =
hicnListener_CreateInet6(forwarder, (char *)symbolic, address);
if (ops != NULL) {
@@ -81,7 +81,7 @@ bool configurationListeners_Remove(const Configuration *config) {
bool _AddPuntingInet(const Configuration *config, Punting *punting,
unsigned ingressId) {
-#if !defined(__APPLE__) && !defined(_WIN32)
+#if !defined(__APPLE__) && !defined(_WIN32) && defined(PUNTING)
struct sockaddr *addr = parcNetwork_SockAddress("0.0.0.0", 1234);
if (addr == NULL) {
printf("Error creating address\n");
@@ -141,7 +141,7 @@ bool _AddPuntingInet(const Configuration *config, Punting *punting,
bool _AddPuntingInet6(const Configuration *config, Punting *punting,
unsigned ingressId) {
-#if !defined(__APPLE__) && !defined(_WIN32)
+#if !defined(__APPLE__) && !defined(_WIN32) && defined(PUNTING)
struct sockaddr *addr = parcNetwork_SockAddress("0::0", 1234);
if (addr == NULL) {
printf("Error creating address\n");
@@ -231,7 +231,6 @@ static bool _setupTcpListenerOnInet(Forwarder *forwarder, ipv4_addr_t *addr4,
static bool _setupUdpListenerOnInet(Forwarder *forwarder, ipv4_addr_t *addr4,
uint16_t *port) {
-
bool success = false;
struct sockaddr_in addr;
@@ -537,6 +536,6 @@ void configurationListeners_SetutpLocalIPv4(const Configuration *config,
uint16_t port) {
Forwarder *forwarder = configuration_GetForwarder(config);
in_addr_t addr = inet_addr("127.0.0.1");
- _setupUdpListenerOnInet(forwarder, (ipv4_addr_t *) &(addr), &port);
- _setupTcpListenerOnInet(forwarder, (ipv4_addr_t *) &(addr), &port);
+ _setupUdpListenerOnInet(forwarder, (ipv4_addr_t *)&(addr), &port);
+ _setupTcpListenerOnInet(forwarder, (ipv4_addr_t *)&(addr), &port);
}