FreeCalypso > hg > freecalypso-citrine
comparison g23m-gsm/alr/alr_dedi.c @ 32:b76c78b62e5e
g23m-gsm/alr/alr_dedi.c: same KC_STRING_SIZE fix as in Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 15 Oct 2016 04:07:40 +0000 |
parents | 75a11d740a02 |
children |
comparison
equal
deleted
inserted
replaced
31:f4da114088af | 32:b76c78b62e5e |
---|---|
921 chan_ass->channel_desc_1_bef_sti.tsc = | 921 chan_ass->channel_desc_1_bef_sti.tsc = |
922 dedicated_req->ch_type2.tsc; | 922 dedicated_req->ch_type2.tsc; |
923 } | 923 } |
924 chan_ass->cipher_mode = dedicated_req->ciph.stat; | 924 chan_ass->cipher_mode = dedicated_req->ciph.stat; |
925 chan_ass->a5_algorithm = dedicated_req->ciph.algo; | 925 chan_ass->a5_algorithm = dedicated_req->ciph.algo; |
926 memcpy (&chan_ass->cipher_key, dedicated_req->ciph.kc, KC_STRING_SIZE); | 926 memcpy (&chan_ass->cipher_key, dedicated_req->ciph.kc, sizeof(T_cipher_key)); |
927 #ifdef FF_L23_A5_3 | 927 #ifdef FF_L23_A5_3 |
928 dedi_cyclically_repeat_kc ((UBYTE *)&chan_ass->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN); | 928 dedi_cyclically_repeat_kc ((UBYTE *)&chan_ass->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN); |
929 #endif | 929 #endif |
930 chan_ass->dtx_allowed = dedicated_req->tr_para.dtx; | 930 chan_ass->dtx_allowed = dedicated_req->tr_para.dtx; |
931 | 931 |
1123 async->handover_command.channel_desc_1_bef_sti.timeslot_no = dedicated_req->ch_type2.tn; | 1123 async->handover_command.channel_desc_1_bef_sti.timeslot_no = dedicated_req->ch_type2.tn; |
1124 async->handover_command.channel_desc_1_bef_sti.tsc = dedicated_req->ch_type2.tsc; | 1124 async->handover_command.channel_desc_1_bef_sti.tsc = dedicated_req->ch_type2.tsc; |
1125 } | 1125 } |
1126 async->handover_command.cipher_mode = dedicated_req->ciph.stat; | 1126 async->handover_command.cipher_mode = dedicated_req->ciph.stat; |
1127 async->handover_command.a5_algorithm = dedicated_req->ciph.algo; | 1127 async->handover_command.a5_algorithm = dedicated_req->ciph.algo; |
1128 memcpy (&async->cipher_key, dedicated_req->ciph.kc, KC_STRING_SIZE); | 1128 memcpy (&async->cipher_key, dedicated_req->ciph.kc, sizeof(T_cipher_key)); |
1129 #ifdef FF_L23_A5_3 | 1129 #ifdef FF_L23_A5_3 |
1130 dedi_cyclically_repeat_kc ((UBYTE *)&async->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN); | 1130 dedi_cyclically_repeat_kc ((UBYTE *)&async->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN); |
1131 #endif | 1131 #endif |
1132 | 1132 |
1133 /* | 1133 /* |
1275 dedi_chan_type_desc (dedicated_req, | 1275 dedi_chan_type_desc (dedicated_req, |
1276 (T_channel_desc_1_bef_sti *)&(sync->handover_command.channel_desc_1_bef_sti), | 1276 (T_channel_desc_1_bef_sti *)&(sync->handover_command.channel_desc_1_bef_sti), |
1277 (T_frequency_list *)&sync->handover_command.frequency_list_bef_sti); | 1277 (T_frequency_list *)&sync->handover_command.frequency_list_bef_sti); |
1278 sync->handover_command.cipher_mode = dedicated_req->ciph.stat; | 1278 sync->handover_command.cipher_mode = dedicated_req->ciph.stat; |
1279 sync->handover_command.a5_algorithm = dedicated_req->ciph.algo; | 1279 sync->handover_command.a5_algorithm = dedicated_req->ciph.algo; |
1280 memcpy (&sync->cipher_key, dedicated_req->ciph.kc, KC_STRING_SIZE); | 1280 memcpy (&sync->cipher_key, dedicated_req->ciph.kc, sizeof(T_cipher_key)); |
1281 #ifdef FF_L23_A5_3 | 1281 #ifdef FF_L23_A5_3 |
1282 dedi_cyclically_repeat_kc ((UBYTE *)&sync->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN); | 1282 dedi_cyclically_repeat_kc ((UBYTE *)&sync->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN); |
1283 #endif | 1283 #endif |
1284 | 1284 |
1285 /* | 1285 /* |
1400 dedi_chan_type_desc (dedicated_req, | 1400 dedi_chan_type_desc (dedicated_req, |
1401 (T_channel_desc_1_bef_sti *)&(presync->handover_command.channel_desc_1_bef_sti), | 1401 (T_channel_desc_1_bef_sti *)&(presync->handover_command.channel_desc_1_bef_sti), |
1402 (T_frequency_list *)&presync->handover_command.frequency_list_bef_sti); | 1402 (T_frequency_list *)&presync->handover_command.frequency_list_bef_sti); |
1403 presync->handover_command.cipher_mode = dedicated_req->ciph.stat; | 1403 presync->handover_command.cipher_mode = dedicated_req->ciph.stat; |
1404 presync->handover_command.a5_algorithm = dedicated_req->ciph.algo; | 1404 presync->handover_command.a5_algorithm = dedicated_req->ciph.algo; |
1405 memcpy (&presync->cipher_key, dedicated_req->ciph.kc, KC_STRING_SIZE); | 1405 memcpy (&presync->cipher_key, dedicated_req->ciph.kc, sizeof(T_cipher_key)); |
1406 #ifdef FF_L23_A5_3 | 1406 #ifdef FF_L23_A5_3 |
1407 dedi_cyclically_repeat_kc ((UBYTE *)&presync->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN); | 1407 dedi_cyclically_repeat_kc ((UBYTE *)&presync->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN); |
1408 #endif | 1408 #endif |
1409 | 1409 |
1410 /* | 1410 /* |
1601 /* | 1601 /* |
1602 * convert the parameters to the layer 1 structure | 1602 * convert the parameters to the layer 1 structure |
1603 */ | 1603 */ |
1604 set_ciph->cipher_mode = ciph_req->ciph.stat; | 1604 set_ciph->cipher_mode = ciph_req->ciph.stat; |
1605 set_ciph->a5_algorithm = ciph_req->ciph.algo; | 1605 set_ciph->a5_algorithm = ciph_req->ciph.algo; |
1606 memcpy (set_ciph->new_ciph_param.A, ciph_req->ciph.kc, KC_STRING_SIZE); | 1606 memcpy (set_ciph->new_ciph_param.A, ciph_req->ciph.kc, sizeof(T_cipher_key)); |
1607 #ifdef FF_L23_A5_3 | 1607 #ifdef FF_L23_A5_3 |
1608 dedi_cyclically_repeat_kc ((UBYTE *)set_ciph->new_ciph_param.A, (UBYTE *)ciph_req->ciph.kc, KLEN); | 1608 dedi_cyclically_repeat_kc ((UBYTE *)set_ciph->new_ciph_param.A, (UBYTE *)ciph_req->ciph.kc, KLEN); |
1609 #endif | 1609 #endif |
1610 | 1610 |
1611 alr_data->dedi_data.act_cipher_mode = set_ciph->cipher_mode; | 1611 alr_data->dedi_data.act_cipher_mode = set_ciph->cipher_mode; |
1612 alr_data->dedi_data.act_a5_algorithm = set_ciph->a5_algorithm; | 1612 alr_data->dedi_data.act_a5_algorithm = set_ciph->a5_algorithm; |
1613 memcpy (&alr_data->dedi_data.act_cipher_key, | 1613 memcpy (&alr_data->dedi_data.act_cipher_key, |
1614 &set_ciph->new_ciph_param, KC_STRING_SIZE); | 1614 &set_ciph->new_ciph_param, sizeof(T_cipher_key)); |
1615 #ifdef FF_L23_A5_3 | 1615 #ifdef FF_L23_A5_3 |
1616 dedi_cyclically_repeat_kc ((UBYTE *)&alr_data->dedi_data.act_cipher_key, | 1616 dedi_cyclically_repeat_kc ((UBYTE *)&alr_data->dedi_data.act_cipher_key, |
1617 (UBYTE *)&set_ciph->new_ciph_param, KLEN); | 1617 (UBYTE *)&set_ciph->new_ciph_param, KLEN); |
1618 #endif | 1618 #endif |
1619 | 1619 |