K2InformaticsGmbH / smpp_parser

A parser for SMPP protocol PDUs
Apache License 2.0
3 stars 1 forks source link

Irrelevant optional parameters chopped off #10

Closed shamis closed 6 years ago

shamis commented 6 years ago

For example

00 00 02 03 00 00 00 04 00 00 00 00 00 00 00 01 34 31 31 35 00 01 09 31 39 32 2E 32 35 34 2E 32 35 34 2E 31 37 00 03 01 31 34 38 2E 32 34 37 2E 31 35 37 2E 32 35 00 D3 04 03 31 35 30 31 30 31 31 37 30 38 35 34 32 33 36 2B 00 31 35 30 31 30 31 31 37 30 38 35 34 32 33 36 2B 00 1B 01 09 07 0C 74 65 73 74 20 6D 65 73 73 61 67 65 02 05 00 01 04 02 04 00 02 00 03 04 26 00 01 01 02 02 00 0C 3F 34 35 2E 31 35 2E 36 37 2E 38 34 02 03 00 0C 3F 38 35 2E 34 36 2E 31 35 2E 34 37 13 83 00 02 03 13 00 30 00 01 83 04 23 00 03 04 00 43 03 04 00 01 04 02 0A 00 02 15 57 00 0E 00 01 02 06 0F 00 01 34 06 0D 00 02 33 00 00 0D 00 01 04 00 0F 00 01 03 00 10 00 02 00 05 15 01 00 11 6A 6B 6A 6B 6C 66 64 73 6B 66 66 6A 6B 64 73 6C 66 02 0B 00 02 1D FE 06 10 00 01 32 06 0E 00 02 35 00 06 11 00 01 02 06 12 00 09 74 65 73 74 20 69 6E 66 6F 06 13 00 05 53 77 69 73 73 15 02 00 08 66 64 73 66 66 61 66 64 00 05 00 01 04 00 06 00 01 08 00 07 00 01 07 00 08 00 02 00 06 02 0C 00 02 00 02 02 0E 00 01 07 02 0F 00 01 05 12 04 00 01 03 13 0C 00 01 03 06 0B 00 12 07 74 65 73 74 20 62 69 6C 6C 69 6E 67 20 69 6E 66 6F 12 01 00 01 02 15 00 00 0C 66 64 73 66 61 66 64 61 66 61 73 66 02 0D 00 01 05 13 80 00 01 06 04 24 00 10 74 65 73 74 20 6D 73 67 20 70 61 79 6C 6F 61 64 04 27 00 01 03 00 19 00 01 00 02 01 00 01 03 00 17 00 04 00 00 00 22 00 1E 00 03 32 34 00 04 21 00 01 01 12 03 00 02 00 07 05 01 00 01 11 03 81 00 0D 01 01 0E 33 32 33 31 32 33 32 31 33 31 03 81 00 04 00 00 00 00 03 02 00 01 07 03 02 00 01 00 03 03 00 0A 0E 66 64 73 66 64 73 66 61 73 03 03 00 01 00

the above pdu is a submit_sm command and it contains optional parameters that are not defined for submit_sm. These are getting removed by the parser

c-bik commented 6 years ago

@shamis if a parameter is not defined for SMPP submit_sm (optional or mandatory) it can't be parsed as there won't be a context to parse it in. I suppose this can't be supported.

Closing this!