/* * ----------------------------------------------------------------------------------- * Updated AGAIN on January 29, 2001 - The tnos user prompt was not coming back to us * after a telnet session was closed off. Instead, TNOS would simply disconnect us, * forcing the KLMProxy user to reattach to the gateway again. This should be the last * update to the patch for the next little while. It seems to do the trick now. If you * have a patch file dated earlier than this one, please discard it and use this one. * ----------------------------------------------------------------------------------- * Updated on January 25, 2001 - Found a bug in the patch (a bad one). If you have a * previous version of this file, then discard it and use this one instead. Thanks. * ----------------------------------------------------------------------------------- * * This file contains a code patch for TNOS 2.30 * * The code patch addes an option to the dombtelnet function, enabling * a BBS user to force RAW (binary) mode on an outgoing telnet session. * * It is by no means the final patch, but it does work, allowing me to * use KLMProxy with our local internet gateway running TNOS 2.30. * * This patch could easily be used on any earlier version of TNOS, as * well as JNOS, and other NOS implementations. The changes are minor * and not difficult to figure out. * * January 11, 2001, Maiko Langelaar, VE4KLM * * Files that require patching are summarized below : * * mailbox.h - prototype definition for the gw_connect () function * mailbox.c - * mailbox2.c - * * make.inc - add -DVE4KLM_MODS in order to compile in the new changes * * Makefile - added another directive to make compiling and linking of tnos * faster. Our Makefile for some reason does a MASS COMPILE each * time I make a small change to ONE c file. See next paragraph, * on how to do a speedy compile and link using this new directive. * * To compile and relink the new changes into a new TNOS binary, simply do : * * make servers.a * make quicknos * * The patch information is shown further below (using the unix DIFF command). If * this is too cryptic for you, then send me an email, and I'll send you a TAR file * (ask for patches.tar) which contains the TNOS source files that I changed. My * modifications are embraced with the '#ifdef KLM_MODS' compiler directive. * * That's it! If you find any of this overwhelming, then send me your source files, * and I'll do it for you. * * 73 de Maiko Langelaar, VE4KLM * Winnipeg, Manitoba, Canada. * * Patch information (using the unix DIFF command) is below ... * */ 1) diff mailbox.h ../tnos.org/mailbox.h 218,220d217 < #ifdef VE4KLM_MODS < int gw_connect (struct mbx *m,int s,struct sockaddr *fsocket,int len, int raw); < #else 222d218 < #endif 2) diff mailbox.c ../tnos.org/mailbox.c 135a136 > 1763c1764 < { "Telnet", dombtelnet, 0, 2, "Telnet hostname *port *r" }, --- > { "Telnet", dombtelnet, 0, 2, "T hostname" }, 3863,3865d3863 < #ifdef VE4KLM_MODS < gw_connect (struct mbx *m, int s, struct sockaddr *fsocket, int len, int raw_i) < #else 3867d3864 < #endif 3889,3896d3885 < #ifdef VE4KLM_MODS < if (raw_i) < { < tputs ("raw..."); < m->privs |= NO_ESCAPE; < } < #endif < 3909,3918c3898,3899 < < #ifdef VE4KLM_MODS < if (!raw_i) < { < #endif < if ((fsocket->sa_family != AF_NETROM) && (fsocket->sa_family != AF_AX25)) < m->privs &= ~NO_ESCAPE; < #ifdef VE4KLM_MODS < } < #endif --- > if ((fsocket->sa_family != AF_NETROM) && (fsocket->sa_family != AF_AX25)) > m->privs &= ~NO_ESCAPE; 3971,3975d3951 < < /* Need ability to get back to pbbs prompt */ < #ifdef VE4KLM_MODS < if ((m->privs & NO_ESCAPE) && !raw_i) < #else 3977d3952 < #endif 4066,4070d4040 < < /* Need ability to get back to pbbs prompt */ < #ifdef VE4KLM_MODS < if ((m->privs & NO_ESCAPE) && !raw_i) < #else 4072d4041 < #endif 4114,4116c4083 < < if ((m->privs & NO_ESCAPE) || (c != IAC)) < { --- > if ((m->privs & NO_ESCAPE) || (c != IAC)) { 4865,4867d4831 < #ifdef VE4KLM_MODS < return gw_connect (m, s, (struct sockaddr *) &fsocket, sizeof (struct sockaddr_nr), 0); < #else 4869d4832 < #endif 4939,4941d4901 < #ifdef VE4KLM_MODS < return gw_connect (m, s, (struct sockaddr *) &afsocket, sizeof (struct sockaddr_ax), 0); < #else 4943d4902 < #endif 3) diff mailbox2.c ../tnos.org/mailbox2.c 360a361,362 > > 803,806d804 < #ifdef VE4KLM_MODS < int raw_i = 0; < #endif < 823,829d820 < #ifdef VE4KLM_MODS < if (argc == 4 && argv[3][0] == 'r') < raw_i = 1; < else < raw_i = 0; < #endif < 895,897d885 < #ifdef VE4KLM_MODS < return gw_connect (m, s, (struct sockaddr *) &fsocket, SOCKSIZE, raw_i); < #else 899d886 < #endif 4) diff make.inc ../tnos.org/make.inc 1c1 < CC = gcc -DVE4KLM_MODS --- > CC = gcc 5) diff Makefile ../tnos.org/Makefile 346,351d345 < quicknos : < echo --- Indexing All Archives < $(RANLIB) $(LIBS) < echo --- Linking: $(NOS) < $(CC) $(CFLAGS) -o $(NOS) $(REQUIRED) $(LIBS) $(LCURSES) $(DBGLIB) $(LSQL) $(SYSLIBS) <