summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormickey <mickey@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-11-25 20:07:09 +0000
committermickey <mickey@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-11-25 20:07:09 +0000
commitb1fc49979c5a752c9b83332c6b35dbf43016f1b4 (patch)
treea89f89912c38af82ff45af7a89ca4f4e7107d228
parentad6fb7bf238070ec09b2aa9422e0a31eed328c3b (diff)
gsmd: start with gsmd_msg_auxdata union
Using a union here (similar to gsmd_evt_auxdata) allows for compiler checks and is much less prone to fail than using pointer arithmetics. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3504 99fdad57-331a-0410-800a-d7fa5415bdb3
-rw-r--r--include/gsmd/usock.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h
index 7340807..db9eac7 100644
--- a/include/gsmd/usock.h
+++ b/include/gsmd/usock.h
@@ -583,6 +583,19 @@ struct gsmd_msg_hdr {
u_int8_t data[];
} __attribute__((packed));
+struct gsmd_msg_auxdata {
+ union {
+ struct {
+ struct gsmd_signal_quality sigq;
+ } signal;
+ struct {
+ char name[16];
+ } current_operator;
+ /* add more here please */
+ } u;
+ u_int8_t data[0];
+} __attribute__ ((packed));
+
#ifdef __GSMD__
#include <gsmd/usock.h>
personal git repositories of Harald Welte. Your mileage may vary