aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-01-09 09:42:21 +0100
committerHarald Welte <laforge@gnumonks.org>2016-01-16 17:47:13 +0100
commit6d101a79a833249c207387d98db3a9eb34a98cc2 (patch)
tree44af20d57afc461335d45221b96a4ea4b4ba4eaa
parent20e8770df08a8584df4ac91f4a8eb86dfe443cd4 (diff)
TRX: remove obsolete get_mac() function
-rw-r--r--src/osmo-bts-trx/main.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index 6f2dd4b..ae85abe 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -34,7 +34,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <net/if.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/application.h>
@@ -66,43 +65,9 @@ static char *gsmtap_ip = 0;
static int rt_prio = -1;
static int trx_num = 1;
char *software_version = "0.0";
-uint8_t abis_mac[6] = { 0, 1, 2, 3, 4, 5 };
char *bsc_host = "localhost";
char *bts_id = "1801/0";
-// FIXME this is a hack
-static void get_mac(void)
-{
- struct if_nameindex *ifn = if_nameindex();
- struct ifreq ifr;
- int sock;
- int ret;
-
- sock = socket(AF_INET, SOCK_STREAM, 0);
- if (sock < 0)
- return;
-
- memset(&ifr, 0, sizeof(ifr));
- if (!ifn)
- return;
- while (ifn->if_name) {
- strncpy(ifr.ifr_name, ifn->if_name, sizeof(ifr.ifr_name)-1);
- ret = ioctl(sock, SIOCGIFHWADDR, &ifr);
- if (ret == 0 && !!memcmp(ifr.ifr_hwaddr.sa_data,
- "\0\0\0\0\0\0", 6)) {
- memcpy(abis_mac, ifr.ifr_hwaddr.sa_data, 6);
- printf("Using MAC address of %s: "
- "'%02x:%02x:%02x:%02x:%02x:%02x'\n",
- ifn->if_name,
- abis_mac[0], abis_mac[1], abis_mac[2],
- abis_mac[3], abis_mac[4], abis_mac[5]);
- break;
- }
- ifn++;
- }
-// if_freenameindex(ifn);
-}
-
int bts_model_init(struct gsm_bts *bts)
{
void *l1h;
@@ -285,8 +250,6 @@ int main(int argc, char **argv)
printf("((*))\n |\n / \\ OsmoBTS\n");
- get_mac();
-
tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context");
tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb");
msgb_set_talloc_ctx(tall_msgb_ctx);