Commit Graph

641 Commits

Author SHA1 Message Date
Harald Welte 2270fbc918 wireshark: more work on completing abis_oml plugin 2009-07-01 17:43:36 +02:00
Harald Welte 55c139b5e7 Merge branch 'master' of gitosis@bs11-abis.gnumonks.org:openbsc 2009-07-01 11:24:18 +02:00
Harald Welte 0a537273cc updated version of wireshark ipaccess RSL plugin (just cosmetic changes) 2009-07-01 11:22:01 +02:00
Harald Welte 2f2f5960ac ip.access test numbers 2009-07-01 11:03:54 +02:00
Harald Welte 84a1fd8838 add more ipaccess 12.21 OML extension definitions 2009-07-01 09:56:21 +02:00
Andreas Eversberg e4d5146077 the pointer "tall_bsc_ctx" belongs to the gsm_data.c file not to include file. 2009-06-29 15:19:38 +02:00
Harald Welte 067712067e Merge branch 'master' of gitosis@bs11-abis.gnumonks.org:openbsc 2009-06-29 13:07:06 +02:00
Harald Welte 81d517d555 ipaccess-find: remove compile-time specified local ip address 2009-06-29 10:43:04 +02:00
Harald Welte ed83184c6d fix various RSL msgb memory leaks in error paths 2009-06-27 03:09:53 +02:00
Harald Welte 79639661f5 cosmetic cleanup of LOCATION UPDATE REQ print-out 2009-06-27 03:09:45 +02:00
Harald Welte 0299368434 add new DMEAS debug category for measurement reporting
disable it by default
2009-06-27 03:09:38 +02:00
Harald Welte cd1c42852a make tests compile again after talloc branch changes 2009-06-26 20:30:46 +02:00
Harald Welte 857e00d9a7 use taloc_zero() rather than talloc() and explisit memset() 2009-06-26 20:25:23 +02:00
Harald Welte 1ff81b519a fix two segfaults
* when paging callback is called, we need to consider a failed paging
  operation (i.e. lchan == NULL)
* we have to zero-initialize every transaction that is allocated
2009-06-26 20:17:06 +02:00
Harald Welte a1d5b23c58 zero-initialize some more memory that we allocate 2009-06-26 19:42:28 +02:00
Harald Welte e821a06a96 add FIXME about memory leak every time we close telnet 2009-06-26 19:42:14 +02:00
Harald Welte baf4d3a9cf fix MNCC memory leak
after passing the mncc structure (contained in msgb) to the mncc layer,
we have to release its memory.  This leak was discovered as a direct result of
using talloc.
2009-06-26 19:40:48 +02:00
Harald Welte 9cfc9356a7 use named variant when allocating msgb's
when we generate a talloc report (SIGUSR1), we can now see which system
allocated a given msgb, this helps memory leak debugging
2009-06-26 19:39:35 +02:00
Harald Welte 91192ee318 Merge branch 'master' into talloc 2009-06-26 18:19:53 +02:00
Harald Welte 9b8eea0a8b updated RSL wireshark patch
* parse ip.access messages with different (any) attribute order
* identify RTP and RTCP streams to the RTP plugin
2009-06-26 15:04:00 +02:00
Harald Welte c3217a15a6 fix typos 2009-06-26 13:21:57 +02:00
Harald Welte 640d70f8ef add new wireshark A-bis OML dissector, incomplete 2009-06-25 20:50:57 +02:00
Harald Welte dfe6619b55 enable OML dissector lookup, register ourselves as "gsm_abis_ip" dissector 2009-06-25 20:50:33 +02:00
Harald Welte 03cb7cd814 abis_nm.h: Fix various typos 2009-06-25 08:23:19 +02:00
Harald Welte 0b4ab2849e Add parsing of 'L1 information' IE of MEASUREMENT RESULT 2009-06-22 01:43:12 +02:00
Harald Welte a1467eb0d8 Add parsing of 'L1 information' IE of MEASUREMENT RESULT 2009-06-22 01:37:50 +02:00
Harald Welte bf263aae60 Merge branch 'master' into talloc 2009-06-22 01:37:14 +02:00
Harald Welte 49a840547b fix various talloc / dynamic bts/trx related bugs
Prior to this patch, nanobts was not able to operate after recent changes
2009-06-22 01:36:25 +02:00
Harald Welte e712a5fd34 switch to dynamically allocated BTS and TRX data structures
This makes it much easier to do run-time configuration using the vty
interface.
2009-06-21 16:17:15 +02:00
Harald Welte a58617f638 fix setfault during registration of VTY TRX function 2009-06-20 22:37:07 +02:00
Harald Welte a8379774ee introduce talloc all over OpenBSC 2009-06-20 22:36:41 +02:00
Harald Welte 7f597bc369 fix setfault during registration of VTY TRX function 2009-06-20 22:36:12 +02:00
Harald Welte 3ae3cec493 replace 'struct gsm_attr' by 'struct tlv_parsed'
This is where we will store the 12.21 / NM attributes for the given
object.
2009-06-20 19:22:24 +02:00
Harald Welte 91afe4ced2 Introduce BS and MS power control related functions
* add bts->band field plus corresponding VTY and commandline argument
* add trx->nominal_power and trx->max_power_red fields
* add rsl_chan_bs_power_ctrl() to control TRX RF power for a given TS
* add rsl_chan_ms_power_ctrl() to control MS RF power for a given lchan.
2009-06-20 19:22:18 +02:00
Harald Welte f739ae6570 BS11: use abis_nm_set_{bts,radio}_attr()
BS11 should only use the raw message sending function if there is no
standard alternative.  For TRX and BTS attributes, we have the standard
variant.
2009-06-20 19:22:11 +02:00
Andreas Eversberg 9eaa5da565 mncc: Add IMSI to gsm_mncc
This allows us to do subscriber lookups based on IMSI and e.g. establish
MT calls to subscribers with no assigned extension.
2009-06-15 23:22:09 +02:00
Harald Welte b4feea561a Merge branch 'mncc-harald' 2009-06-14 22:15:37 +08:00
Harald Welte 88cc99a7f0 Merge branch 'master' of gitosis@bs11-abis.gnumonks.org:openbsc 2009-06-14 22:15:32 +08:00
Andreas Eversberg b992a8ab1b Use correct cause value and cause location
Fixed indication of cause value and location.
Replaced plain cause numbers by definitions from header file.
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index f323a2a..39e7b1f 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -1865,8 +1865,7 @@ int mncc_release_ind(struct gsm_network *net, struct gsm_trans *trans,

 	memset(&rel, 0, sizeof(rel));
 	rel.callref = callref;
-	mncc_set_cause(&rel, GSM48_CAUSE_LOC_PRN_S_LU,
-		       GSM48_CC_CAUSE_UNASSIGNED_NR);
+	mncc_set_cause(&rel, location, value);
 	return mncc_recvmsg(net, trans, MNCC_REL_IND, &rel);
 }

