From a72236a1d0effb1fe985f5685d40e6dc33ab65a3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 27 Sep 2013 22:42:41 +0200 Subject: permit gsmd and libgsm to handle multiple instances By using differntly-named unix domain sockets, we can run multiple gsmd instances in parallel. --- include/gsmd/gsmd.h | 1 + include/libgsmd/libgsmd.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h index 585d78d..47bc43d 100644 --- a/include/gsmd/gsmd.h +++ b/include/gsmd/gsmd.h @@ -74,6 +74,7 @@ struct gsmd; #define GSMD_ATCMD_TIMEOUT 60 /* If doesn get respond within 60 secs, discard */ struct gsmd { + unsigned int instance; unsigned int flags; int interpreter_ready; struct gsmd_fd gfd_uart; diff --git a/include/libgsmd/libgsmd.h b/include/libgsmd/libgsmd.h index a6a4252..3fce0f0 100644 --- a/include/libgsmd/libgsmd.h +++ b/include/libgsmd/libgsmd.h @@ -49,6 +49,7 @@ typedef int lgsm_msg_handler(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh); /* initialize usage of libgsmd, obtain handle for othe API calls */ extern struct lgsm_handle *lgsm_init(const char *device); +extern struct lgsm_handle *lgsm_init_inst(unsigned int instance); /* Terminate usage of libgsmd */ extern int lgsm_exit(struct lgsm_handle *lh); -- cgit v1.2.3