nat: Create a USSD module to filter out USSDs...
This commit is contained in:
parent
74dc303134
commit
17870cf533
|
@ -320,4 +320,7 @@ int bsc_conn_type_to_ctr(struct sccp_connections *conn);
|
|||
|
||||
struct gsm48_hdr *bsc_unpack_dtap(struct bsc_nat_parsed *parsed, struct msgb *msg, uint32_t *len);
|
||||
|
||||
/** USSD filtering */
|
||||
int bsc_check_ussd(struct sccp_connections *con, struct bsc_nat_parsed *parsed, struct msgb *msg);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,7 +6,7 @@ bin_PROGRAMS = bsc_nat
|
|||
|
||||
|
||||
bsc_nat_SOURCES = bsc_filter.c bsc_mgcp_utils.c bsc_nat.c bsc_nat_utils.c \
|
||||
bsc_nat_vty.c bsc_sccp.c \
|
||||
bsc_nat_vty.c bsc_sccp.c bsc_ussd.c \
|
||||
$(top_srcdir)/src/debug.c $(top_srcdir)/src/bsc_msc.c
|
||||
bsc_nat_LDADD = $(top_builddir)/src/libvty.a \
|
||||
$(top_builddir)/src/libmgcp.a $(top_builddir)/src/libbsc.a \
|
||||
|
|
|
@ -854,12 +854,19 @@ static int forward_sccp_to_msc(struct bsc_connection *bsc, struct msgb *msg)
|
|||
con = NULL;
|
||||
goto exit2;
|
||||
}
|
||||
|
||||
/* hand data to a side channel */
|
||||
if (bsc_check_ussd(con, parsed, msg) == 1) {
|
||||
/* we are going to take over the connection */
|
||||
/* TODO: */
|
||||
}
|
||||
}
|
||||
|
||||
con_bsc = con->bsc;
|
||||
con_msc = con->msc_con;
|
||||
con_filter = con->con_local;
|
||||
}
|
||||
|
||||
break;
|
||||
case SCCP_MSG_TYPE_RLC:
|
||||
con = patch_sccp_src_ref_to_msc(msg, parsed, bsc);
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/* USSD Filter Code */
|
||||
|
||||
/*
|
||||
* (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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <openbsc/bsc_nat.h>
|
||||
#include <openbsc/bsc_nat_sccp.h>
|
||||
|
||||
|
||||
int bsc_check_ussd(struct sccp_connections *con, struct bsc_nat_parsed *parsed,
|
||||
struct msgb *msg)
|
||||
{
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue