View Issue Details

IDProjectCategoryView StatusLast Update
0000670LDMud 3.3Networkingpublic2011-02-23 22:22
Reporter_xtian_ Assigned ToGnomi  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Target Version3.3.720Fixed in Version3.3.720 
Summary0000670: [patch] new telopts for inofficial mud protocols
DescriptionThis patch passes the telnet options negotiating through to the mudlib for the following protocols:

ATCP
102: unnamed MUSHclient/Aardwolf protocol
ZMP
MSSP (mud server status protocol)

References:
-----------

ATCP:
Achaea Telnet Client Protocol: From the iron realms, rather popular, for passing messages between client and server. There exist a lot of plugins for this. zMUD/CMUD support.
http://www.ironrealms.com/rapture/manual/files/FeatATCP-txt.html

ZMP:
Zenith Mud Protocol: Not widely used, but well designed. Possible to extend the protocol in your own namespace/package.
http://zmp.sourcemud.org/spec.shtml

102/MUSHclient protocol:
As yet unnamed, conceived by Mushclient maker and Aardwolf administrator. Approximately same as the above, built-in into MUSHclient.
http://www.gammon.com.au/scripts/showrelnote.php?version=4.31&productid=0

MSSP:
Mud Server Status Protocol:
Very young, for a bot that will collect data (number of users, uptime, etc) on your MUD.
http://tintin.sourceforge.net/mssp/
Additional InformationSince it seems as yet to be unnamed, I gave the 102 protocol the name TELOPT_MUSHCLIENT.
TagsNo tags attached.
Attached Files
new_telopts.patch (2,358 bytes)   
Index: mudlib/sys/telnet.h
===================================================================
--- mudlib/sys/telnet.h	(revision 2714)
+++ mudlib/sys/telnet.h	(working copy)
@@ -106,10 +106,15 @@
 #define  TELOPT_STARTTLS      46        /* Transport Layer Security */
 
 /* Inofficial, mud specific telnet options */
+
+#define  TELOPT_MSSP          70        /* Mud Server Status Protocol */
 #define  TELOPT_COMPRESS      85        /* Mud Compression Protocol, v.1 */
 #define  TELOPT_COMPRESS2     86        /* Mud Compression Protocol, v.2 */
 #define  TELOPT_MSP           90        /* Mud Sound Protocol */
 #define  TELOPT_MXP           91        /* Mud Extension Protocol */
+#define  TELOPT_ZMP           93        /* Zenith Mud Protocol */
+#define  TELOPT_MUSHCLIENT   102        /* Mushclient/Aardwolf Protocol */
+#define  TELOPT_ATCP         200        /* Achaea Telnet Client Protocol */
 #define  TELOPT_EXOPL        255        /* extended-options-list */
 
 #define  NTELOPTS            256        /* was: (1+TELOPT_NEWENV) */
Index: src/comm.c
===================================================================
--- src/comm.c	(revision 2714)
+++ src/comm.c	(working copy)
@@ -5053,6 +5053,26 @@
     telopts_dont[TELOPT_STARTTLS] = reply_h_telnet_neg;
     telopts_will[TELOPT_STARTTLS] = reply_h_telnet_neg;
     telopts_wont[TELOPT_STARTTLS] = reply_h_telnet_neg;
