summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-03-10 22:05:17 +0000
committerlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-03-10 22:05:17 +0000
commit3026b93e266558671bd361b6c07546f8174974bc (patch)
treec579158bc0641847851a1369382d3dc250268ebc /include
parent2797211645d452446cb7b329ee9d3d3a923f8520 (diff)
* include stdio from talloc.h
* add new generic extended-response parser * add operator cache, using ext-resp-parser * add proper detection of supported %CPI modes and select highest available one * add %CTZV to vendor_ti init string git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@1316 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'include')
-rw-r--r--include/gsmd/extrsp.h45
-rw-r--r--include/gsmd/gsmd.h2
-rw-r--r--include/gsmd/talloc.h1
3 files changed, 48 insertions, 0 deletions
diff --git a/include/gsmd/extrsp.h b/include/gsmd/extrsp.h
new file mode 100644
index 0000000..1f6e6a5
--- /dev/null
+++ b/include/gsmd/extrsp.h
@@ -0,0 +1,45 @@
+#ifndef _GSMD_EXTRSP_H
+#define _GSMD_EXTRSP_H
+
+/* how many tokens (CSV items) can an extended response have, max */
+#define GSM_EXTRSP_MAX_TOKENS 16
+
+/* how many individual sub-ranges can one range contain */
+#define GSM_EXTRSP_MAX_RANGES 16
+
+
+struct gsm_extrsp_range_item {
+ int min;
+ int max;
+};
+
+enum gsm_extrsp_tok_type {
+ GSMD_ECMD_RTT_NONE,
+ GSMD_ECMD_RTT_EMPTY,
+ GSMD_ECMD_RTT_NUMERIC,
+ GSMD_ECMD_RTT_STRING,
+ GSMD_ECMD_RTT_RANGE,
+};
+
+struct gsm_extrsp_tok {
+ enum gsm_extrsp_tok_type type;
+ union {
+ struct {
+ struct gsm_extrsp_range_item item[GSM_EXTRSP_MAX_RANGES];
+ int num_items;
+ } range;
+ char string[64];
+ int numeric;
+ } u;
+};
+
+struct gsm_extrsp {
+ unsigned int num_tokens;
+ struct gsm_extrsp_tok tokens[GSM_EXTRSP_MAX_TOKENS];
+};
+
+extern int extrsp_supports(const struct gsm_extrsp *er, int index, int value);
+extern struct gsm_extrsp *extrsp_parse(const void *ctx, const char *input);
+extern void extrsp_dump(const struct gsm_extrsp *er);
+
+#endif
diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
index 9f865a0..044f65d 100644
--- a/include/gsmd/gsmd.h
+++ b/include/gsmd/gsmd.h
@@ -66,6 +66,8 @@ struct gsmd {
struct llist_head busy_atcmds; /* our busy gsmd_atcmds */
struct gsmd_vendor_plugin *vendorpl;
struct gsmd_device_state dev_state;
+
+ struct llist_head operators; /* cached list of operator names */
};
struct gsmd_user {
diff --git a/include/gsmd/talloc.h b/include/gsmd/talloc.h
index 2cfd61a..7f4e925 100644
--- a/include/gsmd/talloc.h
+++ b/include/gsmd/talloc.h
@@ -26,6 +26,7 @@
/* nfsim additions */
#include <stdarg.h>
+#include <stdio.h>
/* this is only needed for compatibility with the old talloc */
typedef void TALLOC_CTX;
personal git repositories of Harald Welte. Your mileage may vary