Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > Advanced MUD Concepts
Click here to Register

Reply
 
Thread Tools
Old 03-19-2009, 10:51 AM   #21
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: MSSP (Mud Server Status Protocol)

The thing is, you are reading into a static buffer and I don't use a static buffer. I will install this feature, but I have a feeling it will cause crashes when someone overtly spams a connection with > MAX_INPUT_LENGTH characters, possibly causing memory corruption or a crash.

Is there an easy way to modify this so that it doesn't use a static buffer?

EDIT:

The following code was used:

The result was I could not press <enter> after a hotboot, but the other characters made it through. Upon reboot, it would crash the mud upon connection.

Try it now, the above should translate the telopts, but it should be discarding any resulting buffer since it is running parallel (sort of) to the main networking.

UPDATE: Spoke too soon, it's causing crashes. I'm trying to figure out why, but I'm inside translate_telopts() at this point. I don't see anything, so I'm left to wonder what exactly I should do next. I've tried this several ways.

Last edited by locke : 03-19-2009 at 11:21 AM.
locke is offline   Reply With Quote
Old 03-19-2009, 12:26 PM   #22
scandum
Senior Member
 
Join Date: Jun 2004
Posts: 315
scandum will become famous soon enough
Re: MSSP (Mud Server Status Protocol)

Remove the stripping of \\r in telopt.c and see if that makes a difference, it's the lines:
Just remove the entire thing.

Try the following after that:
scandum is offline   Reply With Quote
Old 03-19-2009, 02:08 PM   #23
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: MSSP (Mud Server Status Protocol)

This results with an immediate crash upon connection.
locke is offline   Reply With Quote
Old 03-19-2009, 08:21 PM   #24
scandum
Senior Member
 
Join Date: Jun 2004
Posts: 315
scandum will become famous soon enough
Re: MSSP (Mud Server Status Protocol)

Odd, I'm at a loss.
scandum is offline   Reply With Quote
Old 03-19-2009, 10:33 PM   #25
scandum
Senior Member
 
Join Date: Jun 2004
Posts: 315
scandum will become famous soon enough
Re: MSSP (Mud Server Status Protocol)

You're using calloc instead of malloc, right?

Calloc automatically zeroes the memory, otherwise odd things might happen.

Regardless, I added a non telnet version to the MSSP specification which should be easier to implement.


MSSP Plaintext

Since it's not feasible for every mud to implement telopt negotiations a plaintext alternative is available. Whenever a new connection enters the command: MSSP-REQUEST a Mud supporting MSSP Plaintext should send the following:

\r\nMSSP-REPLY-START\r\nvariable\tvalue\r\nvariable\tvalue\r\nMSS P-REPLY-END\r\n

If a variable has multiple values you can use multiple tabs:

\r\nMSSP-REPLY-START\r\nvariable\tvalue\tvalue\r\nMSSP-REPLY-END\r\n
scandum is offline   Reply With Quote
Old 03-20-2009, 11:31 AM   #26
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: MSSP (Mud Server Status Protocol)


I use malloc()

Maybe you could write a little piece of code that checks for the request in a string and a variant of the MSSP send routine that maps to mud_data, so I can install that.

I manually assign or use memset() to init variables to 0.

Last edited by locke : 03-20-2009 at 11:42 AM.
locke is offline   Reply With Quote
Old 03-20-2009, 12:23 PM   #27
scandum
Senior Member
 
Join Date: Jun 2004
Posts: 315
scandum will become famous soon enough
Re: MSSP (Mud Server Status Protocol)

You'd want to set everything to NULL, notably d->mccp and d->teltop. Also make sure that d->terminal_type is handled correctly.

What you can do as well is to disable negotiating anything but MSSP in tables.c just in case the crash is in one of the other negotiations.
scandum is offline   Reply With Quote
Old 03-20-2009, 03:04 PM   #28
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: MSSP (Mud Server Status Protocol)

I'll try this and let you know. I don't think I'm setting those variables to anything right now.

What do you mean by "disable negotiating anything but MSSP"?
locke is offline   Reply With Quote
Old 03-20-2009, 05:36 PM   #29
scandum
Senior Member
 
Join Date: Jun 2004
Posts: 315
scandum will become famous soon enough
Re: MSSP (Mud Server Status Protocol)

The announce_support function looks through the telnet table in tables.c for entries that are flagged to send a WILL or DO request, setting the flag to 0 will disable the auto announce.
scandum is offline   Reply With Quote
Old 03-20-2009, 09:35 PM   #30
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: MSSP (Mud Server Status Protocol)