+
+    telopts_do[TELOPT_MSSP] = reply_h_telnet_neg;
+    telopts_dont[TELOPT_MSSP] = reply_h_telnet_neg;
+    telopts_will[TELOPT_MSSP] = reply_h_telnet_neg;
+    telopts_wont[TELOPT_MSSP] = reply_h_telnet_neg;
+
+    telopts_do[TELOPT_ZMP] = reply_h_telnet_neg;
+    telopts_dont[TELOPT_ZMP] = reply_h_telnet_neg;
+    telopts_will[TELOPT_ZMP] = reply_h_telnet_neg;
+    telopts_wont[TELOPT_ZMP] = reply_h_telnet_neg;
+
+    telopts_do[TELOPT_MUSHCLIENT] = reply_h_telnet_neg;
+    telopts_dont[TELOPT_MUSHCLIENT] = reply_h_telnet_neg;
+    telopts_will[TELOPT_MUSHCLIENT] = reply_h_telnet_neg;
+    telopts_wont[TELOPT_MUSHCLIENT] = reply_h_telnet_neg;
+
+    telopts_do[TELOPT_ATCP] = reply_h_telnet_neg;
+    telopts_dont[TELOPT_ATCP] = reply_h_telnet_neg;
+    telopts_will[TELOPT_ATCP] = reply_h_telnet_neg;
+    telopts_wont[TELOPT_ATCP] = reply_h_telnet_neg;
 } /* init_telopts() */
 
 /*-------------------------------------------------------------------------*/
new_telopts.patch (2,358 bytes)   
bug670.diff (9,529 bytes)   
Index: trunk/src/comm.c
===================================================================
--- trunk/src/comm.c	(Revision 2764)
+++ trunk/src/comm.c	(Arbeitskopie)
@@ -4942,73 +4942,19 @@
 {
     int i;
 
+    /* Pass all telnet options that we're not
+     * able to handle to the mudlib.
+     */
     for (i = NTELOPTS; --i >= 0; ) {
-        telopts_do[i] = send_wont;
+        telopts_do[i] = reply_h_telnet_neg;
+        telopts_dont[i] = reply_h_telnet_neg;
+        telopts_will[i] = reply_h_telnet_neg;
+        telopts_wont[i] = reply_h_telnet_neg;
     }
-    for (i = NTELOPTS; --i >= 0; ) {
-        telopts_dont[i] = reply_nil;
-    }
-    for (i = NTELOPTS; --i >= 0; ) {
-        telopts_will[i] = send_dont;
-    }
-    for (i = NTELOPTS; --i >= 0; ) {
-        telopts_wont[i] = reply_nil;
-    }
 
     telopts_do[TELOPT_ECHO] = reply_to_do_echo;
     telopts_dont[TELOPT_ECHO] = reply_to_dont_echo;
 
-    telopts_do[TELOPT_TM] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_TM] = reply_h_telnet_neg;
-    telopts_will[TELOPT_TM] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_TM] = reply_h_telnet_neg;
-
-    telopts_do[TELOPT_NEWENV] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_NEWENV] = reply_h_telnet_neg;
-    telopts_will[TELOPT_NEWENV] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_NEWENV] = reply_h_telnet_neg;
-
-    telopts_do[TELOPT_ENVIRON] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_ENVIRON] = reply_h_telnet_neg;
-    telopts_will[TELOPT_ENVIRON] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_ENVIRON] = reply_h_telnet_neg;
-
-    telopts_do[TELOPT_XDISPLOC] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_XDISPLOC] = reply_h_telnet_neg;
-    telopts_will[TELOPT_XDISPLOC] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_XDISPLOC] = reply_h_telnet_neg;
-
-    telopts_do[TELOPT_LINEMODE] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_LINEMODE] = reply_h_telnet_neg;
-    telopts_will[TELOPT_LINEMODE] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_LINEMODE] = reply_h_telnet_neg;
-
-    telopts_do[TELOPT_NAWS] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_NAWS] = reply_h_telnet_neg;
-    telopts_will[TELOPT_NAWS] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_NAWS] = reply_h_telnet_neg;
-
-    telopts_do[TELOPT_TTYPE] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_TTYPE] = reply_h_telnet_neg;
-    telopts_will[TELOPT_TTYPE] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_TTYPE] = reply_h_telnet_neg;
-
-    telopts_do[TELOPT_TSPEED] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_TSPEED] = reply_h_telnet_neg;
-    telopts_will[TELOPT_TSPEED] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_TSPEED] = reply_h_telnet_neg;
-
-    telopts_do[TELOPT_BINARY] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_BINARY] = reply_h_telnet_neg;
-    telopts_will[TELOPT_BINARY] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_BINARY] = reply_h_telnet_neg;
-
-    /* Tinyfugue can do bad things to your health */
-    telopts_do[TELOPT_EOR] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_EOR] = reply_h_telnet_neg;
-    telopts_will[TELOPT_EOR] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_EOR] = reply_h_telnet_neg;
-
     /* Go Ahead does not make any sense when coupling multiple
      * interactive users. It is debatable if we are sending
      * Go Ahead every time it is appropriate (i.e. , never),
@@ -5028,7 +4974,6 @@
     telopts_wont[TELOPT_SGA] = reply_to_wont_sga;
 
     /* Mud specific protocols */
-
     telopts_do[TELOPT_COMPRESS] = mccp_telnet_neg;
     telopts_dont[TELOPT_COMPRESS] = mccp_telnet_neg;
     telopts_will[TELOPT_COMPRESS] = mccp_telnet_neg;
@@ -5038,21 +4983,6 @@
     telopts_dont[TELOPT_COMPRESS2] = mccp_telnet_neg;
     telopts_will[TELOPT_COMPRESS2] = mccp_telnet_neg;
     telopts_wont[TELOPT_COMPRESS2] = mccp_telnet_neg;
-
-    telopts_do[TELOPT_MSP] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_MSP] = reply_h_telnet_neg;
-    telopts_will[TELOPT_MSP] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_MSP] = reply_h_telnet_neg;
-
-    telopts_do[TELOPT_MXP] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_MXP] = reply_h_telnet_neg;
-    telopts_will[TELOPT_MXP] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_MXP] = reply_h_telnet_neg;
-
-    telopts_do[TELOPT_STARTTLS] = reply_h_telnet_neg;
-    telopts_dont[TELOPT_STARTTLS] = reply_h_telnet_neg;
-    telopts_will[TELOPT_STARTTLS] = reply_h_telnet_neg;
-    telopts_wont[TELOPT_STARTTLS] = reply_h_telnet_neg;
 } /* init_telopts() */
 
 /*-------------------------------------------------------------------------*/
Index: trunk/mudlib/sys/telnet.h
===================================================================
--- trunk/mudlib/sys/telnet.h	(Revision 2764)
+++ trunk/mudlib/sys/telnet.h	(Arbeitskopie)
@@ -106,10 +106,14 @@
 #define  TELOPT_STARTTLS      46        /* Transport Layer Security */
 
 /* Inofficial, mud specific telnet options */
+#define  TELOPT_MSSP          70        /* Mud Server Status Protocol */
 #define  TELOPT_COMPRESS      85        /* Mud Compression Protocol, v.1 */
 #define  TELOPT_COMPRESS2     86        /* Mud Compression Protocol, v.2 */
 #define  TELOPT_MSP           90        /* Mud Sound Protocol */
 #define  TELOPT_MXP           91        /* Mud Extension Protocol */
+#define  TELOPT_ZMP           93        /* Zenith Mud Protocol */
+#define  TELOPT_MUSHCLIENT   102        /* Mushclient/Aardwolf Protocol */
+#define  TELOPT_ATCP         200        /* Achaea Telnet Client Protocol */
 #define  TELOPT_EXOPL        255        /* extended-options-list */
 
 #define  NTELOPTS            256        /* was: (1+TELOPT_NEWENV) */
@@ -135,17 +139,54 @@
    , "TELOPT 56", "TELOPT 57", "TELOPT 58", "TELOPT 59"
    , "TELOPT 60", "TELOPT 61", "TELOPT 62", "TELOPT 63"
    , "TELOPT 64", "TELOPT 65", "TELOPT 66", "TELOPT 67"
-   , "TELOPT 68", "TELOPT 69", "TELOPT 70", "TELOPT 71"
+   , "TELOPT 68", "TELOPT 69", "MSSP", "TELOPT 71"
    , "TELOPT 72", "TELOPT 73", "TELOPT 74", "TELOPT 75"
    , "TELOPT 76", "TELOPT 77", "TELOPT 78", "TELOPT 79"
    , "TELOPT 80", "TELOPT 81", "TELOPT 82", "TELOPT 83"
    , "TELOPT 84", "MUD COMPRESS", "MUD COMPRESS2", "TELOPT 87"
    , "TELOPT 88", "TELOPT 89", "MUD SOUND", "MUD EXTENSION"
