The major part of this change has been contributed by

<andyw@pobox.com>.

Implements patch #4635: Add support for terminal/console servers for
serial programmers

* ser_posix.c: Add net_open(), and divert to it for net:host:port.
* ser_win32.c: Recognize net:host:port, and bail out.
* avrdude.1: Document the net:host:port connection option.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@635 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2006-08-31 20:52:47 +00:00
parent 8ce2ee704c
commit 9e0c0b850a
5 changed files with 154 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
/*
* avrdude - A Downloader/Uploader for AVR device programmers
* Copyright (C) 2003, 2004 Martin J. Thomas <mthomas@rhrk.uni-kl.de>
* Copyright (C) 2006 Joerg Wunsch <j@uriah.heep.sax.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -110,6 +111,20 @@ static int ser_open(char * port, long baud)
LPVOID lpMsgBuf;
HANDLE hComPort=INVALID_HANDLE_VALUE;
/*
* If the port is of the form "net:<host>:<port>", then
* handle it as a TCP connection to a terminal server.
*
* This is curently not implemented for Win32.
*/
if (strncmp(port, "net:", strlen("net:")) == 0) {
fprintf(stderr,
"%s: ser_open(): network connects are currently not"
"implemented for Win32 environments\n",
progname);
exit(1);
}
/* if (hComPort!=INVALID_HANDLE_VALUE)
fprintf(stderr, "%s: ser_open(): \"%s\" is already open\n",
progname, port);