Holger Hans Peter Freyther | 9751081 | 2012-01-22 13:36:52 +0100 | [diff] [blame] | 1 | Testing generation of GSM0808 messages |
| 2 | Testing creating Layer3 |
Philipp Maier | fa896ab | 2017-03-27 16:55:32 +0200 | [diff] [blame] | 3 | Testing creating Layer3 (AoIP) |
Holger Hans Peter Freyther | 9751081 | 2012-01-22 13:36:52 +0100 | [diff] [blame] | 4 | Testing creating Reset |
Philipp Maier | 15596e2 | 2017-04-05 17:55:27 +0200 | [diff] [blame] | 5 | Testing creating Reset Ack |
Holger Hans Peter Freyther | 9751081 | 2012-01-22 13:36:52 +0100 | [diff] [blame] | 6 | Testing creating Clear Command |
| 7 | Testing creating Clear Complete |
Philipp Maier | b478dd3 | 2017-03-29 15:50:05 +0200 | [diff] [blame] | 8 | Testing creating Chipher Mode Command |
Holger Hans Peter Freyther | 9751081 | 2012-01-22 13:36:52 +0100 | [diff] [blame] | 9 | Testing creating Cipher Complete |
| 10 | Testing creating Cipher Reject |
| 11 | Testing creating CM U |
| 12 | Testing creating SAPI Reject |
Philipp Maier | c6144a2 | 2017-03-29 17:53:43 +0200 | [diff] [blame] | 13 | Testing creating Assignment Request |
Holger Hans Peter Freyther | 9751081 | 2012-01-22 13:36:52 +0100 | [diff] [blame] | 14 | Testing creating Assignment Complete |
Philipp Maier | fa896ab | 2017-03-27 16:55:32 +0200 | [diff] [blame] | 15 | Testing creating Assignment Complete (AoIP) |
Holger Hans Peter Freyther | 9751081 | 2012-01-22 13:36:52 +0100 | [diff] [blame] | 16 | Testing creating Assignment Failure |
Philipp Maier | fa896ab | 2017-03-27 16:55:32 +0200 | [diff] [blame] | 17 | Testing creating Assignment Failure (AoIP) |
Holger Hans Peter Freyther | 9751081 | 2012-01-22 13:36:52 +0100 | [diff] [blame] | 18 | Testing creating Clear Request |
Philipp Maier | 3d48ec0 | 2017-03-29 17:37:55 +0200 | [diff] [blame] | 19 | Testing creating Paging Request |
Holger Hans Peter Freyther | 9751081 | 2012-01-22 13:36:52 +0100 | [diff] [blame] | 20 | Testing creating DTAP |
| 21 | Testing prepend DTAP |
Neels Hofmeyr | db2fa4e | 2018-04-13 04:11:20 +0200 | [diff] [blame] | 22 | test_gsm0808_enc_dec_cell_id_list_lac: encoded: 1a 07 05 01 24 ab cd 56 78 (rc = 9) |
Neels Hofmeyr | 74663d9 | 2018-03-23 01:46:42 +0100 | [diff] [blame] | 23 | ------- test_cell_id_list_add |
| 24 | cell_id_list cgi[0] = { |
| 25 | } |
| 26 | |
| 27 | gsm0808_cell_id_list_add(&cil, &lac1) --> rc = 1 |
| 28 | cell_id_list lac[1] = { |
| 29 | 0: 123 |
| 30 | } |
| 31 | |
| 32 | gsm0808_cell_id_list_add(&cil, &lac1) --> rc = 0 |
| 33 | cell_id_list lac[1] = { |
| 34 | 0: 123 |
| 35 | } |
| 36 | |
| 37 | gsm0808_cell_id_list_add(&cil, &lac2) --> rc = 2 |
| 38 | cell_id_list lac[3] = { |
| 39 | 0: 123 |
| 40 | 1: 456 |
| 41 | 2: 789 |
| 42 | } |
| 43 | |
| 44 | gsm0808_cell_id_list_add(&cil, &lac2) --> rc = 0 |
| 45 | cell_id_list lac[3] = { |
| 46 | 0: 123 |
| 47 | 1: 456 |
| 48 | 2: 789 |
| 49 | } |
| 50 | |
| 51 | gsm0808_cell_id_list_add(&cil, &cil) --> rc = 0 |
| 52 | cell_id_list lac[3] = { |
| 53 | 0: 123 |
| 54 | 1: 456 |
| 55 | 2: 789 |
| 56 | } |
| 57 | |
| 58 | gsm0808_cell_id_list_add(&cil, &cgi1) --> rc = -22 |
| 59 | cell_id_list lac[3] = { |
| 60 | 0: 123 |
| 61 | 1: 456 |
| 62 | 2: 789 |
| 63 | } |
| 64 | |
| 65 | can't add to BSS list |
| 66 | cell_id_list bss[0] |
| 67 | |
| 68 | gsm0808_cell_id_list_add(&cil, &lac1) --> rc = -22 |
| 69 | cell_id_list bss[0] |
| 70 | |
| 71 | other types (including NO_CELL) take on new type iff empty |
| 72 | cell_id_list no_cell[0] |
| 73 | |
| 74 | gsm0808_cell_id_list_add(&cil, &cgi1) --> rc = 1 |
| 75 | cell_id_list cgi[1] = { |
| 76 | 0: 001-02-3-4 |
| 77 | } |
| 78 | |
| 79 | gsm0808_cell_id_list_add(&cil, &cgi1) --> rc = 0 |
| 80 | cell_id_list cgi[1] = { |
| 81 | 0: 001-02-3-4 |
| 82 | } |
| 83 | |
| 84 | gsm0808_cell_id_list_add(&cil, &cgi2) --> rc = 2 |
| 85 | cell_id_list cgi[3] = { |
| 86 | 0: 001-02-3-4 |
| 87 | 1: 001-002-3-4 |
| 88 | 2: 005-006-7-8 |
| 89 | } |
| 90 | |
| 91 | gsm0808_cell_id_list_add(&cil, &cgi2) --> rc = 0 |
| 92 | cell_id_list cgi[3] = { |
| 93 | 0: 001-02-3-4 |
| 94 | 1: 001-002-3-4 |
| 95 | 2: 005-006-7-8 |
| 96 | } |
| 97 | |
| 98 | cil.id_list_len = 126 |
| 99 | gsm0808_cell_id_list_add(&cil, &cgi2a) --> rc = 1 |
| 100 | cil.id_list_len = 127 |
| 101 | |
| 102 | cil.id_list_len = 126 |
| 103 | gsm0808_cell_id_list_add(&cil, &cgi3) --> rc = -28 |
| 104 | cil.id_list_len = 127 |
| 105 | gsm0808_cell_id_list_add(&cil, &cgi2a) --> rc = -28 |
| 106 | cil.id_list_len = 127 |
| 107 | ------- test_cell_id_list_add done |
Neels Hofmeyr | 250e7f7 | 2018-04-13 03:30:14 +0200 | [diff] [blame] | 108 | test_gsm0808_enc_dec_cell_id_lac: encoded: 05 03 05 01 24 (rc = 5) |
| 109 | test_gsm0808_enc_dec_cell_id_bss: encoded: 05 01 06 (rc = 3) |
| 110 | test_gsm0808_enc_dec_cell_id_no_cell: encoded: 05 01 03 (rc = 3) |
| 111 | test_gsm0808_enc_dec_cell_id_lai_and_lac: encoded: 05 06 04 21 63 54 23 42 (rc = 8) |
| 112 | test_gsm0808_enc_dec_cell_id_ci: encoded: 05 03 02 04 23 (rc = 5) |
| 113 | test_gsm0808_enc_dec_cell_id_lac_and_ci: encoded: 05 05 01 04 23 02 35 (rc = 7) |
| 114 | test_gsm0808_enc_dec_cell_id_global: encoded: 05 08 00 21 63 54 23 42 04 23 (rc = 10) |
Holger Hans Peter Freyther | 9751081 | 2012-01-22 13:36:52 +0100 | [diff] [blame] | 115 | Done |