+   , "TELOPT 92", "ZMP", "TELOPT 94", "TELOPT 95"
+   , "TELOPT 96", "TELOPT 97", "TELOPT 98", "TELOPT 99"
+   , "TELOPT 100", "TELOPT 101", "MUSHCLIENT", "TELOPT 103"
+   , "TELOPT 104", "TELOPT 105", "TELOPT 106", "TELOPT 107"
+   , "TELOPT 108", "TELOPT 109", "TELOPT 110", "TELOPT 111"
+   , "TELOPT 112", "TELOPT 113", "TELOPT 114", "TELOPT 115"
+   , "TELOPT 116", "TELOPT 117", "TELOPT 118", "TELOPT 119"
+   , "TELOPT 120", "TELOPT 121", "TELOPT 122", "TELOPT 123"
+   , "TELOPT 124", "TELOPT 125", "TELOPT 126", "TELOPT 127"
+   , "TELOPT 128", "TELOPT 129", "TELOPT 130", "TELOPT 131"
+   , "TELOPT 132", "TELOPT 133", "TELOPT 134", "TELOPT 135"
+   , "TELOPT 136", "TELOPT 137", "TELOPT 138", "TELOPT 139"
+   , "TELOPT 140", "TELOPT 141", "TELOPT 142", "TELOPT 143"
+   , "TELOPT 144", "TELOPT 145", "TELOPT 146", "TELOPT 147"
+   , "TELOPT 148", "TELOPT 149", "TELOPT 150", "TELOPT 151"
+   , "TELOPT 152", "TELOPT 153", "TELOPT 154", "TELOPT 155"
+   , "TELOPT 156", "TELOPT 157", "TELOPT 158", "TELOPT 159"
+   , "TELOPT 160", "TELOPT 161", "TELOPT 162", "TELOPT 163"
+   , "TELOPT 164", "TELOPT 165", "TELOPT 166", "TELOPT 167"
+   , "TELOPT 168", "TELOPT 169", "TELOPT 170", "TELOPT 171"
+   , "TELOPT 172", "TELOPT 173", "TELOPT 174", "TELOPT 175"
+   , "TELOPT 176", "TELOPT 177", "TELOPT 178", "TELOPT 179"
+   , "TELOPT 180", "TELOPT 181", "TELOPT 182", "TELOPT 183"
+   , "TELOPT 184", "TELOPT 185", "TELOPT 186", "TELOPT 187"
+   , "TELOPT 188", "TELOPT 189", "TELOPT 190", "TELOPT 191"
+   , "TELOPT 192", "TELOPT 193", "TELOPT 194", "TELOPT 195"
+   , "TELOPT 196", "TELOPT 197", "TELOPT 198", "TELOPT 199"
+   , "ATCP", "TELOPT 201", "TELOPT 202", "TELOPT 203"
+   , "TELOPT 204", "TELOPT 205", "TELOPT 206", "TELOPT 207"
+   , "TELOPT 208", "TELOPT 209", "TELOPT 210", "TELOPT 211"
+   , "TELOPT 212", "TELOPT 213", "TELOPT 214", "TELOPT 215"
+   , "TELOPT 216", "TELOPT 217", "TELOPT 218", "TELOPT 219"
+   , "TELOPT 220", "TELOPT 221", "TELOPT 222", "TELOPT 223"
+   , "TELOPT 224", "TELOPT 225", "TELOPT 226", "TELOPT 227"
+   , "TELOPT 228", "TELOPT 229", "TELOPT 230", "TELOPT 231"
+   , "TELOPT 232", "TELOPT 233", "TELOPT 234", "TELOPT 235"
+   , "TELOPT 236", "TELOPT 237", "TELOPT 238", "TELOPT 239"
+   , "TELOPT 240", "TELOPT 241", "TELOPT 242", "TELOPT 243"
+   , "TELOPT 244", "TELOPT 245", "TELOPT 246", "TELOPT 247"
+   , "TELOPT 248", "TELOPT 249", "TELOPT 250", "TELOPT 251"
+   , "TELOPT 252", "TELOPT 253", "TELOPT 254", "EXOPL"
 };
