Commit Graph

34 Commits

Author SHA1 Message Date
tobez
0f4e951657 Increase usefulness of telnet(1) as a protocol tester. By prepending
"+" to the port number, disable option negotiation and allow
transferring of data with high bit set.

OKed by:	markm (maintainer)
PR:		52032
Submitted by:	Valentin Nechayev <netch maybe-at netch stop kiev stop ua>
MFC After:	2 weeks


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@142790 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2005-02-28 12:46:53 +00:00
maxim
cff120dc74 o Print a correct status for unix domain sockets.
o Restore input mode when return from the command one.

PR:			bin/49983
Submitted by:		Volker Stolz
OK in general from:	markm
MFC after:		1 month


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@139687 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2005-01-04 21:22:32 +00:00
ume
97005ca0b5 Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542
(aka RFC2292bis).  Though I believe this commit doesn't break
backward compatibility againt existing binaries, it breaks
backward compatibility of API.
Now, the applications which use Advanced Sockets API such as
telnet, ping6, mld6query and traceroute6 use RFC3542 API.

Obtained from:	KAME


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@121472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2003-10-24 18:26:30 +00:00
ume
425407c55a EAI_ADDRFAMILY and EAI_NODATA was deprecated in RFC3493
(aka RFC2553bis).  Now, getaddrinfo(3) returns EAI_NONAME
instead of EAI_NODATA.  Our getaddrinfo(3) nor getnameinfo(3)
didn't use EAI_ADDRFAMILY.

Obtained from:	KAME


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@121425 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2003-10-23 13:55:36 +00:00
markm
4369ac2a7f Fix up external variables named "debug" that have a horrible habit
of conflicting with other, similarly named functions in static
libraries. This is done mostly by renaming the var if it is shared
amongst modules, or making it static otherwise.

OK'ed by:	re(scottl)


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@114911 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2003-05-11 18:17:00 +00:00
obrien
90a2e082b9 Use __FBSDID vs. rcsid[]. Also protect sccs[] and copyright[] from GCC 3.3.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@114630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2003-05-04 02:54:49 +00:00
eric
9e0282c9ca Merge argument parsing changes into this copy of telnet.
Submitted by:	markm
Approved by:	bmah


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@107299 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2002-11-27 06:34:24 +00:00
dd
a2b2e46019 Permit the argument to the -s option to be a hostname. I see no
reason to restrict this to a numeric address.

PR:		41841
Submitted by:	Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>,
		Maxim Maximov <mcsi@agava.com>


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@104331 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2002-10-02 00:27:14 +00:00
markm
112a50cd56 Catch up with "base" telnet.
s/FALL THROUGH/FALLTHROUGH/ for lint(1).
s/Usage/usage/ for consistency.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@103955 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2002-09-25 07:26:25 +00:00
alfred
0a0dabb57b unbreak build:
commands.c, sys_bsd.c: comment out/remove junk after #endif/#else
network.c, terminal.c, utlities.c: include stdlib.h for exit(3)


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@96385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2002-05-11 03:19:44 +00:00
jhay
0b3113dc49 Protect variables and function prototypes that are only used in the INET6
case with an ifdef INET6.

This make the fixit floppy compile again.

Reviewed by:	markm


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@87277 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-12-03 17:42:02 +00:00
markm
0efd3a3530 help the alphas out with the WARNS=2 stuff.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@87266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-12-03 12:13:18 +00:00
markm
a88d48b9df Damn. The previous mega-commit was incomplete WRT ANSIfication. This
fixes that.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@87155 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-11-30 22:28:07 +00:00
markm
820d180830 Very large style makeover.
1) ANSIfy.
2) Clean up ifdefs so that
   a) ones that never/always apply are appropriately either
      fully removed, or just the #if junk is removed.
   b) change #if defined(FOO) for appropiate values of FOO.
      (currently AUTHENTICATION and ENCRYPTION)
3) WARNS=2 fixing
4) GC other unused stuff

This code can now be unifdef(1)ed to make non-crypto telnet.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@87139 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-11-30 21:06:38 +00:00
markm
3efb267b2d Manually unifdef(1) CRAY, UNICOS, hpux and sun uselsess code.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@82497 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-08-29 14:16:17 +00:00
markm
0fd2377dcc Code merge and diff reduce with "base" telnet. This is the "later"
telnet, so it was treated as the reference code, except where later
commits were made to "base" telnet.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@81965 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-08-20 12:28:40 +00:00
dillon
c5ebb16d3c A feature to allow one to telnet to a unix domain socket. (MFC from
non-crypto version)

