Project

General

Profile

Feature #3624 » 0002-WIP-Request-and-parse-UNIT_ID.patch

pespin, 11/06/2018 05:51 PM

View differences:

src/ipaccess/ipaccess-config.c
504 504
	if (get_prim_oml_ip) {
505 505
		printf("getting primary OML link IP\n");
506 506
		msgb_put_u8(nmsg_get, NM_ATT_IPACC_PRIM_OML_CFG);
507
		msgb_put_u8(nmsg_get, NM_ATT_IPACC_UNIT_ID);
507 508
		need_to_get_attr = 1;
508 509
	}
509 510
	if (unit_id) {
src/osmo-bsc/abis_nm.c
550 550
		OSMO_ASSERT(NM_ATT_IPACC_PRIM_OML_CFG == *data);
551 551
		uint32_t ip = osmo_load32be(data+1);
552 552
		uint16_t port = osmo_load16be(data+5);
553
		OSMO_ASSERT(NM_ATT_IPACC_UNIT_ID == *(data+7)); //TLV16
554
		char unit_id[40];
555
		memcpy(unit_id, (char*)(data+10), osmo_load16be(data+8));
553 556
		struct in_addr ia = {0};
554 557
		ia.s_addr = htonl(ip);
555
		LOGP(DNM, LOGL_NOTICE, "%s Get Attributes Response: OML IP is %s:%u\n", gsm_trx_name(trx), inet_ntoa(ia), port);
558
		LOGP(DNM, LOGL_NOTICE, "%s Get Attributes Response: OML IP is %s:%u UNIT_ID=%s\n", gsm_trx_name(trx), inet_ntoa(ia), port, unit_id);
556 559
	} else {
557 560
		LOGPFOH(DNM, LOGL_ERROR, foh, "BTS%u: Get Attr Response without List of Required Attributes?!\n",
558 561
			bts->nr);
(3-3/5)
Add picture from clipboard (Maximum size: 48.8 MB)