@@ -1879,7 +1878,9 @@ void free_trans(struct gsm_trans *trans)
 	/* send release to L4, if callref still exists */
 	if (trans->callref) {
 		/* Ressource unavailable */
-		mncc_release_ind(trans->network, trans, trans->callref, 1, 47);
+		mncc_release_ind(trans->network, trans, trans->callref,
+			GSM48_CAUSE_LOC_PRN_S_LU,
+			GSM48_CC_CAUSE_RESOURCE_UNAVAIL);
 		if (trans->state != GSM_CSTATE_NULL)
 			new_cc_state(trans, GSM_CSTATE_NULL);
 	}
@@ -1960,7 +1961,7 @@ static int setup_trig_pag_evt(unsigned int hooknum, unsigned int event,
 				subscr->extension);
 			/* Temporarily out of order */
 			mncc_release_ind(transt->network, transt, transt->callref,
-					 1, 27);
+					 1, GSM48_CC_CAUSE_DEST_OOO);
 			transt->callref = 0;
 			free_trans(transt);
 			break;
@@ -2270,7 +2271,8 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
 			"This is not allowed!\n");
 		/* Temporarily out of order */
 		rc = mncc_release_ind(trans->network, trans, trans->callref,
-				      1, 47);
+				      GSM48_CAUSE_LOC_PRN_S_LU,
+				      GSM48_CC_CAUSE_RESOURCE_UNAVAIL);
 		trans->callref = 0;
 		free_trans(trans);
 		return rc;
@@ -2287,7 +2289,8 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
 	if ((trans_id_mask & 0x007f) == 0x7f) {
 		/* no free transaction ID */
 		rc = mncc_release_ind(trans->network, trans, trans->callref,
-				      1, 47);
+				      GSM48_CAUSE_LOC_PRN_S_LU,
+				      GSM48_CC_CAUSE_RESOURCE_UNAVAIL);
 		trans->callref = 0;
 		free_trans(trans);
 		return rc;
@@ -3373,14 +3376,18 @@ int mncc_send(struct gsm_network *net, int msg_type, void *arg)
 				"unknown callref %d\n", data->called.number,
 				get_mncc_name(msg_type), data->callref);
 			/* Invalid call reference */
