From b1fc49979c5a752c9b83332c6b35dbf43016f1b4 Mon Sep 17 00:00:00 2001 From: mickey Date: Sun, 25 Nov 2007 20:07:09 +0000 Subject: 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 --- include/gsmd/usock.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') 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 -- cgit v1.2.3