Mercurial > emacs
annotate lisp/net/net-utils.el @ 31697:5732e757b20f
(menu_bar_items, tool_bar_items)
(current_active_maps): Remove redundant get_local_map call.
author | Dave Love <fx@gnu.org> |
---|---|
date | Mon, 18 Sep 2000 18:45:01 +0000 |
parents | 716c9bd98063 |
children | 2e9fda397ea2 |
rev | line source |
---|---|
28210 | 1 ;;; net-utils.el --- Network functions |
2 | |
3 ;; Author: Peter Breton <pbreton@cs.umb.edu> | |
4 ;; Created: Sun Mar 16 1997 | |
5 ;; Keywords: network communications | |
6 ;; Time-stamp: <1999-11-13 10:19:01 pbreton> | |
7 | |
8 ;; This file is part of GNU Emacs. | |
9 | |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 ;; Boston, MA 02111-1307, USA. | |
24 | |
25 ;;; Commentary: | |
26 ;; | |
27 ;; There are three main areas of functionality: | |
28 ;; | |
29 ;; * Wrap common network utility programs (ping, traceroute, netstat, | |
30 ;; nslookup, arp, route). Note that these wrappers are of the diagnostic | |
31 ;; functions of these programs only. | |
32 ;; | |
33 ;; * Implement some very basic protocols in Emacs Lisp (finger and whois) | |
34 ;; | |
35 ;; * Support connections to HOST/PORT, generally for debugging and the like. | |
36 ;; In other words, for doing much the same thing as "telnet HOST PORT", and | |
37 ;; then typing commands. | |
38 ;; | |
39 ;; PATHS | |
40 ;; | |
41 ;; On some systems, some of these programs are not in normal user path, | |
42 ;; but rather in /sbin, /usr/sbin, and so on. | |
43 | |
44 | |
45 ;;; Code: | |
46 (eval-when-compile | |
47 (require 'comint)) | |
48 | |
49 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
50 ;; Customization Variables | |
51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
52 | |
53 (defgroup net-utils nil | |
54 "Network utility functions." | |
55 :prefix "net-utils-" | |
56 :group 'comm | |
57 :version "20.3" | |
58 ) | |
59 | |
60 (defcustom net-utils-remove-ctl-m | |
61 (member system-type (list 'windows-nt 'msdos)) | |
62 "If non-nil, remove control-Ms from output." | |
63 :group 'net-utils | |
64 :type 'boolean | |
65 ) | |
66 | |
67 (defcustom traceroute-program | |
68 (if (eq system-type 'windows-nt) | |
69 "tracert" | |
70 "traceroute") | |
71 "Program to trace network hops to a destination." | |
72 :group 'net-utils | |
73 :type 'string | |
74 ) | |
75 | |
76 (defcustom traceroute-program-options nil | |
77 "Options for the traceroute program." | |
78 :group 'net-utils | |
79 :type '(repeat string) | |
80 ) | |
81 | |
82 (defcustom ping-program "ping" | |
83 "Program to send network test packets to a host." | |
84 :group 'net-utils | |
85 :type 'string | |
86 ) | |
87 | |
88 ;; On Linux and Irix, the system's ping program seems to send packets | |
89 ;; indefinitely unless told otherwise | |
90 (defcustom ping-program-options | |
91 (and (memq system-type (list 'linux 'gnu/linux 'irix)) | |
92 (list "-c" "4")) | |
93 "Options for the ping program. | |
94 These options can be used to limit how many ICMP packets are emitted." | |
95 :group 'net-utils | |
96 :type '(repeat string) | |
97 ) | |
98 | |
99 (defcustom ipconfig-program | |
100 (if (eq system-type 'windows-nt) | |
101 "ipconfig" | |
102 "ifconfig") | |
103 "Program to print network configuration information." | |
104 :group 'net-utils | |
105 :type 'string | |
106 ) | |
107 | |
108 (defcustom ipconfig-program-options | |
109 (list | |
110 (if (eq system-type 'windows-nt) | |
111 "/all" "-a")) | |
112 "Options for ipconfig-program." | |
113 :group 'net-utils | |
114 :type '(repeat string) | |
115 ) | |
116 | |
117 (defcustom netstat-program "netstat" | |
118 "Program to print network statistics." | |
119 :group 'net-utils | |
120 :type 'string | |
121 ) | |
122 | |
123 (defcustom netstat-program-options | |
124 (list "-a") | |
125 "Options for netstat-program." | |
126 :group 'net-utils | |
127 :type '(repeat string) | |
128 ) | |
129 | |
130 (defcustom arp-program "arp" | |
131 "Program to print IP to address translation tables." | |
132 :group 'net-utils | |
133 :type 'string | |
134 ) | |
135 | |
136 (defcustom arp-program-options | |
137 (list "-a") | |
138 "Options for arp-program." | |
139 :group 'net-utils | |
140 :type '(repeat string) | |
141 ) | |
142 | |
143 (defcustom route-program | |
144 (if (eq system-type 'windows-nt) | |
145 "route" | |
146 "netstat") | |
147 "Program to print routing tables." | |
148 :group 'net-utils | |
149 :type 'string | |
150 ) | |
151 | |
152 (defcustom route-program-options | |
153 (if (eq system-type 'windows-nt) | |
154 (list "print") | |
155 (list "-r")) | |
156 "Options for route-program." | |
157 :group 'net-utils | |
158 :type '(repeat string) | |
159 ) | |
160 | |
161 (defcustom nslookup-program "nslookup" | |
162 "Program to interactively query DNS information." | |
163 :group 'net-utils | |
164 :type 'string | |
165 ) | |
166 | |
167 (defcustom nslookup-program-options nil | |
168 "List of options to pass to the nslookup program." | |
169 :group 'net-utils | |
170 :type '(repeat string) | |
171 ) | |
172 | |
173 (defcustom nslookup-prompt-regexp "^> " | |
174 "Regexp to match the nslookup prompt." | |
175 :group 'net-utils | |
176 :type 'regexp | |
177 ) | |
178 | |
179 (defcustom dig-program "dig" | |
180 "Program to query DNS information." | |
181 :group 'net-utils | |
182 :type 'string | |
183 ) | |
184 | |
185 (defcustom ftp-program "ftp" | |
186 "Progam to run to do FTP transfers." | |
187 :group 'net-utils | |
188 :type 'string | |
189 ) | |
190 | |
191 (defcustom ftp-program-options nil | |
192 "List of options to pass to the FTP program." | |
193 :group 'net-utils | |
194 :type '(repeat string) | |
195 ) | |
196 | |
197 (defcustom ftp-prompt-regexp "^ftp>" | |
198 "Regexp which matches the FTP program's prompt." | |
199 :group 'net-utils | |
200 :type 'regexp | |
201 ) | |
202 | |
203 (defcustom smbclient-program "smbclient" | |
204 "Smbclient program." | |
205 :group 'net-utils | |
206 :type 'string | |
207 ) | |
208 | |
209 (defcustom smbclient-program-options nil | |
210 "List of options to pass to the smbclient program." | |
211 :group 'net-utils | |
212 :type '(repeat string) | |
213 ) | |
214 | |
215 (defcustom smbclient-prompt-regexp "^smb: \>" | |
216 "Regexp which matches the smbclient program's prompt." | |
217 :group 'net-utils | |
218 :type 'regexp | |
219 ) | |
220 | |
28419
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
221 ;; Internal variables |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
222 (defvar network-connection-service nil) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
223 (defvar network-connection-host nil) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
224 |
28210 | 225 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
226 ;; Nslookup goodies | |
227 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
228 | |
229 (defconst nslookup-font-lock-keywords | |
30548
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
230 (progn |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
231 (require 'font-lock) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
232 (list |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
233 (list nslookup-prompt-regexp 0 font-lock-reference-face) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
234 (list "^[A-Za-z0-9 _]+:" 0 font-lock-type-face) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
235 (list "\\<\\(SOA\\|NS\\|MX\\|A\\|CNAME\\)\\>" |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
236 1 font-lock-keyword-face) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
237 ;; Dotted quads |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
238 (list |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
239 (mapconcat 'identity |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
240 (make-list 4 "[0-9]+") |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
241 "\\.") |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
242 0 font-lock-variable-name-face) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
243 ;; Host names |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
244 (list |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
245 (let ((host-expression "[-A-Za-z0-9]+")) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
246 (concat |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
247 (mapconcat 'identity |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
248 (make-list 2 host-expression) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
249 "\\.") |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
250 "\\(\\." host-expression "\\)*") |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
251 ) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
252 0 font-lock-variable-name-face) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
253 )) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
254 "Expressions to font-lock for nslookup.") |
28210 | 255 |
256 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
257 ;; FTP goodies | |
258 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
259 | |
260 (defconst ftp-font-lock-keywords | |
30548
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
261 (progn |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
262 (require 'font-lock) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
263 (list |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
264 (list ftp-prompt-regexp 0 font-lock-reference-face)))) |
28210 | 265 |
266 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
267 ;; smbclient goodies | |
268 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
269 | |
270 (defconst smbclient-font-lock-keywords | |
30548
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
271 (progn |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
272 (require 'font-lock) |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
273 (list |
716c9bd98063
(nslookup-font-lock-keywords): Don't condition font lock support
Eli Zaretskii <eliz@gnu.org>
parents:
29303
diff
changeset
|
274 (list smbclient-prompt-regexp 0 font-lock-reference-face)))) |
28210 | 275 |
276 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
277 ;; Utility functions | |
278 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
279 | |
280 ;; Simplified versions of some at-point functions from ffap.el. | |
281 ;; It's not worth loading all of ffap just for these. | |
282 (defun net-utils-machine-at-point () | |
283 (let ((pt (point))) | |
284 (buffer-substring-no-properties | |
285 (save-excursion | |
286 (skip-chars-backward "-a-zA-Z0-9.") | |
287 (point)) | |
288 (save-excursion | |
289 (skip-chars-forward "-a-zA-Z0-9.") | |
290 (skip-chars-backward "." pt) | |
291 (point))))) | |
292 | |
293 (defun net-utils-url-at-point () | |
294 (let ((pt (point))) | |
295 (buffer-substring-no-properties | |
296 (save-excursion | |
297 (skip-chars-backward "--:=&?$+@-Z_a-z~#,%") | |
298 (skip-chars-forward "^A-Za-z0-9" pt) | |
299 (point)) | |
300 (save-excursion | |
301 (skip-chars-forward "--:=&?$+@-Z_a-z~#,%") | |
302 (skip-chars-backward ":;.,!?" pt) | |
303 (point))))) | |
304 | |
305 | |
306 (defun net-utils-remove-ctrl-m-filter (process output-string) | |
307 "Remove trailing control Ms." | |
308 (let ((old-buffer (current-buffer)) | |
309 (filtered-string output-string)) | |
310 (unwind-protect | |
311 (let ((moving)) | |
312 (set-buffer (process-buffer process)) | |
313 (setq moving (= (point) (process-mark process))) | |
314 | |
315 (while (string-match "\r" filtered-string) | |
316 (setq filtered-string | |
317 (replace-match "" nil nil filtered-string))) | |
318 | |
319 (save-excursion | |
320 ;; Insert the text, moving the process-marker. | |
321 (goto-char (process-mark process)) | |
322 (insert filtered-string) | |
323 (set-marker (process-mark process) (point))) | |
324 (if moving (goto-char (process-mark process)))) | |
325 (set-buffer old-buffer)))) | |
326 | |
327 (defmacro net-utils-run-program (name header program &rest args) | |
328 "Run a network information program." | |
329 ` (let ((buf (get-buffer-create (concat "*" ,name "*")))) | |
330 (set-buffer buf) | |
331 (erase-buffer) | |
332 (insert ,header "\n") | |
333 (set-process-filter | |
334 (apply 'start-process ,name buf ,program ,@args) | |
335 'net-utils-remove-ctrl-m-filter) | |
336 (display-buffer buf))) | |
337 | |
338 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
339 ;; Wrappers for external network programs | |
340 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
341 | |
342 ;;;###autoload | |
343 (defun traceroute (target) | |
344 "Run traceroute program for TARGET." | |
345 (interactive "sTarget: ") | |
346 (let ((options | |
347 (if traceroute-program-options | |
348 (append traceroute-program-options (list target)) | |
349 (list target)))) | |
350 (net-utils-run-program | |
351 (concat "Traceroute" " " target) | |
352 (concat "** Traceroute ** " traceroute-program " ** " target) | |
353 traceroute-program | |
354 options | |
355 ))) | |
356 | |
357 ;;;###autoload | |
358 (defun ping (host) | |
359 "Ping HOST. | |
360 If your system's ping continues until interrupted, you can try setting | |
361 `ping-program-options'." | |
362 (interactive | |
363 (list (read-from-minibuffer "Ping host: " (net-utils-machine-at-point)))) | |
364 (let ((options | |
365 (if ping-program-options | |
366 (append ping-program-options (list host)) | |
367 (list host)))) | |
368 (net-utils-run-program | |
369 (concat "Ping" " " host) | |
370 (concat "** Ping ** " ping-program " ** " host) | |
371 ping-program | |
372 options | |
373 ))) | |
374 | |
375 ;;;###autoload | |
376 (defun ipconfig () | |
377 "Run ipconfig program." | |
378 (interactive) | |
379 (net-utils-run-program | |
380 "Ipconfig" | |
381 (concat "** Ipconfig ** " ipconfig-program " ** ") | |
382 ipconfig-program | |
383 ipconfig-program-options | |
384 )) | |
385 | |
386 ;; This is the normal name on most Unixes. | |
387 ;;;###autoload | |
388 (defalias 'ifconfig 'ipconfig) | |
389 | |
390 ;;;###autoload | |
391 (defun netstat () | |
392 "Run netstat program." | |
393 (interactive) | |
394 (net-utils-run-program | |
395 "Netstat" | |
396 (concat "** Netstat ** " netstat-program " ** ") | |
397 netstat-program | |
398 netstat-program-options | |
399 )) | |
400 | |
401 ;;;###autoload | |
402 (defun arp () | |
403 "Run the arp program." | |
404 (interactive) | |
405 (net-utils-run-program | |
406 "Arp" | |
407 (concat "** Arp ** " arp-program " ** ") | |
408 arp-program | |
409 arp-program-options | |
410 )) | |
411 | |
412 ;;;###autoload | |
413 (defun route () | |
414 "Run the route program." | |
415 (interactive) | |
416 (net-utils-run-program | |
417 "Route" | |
418 (concat "** Route ** " route-program " ** ") | |
419 route-program | |
420 route-program-options | |
421 )) | |
422 | |
423 ;; FIXME -- Needs to be a process filter | |
424 ;; (defun netstat-with-filter (filter) | |
425 ;; "Run netstat program." | |
426 ;; (interactive "sFilter: ") | |
427 ;; (netstat) | |
428 ;; (set-buffer (get-buffer "*Netstat*")) | |
429 ;; (goto-char (point-min)) | |
430 ;; (delete-matching-lines filter) | |
431 ;; ) | |
432 | |
433 ;;;###autoload | |
434 (defun nslookup-host (host) | |
435 "Lookup the DNS information for HOST." | |
436 (interactive | |
437 (list (read-from-minibuffer "Lookup host: " (net-utils-machine-at-point)))) | |
438 (let ((options | |
439 (if nslookup-program-options | |
440 (append nslookup-program-options (list host)) | |
441 (list host)))) | |
442 (net-utils-run-program | |
443 "Nslookup" | |
444 (concat "** " | |
445 (mapconcat 'identity | |
446 (list "Nslookup" host nslookup-program) | |
447 " ** ")) | |
448 nslookup-program | |
449 options | |
450 ))) | |
451 | |
452 | |
453 ;;;###autoload | |
454 (defun nslookup () | |
455 "Run nslookup program." | |
456 (interactive) | |
457 (require 'comint) | |
458 (comint-run nslookup-program) | |
459 (set-process-filter (get-buffer-process "*nslookup*") | |
460 'net-utils-remove-ctrl-m-filter) | |
461 (nslookup-mode) | |
462 ) | |
463 | |
464 ;; Using a derived mode gives us keymaps, hooks, etc. | |
465 (define-derived-mode | |
466 nslookup-mode comint-mode "Nslookup" | |
467 "Major mode for interacting with the nslookup program." | |
468 (set | |
469 (make-local-variable 'font-lock-defaults) | |
470 '((nslookup-font-lock-keywords))) | |
471 (setq local-abbrev-table nslookup-mode-abbrev-table) | |
472 (abbrev-mode t) | |
473 (make-local-variable 'comint-prompt-regexp) | |
474 (setq comint-prompt-regexp nslookup-prompt-regexp) | |
475 (make-local-variable 'comint-input-autoexpand) | |
476 (setq comint-input-autoexpand t) | |
477 ) | |
478 | |
479 (define-key nslookup-mode-map "\t" 'comint-dynamic-complete) | |
480 | |
481 (define-abbrev nslookup-mode-abbrev-table "e" "exit") | |
482 (define-abbrev nslookup-mode-abbrev-table "f" "finger") | |
483 (define-abbrev nslookup-mode-abbrev-table "h" "help") | |
484 (define-abbrev nslookup-mode-abbrev-table "lse" "lserver") | |
485 (define-abbrev nslookup-mode-abbrev-table "q" "exit") | |
486 (define-abbrev nslookup-mode-abbrev-table "r" "root") | |
487 (define-abbrev nslookup-mode-abbrev-table "s" "set") | |
488 (define-abbrev nslookup-mode-abbrev-table "se" "server") | |
489 (define-abbrev nslookup-mode-abbrev-table "v" "viewer") | |
490 | |
491 ;;;###autoload | |
492 (defun dig (host) | |
493 "Run dig program." | |
494 (interactive | |
495 (list | |
496 (progn | |
497 (require 'ffap) | |
498 (read-from-minibuffer | |
499 "Lookup host: " | |
500 (or (ffap-string-at-point 'machine) ""))))) | |
501 (net-utils-run-program | |
502 "Dig" | |
503 (concat "** " | |
504 (mapconcat 'identity | |
505 (list "Dig" host dig-program) | |
506 " ** ")) | |
507 dig-program | |
508 (list host) | |
509 )) | |
510 | |
511 ;; This is a lot less than ange-ftp, but much simpler. | |
512 ;;;###autoload | |
513 (defun ftp (host) | |
514 "Run ftp program." | |
515 (interactive | |
516 (list | |
517 (read-from-minibuffer | |
518 "Ftp to Host: " (net-utils-machine-at-point)))) | |
519 (require 'comint) | |
520 (let ((buf (get-buffer-create (concat "*ftp [" host "]*")))) | |
521 (set-buffer buf) | |
522 (comint-mode) | |
523 (comint-exec buf (concat "ftp-" host) ftp-program nil | |
524 (if ftp-program-options | |
525 (append (list host) ftp-program-options) | |
526 (list host))) | |
527 (ftp-mode) | |
528 (switch-to-buffer-other-window buf) | |
529 )) | |
530 | |
531 (define-derived-mode | |
532 ftp-mode comint-mode "FTP" | |
533 "Major mode for interacting with the ftp program." | |
534 | |
535 (set | |
536 (make-local-variable 'font-lock-defaults) | |
537 '((ftp-font-lock-keywords))) | |
538 | |
539 (make-local-variable 'comint-prompt-regexp) | |
540 (setq comint-prompt-regexp ftp-prompt-regexp) | |
541 | |
542 (make-local-variable 'comint-input-autoexpand) | |
543 (setq comint-input-autoexpand t) | |
544 | |
545 ;; Already buffer local! | |
546 (setq comint-output-filter-functions | |
547 (list 'comint-watch-for-password-prompt)) | |
548 | |
549 (setq local-abbrev-table ftp-mode-abbrev-table) | |
550 (abbrev-mode t) | |
551 ) | |
552 | |
553 (define-abbrev ftp-mode-abbrev-table "q" "quit") | |
554 (define-abbrev ftp-mode-abbrev-table "g" "get") | |
555 (define-abbrev ftp-mode-abbrev-table "p" "prompt") | |
556 (define-abbrev ftp-mode-abbrev-table "anon" "anonymous") | |
557 | |
558 ;; Occasionally useful | |
559 (define-key ftp-mode-map "\t" 'comint-dynamic-complete) | |
560 | |
561 (defun smbclient (host service) | |
562 "Connect to SERVICE on HOST via SMB." | |
563 (interactive | |
564 (list | |
565 (read-from-minibuffer | |
566 "Connect to Host: " (net-utils-machine-at-point)) | |
567 (read-from-minibuffer "SMB Service: "))) | |
568 (require 'comint) | |
569 (let* ((name (format "smbclient [%s\\%s]" host service)) | |
570 (buf (get-buffer-create (concat "*" name "*"))) | |
571 (service-name (concat "\\\\" host "\\" service))) | |
572 (set-buffer buf) | |
573 (comint-mode) | |
574 (comint-exec buf name smbclient-program nil | |
575 (if smbclient-program-options | |
576 (append (list service-name) smbclient-program-options) | |
577 (list service-name))) | |
578 (smbclient-mode) | |
579 (switch-to-buffer-other-window buf) | |
580 )) | |
581 | |
582 (defun smbclient-list-shares (host) | |
583 "List services on HOST." | |
584 (interactive | |
585 (list | |
586 (read-from-minibuffer | |
587 "Connect to Host: " (net-utils-machine-at-point)) | |
588 )) | |
589 (let ((buf (get-buffer-create (format "*SMB Shares on %s*" host)))) | |
590 (set-buffer buf) | |
591 (comint-mode) | |
592 (comint-exec | |
593 buf | |
594 "smbclient-list-shares" | |
595 smbclient-program | |
596 nil | |
597 (list "-L" host) | |
598 ) | |
599 (smbclient-mode) | |
600 (switch-to-buffer-other-window buf))) | |
601 | |
602 (define-derived-mode | |
603 smbclient-mode comint-mode "smbclient" | |
604 "Major mode for interacting with the smbclient program." | |
605 | |
606 (set | |
607 (make-local-variable 'font-lock-defaults) | |
608 '((smbclient-font-lock-keywords))) | |
609 | |
610 (make-local-variable 'comint-prompt-regexp) | |
611 (setq comint-prompt-regexp smbclient-prompt-regexp) | |
612 | |
613 (make-local-variable 'comint-input-autoexpand) | |
614 (setq comint-input-autoexpand t) | |
615 | |
616 ;; Already buffer local! | |
617 (setq comint-output-filter-functions | |
618 (list 'comint-watch-for-password-prompt)) | |
619 | |
620 (setq local-abbrev-table smbclient-mode-abbrev-table) | |
621 (abbrev-mode t) | |
622 ) | |
623 | |
624 (define-abbrev smbclient-mode-abbrev-table "q" "quit") | |
625 | |
626 | |
627 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
628 ;; Network Connections | |
629 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
630 | |
631 ;; Full list is available at: | |
632 ;; ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers | |
633 (defvar network-connection-service-alist | |
634 (list | |
635 (cons 'echo 7) | |
636 (cons 'active-users 11) | |
637 (cons 'daytime 13) | |
638 (cons 'chargen 19) | |
639 (cons 'ftp 21) | |
640 (cons 'telnet 23) | |
641 (cons 'smtp 25) | |
642 (cons 'time 37) | |
643 (cons 'whois 43) | |
644 (cons 'gopher 70) | |
645 (cons 'finger 79) | |
646 (cons 'www 80) | |
647 (cons 'pop2 109) | |
648 (cons 'pop3 110) | |
649 (cons 'sun-rpc 111) | |
650 (cons 'nntp 119) | |
651 (cons 'ntp 123) | |
652 (cons 'netbios-name 137) | |
653 (cons 'netbios-data 139) | |
654 (cons 'irc 194) | |
655 (cons 'https 443) | |
656 (cons 'rlogin 513) | |
657 ) | |
658 "Alist of services and associated TCP port numbers. | |
659 This list in not complete.") | |
660 | |
661 ;; Workhorse macro | |
662 (defmacro run-network-program (process-name host port | |
663 &optional initial-string) | |
664 ` | |
665 (let ((tcp-connection) | |
666 (buf) | |
667 ) | |
668 (setq buf (get-buffer-create (concat "*" ,process-name "*"))) | |
669 (set-buffer buf) | |
670 (or | |
671 (setq tcp-connection | |
672 (open-network-stream | |
673 ,process-name | |
674 buf | |
675 ,host | |
676 ,port | |
677 )) | |
678 (error "Could not open connection to %s" ,host)) | |
679 (erase-buffer) | |
680 (set-marker (process-mark tcp-connection) (point-min)) | |
681 (set-process-filter tcp-connection 'net-utils-remove-ctrl-m-filter) | |
682 (and ,initial-string | |
683 (process-send-string tcp-connection | |
684 (concat ,initial-string "\r\n"))) | |
685 (display-buffer buf))) | |
686 | |
687 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
688 ;; Simple protocols | |
689 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
690 | |
29303
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
691 (defcustom finger-X.500-host-regexps nil |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
692 "A list of regular expressions matching host names. |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
693 If a host name passed to `finger' matches one of these regular |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
694 expressions, it is assumed to be a host that doesn't accept |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
695 queries of the form USER@HOST, and wants a query containing USER only." |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
696 :group 'net-utils |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
697 :type '(repeat regexp) |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
698 :version "21.1") |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
699 |
28210 | 700 ;; Finger protocol |
701 ;;;###autoload | |
702 (defun finger (user host) | |
703 "Finger USER on HOST." | |
704 ;; One of those great interactive statements that's actually | |
705 ;; longer than the function call! The idea is that if the user | |
706 ;; uses a string like "pbreton@cs.umb.edu", we won't ask for the | |
707 ;; host name. If we don't see an "@", we'll prompt for the host. | |
708 (interactive | |
709 (let* ((answer (read-from-minibuffer "Finger User: " | |
710 (net-utils-url-at-point))) | |
711 (index (string-match (regexp-quote "@") answer))) | |
712 (if index | |
29303
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
713 (list (substring answer 0 index) |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
714 (substring answer (1+ index))) |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
715 (list answer |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
716 (read-from-minibuffer "At Host: " |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
717 (net-utils-machine-at-point)))))) |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
718 (let* ((user-and-host (concat user "@" host)) |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
719 (process-name (concat "Finger [" user-and-host "]")) |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
720 (regexps finger-X.500-host-regexps) |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
721 found) |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
722 (while (not (string-match (car regexps) host)) |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
723 (setq regexps (cdr regexps))) |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
724 (when regexps |
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
725 (setq user-and-host user)) |
28210 | 726 (run-network-program |
727 process-name | |
728 host | |
729 (cdr (assoc 'finger network-connection-service-alist)) | |
29303
a3541330de52
(finger-X.500-host-regexps): New user-option.
Gerd Moellmann <gerd@gnu.org>
parents:
28419
diff
changeset
|
730 user-and-host))) |
28210 | 731 |
732 (defcustom whois-server-name "rs.internic.net" | |
733 "Default host name for the whois service." | |
734 :group 'net-utils | |
735 :type 'string | |
736 ) | |
737 | |
738 (defcustom whois-server-list | |
739 '(("whois.arin.net") ; Networks, ASN's, and related POC's (numbers) | |
740 ("rs.internic.net") ; domain related info | |
741 ("whois.abuse.net") | |
742 ("whois.apnic.net") | |
743 ("nic.ddn.mil") | |
744 ("whois.nic.mil") | |
745 ("whois.nic.gov") | |
746 ("whois.ripe.net")) | |
747 "A list of whois servers that can be queried." | |
748 :group 'net-utils | |
749 :type '(repeat (list string))) | |
750 | |
751 (defcustom whois-server-tld | |
752 '(("rs.internic.net" . "com") | |
753 ("rs.internic.net" . "org") | |
754 ("whois.ripe.net" . "be") | |
755 ("whois.ripe.net" . "de") | |
756 ("whois.ripe.net" . "dk") | |
757 ("whois.ripe.net" . "it") | |
758 ("whois.ripe.net" . "fi") | |
759 ("whois.ripe.net" . "fr") | |
760 ("whois.ripe.net" . "uk") | |
761 ("whois.apnic.net" . "au") | |
762 ("whois.apnic.net" . "ch") | |
763 ("whois.apnic.net" . "hk") | |
764 ("whois.apnic.net" . "jp") | |
765 ("whois.nic.gov" . "gov") | |
766 ("whois.nic.mil" . "mil")) | |
767 "Alist to map top level domains to whois servers." | |
768 :group 'net-utils | |
769 :type '(repeat (cons string string))) | |
770 | |
771 (defcustom whois-guess-server t | |
772 "If non-nil then whois will try to deduce the appropriate whois | |
773 server from the query. If the query doesn't look like a domain or hostname | |
774 then the server named by whois-server-name is used." | |
775 :group 'net-utils | |
776 :type 'boolean) | |
777 | |
778 (defun whois-get-tld (host) | |
779 "Return the top level domain of `host', or nil if it isn't a domain name." | |
780 (let ((i (1- (length host))) | |
781 (max-len (- (length host) 5))) | |
782 (while (not (or (= i max-len) (char-equal (aref host i) ?.))) | |
783 (setq i (1- i))) | |
784 (if (= i max-len) | |
785 nil | |
786 (substring host (1+ i))))) | |
787 | |
788 ;; Whois protocol | |
789 ;;;###autoload | |
790 (defun whois (arg search-string) | |
791 "Send SEARCH-STRING to server defined by the `whois-server-name' variable. | |
792 If `whois-guess-server' is non-nil, then try to deduce the correct server | |
793 from SEARCH-STRING. With argument, prompt for whois server." | |
794 (interactive "P\nsWhois: ") | |
795 (let* ((whois-apropos-host (if whois-guess-server | |
796 (rassoc (whois-get-tld search-string) | |
797 whois-server-tld) | |
798 nil)) | |
799 (server-name (if whois-apropos-host | |
800 (car whois-apropos-host) | |
801 whois-server-name)) | |
802 (host | |
803 (if arg | |
804 (completing-read "Whois server name: " | |
805 whois-server-list nil nil "whois.") | |
806 server-name))) | |
807 (run-network-program | |
808 "Whois" | |
809 host | |
810 (cdr (assoc 'whois network-connection-service-alist)) | |
811 search-string | |
812 ))) | |
813 | |
814 (defcustom whois-reverse-lookup-server "whois.arin.net" | |
815 "Server which provides inverse DNS mapping." | |
816 :group 'net-utils | |
817 :type 'string | |
818 ) | |
819 | |
820 ;;;###autoload | |
821 (defun whois-reverse-lookup () | |
822 (interactive) | |
823 (let ((whois-server-name whois-reverse-lookup-server)) | |
824 (call-interactively 'whois))) | |
825 | |
826 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
827 ;;; General Network connection | |
828 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
829 | |
28419
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
830 ;; Using a derived mode gives us keymaps, hooks, etc. |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
831 (define-derived-mode |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
832 network-connection-mode comint-mode "Network-Connection" |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
833 "Major mode for interacting with the network-connection program." |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
834 ) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
835 |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
836 (defun network-connection-mode-setup (host service) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
837 (let ((network-abbrev-table |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
838 (or |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
839 (assoc service network-connection-service-abbrev-alist) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
840 (and (rassoc service network-connection-service-alist) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
841 (assoc |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
842 (elt (rassoc service network-connection-service-alist) 0) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
843 network-connection-service-abbrev-alist))))) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
844 (make-local-variable 'network-connection-host) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
845 (setq network-connection-host host) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
846 (make-local-variable 'network-connection-service) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
847 (setq network-connection-service service) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
848 (and network-abbrev-table |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
849 (setq local-abbrev-table (cdr network-abbrev-table)) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
850 (abbrev-mode t) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
851 ))) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
852 |
28210 | 853 ;;;###autoload |
854 (defun network-connection-to-service (host service) | |
855 "Open a network connection to SERVICE on HOST." | |
856 (interactive | |
857 (list | |
858 (read-from-minibuffer "Host: " (net-utils-machine-at-point)) | |
859 (completing-read "Service: " | |
860 (mapcar | |
861 (function | |
862 (lambda (elt) | |
863 (list (symbol-name (car elt))))) | |
864 network-connection-service-alist)))) | |
865 (network-connection | |
866 host | |
867 (cdr (assoc (intern service) network-connection-service-alist))) | |
868 ) | |
869 | |
870 ;;;###autoload | |
871 (defun network-connection (host port) | |
872 "Open a network connection to HOST on PORT." | |
873 (interactive "sHost: \nnPort: ") | |
874 (network-service-connection host (number-to-string port))) | |
875 | |
876 (defun network-service-connection (host service) | |
877 "Open a network connection to SERVICE on HOST." | |
878 (require 'comint) | |
28419
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
879 (let* ( |
28210 | 880 (process-name (concat "Network Connection [" host " " service "]")) |
881 (portnum (string-to-number service)) | |
28419
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
882 (buf (get-buffer-create (concat "*" process-name "*"))) |
28210 | 883 ) |
884 (or (zerop portnum) (setq service portnum)) | |
885 (make-comint | |
886 process-name | |
887 (cons host service)) | |
28419
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
888 (set-buffer buf) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
889 (network-connection-mode) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
890 (network-connection-mode-setup host service) |
fed834403704
network-connection-mode is derived from comint-mode
Peter Breton <pbreton@attbi.com>
parents:
28210
diff
changeset
|
891 (pop-to-buffer buf) |
28210 | 892 )) |
893 | |
894 (provide 'net-utils) | |
895 | |
896 ;;; net-utils.el ends here |