Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » MTTS?
Forum Rules | Mark all | Recent Posts

MTTS?
< Newer Topic :: Older Topic >

Pages:<< prev 1, 2 next >>
Post is unread #1 Mar 29, 2011, 8:20 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

So I got an email from someone wondering when FUSS is going to support MTTS. Had to tell them I've no idea what that is. I haven't bothered to go look it up. Anyone got a quickie on what that's supposed to be and why we'd want it?
       
Post is unread #2 Mar 29, 2011, 9:38 pm   Last edited Mar 29, 2011, 9:42 pm by Xerix
Go to the top of the page
Go to the bottom of the page

Xerix
Fledgling
GroupMembers
Posts15
JoinedDec 2, 2009

All I found on it.
MTTS

The TTYPE Protocol

TTYPE is implemented as a Telnet option RFC854, RFC855. The server and client negotiate the use of the TTYPE option as they would any other telnet option as detailed in RFC1091. Once agreement has been reached on the use of the option, option sub-negotiation is used to exchange information between the server and client.


Edit: Scandum's stuff. :ninja:
       
Post is unread #3 Mar 29, 2011, 10:02 pm
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

MTTS is another Scandum invention.

It's a glorified way to try and pass the information that you *CAN* get by using the termcap (or termlib) library in conjunction with the TTYPE setting that TELNET can already pass.

So, rather than using termcap/termlib like every login shell has used for 30 years, Scandum wants to roll his own that uses telnet subnegotiation just like MSSP/MSDP.
       
Post is unread #4 Mar 29, 2011, 10:33 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Unless someone other than Scandum picks it up, I won't ever consider it for inclusion in SmaugFUSS. IT's another half-baked idea of Scandum's to reinvent the wheel in a MUD Specific fashion.
       
Post is unread #5 Mar 29, 2011, 10:57 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

I see. Well in that case I think we'll just pass. AFKMud has terminal type detection already and it would be trivial to backport to FUSS if we want that.
       
Post is unread #6 Mar 30, 2011, 1:37 am
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

I think having NAWS and TTYPE should be sufficient for most purposes. If you really want to work with terminal features (IE: make a full screen editor or menu interface), you will probably want to use the termcap/termlib system, and having those two pieces works well enough for things like bash, so I don't see why a custom protocol is necessary.

If it is pretty simple to add NAWS and TTYPE to SmaugFUSS, I would suggest doing that and just reflecting the information in the descriptor structure. Making the display adapt to someone resizing their window is always a plus. :)
       
Post is unread #7 Mar 30, 2011, 7:57 am
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

I would like to see NAWS and TTYPE support in FUSS, But I lack the time currently to add them, so if you would like to, Quix, feel free to doso, and send me or Samson a diff of the changes and one of us will get it added ASAP.
       
Post is unread #8 Mar 30, 2011, 12:32 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

TTYPE is nothing more than detecting the name of the terminal the client sends, right?
       
Post is unread #9 Mar 30, 2011, 5:11 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

I think there's a little more to it, but that's the gist of it yeah. I think it can be used for other things too, but I'm not sure been a while since I looked at the spec.
       
Post is unread #10 Mar 30, 2011, 10:32 pm   Last edited Mar 31, 2011, 12:13 am by Quixadhal
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

Yep, you got it.

TTYPE is a TELNET subnegotiation, so you need to either properly handle TELNET, or fake it by hard-coding the sequences you need to get it.

NAWS is another subnegotiation that gets the current terminal size (rows and columns). Same deal, you can hard-code it.

Given those two things, you can mostly make people's diaplay work decently. If you go the extra mile, you can look up stuff about the terminal type via termcap/termlib and then know what it can do (like, what sequences to use for various things). But AFAIK, no MUD out there actually does that. Most assume VT100/ANSI codes and call it good.

I make no promises about having time and energy, but I'll take a look at it if you guys like.

EDIT:

Interesting, I started looking up the sequences for NAWS and TTYPE, figuring I'd just kludge them in alongside MCCP, but I also ran across Elanthis' libtelnet again. From the relesed files:


The author or authors of this code dedicate any and all copyright
interest in this code to the public domain. We make this dedication
for the benefit of the public at large and to the detriment of our
heirs and successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
code under copyright law.


So, if ya'll wanted to put a full and proper telnet stack into SmaugFUSS, that looks like a green light to me. I may look into that first, since I think it would essentially mean hooking the library into the lowest level read/write code (easy, I hope?), and then switching the existing mccp/mssp code to use callbacks from the library.
       
Post is unread #11 Mar 31, 2011, 1:04 am
Go to the top of the page
Go to the bottom of the page

Xerix
Fledgling
GroupMembers
Posts15
JoinedDec 2, 2009

Nice, I am interested in seeing your results. GL.
       
Post is unread #12 Mar 31, 2011, 1:51 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

That sounds like a decent start so long as it processes things in accordance with standards that are not being dictated by Scandum :)
       
Post is unread #13 Mar 31, 2011, 9:04 am
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Elanthis' Libtelnet is a great thing, and I'd love to get it into FUSS. I use in it Elysium and it's a godsend. I don't have to worry about messing with the telnet stack or anything, I just use the provided hooks to get the information I want and it handles all output to the descriptor and translates things into subnegotiation as needed.
       
