help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

telnet in buffer using elisp -- is this the best way?


From: Tennis Smith
Subject: telnet in buffer using elisp -- is this the best way?
Date: Sat, 10 Jul 2004 11:44:31 -0700

Hi

Apologies for the basic nature of the questions, but my area is s/w testing,
not elisp writing. ;-)

I frequently have the need to telnet into routers, via console ports thru a
term server or a native ip address.  I've built some *very* basic elisp
functions for doing this, but I'm wondering if there is a better way. The
number of routers in my environment continues to grow (Im in a testing
group, we have hundreds of the things). So, this approach has become a real
problem since each router requires a separate function to access it.

Here are a couple examples:

(defun 5gw-con ()
(interactive)
(telnet "10.10.10.58 2008")
(rename-buffer "ef-gw-5-con"))

(defun 5gw-con2 ()
(interactive)
(telnet "10.10.10.58 2009")
(rename-buffer "ef-gw-5-con"))

(defun 7gw ()
(interactive)
(telnet "10.10.10.40")
(rename-buffer "ef-gw-7"))

There's an additional issue too. Sometimes the same address will be used in
multiple places. Note that the first two examples uses an ip/port
combination. In this case the port will be changing, but the base ip address
will stay the same. Is there a way to specify the ip address in _one_ place
and have it be used in multiple places?

Is there a better way to do all this?

TIA,
-Tennis




--
Remove "-remove-to-reply" to respond to my  email address directly.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]