On 28.03.21 19:26, Gnomi wrote:
>> Wondering if someone would be kind enough to share an MSSP example. I am
>> enabling MSSP from the mud (WILL MSSP), but I don't understand how to
>> translate the MSSP_VALs like:
>> IAC SB MSSP MSSP_VAR "PLAYERS" MSSP_VAL "52" MSSP_VAR "UPTIME" MSSP_VAL
>> "1234567890" IAC SE (from
https://mudhalla.net/tintin/protocols/mssp/)
>
> MSSP_VAR is the byte 0x01
> MSSP_VAL is the byte 0x02
> MSSP is the byte 0x46
Also, the " are not part of the final string. Your example above would be
IAC SB 46 1 PLAYERS 2 52 1 UPTIME 2 1234567890 IAC SB
(without any spaces of course)
This then translates into the byte stream
255 250 46 1 80 76 65 89 69 82 83 2 53 50 1 ... 255 250
on the wire. (again without spaces)
Note that this examples also contains code for the variant not based on telnet
negotiations. And this prepares the string, but the actual code for sending it
is located in
https://github.com/MorgenGrauen/mg-mudlib/blob/master/secure/telnetneg.c (line
280).
send_telnet_neg_str(
to_bytes(({SB, TELOPT_MSSP}))
+ to_bytes(sprintf("%s", ({string})mssp->get_telnegs_str()),
"ASCII//TRANSLIT"));
send_telnet_neg_str() is also in that file and encapsulates it with the 255
... 255 250 bytes before sending with binary_message().
Bye,
Zesstra
--
MorgenGrauen -
1 Welt, mehr als 200 Programmierer , mehr als 16000 Raeume,
viel mehr als 7000 unterschiedliche Figuren, 90 Quests, 13 Gilden,
ueber 5000 Waffen und Ruestungen, keine Umlaute und ein Haufen Verrueckter.
Existenz: mehr als 25 Jahre
http://mg.mud.de/