From 355ce696611b6484f6368035bf84c1051acead75 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 5 Jul 2011 14:53:37 +0200 Subject: include: export lapd.h since openBSC needs it More specifically, the unfinished ericsson rbs2000 BTS. --- include/Makefile.am | 2 +- include/lapd.h | 46 ---------------------------------------- include/osmocom/abis/Makefile.am | 1 + include/osmocom/abis/lapd.h | 46 ++++++++++++++++++++++++++++++++++++++++ src/input/dahdi.c | 2 +- src/input/lapd.c | 2 +- 6 files changed, 50 insertions(+), 49 deletions(-) delete mode 100644 include/lapd.h create mode 100644 include/osmocom/abis/lapd.h diff --git a/include/Makefile.am b/include/Makefile.am index c94d3eec..ea38eec8 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,3 +1,3 @@ -noinst_HEADERS=mISDNif.h internal.h lapd.h +noinst_HEADERS=mISDNif.h internal.h SUBDIRS=osmocom diff --git a/include/lapd.h b/include/lapd.h deleted file mode 100644 index fb980d10..00000000 --- a/include/lapd.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef OPENBSC_LAPD_H -#define OPENBSC_LAPD_H - -#include - -#include - -typedef enum { - LAPD_MPH_NONE = 0, - - LAPD_MPH_ACTIVATE_IND, - LAPD_MPH_DEACTIVATE_IND, - - LAPD_DL_DATA_IND, - LAPD_DL_UNITDATA_IND, - -} lapd_mph_type; - -struct lapd_instance { - struct llist_head list; /* list of LAPD instances */ - int network_side; - - void (*transmit_cb)(uint8_t *data, int len, void *cbdata); - void *cbdata; - - struct llist_head tei_list; /* list of TEI in this LAPD instance */ -}; - -extern uint8_t *lapd_receive(struct lapd_instance *li, uint8_t *data, unsigned int len, - int *ilen, lapd_mph_type *prim); - -extern void lapd_transmit(struct lapd_instance *li, uint8_t tei, uint8_t sapi, - uint8_t *data, unsigned int len); - -struct lapd_instance *lapd_instance_alloc(int network_side, - void (*tx_cb)(uint8_t *data, int len, - void *cbdata), void *cbdata); - - -/* Start a (user-side) SAP for the specified TEI/SAPI on the LAPD instance */ -int lapd_sap_start(struct lapd_instance *li, uint8_t tei, uint8_t sapi); - -/* Stop a (user-side) SAP for the specified TEI/SAPI on the LAPD instance */ -int lapd_sap_stop(struct lapd_instance *li, uint8_t tei, uint8_t sapi); - -#endif /* OPENBSC_LAPD_H */ diff --git a/include/osmocom/abis/Makefile.am b/include/osmocom/abis/Makefile.am index 85c77b7c..ea1ededb 100644 --- a/include/osmocom/abis/Makefile.am +++ b/include/osmocom/abis/Makefile.am @@ -1,5 +1,6 @@ osmoabis_HEADERS = abis.h \ e1_input.h \ + lapd.h \ logging.h \ subchan_demux.h \ ipa_proxy.h \ diff --git a/include/osmocom/abis/lapd.h b/include/osmocom/abis/lapd.h new file mode 100644 index 00000000..fb980d10 --- /dev/null +++ b/include/osmocom/abis/lapd.h @@ -0,0 +1,46 @@ +#ifndef OPENBSC_LAPD_H +#define OPENBSC_LAPD_H + +#include + +#include + +typedef enum { + LAPD_MPH_NONE = 0, + + LAPD_MPH_ACTIVATE_IND, + LAPD_MPH_DEACTIVATE_IND, + + LAPD_DL_DATA_IND, + LAPD_DL_UNITDATA_IND, + +} lapd_mph_type; + +struct lapd_instance { + struct llist_head list; /* list of LAPD instances */ + int network_side; + + void (*transmit_cb)(uint8_t *data, int len, void *cbdata); + void *cbdata; + + struct llist_head tei_list; /* list of TEI in this LAPD instance */ +}; + +extern uint8_t *lapd_receive(struct lapd_instance *li, uint8_t *data, unsigned int len, + int *ilen, lapd_mph_type *prim); + +extern void lapd_transmit(struct lapd_instance *li, uint8_t tei, uint8_t sapi, + uint8_t *data, unsigned int len); + +struct lapd_instance *lapd_instance_alloc(int network_side, + void (*tx_cb)(uint8_t *data, int len, + void *cbdata), void *cbdata); + + +/* Start a (user-side) SAP for the specified TEI/SAPI on the LAPD instance */ +int lapd_sap_start(struct lapd_instance *li, uint8_t tei, uint8_t sapi); + +/* Stop a (user-side) SAP for the specified TEI/SAPI on the LAPD instance */ +int lapd_sap_stop(struct lapd_instance *li, uint8_t tei, uint8_t sapi); + +#endif /* OPENBSC_LAPD_H */ diff --git a/src/input/dahdi.c b/src/input/dahdi.c index e7400e4b..e411f9a3 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -43,7 +43,7 @@ #include #include -#include "lapd.h" +#include #define TS1_ALLOC_SIZE 300 diff --git a/src/input/lapd.c b/src/input/lapd.c index 6c070e3c..2e0dd080 100644 --- a/src/input/lapd.c +++ b/src/input/lapd.c @@ -36,7 +36,7 @@ #include #include -#include "lapd.h" +#include #include #include -- cgit v1.2.3