add new function gsm_bts_by_lac() to search for BTS based on location area

diff --git a/src/gsm_data.c b/src/gsm_data.c
index f654d90..78f9765 100644
--- a/src/gsm_data.c
+++ b/src/gsm_data.c
@@ -179,3 +179,30 @@
 		return "undefined";
 	return bts_types[type];
 }
+
+/* Search for a BTS in the given Location Area; optionally start searching
+ * with start_bts (for continuing to search after the first result) */
+struct gsm_bts *gsm_bts_by_lac(struct gsm_network *net, unsigned int lac,
+				struct gsm_bts *start_bts)
+{
+	int i;
+	struct gsm_bts *bts;
+	int skip = 0;
+
+	if (start_bts)
+		skip = 1;
+
+	for (i = 0; i < net->num_bts; i++) {
+		bts = &net->bts[i];
+
+		if (skip) {
+			if (start_bts == bts)
+				skip = 0;
+			continue;
+		}
+
+		if (bts->location_area_code == lac)
+			return bts;
+	}
+	return NULL;
+}