diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 2 | ||||
-rw-r--r-- | include/bsc_data.h | 8 | ||||
-rw-r--r-- | include/bss_patch.h | 2 | ||||
-rw-r--r-- | include/bssap_sccp.h | 2 | ||||
-rw-r--r-- | include/cellmgr_debug.h | 17 | ||||
-rw-r--r-- | include/ipaccess.h | 2 | ||||
-rw-r--r-- | include/mgcp/mgcp.h | 2 | ||||
-rw-r--r-- | include/mgcp/mgcp_internal.h | 6 | ||||
-rw-r--r-- | include/mgcp_ss7.h | 4 | ||||
-rw-r--r-- | include/mtp_data.h | 9 | ||||
-rw-r--r-- | include/mtp_level3.h | 1 | ||||
-rw-r--r-- | include/mtp_pcap.h | 2 | ||||
-rw-r--r-- | include/openbsc_nat/bssap.h | 2 | ||||
-rw-r--r-- | include/openbsc_nat/tlv.h | 2 | ||||
-rw-r--r-- | include/thread.h | 4 | ||||
-rw-r--r-- | include/udp_input.h | 2 | ||||
-rw-r--r-- | include/write_queue.h | 48 |
17 files changed, 39 insertions, 76 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index 7a2960e..8b1dd4b 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,5 +1,5 @@ noinst_HEADERS = mtp_level3.h mtp_data.h ipaccess.h thread.h mtp_pcap.h \ - mgcp_ss7.h bss_patch.h write_queue.h bssap_sccp.h bsc_data.h udp_input.h \ + mgcp_ss7.h bss_patch.h bssap_sccp.h bsc_data.h udp_input.h \ snmp_mtp.h SUBDIRS = mgcp openbsc_nat diff --git a/include/bsc_data.h b/include/bsc_data.h index 9b5bbfd..8418dab 100644 --- a/include/bsc_data.h +++ b/include/bsc_data.h @@ -23,13 +23,13 @@ #ifndef BSC_DATA_H #define BSC_DATA_H -#include <laf0rge1/linuxlist.h> -#include <laf0rge1/select.h> -#include <laf0rge1/timer.h> +#include <osmocore/linuxlist.h> +#include <osmocore/select.h> +#include <osmocore/timer.h> +#include <osmocore/write_queue.h> #include <sccp/sccp.h> -#include "write_queue.h" #include <netinet/in.h> #include <arpa/inet.h> diff --git a/include/bss_patch.h b/include/bss_patch.h index 43dc5f1..7d83ac9 100644 --- a/include/bss_patch.h +++ b/include/bss_patch.h @@ -22,7 +22,7 @@ #ifndef bss_patch_h #define bss_patch_h -#include <laf0rge1/msgb.h> +#include <osmocore/msgb.h> #include <sccp/sccp.h> diff --git a/include/bssap_sccp.h b/include/bssap_sccp.h index f2dd45c..91e678e 100644 --- a/include/bssap_sccp.h +++ b/include/bssap_sccp.h @@ -21,7 +21,7 @@ #ifndef bssap_sccp_h #define bssap_sccp_h -#include <sys/types.h> +#include <stdint.h> #include <sccp/sccp_types.h> struct msgb *create_clear_command(struct sccp_source_reference *dest_ref); diff --git a/include/cellmgr_debug.h b/include/cellmgr_debug.h new file mode 100644 index 0000000..3d22cab --- /dev/null +++ b/include/cellmgr_debug.h @@ -0,0 +1,17 @@ +#ifndef CELLMGR_DEBUG_H +#define CELLMGR_DEBUG_H + +#define DEBUG +#include <osmocore/logging.h> + +/* Debuag Areas of the code */ +enum { + DINP, + DMSC, + DSCCP, + DMGCP, +}; + +extern const struct log_info log_info; + +#endif diff --git a/include/ipaccess.h b/include/ipaccess.h index ca12eed..4cf3a28 100644 --- a/include/ipaccess.h +++ b/include/ipaccess.h @@ -1,7 +1,7 @@ #ifndef _IPACCESS_H #define _IPACCESS_H -#include <laf0rge1/linuxlist.h> +#include <osmocore/linuxlist.h> #define IPA_TCP_PORT_OML 3002 #define IPA_TCP_PORT_RSL 3003 diff --git a/include/mgcp/mgcp.h b/include/mgcp/mgcp.h index 914571a..9bbf554 100644 --- a/include/mgcp/mgcp.h +++ b/include/mgcp/mgcp.h @@ -24,7 +24,7 @@ #ifndef OPENBSC_MGCP_H #define OPENBSC_MGCP_H -#include <laf0rge1/msgb.h> +#include <osmocore/msgb.h> #include <arpa/inet.h> diff --git a/include/mgcp/mgcp_internal.h b/include/mgcp/mgcp_internal.h index d1a6523..ab6217d 100644 --- a/include/mgcp/mgcp_internal.h +++ b/include/mgcp/mgcp_internal.h @@ -24,14 +24,10 @@ #ifndef OPENBSC_MGCP_DATA_H #define OPENBSC_MGCP_DATA_H -#include <laf0rge1/select.h> +#include <osmocore/select.h> #define CI_UNUSED 0 -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) -#endif - enum mgcp_connection_mode { MGCP_CONN_NONE = 0, MGCP_CONN_RECV_ONLY = 1, diff --git a/include/mgcp_ss7.h b/include/mgcp_ss7.h index 3c9b4b7..2779962 100644 --- a/include/mgcp_ss7.h +++ b/include/mgcp_ss7.h @@ -23,9 +23,9 @@ #ifndef mgcp_ss7_h #define mgcp_ss7_h -#include <laf0rge1/timer.h> +#include <osmocore/timer.h> +#include <osmocore/write_queue.h> -#include "write_queue.h" #include "thread.h" diff --git a/include/mtp_data.h b/include/mtp_data.h index 7006953..b8f6af0 100644 --- a/include/mtp_data.h +++ b/include/mtp_data.h @@ -21,8 +21,9 @@ #ifndef mtp_data_h #define mtp_data_h -#include <laf0rge1/msgb.h> -#include <laf0rge1/timer.h> +#include <osmocore/msgb.h> +#include <osmocore/timer.h> +#include <osmocore/utils.h> /* MTP Level3 timers */ @@ -81,8 +82,4 @@ void mtp_link_restart(struct mtp_link *link); void mtp_link_slta_recv(struct mtp_link *link); void mtp_link_sccp_down(struct mtp_link *link); -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) -#endif - #endif diff --git a/include/mtp_level3.h b/include/mtp_level3.h index ad00c1a..a7cdd45 100644 --- a/include/mtp_level3.h +++ b/include/mtp_level3.h @@ -23,6 +23,7 @@ #ifndef mtp_level3_h #define mtp_level3_h +#include <stdint.h> #include <endian.h> #include <sys/types.h> diff --git a/include/mtp_pcap.h b/include/mtp_pcap.h index 1b7334a..5e8f7d3 100644 --- a/include/mtp_pcap.h +++ b/include/mtp_pcap.h @@ -21,7 +21,7 @@ #ifndef mtp_pcap_h #define mtp_pcap_h -#include <sys/types.h> +#include <stdint.h> int mtp_pcap_write_header(int fd); int mtp_pcap_write_msu(int fd, const uint8_t *data, int length); diff --git a/include/openbsc_nat/bssap.h b/include/openbsc_nat/bssap.h index 4986f9d..68e4d00 100644 --- a/include/openbsc_nat/bssap.h +++ b/include/openbsc_nat/bssap.h @@ -5,7 +5,7 @@ #include <stdlib.h> -#include <laf0rge1/msgb.h> +#include <osmocore/msgb.h> #include <sccp/sccp.h> struct gsm_network; diff --git a/include/openbsc_nat/tlv.h b/include/openbsc_nat/tlv.h index 88bd9af..e2d4b88 100644 --- a/include/openbsc_nat/tlv.h +++ b/include/openbsc_nat/tlv.h @@ -4,7 +4,7 @@ #include <sys/types.h> #include <string.h> -#include <laf0rge1/msgb.h> +#include <osmocore/msgb.h> /* Terminology / wording tag length value (in bits) diff --git a/include/thread.h b/include/thread.h index f23cae7..2db8118 100644 --- a/include/thread.h +++ b/include/thread.h @@ -21,8 +21,8 @@ #ifndef thread_h #define thread_h -#include <laf0rge1/linuxlist.h> -#include <laf0rge1/select.h> +#include <osmocore/linuxlist.h> +#include <osmocore/select.h> #include <pthread.h> diff --git a/include/udp_input.h b/include/udp_input.h index 1715733..b11448b 100644 --- a/include/udp_input.h +++ b/include/udp_input.h @@ -24,7 +24,7 @@ #define c7_udp_input_h #include <stdint.h> -#include "write_queue.h" +#include <osmocore/write_queue.h> #define UDP_FORMAT_SIMPLE_UDP 2 #define UDP_FORMAT_SIMPLE_TCP 3 diff --git a/include/write_queue.h b/include/write_queue.h deleted file mode 100644 index 45191e0..0000000 --- a/include/write_queue.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org> - * (C) 2010 by On-Waves - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ -/* Generic write queue implementation */ -#ifndef write_queue_h -#define write_queue_h - -#include <laf0rge1/select.h> -#include <laf0rge1/msgb.h> - -struct write_queue { - struct bsc_fd bfd; - unsigned int max_length; - unsigned int current_length; - - unsigned int paused; - - struct llist_head msg_queue; - - int (*read_cb)(struct bsc_fd *fd); - int (*write_cb)(struct bsc_fd *fd, struct msgb *msg); -}; - -void write_queue_init(struct write_queue *queue, int max_length); -int write_queue_enqueue(struct write_queue *queue, struct msgb *data); -int write_queue_bfd_cb(struct bsc_fd *fd, unsigned int what); - -void write_queue_pause(struct write_queue *queue); -void write_queue_unpause(struct write_queue *queue); - -#endif |