summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-12-07 11:35:02 +0100
committerHarald Welte <laforge@gnumonks.org>2011-12-07 11:35:02 +0100
commitaae236245596743b6aff4b1b294c0e8d97b8190f (patch)
tree7a84960ab3e424930676107f33ad23981b964834 /utils
parent57143a43619ccb229b35b4b4c7def737cb41a40a (diff)
auth_core: don't use anonymous unions to make certain gcc versions happy
Diffstat (limited to 'utils')
-rw-r--r--utils/osmo-auc-gen.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c
index 90976970..62b51289 100644
--- a/utils/osmo-auc-gen.c
+++ b/utils/osmo-auc-gen.c
@@ -102,12 +102,12 @@ int main(int argc, char **argv)
case 'k':
switch (test_aud.type) {
case OSMO_AUTH_TYPE_GSM:
- rc = osmo_hexparse(optarg, test_aud.gsm.ki,
- sizeof(test_aud.gsm.ki));
+ rc = osmo_hexparse(optarg, test_aud.u.gsm.ki,
+ sizeof(test_aud.u.gsm.ki));
break;
case OSMO_AUTH_TYPE_UMTS:
- rc = osmo_hexparse(optarg, test_aud.umts.k,
- sizeof(test_aud.umts.k));
+ rc = osmo_hexparse(optarg, test_aud.u.umts.k,
+ sizeof(test_aud.u.umts.k));
break;
default:
fprintf(stderr, "please specify 2g/3g first!\n");
@@ -118,16 +118,16 @@ int main(int argc, char **argv)
fprintf(stderr, "Only UMTS has OPC\n");
exit(2);
}
- rc = osmo_hexparse(optarg, test_aud.umts.opc,
- sizeof(test_aud.umts.opc));
+ rc = osmo_hexparse(optarg, test_aud.u.umts.opc,
+ sizeof(test_aud.u.umts.opc));
break;
case 'f':
if (test_aud.type != OSMO_AUTH_TYPE_UMTS) {
fprintf(stderr, "Only UMTS has AMF\n");
exit(2);
}
- rc = osmo_hexparse(optarg, test_aud.umts.amf,
- sizeof(test_aud.umts.amf));
+ rc = osmo_hexparse(optarg, test_aud.u.umts.amf,
+ sizeof(test_aud.u.umts.amf));
break;
case 's':
if (test_aud.type != OSMO_AUTH_TYPE_UMTS) {
@@ -135,7 +135,7 @@ int main(int argc, char **argv)
exit(2);
}
ul = strtoul(optarg, 0, 10);
- test_aud.umts.sqn = ul;
+ test_aud.u.umts.sqn = ul;
break;
case 'r':
rc = osmo_hexparse(optarg, _rand, sizeof(_rand));
@@ -175,7 +175,7 @@ int main(int argc, char **argv)
if (rc < 0) {
printf("AUTS failed\n");
} else {
- printf("AUTS success: SEQ.MS = %lu\n", test_aud.umts.sqn);
+ printf("AUTS success: SEQ.MS = %lu\n", test_aud.u.umts.sqn);
}
#endif
exit(0);