misc: Add prototypes to header files, include more header files

Fix various warnings about implicit declarations of functions.
diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h
index a8734d1..49dd773 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -492,6 +492,7 @@
 unsigned int n_pag_blocks(int bs_ccch_sdcch_comb, unsigned int bs_ag_blks_res);
 u_int64_t str_to_imsi(const char *imsi_str);
 u_int8_t lchan2chan_nr(struct gsm_lchan *lchan);
+int rsl_release_request(struct gsm_lchan *lchan, u_int8_t link_id);
 
 /* to be provided by external code */
 int abis_rsl_sendmsg(struct msgb *msg);
diff --git a/openbsc/include/openbsc/db.h b/openbsc/include/openbsc/db.h
index eef42f6..d7547d6 100644
--- a/openbsc/include/openbsc/db.h
+++ b/openbsc/include/openbsc/db.h
@@ -39,6 +39,7 @@
 int db_sync_subscriber(struct gsm_subscriber* subscriber);
 int db_subscriber_alloc_tmsi(struct gsm_subscriber* subscriber);
 int db_subscriber_assoc_imei(struct gsm_subscriber* subscriber, char *imei);
+int db_sync_equipment(struct gsm_equipment *equip);
 
 /* SMS store-and-forward */
 int db_sms_store(struct gsm_sms *sms);
diff --git a/openbsc/include/openbsc/e1_input.h b/openbsc/include/openbsc/e1_input.h
index 1e8da56..64e0b4f 100644
--- a/openbsc/include/openbsc/e1_input.h
+++ b/openbsc/include/openbsc/e1_input.h
@@ -151,6 +151,8 @@
 /* called by TRAU muxer to obtain the destination mux entity */
 struct subch_mux *e1inp_get_mux(u_int8_t e1_nr, u_int8_t ts_nr);
 
+void e1inp_sign_link_destroy(struct e1inp_sign_link *link);
+int e1inp_line_update(struct e1inp_line *line);
 
 /* e1_config.c */
 int e1_reconfig_ts(struct gsm_bts_trx_ts *ts);
diff --git a/openbsc/include/openbsc/gsm_04_11.h b/openbsc/include/openbsc/gsm_04_11.h
index e78d946..dd6a263 100644
--- a/openbsc/include/openbsc/gsm_04_11.h
+++ b/openbsc/include/openbsc/gsm_04_11.h
@@ -205,6 +205,9 @@
 
 int gsm0411_rcv_sms(struct msgb *msg);
 
-int gsm0411_send_sms(struct gsm_lchan *lchan, struct sms_deliver *sms);
+int gsm411_send_sms_lchan(struct gsm_lchan *lchan, struct gsm_sms *sms);
+
+struct gsm_sms *sms_alloc(void);
+void sms_free(struct gsm_sms *sms);
 
 #endif
diff --git a/openbsc/include/openbsc/ipaccess.h b/openbsc/include/openbsc/ipaccess.h
index d6ded35..44c3301 100644
--- a/openbsc/include/openbsc/ipaccess.h
+++ b/openbsc/include/openbsc/ipaccess.h
@@ -34,4 +34,6 @@
 	IPAC_IDTAG_UNIT			= 0x08,
 };
 
+int ipaccess_connect(struct e1inp_line *line, struct sockaddr_in *sa);
+
 #endif /* _IPACCESS_H */
diff --git a/openbsc/include/openbsc/misdn.h b/openbsc/include/openbsc/misdn.h
index d3631e7..6c38de7 100644
--- a/openbsc/include/openbsc/misdn.h
+++ b/openbsc/include/openbsc/misdn.h
@@ -24,5 +24,6 @@
 
 int mi_setup(int cardnr,  struct e1inp_line *line, int release_l2);
 int _abis_nm_sendmsg(struct msgb *msg);
+int mi_e1_line_update(struct e1inp_line *line);
 
 #endif
diff --git a/openbsc/src/db.c b/openbsc/src/db.c
index 51f94b6..0bb86fe 100644
--- a/openbsc/src/db.c
+++ b/openbsc/src/db.c
@@ -21,6 +21,7 @@
  */
 
 #include <openbsc/gsm_data.h>
+#include <openbsc/gsm_04_11.h>
 #include <openbsc/db.h>
 #include <openbsc/talloc.h>
 
diff --git a/openbsc/src/e1_config.c b/openbsc/src/e1_config.c
index e743132..4a1cbb0 100644
--- a/openbsc/src/e1_config.c
+++ b/openbsc/src/e1_config.c
@@ -8,6 +8,7 @@
 #include <openbsc/trau_frame.h>
 #include <openbsc/trau_mux.h>
 #include <openbsc/misdn.h>
+#include <openbsc/ipaccess.h>
 #include <openbsc/talloc.h>
 
 #define SAPI_L2ML	0
diff --git a/openbsc/src/e1_input.c b/openbsc/src/e1_input.c
index 4bc15e5..b6461df 100644
--- a/openbsc/src/e1_input.c
+++ b/openbsc/src/e1_input.c
@@ -52,6 +52,7 @@
 #include <openbsc/trau_frame.h>
 #include <openbsc/trau_mux.h>
 #include <openbsc/talloc.h>
+#include <openbsc/misdn.h>
 
 #define NUM_E1_TS	32
 
diff --git a/openbsc/src/gsm_04_11.c b/openbsc/src/gsm_04_11.c
index 3f93ffb..f31e3f8 100644
--- a/openbsc/src/gsm_04_11.c
+++ b/openbsc/src/gsm_04_11.c
@@ -46,6 +46,7 @@
 #include <openbsc/transaction.h>
 #include <openbsc/paging.h>
 #include <openbsc/bsc_rll.h>
+#include <openbsc/chan_alloc.h>
 
 #define GSM411_ALLOC_SIZE	1024
 #define GSM411_ALLOC_HEADROOM	128
diff --git a/openbsc/src/transaction.c b/openbsc/src/transaction.c
index 9e7c794..3825de1 100644
--- a/openbsc/src/transaction.c
+++ b/openbsc/src/transaction.c
@@ -31,6 +31,8 @@
 
 static void *tall_trans_ctx;
 
+void _gsm48_cc_trans_free(struct gsm_trans *trans);
+
 struct gsm_trans *trans_find_by_id(struct gsm_subscriber *subscr,
 				   u_int8_t proto, u_int8_t trans_id)
 {
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index 05b0070..1fe65df 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -31,6 +31,7 @@
 #include <openbsc/linuxlist.h>
 #include <openbsc/gsm_data.h>
 #include <openbsc/gsm_subscriber.h>
+#include <openbsc/gsm_04_11.h>
 #include <openbsc/e1_input.h>
 #include <openbsc/abis_nm.h>
 #include <openbsc/gsm_utils.h>