Also update the crypto telnet's man page to reflect other options
ported from the non-crypto version.

Obtained from:   Lyndon Nerenberg <lyndon@orthanc.ab.ca>


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@77095 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-05-23 22:54:07 +00:00
kris
312e8003c1 Correct definition of MAXHOSTNAMELEN in ifdef'ed code.
Submitted by:	Edwin Groothuis <mavetju@chello.nl>
PR:		bin/22787


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@69223 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-11-26 21:37:51 +00:00
kris
53049b911e Fix a buffer overflow from a long local hostname.
Obtained from:	OpenBSD


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@68891 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-11-19 10:08:26 +00:00
ume
a2af2980e2 Fix buffer size of ALIGNed buffer.
PR:		bin/20053
Submitted by:	Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@63662 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-07-20 14:54:04 +00:00
ume
7b1c9dcfd4 Make telnet -s work. It is corresponding to EAI_NONAME -> EAI_NODATA
change (getaddrinfo.c rev 1.12).


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@62805 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-07-08 05:22:00 +00:00
itojun
79d0212f03 sync with usr.bin/telnet/commands.c 1.21 -> 1.22. pierre.dampure@alveley.org
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@62773 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-07-07 12:35:05 +00:00
shin
5137153b86 CMSG_XXX macros alignment fixes to follow RFC2292.
Approved by: jkh


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@57724 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-03-03 12:50:46 +00:00
shin
737e54e224 Use static buffer to save source route hostnames.
Approved by: jkh


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@57343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-02-19 16:33:14 +00:00
shin
62286e5a31 Print "Trying ..." for each host. Also cleanups for error printing.
Approved by: jkh

Submitted by: Ben Smithurst <ben@scientia.demon.co.uk>


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@57342 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-02-19 16:17:41 +00:00
shin
c750243830 Fix bugs in telnet.
Sorry there were still several bugs.
   -error retry at af missmatch was incomplete.
   -af matching for source addr option was wrong
   -socket was not freed at retry.

Approved by: jkh


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@57233 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-02-15 15:59:12 +00:00
shin
d2ec198a69 Add more dual stack consideration.
-Should retry as much as possible when some of source
     routing intermediate hosts' address families missmatch
     happened.
     (such as when a host has only A record, and another host
     has each of A and AAAA record.)

    -Should retry as much as possible when dest addr and
     source addr(specified with -s option) address family
     missmatch happend

Approved by: jkh


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@57125 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-02-10 20:06:36 +00:00
shin
92a0e6dadf Fix telnet core dump at invalid service name specified.
Added an error check to avoid it.

Approved by: jkh

Submitted by: Robert Muir <rmuir@gibralter.net>


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@57016 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-02-07 00:52:49 +00:00
shin
845ce56d7b Add NI_NAMEREQD flag to getnameinfo() call. Without this flag,
getnameinfo() don't return error at name resolving failure.
But it is used at doaddrlookup(-N) case in telnet, error need to be
returned to correctly initialize hostname buffer.

Discovered at checking recent KAME repository change, noticed by itojun.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@56870 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-01-29 18:21:05 +00:00
shin
32ca7e751c another tcp apps IPv6 updates.(should be make world safe)
ftp, telnet, ftpd, faithd
  also telnet related sync with crypto, secure, kerberosIV

Obtained from: KAME project


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@56668 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-01-27 09:28:38 +00:00
nsayer
1549f66b7a Fix int function without return (make consistent with neighbors)
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@49861 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
1999-08-16 02:15:29 +00:00
ru
6d21a249df Merge from non-crypto version:
- "-N" option
- "-E" security fix
- "-s src_addr" option

Requested by:	markm


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@47973 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
1999-06-17 09:24:37 +00:00
markm
6ba4d9bbdb Bring the FreeBSD changes to the virgin sources.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@29181 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
1997-09-07 07:02:53 +00:00
markm
0e15f670a1 This commit was generated by cvs2svn to compensate for changes in r29088,
which included commits to RCS files with non-trunk default branches.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@29089 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
1997-09-04 06:11:16 +00:00