-			return mncc_release_ind(net, NULL, data->callref, 1, 81);
+			return mncc_release_ind(net, NULL, data->callref,
+				GSM48_CAUSE_LOC_PRN_S_LU,
+				GSM48_CC_CAUSE_INVAL_TRANS_ID);
 		}
 		if (!data->called.number[0] && !data->called.imsi[0]) {
 			DEBUGP(DCC, "(bts - trx - ts - ti) "
 				"Received '%s' from MNCC with "
 				"no number or IMSI\n", get_mncc_name(msg_type));
 			/* Invalid number */
-			return mncc_release_ind(net, NULL, data->callref, 1, 28);
+			return mncc_release_ind(net, NULL, data->callref,
+				GSM48_CAUSE_LOC_PRN_S_LU,
+				GSM48_CC_CAUSE_INV_NR_FORMAT);
 		}
 		/* New transaction due to setup, find subscriber */
 		if (data->called.number[0])
@@ -3394,7 +3401,9 @@ int mncc_send(struct gsm_network *net, int msg_type, void *arg)
 				"unknown subscriber %s\n", data->called.number,
 				get_mncc_name(msg_type), data->called.number);
 			/* Unknown subscriber */
-			return mncc_release_ind(net, NULL, data->callref, 1, 1);
+			return mncc_release_ind(net, NULL, data->callref,
+				GSM48_CAUSE_LOC_PRN_S_LU,
+				GSM48_CC_CAUSE_UNASSIGNED_NR);
 		}
 		/* If subscriber is not "attached" */
 		if (!subscr->lac) {
@@ -3404,14 +3413,18 @@ int mncc_send(struct gsm_network *net, int msg_type, void *arg)
 				get_mncc_name(msg_type), data->called.number);
 			subscr_put(subscr);
 			/* Temporarily out of order */
-			return mncc_release_ind(net, NULL, data->callref, 1, 27);
+			return mncc_release_ind(net, NULL, data->callref,
+				GSM48_CAUSE_LOC_PRN_S_LU,
+				GSM48_CC_CAUSE_DEST_OOO);
 		}
 		/* Create transaction */
 		if (!(trans = calloc(1, sizeof(struct gsm_trans)))) {
 			DEBUGP(DCC, "No memory for trans.\n");
 			subscr_put(subscr);
 			/* Ressource unavailable */
-			mncc_release_ind(net, NULL, data->callref, 1, 47);
+			mncc_release_ind(net, NULL, data->callref,
+				GSM48_CAUSE_LOC_PRN_S_LU,
+				GSM48_CC_CAUSE_RESOURCE_UNAVAIL);
 			return -ENOMEM;
 		}
 		trans->callref = data->callref;
2009-06-14 22:14:12 +08:00
Andreas Eversberg fbc65b7583 Fix lchan refcounting in case of IMSI DETACH
Removed lchan_put() after IMSI detach function.
We don't need to put lchan, because we don't hold a ressource.
2009-06-14 22:09:12 +08:00
Holger Hans Peter Freyther 56f59bb2dc make btstype2str return a const char* to make gcc 4.4 happy 2009-06-12 17:39:38 +02:00
Harald Welte b5711a65d9 Merge commit 'origin/master' into mncc-harald 2009-06-12 20:15:16 +08:00
Holger Hans Peter Freyther c192871ff8 [misc] Fix make distcheck by adding compat_af_isdn.h 2009-06-12 08:54:08 +02:00
Harald Welte 3794e15496 SMS: fix parsing of destination phone number 2009-06-12 02:42:11 +08:00
Harald Welte e16b138db0 Increase LCHAN_RELEASE_TIMEOUT to 10 seconds
If we release the LCHAN after the CM SERVICE ACK too early, we can no longer
receive longer SMS messages... so let's increase it to 10 secs.
2009-06-12 02:41:10 +08:00
Harald Welte cb0595f234 04.08: Make mncc-harald branch work
This fixes two reasons for crashes due to uninitialized memory or
wrong pointer passing introduced in my own mncc modifications
2009-06-12 01:54:08 +08:00
Harald Welte 4d4e6f7b70 SMS: fix parsing of destination address BCD
this bug was introduced in Andreas' MNCC patches while altering
decode_bcd_number().
2009-06-12 01:53:29 +08:00
Harald Welte 17f4cbfda3 abis_nm: fix printing of ADMinistrative state 2009-06-12 01:34:29 +08:00
Harald Welte bbc636a33f use less magic numbers (04.08 CC cause values)
Introduce a gsm48_cc_cause enum and use it from gsm_04_08 and MNCC,
also make sure we use gsm48_cause_loc rather than plain numbers.
2009-06-11 14:23:20 +08:00
Harald Welte 0374084947 reworked MNCC codebase
This is Harald's reworked MNCC base, slowly heading towards integration
into master.  The key changes are:
* provide much more structure to the data in gsm_mncc
* encode_* and decode_* functions now take a structure rather than tons
  of individual arguments (whose order nobody can remember)
* make sure we don't have copies of the same code everywhere by introducing
  mncc_set_cause() and mncc_release_ind()
* save horizontal screen space if possible
* make sure we break lines > 80 characters
2009-06-10 23:25:50 +08:00