Commit e4bba403 authored by Aurélien Delrieu's avatar Aurélien Delrieu

Remove useless emu and interco ifaces from core

parent 93e56996
......@@ -53,7 +53,6 @@
* @param channelID the Id of the new channel
* @param input true if the channel accept incoming data
* @param output true if channel send data
* @param local_interface_name.c_str() the name of the local network interface to use
* @param port the port on which the channel is bind
* @param multicast true is this is a multicast channel
* @param local_ip_addr the host IP address
......@@ -70,7 +69,6 @@ UdpChannel::UdpChannel(string name,
unsigned int channel_id,
bool input,
bool output,
const string local_interface_name,
unsigned short port,
bool multicast,
const string local_ip_addr,
......@@ -88,7 +86,6 @@ UdpChannel::UdpChannel(string name,
stacked_ip(""),
max_stack(stack)
{
int ifIndex;
struct ip_mreq imr;
unsigned char ttl = 1;
int one = 1;
......@@ -122,17 +119,6 @@ UdpChannel::UdpChannel(string name,
goto error;
}
// get the index of the network interface
ifIndex = this->getIfIndex(local_interface_name.c_str());
if(ifIndex < 0)
{
LOG(this->log_init, LEVEL_ERROR,
"cannot get the index for %s\n",
local_interface_name.c_str());
goto error;
}
// Set destination characteristics to send the datagramms
if(this->isOutputOk())
{
......@@ -315,46 +301,6 @@ bool UdpChannel::isOutputOk()
return (m_output);
}
/**
* Get the index of a network interface
* @param name the name of the interface
* @return the index of the interface if successful, -1 otherwise
*/
int UdpChannel::getIfIndex(const char *name)
{
int sock;
ifreq ifr;
int index = -1;
// open the network interface socket
sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
if(sock < 0)
{
LOG(this->log_sat_carrier, LEVEL_ERROR,
"cannot create an INET socket: "
"(%s:%d)\n", strerror(errno), errno);
goto exit;
}
// get the network interface index
bzero(&ifr, sizeof(ifreq));
strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1);
if(ioctl(sock, SIOGIFINDEX, &ifr) < 0)
{
LOG(this->log_sat_carrier, LEVEL_ERROR,
"cannot get the network interface "
"index: %s (%d)\n", strerror(errno), errno);
goto close;
}
index = ifr.ifr_ifindex;
close:
close(sock);
exit:
return index;
}
/**
* Return the network socket of the udp channel
* @return the network socket of the udp channel
......
......@@ -65,7 +65,6 @@ class UdpChannel
spot_id_t s_id,
unsigned int channel_id,
bool input, bool output,
const string local_interface_name,
unsigned short port,
bool multicast,
const string local_ip_addr,
......@@ -95,8 +94,6 @@ class UdpChannel
int receive(NetSocketEvent *const event,
unsigned char **buf, size_t &data_len);
int getIfIndex(const char *name);
int getChannelFd();
spot_id_t getSpotId();
......
......@@ -46,7 +46,6 @@
struct ic_specific
{
string interconnect_iface; // Interconnect interface name
string interconnect_addr; // Interconnect interface IP address
};
......@@ -77,7 +76,6 @@ class BlockInterconnectDownward: public Block
Upward(const string &name, struct ic_specific specific):
RtUpward(name),
InterconnectChannelReceiver(name + ".Upward",
specific.interconnect_iface,
specific.interconnect_addr)
{};
......@@ -93,7 +91,6 @@ class BlockInterconnectDownward: public Block
Downward(const string &name, struct ic_specific specific):
RtDownward(name),
InterconnectChannelSender(name + ".Downward",
specific.interconnect_iface,
specific.interconnect_addr)
{};
......@@ -142,7 +139,6 @@ class BlockInterconnectUpward: public Block
Upward(const string &name, struct ic_specific specific):
RtUpward(name),
InterconnectChannelSender(name + ".Upward",
specific.interconnect_iface,
specific.interconnect_addr)
{};
......@@ -158,7 +154,6 @@ class BlockInterconnectUpward: public Block
Downward(const string &name, struct ic_specific specific):
RtDownward(name),
InterconnectChannelReceiver(name + ".Downward",
specific.interconnect_iface,
specific.interconnect_addr)
{};
......
......@@ -48,7 +48,6 @@ void InterconnectChannelSender::initUdpChannels(unsigned int data_port, unsigned
0, // no use for the spot ID
false,
true,
this->interconnect_iface,
data_port,
false, // this socket is not multicast
this->interconnect_addr,
......@@ -61,7 +60,6 @@ void InterconnectChannelSender::initUdpChannels(unsigned int data_port, unsigned
0, // no use for the spot ID
false,
true,
this->interconnect_iface,
sig_port,
false, // this socket is not multicast
this->interconnect_addr,
......@@ -174,7 +172,6 @@ void InterconnectChannelReceiver::initUdpChannels(unsigned int data_port, unsign
0, // no use for the spot ID
true,
false,
this->interconnect_iface,
data_port,
false, // this socket is not multicast
this->interconnect_addr,
......@@ -187,7 +184,6 @@ void InterconnectChannelReceiver::initUdpChannels(unsigned int data_port, unsign
0, // no use for the spot ID
true,
false,
this->interconnect_iface,
sig_port,
false, // this socket is not multicast
this->interconnect_addr,
......
......@@ -59,9 +59,8 @@ typedef struct
class InterconnectChannel
{
public:
InterconnectChannel(string name, string iface_name, string iface_addr):
InterconnectChannel(string name, string iface_addr):
name(name),
interconnect_iface(iface_name),
interconnect_addr(iface_addr),
data_channel(NULL),
sig_channel(NULL)
......@@ -96,8 +95,6 @@ class InterconnectChannel
unsigned int wmem) = 0;
/// This blocks name
string name;
/// The interconnect interface name
string interconnect_iface;
/// The interconnect interface IP address
string interconnect_addr;
/// The data channel
......@@ -111,8 +108,8 @@ class InterconnectChannel
class InterconnectChannelSender: public InterconnectChannel
{
public:
InterconnectChannelSender(string name, string iface_name, string iface_addr):
InterconnectChannel(name, iface_name, iface_addr)
InterconnectChannelSender(string name, string iface_addr):
InterconnectChannel(name, iface_addr)
{
};
......@@ -170,8 +167,8 @@ class InterconnectChannelSender: public InterconnectChannel
class InterconnectChannelReceiver: public InterconnectChannel
{
public:
InterconnectChannelReceiver(string name, string iface_name, string iface_addr):
InterconnectChannel(name, iface_name, iface_addr)
InterconnectChannelReceiver(string name, string iface_addr):
InterconnectChannel(name, iface_addr)
{
};
......
......@@ -161,8 +161,7 @@ bool BlockSatCarrier::Upward::onInit(void)
UdpChannel *channel;
// initialize all channels from the configuration file
if(!this->in_channel_set.readInConfig(this->ip_addr,
this->interface_name))
if(!this->in_channel_set.readInConfig(this->ip_addr))
{
LOG(this->log_init, LEVEL_ERROR,
"Wrong channel set configuration\n");
......@@ -194,8 +193,7 @@ bool BlockSatCarrier::Upward::onInit(void)
bool BlockSatCarrier::Downward::onInit()
{
// initialize all channels from the configuration file
if(!this->out_channel_set.readOutConfig(this->ip_addr,
this->interface_name))
if(!this->out_channel_set.readOutConfig(this->ip_addr))
{
LOG(this->log_init, LEVEL_ERROR,
"Wrong channel set configuration\n");
......
......@@ -46,7 +46,6 @@ struct sc_specific
{
tal_id_t tal_id; ///< the terminal id for terminal
string ip_addr; ///< the IP address for emulation
string emu_iface; ///< the name of the emulation interface
};
/**
......@@ -74,7 +73,6 @@ class BlockSatCarrier: public Block
Upward(const string &name, struct sc_specific specific):
RtUpward(name),
ip_addr(specific.ip_addr),
interface_name(specific.emu_iface),
tal_id(specific.tal_id),
in_channel_set(specific.tal_id)
{};
......@@ -85,8 +83,6 @@ class BlockSatCarrier: public Block
private:
/// the IP address for emulation newtork
string ip_addr;
/// the interface name for emulation newtork
string interface_name;
/// the terminal id for the emulation newtork
tal_id_t tal_id;
/// List of input channels
......@@ -111,7 +107,6 @@ class BlockSatCarrier: public Block
Downward(const string &name, struct sc_specific specific):
RtDownward(name),
ip_addr(specific.ip_addr),
interface_name(specific.emu_iface),
tal_id(specific.tal_id),
out_channel_set(specific.tal_id)
{};
......@@ -122,8 +117,6 @@ class BlockSatCarrier: public Block
private:
/// the IP address for emulation newtork
string ip_addr;
/// the interface name for emulation newtork
string interface_name;
/// the terminal id for the emulation newtork
tal_id_t tal_id;
/// List of output channels
......
......@@ -59,7 +59,6 @@ sat_carrier_channel_set::~sat_carrier_channel_set()
bool sat_carrier_channel_set::readConfig(const string local_ip_addr,
const string interface_name,
bool in)
{
......@@ -355,7 +354,6 @@ bool sat_carrier_channel_set::readConfig(const string local_ip_addr,
carrier_id,
is_input,
is_output,
interface_name,
carrier_port,
carrier_multicast,
local_ip_addr,
......@@ -379,16 +377,14 @@ error:
return false;
}
bool sat_carrier_channel_set::readInConfig(const string local_ip_addr,
const string interface_name)
bool sat_carrier_channel_set::readInConfig(const string local_ip_addr)
{
return this->readConfig(local_ip_addr, interface_name, true);
return this->readConfig(local_ip_addr, true);
}
bool sat_carrier_channel_set::readOutConfig(const string local_ip_addr,
const string interface_name)
bool sat_carrier_channel_set::readOutConfig(const string local_ip_addr)
{
return this->readConfig(local_ip_addr, interface_name, false);
return this->readConfig(local_ip_addr, false);
}
bool sat_carrier_channel_set::send(uint8_t carrier_id,
......
......@@ -61,21 +61,17 @@ class sat_carrier_channel_set: public std::vector < UdpChannel * >
* Read data from the configuration file and create input channels
*
* @param local_ip_addr The IP address for emulation network
* @param interface_name The interface name for emulation network
* @return true on success, false otherwise
*/
bool readInConfig(const string local_ip_addr,
const string interface_name);
bool readInConfig(const string local_ip_addr);
/**
* Read data from the configuration file and create output channels
*
* @param local_ip_addr The IP address for emulation network
* @param interface_name The interface name for emulation network
* @return true on success, false otherwise
*/
bool readOutConfig(const string local_ip_addr,
const string interface_name);
bool readOutConfig(const string local_ip_addr);
/**
* @brief Send data on a satellite carrier
......@@ -115,12 +111,10 @@ class sat_carrier_channel_set: public std::vector < UdpChannel * >
* Read data from the configuration file and create channels
*
* @param local_ip_addr The IP address for emulation network
* @param interface_name The interface name for emulation network
* @param in Whether we want input or output channels
* @return true on success, false otherwise
*/
bool readConfig(const string local_ip_addr,
const string interface_name,
bool in);
/// The terminal ID
......
......@@ -267,8 +267,7 @@ bool TestSatCarriers::Upward::onInit(void)
UdpChannel *channel;
// initialize all channels from the configuration file
if(!this->in_channel_set.readInConfig(this->ip_addr,
this->interface_name))
if(!this->in_channel_set.readInConfig(this->ip_addr))
{
fprintf(stderr, "Wrong channel set configuration\n");
return false;
......@@ -297,8 +296,7 @@ bool TestSatCarriers::Upward::onInit(void)
bool TestSatCarriers::Downward::onInit()
{
// initialize all channels from the configuration file
if(!this->out_channel_set.readOutConfig(this->ip_addr,
this->interface_name))
if(!this->out_channel_set.readOutConfig(this->ip_addr))
{
fprintf(stderr, "Wrong channel set configuration\n");
return false;
......
......@@ -46,7 +46,6 @@ struct sc_specific
{
tal_id_t tal_id;
string ip_addr; ///< the IP address for emulation
string emu_iface; ///< the name of the emulation interface
};
/**
......@@ -71,8 +70,7 @@ class TestSatCarriers: public Block
Upward(const string &name, struct sc_specific specific):
RtUpward(name),
in_channel_set(specific.tal_id),
ip_addr(specific.ip_addr),
interface_name(specific.emu_iface)
ip_addr(specific.ip_addr)
{};
......@@ -91,8 +89,6 @@ class TestSatCarriers: public Block
sat_carrier_channel_set in_channel_set;
/// the IP address for emulation newtork
string ip_addr;
/// the interface name for emulation newtork
string interface_name;
};
class Downward: public RtDownward
......@@ -101,8 +97,7 @@ class TestSatCarriers: public Block
Downward(const string &name, struct sc_specific specific):
RtDownward(name),
out_channel_set(specific.tal_id),
ip_addr(specific.ip_addr),
interface_name(specific.emu_iface)
ip_addr(specific.ip_addr)
{};
bool onInit(void);
......@@ -120,8 +115,6 @@ class TestSatCarriers: public Block
sat_carrier_channel_set out_channel_set;
/// the IP address for emulation newtork
string ip_addr;
/// the interface name for emulation newtork
string interface_name;
/// The tun output file descriptor
int fd;
};
......
......@@ -51,7 +51,7 @@
/**
* Argument treatment
*/
bool init_process(int argc, char **argv, string &ip_addr, string &iface_name)
bool init_process(int argc, char **argv, string &ip_addr)
{
int opt;
......@@ -64,17 +64,12 @@ bool init_process(int argc, char **argv, string &ip_addr, string &iface_name)
/// get local IP address
ip_addr = optarg;
break;
case 'n':
// get local interface name
iface_name = optarg;
break;
case 'h':
case '?':
fprintf(stderr, "usage: %s [-h] [[-q] [-d] -a ip_address -n interface_name]\n",
fprintf(stderr, "usage: %s [-h] [[-q] [-d] -a ip_address]\n",
argv[0]);
fprintf(stderr, "\t-h print this message\n");
fprintf(stderr, "\t-a <ip_address> set the IP address\n");
fprintf(stderr, "\t-n <interface_name> set the interface name\n");
fprintf(stderr, "usage printed on stderr\n");
return false;
......@@ -87,11 +82,6 @@ bool init_process(int argc, char **argv, string &ip_addr, string &iface_name)
return false;
}
if(iface_name.size() == 0)
{
fprintf(stderr, "missing mandatory interface name option");
return false;
}
return true;
}
......@@ -100,7 +90,6 @@ int main(int argc, char **argv)
{
const char *progname = argv[0];
string ip_addr;
string emu_iface;
Block *block_sat_carrier;
vector<string> conf_files;
......@@ -109,14 +98,13 @@ int main(int argc, char **argv)
struct sc_specific specific;
// retrieve arguments on command line
if(init_process(argc, argv, ip_addr, emu_iface) == false)
if(init_process(argc, argv, ip_addr) == false)
{
fprintf(stderr, "%s: failed to init the process\n", progname);
goto quit;
}
specific.ip_addr = ip_addr;
specific.emu_iface = emu_iface;
conf_files.push_back("test_topology.conf");
// Load configuration files content
......
......@@ -81,7 +81,6 @@
*/
bool init_process(int argc, char **argv,
string &ip_addr,
string &emu_iface,
string &lan_iface,
string &conf_path,
tal_id_t &instance_id)
......@@ -94,7 +93,7 @@ bool init_process(int argc, char **argv,
char entity[10];
string lib_external_output_path = "";
/* setting environment agent parameters */
while(!stop && (opt = getopt(argc, argv, "-hqdi:a:n:l:c:e:")) != EOF)
while(!stop && (opt = getopt(argc, argv, "-hqdi:a:c:e:")) != EOF)
{
switch(opt)
{
......@@ -114,10 +113,6 @@ bool init_process(int argc, char **argv,
// get local IP address
ip_addr = optarg;
break;
case 'n':
// get local interface name
emu_iface = optarg;
break;
case 'l':
// get lan interface name
lan_iface = optarg;
......@@ -133,14 +128,13 @@ bool init_process(int argc, char **argv,
case 'h':
case '?':
fprintf(stderr, "usage: %s [-h] [[-q] [-d] -i instance_id -a ip_address "
"-n emu_iface -l lan_iface -c conf_path -e lib_ext_output_path\n",
"-l lan_iface -c conf_path -e lib_ext_output_path\n",
argv[0]);
fprintf(stderr, "\t-h print this message\n");
fprintf(stderr, "\t-q disable output\n");
fprintf(stderr, "\t-d enable output debug events\n");
fprintf(stderr, "\t-a <ip_address> set the IP address for emulation\n");
fprintf(stderr, "\t-n <emu_iface> set the emulation interface name\n");
fprintf(stderr, "\t-l <lan_iface> set the ST lan interface name\n");
fprintf(stderr, "\t-l <lan_iface> set the GW lan interface name\n");
fprintf(stderr, "\t-i <instance> set the instance id\n");
fprintf(stderr, "\t-c <conf_path> specify the configuration path\n");
fprintf(stderr, "\t-e <lib_ext_output_path> specify the external output library path\n");
......@@ -189,13 +183,6 @@ bool init_process(int argc, char **argv,
return false;
}
if(emu_iface.size() == 0)
{
DFLTLOG(LEVEL_CRITICAL,
"missing mandatory emulation interface name option");
return false;
}
if(lan_iface.size() == 0)
{
DFLTLOG(LEVEL_CRITICAL,
......@@ -219,7 +206,6 @@ int main(int argc, char **argv)
struct sched_param param;
bool init_ok;
string ip_addr;
string emu_iface;
string lan_iface;
tal_id_t mac_id = 0;
struct sc_specific specific;
......@@ -247,7 +233,7 @@ int main(int argc, char **argv)
int is_failure = 1;
// retrieve arguments on command line
init_ok = init_process(argc, argv, ip_addr, emu_iface, lan_iface, conf_path, mac_id);
init_ok = init_process(argc, argv, ip_addr, lan_iface, conf_path, mac_id);
plugin_conf_path = conf_path + string("plugins/");
......@@ -370,7 +356,6 @@ int main(int argc, char **argv)
}
specific.ip_addr = ip_addr;
specific.emu_iface = emu_iface; // TODO emu_iface in struct
specific.tal_id = mac_id;
block_sat_carrier = Rt::createBlock<BlockSatCarrier,
BlockSatCarrier::Upward,
......
......@@ -73,10 +73,9 @@
/**
* Argument treatment
*/
bool init_process(int argc, char **argv,
bool init_process(int argc, char **argv,
string &lan_iface,
tal_id_t &instance_id,
string &interconnect_iface,
string &interconnect_addr,
string &conf_path)
{
......@@ -89,7 +88,7 @@ bool init_process(int argc, char **argv,
char entity[10];
/* setting environment agent parameters */
while(!stop && (opt = getopt(argc, argv, "-hqdi:l:u:w:c:e:")) != EOF)
while(!stop && (opt = getopt(argc, argv, "-hqdi:u:w:c:e:")) != EOF)
{
switch(opt)
{
......@@ -109,10 +108,6 @@ bool init_process(int argc, char **argv,
// get lan interface name
lan_iface = optarg;
break;
case 'u':
// Get the interconnect interface name
interconnect_iface = optarg;
break;
case 'w':
// Get the interconnect IP address
interconnect_addr = optarg;
......@@ -128,14 +123,13 @@ bool init_process(int argc, char **argv,
case 'h':
case '?':
fprintf(stderr, "usage: %s [-h] [[-q] [-d] -i instance_id "
"-l lan_iface -u interconnect_iface -w interconnect_addr -c conf_path -e lib_ext_output_path\n",
"-l lan_iface -w interconnect_addr -c conf_path -e lib_ext_output_path\n",
argv[0]);
fprintf(stderr, "\t-h print this message\n");
fprintf(stderr, "\t-q disable output\n");
fprintf(stderr, "\t-d enable output debug events\n");
fprintf(stderr, "\t-l <lan_iface> set the ST lan interface name\n");
fprintf(stderr, "\t-l <lan_iface> set the GW lan interface name\n");
fprintf(stderr, "\t-i <instance> set the instance id\n");
fprintf(stderr, "\t-u <interconnect_iface> set the interconnect interface name\n");
fprintf(stderr, "\t-w <interconnect_addr> set the interconnect IP address\n");
fprintf(stderr, "\t-c <conf_path> specify the configuration path\n");
fprintf(stderr, "\t-e <lib_ext_output_path> specify the external output library path\n");
......@@ -189,14 +183,6 @@ bool init_process(int argc, char **argv,
return false;
}
if(interconnect_iface.size() == 0)
{
DFLTLOG(LEVEL_CRITICAL,
"missing mandatory interconnect interface option");
return false;
}
return true;
if(interconnect_addr.size() == 0)
{
DFLTLOG(LEVEL_CRITICAL,
......@@ -213,7 +199,6 @@ int main(int argc, char **argv)
bool init_ok;
string lan_iface;
tal_id_t mac_id = 0;
string interconnect_iface;
string interconnect_addr;
struct ic_specific spec_ic;
......@@ -238,7 +223,7 @@ int main(int argc, char **argv)
// retrieve arguments on command line
init_ok = init_process(argc, argv, lan_iface, mac_id,
interconnect_iface, interconnect_addr, conf_path);
interconnect_addr, conf_path);
plugin_conf_path = conf_path + string("plugins/");
......@@ -324,7 +309,6 @@ int main(int argc, char **argv)
goto release_plugins;
}
spec_ic.interconnect_iface = interconnect_iface;
spec_ic.interconnect_addr = interconnect_addr;
block_interconnect = Rt::createBlock<BlockInterconnectDownward,
......
......@@ -71,13 +71,10 @@
*/
bool init_process(int argc, char **argv,
string &ip_addr,
string &emu_iface,
tal_id_t &instance_id,
string &interconnect_iface,
string &interconnect_addr,
string &conf_path)
{
// TODO remove lan_iface and handle bridging in daemon
int opt;
bool output_enabled = true;
bool output_stdout = false;
......@@ -85,7 +82,7 @@ bool init_process(int argc, char **argv,
string lib_external_output_path = "";
char entity[10];
/* setting environment agent parameters */
while(!stop && (opt = getopt(argc, argv, "-hqdi:a:n:u:w:c:e:")) != EOF)
while(!stop && (opt = getopt(argc, argv, "-hqdi:a:u:w:c:e:")) != EOF)
{
switch(opt)
{
......@@ -105,14 +102,6 @@ bool init_process(int argc, char **argv,
// get local IP address
ip_addr = optarg;
break;
case 'n':
// get local interface name
emu_iface = optarg;
break;
case 'u':
// Get the interconnect interface name
interconnect_iface = optarg;
break;
case 'w':
// Get the interconnect IP address
interconnect_addr = optarg;
......@@ -128,15 +117,13 @@ bool init_process(int argc, char **argv,
case 'h':
case '?':
fprintf(stderr, "usage: %s [-h] [-q] [-d] -i instance_id -a ip_address "
"-n emu_iface -u interconnect_iface -w interconnect_addr "
"-w interconnect_addr "
"-c conf_path -e lib_ext_output_path\n", argv[0]);
fprintf(stderr, "\t-h print this message\n");
fprintf(stderr, "\t-q disable output\n");
fprintf(stderr, "\t-d enable output debug events\n");
fprintf(stderr, "\t-a <ip_address> set the IP address for emulation\n");
fprintf(stderr, "\t-n <emu_iface> set the emulation interface name\n");
fprintf(stderr, "\t-i <instance> set the instance id\n");
fprintf(stderr, "\t-u <interconnect_iface> set the interconnect interface name\n");
fprintf(stderr, "\t-w <interconnect_addr> set the interconnect IP address\n");
fprintf(stderr, "\t-c <conf_path> specify the configuration path\n");
fprintf(stderr, "\t-e <lib_ext_output_path> specify the external output library path\n");
......@@ -183,13 +170,6 @@ bool init_process(int argc, char **argv,
return false;
}
if(emu_iface.size() == 0)
{
DFLTLOG(LEVEL_CRITICAL,
"missing mandatory emulation interface name option");
return false;
}
if(conf_path.size() == 0)
{
DFLTLOG(LEVEL_CRITICAL,
......@@ -197,13 +177,6 @@ bool init_process(int argc, char **argv,
return false;
}
if(interconnect_iface.size() == 0)
{
DFLTLOG(LEVEL_CRITICAL,
"missing mandatory interconnect interface option");
return false;
}
if(interconnect_addr.size() == 0)
{
DFLTLOG(LEVEL_CRITICAL,
......@@ -221,10 +194,8 @@ int main(int argc, char **argv)
struct sched_param param;
bool init_ok;
string ip_addr;
string emu_iface;
tal_id_t mac_id = 0;
struct sc_specific specific;
string interconnect_iface;
string interconnect_addr;