-#define  TELOPT_FIRST   TELOPT_BINARY
-#define  TELOPT_LAST    TELOPT_MXP
-#define  TELOPT_OK(x)   ((x) <= TELOPT_LAST && (x) >= TELOPT_FIRST)
-#define  TELOPT(x)      telopts[(x)-TELOPT_FIRST]
 #endif
 
 #endif /* __DRIVER_SOURCE__ */
Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(Revision 2764)
+++ trunk/CHANGELOG	(Arbeitskopie)
@@ -1,6 +1,10 @@
 This file lists all changes made to the game driver in all glory detail.
 See the file HISTORY for a user-oriented summary of all the changes.
 
+12-Oct-2009 (Gnomi)
+  - Pass all unknown telnet options to the mudlib. (#670)
+    (comm.c)
+
 05-Oct-2009 (Zesstra)
   - prepend '/' in get_dir() in plain mode for entries in the root directory,
     if paths are requested by GETDIR_PATH. They were omitted until now. (#501)
bug670.diff (9,529 bytes)   

Relationships

related to 0000264 new LDMud Make telnet negotiations more configurable 

Activities

zesstra

2009-09-04 09:15

administrator   ~0001249

While I don't really like the MSSP-telnet variant (because I think many muds don't want to deal with the PITA of telnet negotiations), I think it is a good idea to pass the stuff to the mudlib.
Gnomi commented something about passing all unknown (to the driver) telnet options to the mudlib, which is probably the way to go...

_xtian_

2009-09-17 15:49

reporter   ~0001274

agreed. But in the meantime ... could you please apply this? ;) Thanks.

zesstra

2009-09-18 02:30

administrator   ~0001276

I have no knowledge/experiences with the details of telnet negotiations and I am currently in no mood to change this. So I am not fit to take care of this issue and somebody else has to take over.

Gnomi

2009-09-18 02:53

manager   ~0001277

It shouldn't be too hard to pass all unknown telnet options to the mudlib. So I won't apply the patch but implement that instead.

Gnomi

2009-10-12 04:07

manager   ~0001517

I attached a patch for 3.3 and committed it as r2767 for 3.5.

The patch adds defines in telnet.h for telnet options that were mentioned in this bug report, and passes to the mudlib all telnet negotations that are not handled by the driver.

Gnomi

2009-11-10 14:26

manager   ~0001617

Committed as r2805.

Issue History

Date Modified Username Field Change
2009-08-21 07:26 _xtian_ New Issue
2009-08-21 07:26 _xtian_ File Added: new_telopts.patch
2009-09-04 09:15 zesstra Note Added: 0001249
2009-09-17 15:49 _xtian_ Note Added: 0001274
2009-09-18 02:30 zesstra Note Added: 0001276
2009-09-18 02:51 Gnomi Status new => assigned
2009-09-18 02:51 Gnomi Assigned To => Gnomi
2009-09-18 02:53 Gnomi Note Added: 0001277
2009-09-30 16:08 zesstra Relationship added related to 0000264
2009-10-12 04:03 Gnomi File Added: bug670.diff
2009-10-12 04:07 Gnomi Note Added: 0001517
2009-11-10 14:23 Gnomi Project LDMud => LDMud 3.3
2009-11-10 14:26 Gnomi Note Added: 0001617
2009-11-10 14:26 Gnomi Status assigned => resolved
2009-11-10 14:26 Gnomi Fixed in Version => 3.3.720
2009-11-10 14:26 Gnomi Resolution open => fixed
2011-02-23 22:22 zesstra Target Version => 3.3.720