<package_list> ::= <package_assignment> { <package_assignment> }
<package_assignment> ::= MSDP_VAR <string> MSDP_VAL <value_expr> { MSDP_VAL <value_expr> }
<variable_list> ::= <variable_assignment> { <variable_assignment> }
<variable_assignment> ::= MSDP_VAR <string> MSDP_VAL <value_expr>
<value_expr> ::= <string> | <array> | <table>
<table> ::= MSDP_TABLE_OPEN { <variable_list> } MSDP_TABLE_CLOSE
<array> ::= MSDP_ARRAY_OPEN { MSDP_VAL <value_expr> } MSDP_ARRAY_CLOSE
<string> ::= { CHARACTERS }
Variables are send as a typical telnet sub-negotiation having the format: IAC SB MSDP MSDP_VAR <VARIABLE> MSDP_VAL <VALUE> IAC SE. For ease of parsing, variables and values cannot contain the NUL, MSDP_VAL, MSDP_VAR, MSDP_TABLE_OPEN, MSDP_TABLE_CLOSE, or IAC byte.
The above should probably also forbid MSDP_ARRAY_OPEN and MSDP_ARRAY_CLOSE.
I presume it is allowed to send strings with escape codes since the protocol doesn't define how string might be processed client side.
For example:
IAC SB MSDP MSDP_VAR "FOO" MSDP_VAL "FOO\000BAR\003BAZ" IAC SE
What's the difference between…
IAC SB MSDP MSDP_VAR "SEND" MSDP_VAL "HEALTH" MSDP_VAL "HEALTH_MAX" MSDP_VAL "MANA" MSDP_VAL "MANA_MAX" IAC SE
and
IAC SB MSDP MSDP_VAR "SEND" MSDP_VAL MSDP_ARRAY_OPEN MSDP_VAL "HEALTH" MSDP_VAL "HEALTH_MAX" MSDP_VAL "MANA" MSDP_VAL "MANA_MAX" MSDP_ARRAY_CLOSE
Aren't they both arrays?
Or should the client assign SEND to MANA_MAX ignoring the rest?