From 1584a74a4acdfb17aab0d6a2b13b18a7799aa37d Mon Sep 17 00:00:00 2001 From: laforge Date: Sat, 2 Sep 2006 10:32:06 +0000 Subject: first compiling (unfinished, not-working) version of userspace gsm infrastructure git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@40 99fdad57-331a-0410-800a-d7fa5415bdb3 --- include/libgsmd/libgsmd.h | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 include/libgsmd/libgsmd.h (limited to 'include/libgsmd/libgsmd.h') diff --git a/include/libgsmd/libgsmd.h b/include/libgsmd/libgsmd.h new file mode 100644 index 0000000..579f13d --- /dev/null +++ b/include/libgsmd/libgsmd.h @@ -0,0 +1,50 @@ +#ifndef _LIBGSMD_H +#define _LIBGSMD_H + +/* libgsmd.h - Library API for gsmd, the GSM Daemon + * (C) 2006 by Harald Welte + * Development funded by First International Computers, Inc. + */ + +#include +#include + +/* Generic Information + * + * Return value: + * < 0 Error, see libgsmd/errno.h and errno.h + * = 0 Success + * > 0 Success, number of information elements returned + * + * Allocation: + * All data structures are caller-allocated. The only exception + * is struct lgsm_handle which is allocatedi in lgsm_init() and + * free'd in lgsm_exit() + * + * References: + * Recefences to "Chapter X" are referring to 3GPP TS 07.07 version 7.8.0 + */ + +/* Opaque data structure, content only known to libgsm implementation */ +struct lgsm_handle; + +/* initialize usage of libgsmd, obtain handle for othe API calls */ +extern struct lgsm_handle *lgsm_init(void); + +/* Terminate usage of libgsmd */ +extern int lgsm_exit(struct lgsm_handle *lh); + +/* Refer to GSM 04.08 [8] subclause 10.5.4.7 */ +enum lgsm_addr_type { + LGSM_ATYPE_ISDN_UNKN = 161, + LGSM_ATYPE_ISDN_INTL = , + LGSM_ATYPE_ISDN_NATIONAL = , +}; + +#define LGSM_ADDR_MAXLEN 31 +struct lgsm_addr { + char addr[LGSM_ADDR_MAXLEN+1]; + enum lgsm_addr_type tyoe; +}; + +#endif -- cgit v1.2.3