Post is unread #14 Apr 7, 2011, 2:00 am
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

Halfway there. :)

I have the input side done. The output side is slightly more complicated, because Smaug tries to buffer things, and so one has to decide if using the fancy libtelnet routines for things like toggling echo state is worth unwinding the buffering, or to just leave the hard-coded IAC sequences in there and push the whole buffer through in one chunk. Also, have to strip out most of the MCCP stuff, because libtelnet handles that internally.

Question for you guys!

Does anyone ever *really* want to disable MCCP once it's going? I mean, other than to test and see if you can? I ask, because libtelnet doesn't provide any means to do this... it has hooks to start it, and a callback to tell you that it's working, but no direct method to switch it off again. Of course, sending the raw subnegotiation should do it, but I'm just curious if it's even worth the trouble.
       
Post is unread #15 Apr 7, 2011, 8:32 am
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

I would say its worth at least trying to get working in case there ever is a need to turn off MCCP.
       
Post is unread #16 Apr 7, 2011, 11:17 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

The only scenario I know of where it's important is during a hotboot/copyover. Some clients don't much like it when the descriptor is reset without that having been turned off and then back on first. You end up with screens full of gibberish.
       
Post is unread #17 Apr 7, 2011, 11:18 am   Last edited Apr 7, 2011, 11:32 am by Quixadhal
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

Hmmm, well, by cheating, I have NAWS and TTYPE working properly. There is some arguing still going on to get echo on/off working though.

If I can get that part working, I'll see if I can get the compress stuff to toggle.

Then I'll see about buffering. To get stuff working properly, write_to_buffer() is now just a wrapper that calls write_to_descriptor(). If buffering ends up being important, it'll have to happen on the other end (where telnet_event_handler() invokes the actual sending routine).

EDIT: HA, got it. Man, you have to turn your brain inside out to work with this stupid protocol properly.

It's not good enough to just say DO or DON'T echo. To ensure no echoing happens, you have to emphatically say I WILL echo, and you DONT echo, and then not actually do the echoing... and then to turn it back on, you tell it you WONT echo, and you DO echo. If you don't toggle both sides, one ends up doing the echoing anyways.
       
Post is unread #18 Apr 7, 2011, 1:43 pm
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

Ok, good progress today.

If you guys would be so kind as to log into shadowlord.org port 7777 and see what you think, and most especially try a client that does MCCP since I haven't tested that yet. :)

In theory, when a hotboot happens, it should turn compression OFF, and then renegotiate it when the new copy comes back up.

Right now, I modified the config command to display your terminal type and height/width. Your pager length is set to your terminal height. You can still hand-set it, although a renegotiation of NAWS will probably overwrite it again.... may need to add a "manual" bit so it doesn't do that. :)

Lots of cleanup to do yet, and probably a few edge cases I missed. But... so far so good. It went easier than I expected it to. :)
       
Post is unread #19 Apr 15, 2011, 12:47 am
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

Ok, another update. :)

I've been poking at libtelnet for a while now, and while it's a very nice callback-based library, it really doesn't mesh well with smaug's concept of buffered vs. unbuffered output. Also, I can't for the life of me to get MCCP to work *reliably* through this. I can get it to work, and I can get it to survive a hotboot -- sometimes.

So, I went looking around, and found another chunk of code that's public domain. This is written by KaVir, and while it isn't quite as slick as elanthis' code, it's also a bit easier to manage.

So far, so good. It has NAWS and TTYPE support, it also supports some other bells and whistles like MXP and XTERM256 colors, although you may wish to modify it to fit into Smaug's native color system a bit better.

I'll poke at it more this week. At least my limited testing with CMUD seems to think it likes MCCP just fine.
       
Post is unread #20 May 7, 2011, 10:21 am
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

Just checking in on this. :)

Using KaVir's code seems to be pretty solid and works well for general telnet stuff. He had his own color code system implemented in the output routines itself, which I plan to disable (it's fine, but you guys probably don't want another different color code system).

Taking some tips from it, and from the LpMUD I'm working on, I've expanded my own color stuff a bit. It still needs some work, but right now I have xterm256 working properly. One idea I'd like to bounce off you guys is doing away with trying to manage output by flags and instead switch to a terminal type.

To clarify, right now I use the ANSI bitflag to determine if you want ANSI or not. I also check the MSDP data variable for XTERM256 support, and use that as another flag which overrides ANSI. So, you can have xterm256 on, or you can have ANSI on, or nothing. This gets messier the more conversions you have. Right now, I plant to support nothing, ansi, xterm-256color, xterm-greyscale, mxp, as well as use the same code for imc2 and i3/pinkfish output.

So, instead of a zillion flags, it would be smoother if the user could select a terminal type from a list. Using TTYPE, if we recognize the terminal, we can pick the best match. If not, we can default to either "unknown" or "ansi". The command ansi could just set your terminal type to "ansi", or you could have it take an argument like "xterm256" or "greyscale" or "mxp" to force a particular type of output.

Idears? You like? You no like? Lemme know. :)
       
Pages:<< prev 1, 2 next >>