MSSP example

15 views
Skip to first unread message

William Edsall

unread,
Mar 28, 2021, 10:29:18 AM3/28/21
to LDMud Talk
Hi all,
 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/)

Thanks :) Gorgar@dragonfireMUD

Gnomi

unread,
Mar 28, 2021, 1:26:57 PM3/28/21
to ldmud...@googlegroups.com
Hi Gorgar,

William Edsall 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

You can find an example in our mudlib (https://www.unitopia.de/pub/UNItopia/mudlib.tar.gz)
in the file i/player/telnet_neg.c, just search for mssp there.

Another example is in the Morgengrauen mudlib:
https://github.com/MorgenGrauen/mg-mudlib/blob/master/secure/misc/mssp.c

Regards,
Gnomi.

Zesstra

unread,
Mar 30, 2021, 3:33:11 AM3/30/21
to ldmud...@googlegroups.com
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)

> Another example is in the Morgengrauen mudlib:
> https://github.com/MorgenGrauen/mg-mudlib/blob/master/secure/misc/mssp.c
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/
Reply all
Reply to author
Forward
0 new messages