Skip to content

Commit

Permalink
Rolling back addition of ethernet interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb James DeLisle committed Nov 12, 2012
1 parent 5ffed3f commit ffeb258
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 681 deletions.
40 changes: 0 additions & 40 deletions admin/Configurator.c
Expand Up @@ -172,45 +172,6 @@ static void tunInterface(Dict* ifaceConf, struct Allocator* tempAlloc, struct Co
rpcCall0(String_CONST("Core_initTunnel"), args, ctx, tempAlloc, false);
}

static void ethInterface(Dict* config, struct Context* ctx)
{
Dict* eth = Dict_getDict(config, String_CONST("ETHInterface"));

if (eth) {
// Setup the interface.
String* deviceStr = Dict_getString(eth, String_CONST("bind"));
Dict* d = Dict_new(ctx->alloc);
if (deviceStr) {
Dict_putString(d, String_CONST("bindDevice"), deviceStr, ctx->alloc);
}
rpcCall(String_CONST("ETHInterface_new"), d, ctx, ctx->alloc);

// Make the connections.
Dict* connectTo = Dict_getDict(eth, String_CONST("connectTo"));
if (connectTo) {
struct Dict_Entry* entry = *connectTo;
while (entry != NULL) {
String* key = (String*) entry->key;
if (entry->val->type != Object_DICT) {
Log_critical(ctx->logger, "interfaces.ETHInterface.connectTo: entry [%s] "
"is not a dictionary type.", key->bytes);
exit(-1);
}
Dict* value = entry->val->as.dictionary;

Log_keys(ctx->logger, "Attempting to connect to node [%s].", key->bytes);

struct Allocator* perCallAlloc = ctx->alloc->child(ctx->alloc);
Dict_putString(value, String_CONST("dstMac"), key, perCallAlloc);
rpcCall(String_CONST("ETHInterface_beginConnection"), value, ctx, perCallAlloc);
perCallAlloc->free(perCallAlloc);

entry = entry->next;
}
}
}
}

static void security(List* securityConf, struct Allocator* tempAlloc, struct Context* ctx)
{
bool noFiles = false;
Expand Down Expand Up @@ -254,7 +215,6 @@ void Configurator_config(Dict* config,

Dict* ifaces = Dict_getDict(config, String_CONST("interfaces"));
udpInterface(ifaces, &ctx);
ethInterface(ifaces, &ctx);

Dict* routerConf = Dict_getDict(config, String_CONST("router"));
Dict* iface = Dict_getDict(routerConf, String_CONST("interface"));
Expand Down
14 changes: 0 additions & 14 deletions admin/angel/cjdroute2.c
Expand Up @@ -31,7 +31,6 @@
#include "interface/TUNInterface.h"
#include "interface/TUNConfigurator.h"
#include "interface/UDPInterface_admin.h"
#include "interface/ETHInterface_admin.h"
#include "io/Reader.h"
#include "io/ArrayReader.h"
#include "io/ArrayWriter.h"
Expand Down Expand Up @@ -211,19 +210,6 @@ static int genconf(struct Random* rand)
" // Ask somebody who is already connected.\n"
" }\n"
" }\n"
"\n"
" /*\n"
" \"ETHInterface\":\n"
" {\n"
" // Bind to this device.\n"
" \"bind\": \"eth0\", \n"
" // Node(s) to connect to.\n"
" {\n"
" // Add connection credential here to join the network\n"
" // Ask your peer on the other side of the link.\n"
" }\n"
" }\n"
" */\n"
" },\n"
"\n"
" // Configuration for the router.\n"
Expand Down
2 changes: 0 additions & 2 deletions interface/CMakeLists.txt
Expand Up @@ -21,8 +21,6 @@ endif()
add_library(interface
UDPInterface.c
UDPInterface_admin.c
ETHInterface.c
ETHInterface_admin.c
${tunif}
TUNConfigurator_${SYSTEM}.c
InterfaceConnector.c
Expand Down
295 changes: 0 additions & 295 deletions interface/ETHInterface.c

This file was deleted.

0 comments on commit ffeb258

Please sign in to comment.