I tried it by reverting to using translate_telopts() after setting the pointers to NULL and it kicked in my sigsegv monitor, reporting this through the telnet port when I connected:

locke is offline   Reply With Quote
Old 03-20-2009, 10:34 PM   #31
scandum
Senior Member
 
Join Date: Jun 2004
Posts: 315
scandum will become famous soon enough
Re: MSSP (Mud Server Status Protocol)

Might be the RESTRING macro call on d->terminal_type while it's NULL. Not sure what you're doing, but if you use it "as is" you'd want to use: d->terminal_type = strdup("");

Should be more obvious if you execute:

telnet
set options
open nimud.divineright.org 5333
scandum is offline   Reply With Quote
Old 03-21-2009, 12:24 AM   #32
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: MSSP (Mud Server Status Protocol)

While using gdb it hung in select() instead of crashing.
locke is offline   Reply With Quote
Old 03-21-2009, 12:28 AM   #33
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: MSSP (Mud Server Status Protocol)

This was already done as d->terminal_type = &str_empty[0];
locke is offline   Reply With Quote
Old 03-21-2009, 04:13 PM   #34
scandum
Senior Member
 
Join Date: Jun 2004
Posts: 315
scandum will become famous soon enough
Re: MSSP (Mud Server Status Protocol)

You should use d->terminal_type = strdup(""); if you're gonna use the macro provided with mth.
scandum is offline   Reply With Quote
Old 03-21-2009, 06:48 PM   #35
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: MSSP (Mud Server Status Protocol)

This fixed the problem, and I am now using translate_telopts with no wierdness. Undefined Behavior beware.

So, please try connecting us to your network. Once connected I will release NiMUD with an announcement at the top of the README about contacting you should someone want to start a NiMUD and join your network.

The specific copy of NiMUD I run is at nimud.divineright.org 5333, but others may join your network someday.

Tintin was the first client I ever used, but I later switched to TinyFugue. Now I just use PuTTy. It would be interesting to see a "lite" version written for use with the standard telnet port instead of stdin, that was easily added to existing MUDs -- one with the ability only to connect with multiple sessions to a default mud address -- as a proxy service. That way MUD admins could set up Tintin on their primary port, with some default settings to auto connect to the MUD, plus the ability to allow players to manage multiple sessions with Tintin on MUDs (like mine) that allow multiplaying.

You know .. it could activate when another client isn't detected, otherwise merely forwarding to the port like tcpxd.

Regards,
Locke

Last edited by locke : 03-21-2009 at 07:07 PM.
locke is offline   Reply With Quote
Old 03-21-2009, 08:28 PM   #36
scandum
Senior Member
 
Join Date: Jun 2004
Posts: 315
scandum will become famous soon enough
Re: MSSP (Mud Server Status Protocol)

It's not working as of yet, I get:

RCVD IAC 0 0
NiM5 Build 12773

<the greeting screen>

What is thy name?
RCVD IAC IAC
RCVD IAC SE 253
ÿú
RCVD IAC IAC
RCVD IAC SE 32
ÿúFNAMEThe Isles: Lands of KltaraPLAYERS62UPTIME24CODEBASENiMUDCONTACT<etc>

Looks like it tries to send out the actual MSSP data, but it gets mangled somewhere.

The debug output in tintin is supposed to look something like the following:

Last edited by scandum : 03-21-2009 at 08:34 PM.
scandum is offline   Reply With Quote
Old 03-21-2009, 09:44 PM   #37
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: MSSP (Mud Server Status Protocol)

There's that wierd character combination, ÿú !!! I have no idea but I will switch to your write_to_descriptor and see if that helps.

Are you related to 121.149.104.1 ? This bot seems to be repeatedly connecting, maybe it's your crawler?
locke is offline   Reply With Quote
Old 03-23-2009, 02:59 PM   #38
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: MSSP (Mud Server Status Protocol)

I have done this. Please retry.
locke is offline   Reply With Quote
Old 03-23-2009, 03:48 PM   #39
scandum
Senior Member
 
Join Date: Jun 2004
Posts: 315
scandum will become famous soon enough
Re: MSSP (Mud Server Status Protocol)

That's a korean IP, not sure who it is.

MSSP is still not working, nor is the mud announcing MSSP support.

I suggest you use tintin++ for debugging it with the following line to connect:

#config debug on;#ses x nimud.divineright.org 5333

If MSSP works you'll automatically get a formatted display of MSSP variables and values as I pasted earlier on.
scandum is offline   Reply With Quote
Old 03-24-2009, 06:14 PM   #40
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: MSSP (Mud Server Status Protocol)

Scandum,


Yet it still does not work. Why?
locke is offline   Reply With Quote
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 04:22 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022