aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/smpp_smsc.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-11-20 22:22:04 +0100
committerHarald Welte <laforge@gnumonks.org>2012-11-24 11:07:29 +0100
commit338e3b3b4bf4947db817a57e0bf1838400e690ca (patch)
tree2bbdc6e476a26e39b03bb4fa75ffd03096938a4b /openbsc/src/libmsc/smpp_smsc.h
parenteff4094950cb7e796ae8baee065528617349b0a8 (diff)
SMPP: VTY configuration of SMPP code, authentication support
Diffstat (limited to 'openbsc/src/libmsc/smpp_smsc.h')
-rw-r--r--openbsc/src/libmsc/smpp_smsc.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/openbsc/src/libmsc/smpp_smsc.h b/openbsc/src/libmsc/smpp_smsc.h
index b1617e600..4b5bd85be 100644
--- a/openbsc/src/libmsc/smpp_smsc.h
+++ b/openbsc/src/libmsc/smpp_smsc.h
@@ -12,15 +12,20 @@
#include <smpp34_structs.h>
#include <smpp34_params.h>
+#define SMPP_SYS_ID_LEN 16
+#define SMPP_PASSWD_LEN 16
+
enum esme_read_state {
READ_ST_IN_LEN = 0,
READ_ST_IN_MSG = 1,
};
+struct osmo_smpp_acl;
+
struct osmo_esme {
struct llist_head list;
struct smsc *smsc;
-
+ struct osmo_smpp_acl *acl;
int use;
uint32_t own_seq_nr;
@@ -35,15 +40,28 @@ struct osmo_esme {
struct msgb *read_msg;
uint8_t smpp_version;
- char system_id[16+1];
+ char system_id[SMPP_SYS_ID_LEN+1];
uint8_t bind_flags;
};
+struct osmo_smpp_acl {
+ struct llist_head list;
+ struct smsc *smsc;
+ char *description;
+ char system_id[SMPP_SYS_ID_LEN+1];
+ char passwd[SMPP_PASSWD_LEN+1];
+ int default_route;
+};
+
struct smsc {
struct osmo_fd listen_ofd;
struct llist_head esme_list;
- char system_id[16+1];
+ struct llist_head acl_list;
+ uint16_t listen_port;
+ char system_id[SMPP_SYS_ID_LEN+1];
+ int accept_all;
+ struct osmo_esme *def_route;
void *priv;
};
@@ -53,6 +71,11 @@ int smpp_smsc_init(struct smsc *smsc, uint16_t port);
void smpp_esme_get(struct osmo_esme *esme);
void smpp_esme_put(struct osmo_esme *esme);
+struct osmo_smpp_acl *smpp_acl_alloc(struct smsc *smsc, const char *sys_id);
+struct osmo_smpp_acl *smpp_acl_by_system_id(struct smsc *smsc,
+ const char *sys_id);
+void smpp_acl_delete(struct osmo_smpp_acl *acl);
+
int smpp_tx_submit_r(struct osmo_esme *esme, uint32_t sequence_nr,
uint32_t command_status, char *msg_id);