From 338e3b3b4bf4947db817a57e0bf1838400e690ca Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 20 Nov 2012 22:22:04 +0100 Subject: SMPP: VTY configuration of SMPP code, authentication support --- openbsc/src/libmsc/smpp_smsc.h | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'openbsc/src/libmsc/smpp_smsc.h') 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 #include +#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); -- cgit v1.2.3