com0com-cvs Mailing List for Null-modem emulator (Page 12)
The virtual serial port driver for Windows.
Brought to you by:
vfrolov
You can subscribe to this list here.
2005 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
(13) |
Jun
(18) |
Jul
(9) |
Aug
(10) |
Sep
(15) |
Oct
(6) |
Nov
(9) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(6) |
Feb
(4) |
Mar
(4) |
Apr
(2) |
May
(7) |
Jun
(11) |
Jul
(6) |
Aug
(9) |
Sep
(1) |
Oct
(27) |
Nov
(22) |
Dec
(3) |
2007 |
Jan
(13) |
Feb
(16) |
Mar
(2) |
Apr
(3) |
May
(7) |
Jun
(17) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(20) |
Nov
(18) |
Dec
(1) |
2008 |
Jan
|
Feb
(3) |
Mar
(46) |
Apr
(40) |
May
(4) |
Jun
(9) |
Jul
(7) |
Aug
(62) |
Sep
(25) |
Oct
(51) |
Nov
(67) |
Dec
(81) |
2009 |
Jan
(13) |
Feb
(31) |
Mar
(12) |
Apr
|
May
(10) |
Jun
|
Jul
(5) |
Aug
(2) |
Sep
(10) |
Oct
|
Nov
(3) |
Dec
(1) |
2010 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
(12) |
Jun
(9) |
Jul
(12) |
Aug
(7) |
Sep
(6) |
Oct
|
Nov
|
Dec
(1) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(11) |
Jun
|
Jul
(26) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(23) |
2012 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
(2) |
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Vyacheslav F. <vf...@us...> - 2008-12-08 10:49:14
|
Update of /cvsroot/com0com/com0com/sys In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19107 Modified Files: version.h Log Message: Pre-tagging version change Index: version.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/version.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** version.h 10 Jun 2008 11:19:33 -0000 1.15 --- version.h 8 Dec 2008 10:49:07 -0000 1.16 *************** *** 26,32 **** #define C0C_V1 2 ! #define C0C_V2 1 #define C0C_V3 0 ! #define C0C_V4 1 #define MK_VERSION_STR1(V1, V2, V3, V4) #V1 "." #V2 "." #V3 "." #V4 --- 26,32 ---- #define C0C_V1 2 ! #define C0C_V2 2 #define C0C_V3 0 ! #define C0C_V4 0 #define MK_VERSION_STR1(V1, V2, V3, V4) #V1 "." #V2 "." #V3 "." #V4 |
From: Vyacheslav F. <vf...@us...> - 2008-12-08 10:41:48
|
Update of /cvsroot/com0com/com0com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18413 Modified Files: ReadMe.txt Log Message: Added more FAQs & HOWTOs Index: ReadMe.txt =================================================================== RCS file: /cvsroot/com0com/com0com/ReadMe.txt,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ReadMe.txt 2 Dec 2008 15:51:17 -0000 1.19 --- ReadMe.txt 8 Dec 2008 10:41:10 -0000 1.20 *************** *** 22,25 **** --- 22,32 ---- to CNCB0 port. In this case the t38modem is a fax modem emulation program. + In conjunction with the hub4com the com0com allows you to + - handle data and signals from a single real serial device by a number of + different applications. For example, several applications can share data + from one GPS device; + - use real serial ports of remote computer like if they exist on the local + computer (supports RFC 2217). + The homepage for com0com project is http://com0com.sourceforge.net/. *************** *** 28,39 **** ========== ! NOTE (Windows Vista): Before installing/uninstalling the com0com driver or adding/removing/changing ! ports on Windows Vista the User Account Control (UAC) should be turned off. ! NOTE (x64-based Windows Vista): The com0com.sys is a test-signed kernel-mode driver that will not load by ! default on x64-based Windows Vista. To enable test signing, use the following ! BCDedit command: bcdedit.exe -set TESTSIGNING ON NOTE: --- 35,49 ---- ========== ! NOTE (Windows Vista/Windows Server 2008): Before installing/uninstalling the com0com driver or adding/removing/changing ! ports the User Account Control (UAC) should be turned off (require reboot). ! NOTE (x64-based Windows Vista/Windows Server 2008): The com0com.sys is a test-signed kernel-mode driver that will not load by ! default. To enable test signing, enter command: ! ! bcdedit.exe -set TESTSIGNING ON ! ! and reboot the computer. NOTE: *************** *** 213,214 **** --- 223,256 ---- BTW: The setupg.exe is a GUI wrapper for setupc.exe. + + Q. I need to use com0com ports with an application that doesn't recognize + com0com ports as "real" com ports. It does not see a com0com port even + though I have changed it's name to COMx. Is there a com0com settings that + will make the port appear to be a "real" com port? + A. No, there is not, but you can "deceive" the application this way: + + 1. With the "Add/Remove Hardware" wizard install new standard serial port. + You don't need a real serial hardware to do it. Select non conflicted + IO/IRQ resources. + 2. With the "Device Manager" disable the newly created port (let it be + COM4). + 3. Launch the Setup Command Prompt shortcut. + 4. Install the pair of ports, were one of them has name COM4, for example: + + command> install PortName=COM4 - + + Ignore a warning about the COM4 is "in use" (press Continue). + + Q. Is it possible to configure the com0com to randomly corrupt the data? It + would be nice to have this feature so that we can test our application + robustness. + A. Yes, it's possible by setting EmuNoise parameter: + + 1. Launch the Setup Command Prompt shortcut. + 2. Enter the change command, for example: + + command> change CNCA0 EmuNoise=0.00001,EmuBR=yes,EmuOverrun=yes + command> change CNCB0 EmuNoise=0.00001,EmuBR=yes,EmuOverrun=yes + + Now each character frame (including idle frames) will be corrupted with + probability 0.00001. |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 18:09:54
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5465 Modified Files: ReadMe.txt Log Message: Renamed to "HUB for communications" Rewritten INTRODUCTION section Removed BUILDING section Added Encryption example Added FAQs & HOWTOs section Index: ReadMe.txt =================================================================== RCS file: /cvsroot/com0com/hub4com/ReadMe.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ReadMe.txt 1 Dec 2008 17:22:53 -0000 1.6 --- ReadMe.txt 5 Dec 2008 18:09:51 -0000 1.7 *************** *** 1,26 **** ! =========================== ! HUB for COM ports (hub4com) ! =========================== INTRODUCTION ============ ! The HUB for COM ports (hub4com) is a Windows application and is a part ! of the com0com project. ! It allows to send data received from one COM port to a number of COM ! ports and vice versa. In conjunction with the com0com driver the hub4com ! makes it possible to handle data from a single serial device by a number ! of different applications. For example, several applications can share ! data from one GPS device. The homepage for com0com project is http://com0com.sourceforge.net/. - BUILDING - ======== - - Start Microsoft Visual C++ 2005 with hub4com.sln file. - Set Active Configuration to hub4com - Win32 Release. - Build solution (hub4com.exe and plugins\*.dll). TESTING --- 1,24 ---- ! ================================ ! HUB for communications (hub4com) ! ================================ INTRODUCTION ============ ! The HUB for communications (hub4com) is a Windows application and is a part of ! the com0com project. ! It allows to receive data and signals from one port, modify and send it to a ! number of ports and vice versa. ! ! In conjunction with the com0com driver the hub4com allows to ! - handle data and signals from a single real serial device by a number of ! different applications. For example, several applications can share data ! from one GPS device; ! - use real serial ports of remote computer like if they exist on the local ! computer. The homepage for com0com project is http://com0com.sourceforge.net/. TESTING *************** *** 91,99 **** ! RFC 2217 COM port server ! ------------------------ ! You have a phisical COM1 port and you'd like to share it through the ! network by the RFC 2217 "Telnet Com Port Control Option" protocol. 1. Start the com2tcp-rfc2217.bat on COM1 port. For example: --- 89,97 ---- ! RFC 2217 server (TCP to COM port redirector) ! -------------------------------------------- ! You have a server computer with phisical COM1 port and you'd like to share it ! through the network by the RFC 2217 "Telnet Com Port Control Option" protocol: 1. Start the com2tcp-rfc2217.bat on COM1 port. For example: *************** *** 105,114 **** ! COM port to TCP redirector (RFC 2217) ! ------------------------------------- ! On the first computer your.comport.server you have a phisical serial port ! shared through the network by the RFC 2217 protocol and you'd like to use ! it like a virtual serial port on the second computer. 1. With the com0com's Setup Command Prompt create COM5<->CNCB0 virtual --- 103,112 ---- ! RFC 2217 client (COM port to TCP redirector) ! -------------------------------------------- ! You have a server computer your.comport.server with phisical serial port ! shared through the network by the RFC 2217 protocol (see above example) and ! you'd like to use it on the client computer like a virtual serial port. 1. With the com0com's Setup Command Prompt create COM5<->CNCB0 virtual *************** *** 188,193 **** | app3 -- COM4 (virtual) -- | | -- COM4 --- -------------------------------------- -------------------- ! 1. With the com0com's Setup Command Prompt on both computers create COM2<->CNCB0, COM3<->CNCB1 and COM4<->CNCB2 virtual serial port pairs (see com0com's ReadMe.txt for more info). For example: --- 186,193 ---- | app3 -- COM4 (virtual) -- | | -- COM4 --- -------------------------------------- -------------------- + |<--------multiplexed------->| + |<-------------RFC 2217------------->| ! 1. With the com0com's Setup Command Prompt on client computer create COM2<->CNCB0, COM3<->CNCB1 and COM4<->CNCB2 virtual serial port pairs (see com0com's ReadMe.txt for more info). For example: *************** *** 204,205 **** --- 204,266 ---- multiplexer --baud 115200 COM1 CNCB1 CNCB2 CNCB3 + + + Encryption + ---------- + + You have a server computer that has three serial ports COM2, COM3 and COM4. + You'd like to use COM2, COM3 and COM4 of the server computer like if they + exist on the client computer and use the server computer's TCP/IP port + serial.server.addr:5555 for this. Additionally you'd like to encrypt TCP/IP + traffic to protect the private data from others: + + -------------------------------- ------------------------ + | Client computer | | Server computer | + | | | (serial.server.addr) | + | | | | + | app1 -- COM2 (virtual) -- | | -- COM2 ----- + | \ | | port / | + | app2 -- COM3 (virtual) --->-------TCP/IP-----> 5555-----<--- COM3 ----- + | / | | \ | + | app3 -- COM4 (virtual) -- | | -- COM4 ----- + -------------------------------- ------------------------ + |<--encrypted-->| + |<---multiplexed----------->| + |<--------RFC 2217----------------->| + + 1. With the com0com's Setup Command Prompt on client computer create + COM2<->CNCB0, COM3<->CNCB1 and COM4<->CNCB2 virtual serial port + pairs (see com0com's ReadMe.txt for more info). For example: + + command> install 0 PortName=COM2,EmuBR=yes - + command> install 1 PortName=COM3,EmuBR=yes - + command> install 2 PortName=COM4,EmuBR=yes - + + 2. Start the multiplexer.bat on the Server computer: + + multiplexer --secret "any secret phrase" --link-type tcp 5555 --mode server CNCB1 CNCB2 CNCB3 + + 3. Start the multiplexer.bat on the Client computer: + + multiplexer --secret "any secret phrase" --link-type tcp serial.server.addr:5555 CNCB1 CNCB2 CNCB3 + + + FAQs & HOWTOs + ============= + + Q. The com2tcp.bat, com2tcp-rfc2217.bat and multiplexer.bat are a wrappers to + the hub4com.exe. How to convert wrapper's command line to a file with + arguments for hub4com.exe? + A. The file can be created by seting OPTIONS variable, for example: + + 1. Convert multiplexer.bat's command line to the my.txt file: + + SET OPTIONS=--create-filter=trace,_CUT_THIS_LINE_ + multiplexer --baud 115200 COM1 CNCB1 CNCB2 CNCB3 > my.txt + + 2. Cut line "--create-filter=trace,_CUT_THIS_LINE_" from my.txt file. + + Now the folloving two command lines are equal: + + multiplexer --baud 115200 COM1 CNCB1 CNCB2 CNCB3 + hub4com --load=my.txt,_BEGIN_,_END_ |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 18:05:26
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3186 Modified Files: hub4com.vcproj Log Message: Added Building.txt Index: hub4com.vcproj =================================================================== RCS file: /cvsroot/com0com/hub4com/hub4com.vcproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** hub4com.vcproj 1 Dec 2008 17:20:57 -0000 1.9 --- hub4com.vcproj 5 Dec 2008 18:05:21 -0000 1.10 *************** *** 315,318 **** --- 315,322 ---- > <File + RelativePath=".\Building.txt" + > + </File> + <File RelativePath=".\ReadMe.txt" > |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 18:04:06
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2404 Added Files: Building.txt Log Message: Initial revision --- NEW FILE: Building.txt --- ================================ HUB for communications (hub4com) ================================ PREREQUISITES ============= You will need the following to build hub4com from source code: 1. Microsoft Visual C++ 2005 Express Edition (MSVC). 2. Microsoft Windows Platform Software Development Kit (SDK). BUILDING ======== 1. Start Microsoft Visual C++ 2005 with hub4com.sln file. 2. Set Active Configuration to hub4com - Win32 Release. 3. Build solution (hub4com.exe and plugins\*.dll). It will create hub4com.exe and plugins\*.dll files. |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 14:52:59
|
Update of /cvsroot/com0com/hub4com/examples In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11054 Modified Files: multiplexer.bat Log Message: Enabled quoted parameters Added --secret option Enabled reconnection for TCP linkport Index: multiplexer.bat =================================================================== RCS file: /cvsroot/com0com/hub4com/examples/multiplexer.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** multiplexer.bat 2 Dec 2008 11:27:10 -0000 1.2 --- multiplexer.bat 5 Dec 2008 14:52:54 -0000 1.3 *************** *** 16,22 **** :BEGIN_PARSE_OPTIONS ! IF "%1"=="" GOTO END_PARSE_OPTIONS ! SET OPTION=%1 SHIFT /1 --- 16,22 ---- :BEGIN_PARSE_OPTIONS ! IF "%~1" == "" GOTO END_PARSE_OPTIONS ! SET OPTION=%~1 SHIFT /1 *************** *** 29,33 **** IF /I "%OPTION%" NEQ "--mode" GOTO END_OPTION_MODE ! SET ARG=%1 SHIFT /1 --- 29,33 ---- IF /I "%OPTION%" NEQ "--mode" GOTO END_OPTION_MODE ! SET ARG=%~1 SHIFT /1 *************** *** 49,53 **** GOTO END_OPTION_LC :BEGIN_OPTION_LC ! SET VAL=%1 SHIFT /1 IF /I "%VAL:~0,1%"=="d" SET VAL=c --- 49,53 ---- GOTO END_OPTION_LC :BEGIN_OPTION_LC ! SET VAL=%~1 SHIFT /1 IF /I "%VAL:~0,1%"=="d" SET VAL=c *************** *** 57,65 **** IF /I "%OPTION%" NEQ "--link-type" GOTO END_OPTION_LINK_TYPE ! SET LINK_TYPE=%1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS :END_OPTION_LINK_TYPE IF "%OPTION:~0,2%" == "--" GOTO USAGE --- 57,71 ---- IF /I "%OPTION%" NEQ "--link-type" GOTO END_OPTION_LINK_TYPE ! SET LINK_TYPE=%~1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS :END_OPTION_LINK_TYPE + IF /I "%OPTION%" NEQ "--secret" GOTO END_OPTION_SECRET + SET SECRET=%~1 + SHIFT /1 + GOTO BEGIN_PARSE_OPTIONS + :END_OPTION_SECRET + IF "%OPTION:~0,2%" == "--" GOTO USAGE *************** *** 67,70 **** --- 73,92 ---- SET /A PORT_NUM=%PORT_NUM%+1 + IF "%TRACE_COMMENT%" NEQ "" GOTO END_LINKPORT_TRACE + SET LINKPORT_FILTERS=%LINKPORT_FILTERS% --create-filter=trace,linkport,COM + :END_LINKPORT_TRACE + + IF "%SECRET%" == "" GOTO END_LINKPORT_SECRET + SET LINKPORT_FILTERS=%LINKPORT_FILTERS% --create-filter=crypt,linkport,crypt:"--secret=\"%SECRET%\"" + + IF "%TRACE_COMMENT%" NEQ "" GOTO END_LINKPORT_TRACE_RAW + SET LINKPORT_FILTERS=%LINKPORT_FILTERS% --create-filter=trace,linkport,RAW + :END_LINKPORT_TRACE_RAW + :END_LINKPORT_SECRET + + IF "%LINKPORT_FILTERS%" == "" GOTO END_LINKPORT_FILTERS + SET LINKPORT_FILTERS=%LINKPORT_FILTERS% --add-filters=0:linkport + :END_LINKPORT_FILTERS + IF /I "%LINK_TYPE%" NEQ "serial" GOTO END_LINK_TYPE_SERIAL SET OPTIONS=%OPTIONS% \\.\%OPTION% *************** *** 73,77 **** IF /I "%LINK_TYPE%" NEQ "tcp" GOTO END_LINK_TYPE_TCP ! SET OPTIONS=%OPTIONS% --use-driver=tcp %OPTION% --use-driver=serial GOTO BEGIN_PARSE_OPTIONS :END_LINK_TYPE_TCP --- 95,99 ---- IF /I "%LINK_TYPE%" NEQ "tcp" GOTO END_LINK_TYPE_TCP ! SET OPTIONS=%OPTIONS% --use-driver=tcp *%OPTION% --use-driver=serial GOTO BEGIN_PARSE_OPTIONS :END_LINK_TYPE_TCP *************** *** 109,113 **** @ECHO ON ! "%HUB4COM%" %CLIENT_OPTIONS% %SERVER_OPTIONS% --write-limit=%LINKPORT_WRITE_LIMIT% %OPTIONS% @ECHO OFF ENDLOCAL --- 131,135 ---- @ECHO ON ! "%HUB4COM%" %LINKPORT_FILTERS% %CLIENT_OPTIONS% %SERVER_OPTIONS% --write-limit=%LINKPORT_WRITE_LIMIT% %OPTIONS% @ECHO OFF ENDLOCAL *************** *** 127,130 **** --- 149,153 ---- ECHO --link-type ^<t^> - for subsequent port set type ^<t^> (default is ECHO serial), where ^<t^> is serial or tcp. + ECHO --secret=^<secret^> - encrypt data with key created from ^<secret^>. ECHO. ECHO Subports options: |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 14:31:08
|
Update of /cvsroot/com0com/hub4com/examples In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9918 Modified Files: com2tcp-esc.bat com2tcp-rfc2217.bat com2tcp.bat Log Message: Enabled quoted parameters Index: com2tcp-esc.bat =================================================================== RCS file: /cvsroot/com0com/hub4com/examples/com2tcp-esc.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** com2tcp-esc.bat 13 Nov 2008 07:32:06 -0000 1.4 --- com2tcp-esc.bat 5 Dec 2008 14:31:05 -0000 1.5 *************** *** 9,20 **** :BEGIN_PARSE_OPTIONS ! SET OPTION=%1 ! IF NOT "%OPTION:~0,2%"=="--" GOTO END_PARSE_OPTIONS SHIFT /1 ! IF /I "%OPTION%"=="--help" GOTO USAGE IF /I "%OPTION%" NEQ "--interface" GOTO END_OPTION_INTERFACE ! SET OPTIONS=%OPTIONS% --interface=%1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS --- 9,20 ---- :BEGIN_PARSE_OPTIONS ! SET OPTION=%~1 ! IF NOT "%OPTION:~0,2%" == "--" GOTO END_PARSE_OPTIONS SHIFT /1 ! IF /I "%OPTION%" == "--help" GOTO USAGE IF /I "%OPTION%" NEQ "--interface" GOTO END_OPTION_INTERFACE ! SET OPTIONS=%OPTIONS% --interface=%~1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS *************** *** 22,26 **** IF /I "%OPTION%" NEQ "--linectl" GOTO END_OPTION_LINECTL ! SET LC_CLIENT_MODE=%1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS --- 22,26 ---- IF /I "%OPTION%" NEQ "--linectl" GOTO END_OPTION_LINECTL ! SET LC_CLIENT_MODE=%~1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS *************** *** 31,44 **** :BEGIN_PARSE_ARGS ! IF "%1"=="" GOTO USAGE ! SET COMPORT=%1 SHIFT /1 ! IF "%1"=="" GOTO USAGE ! SET TCP=%1 SHIFT /1 ! IF "%1"=="" GOTO END_PARSE_ARGS ! SET TCP=%TCP%:%1 SHIFT /1 --- 31,44 ---- :BEGIN_PARSE_ARGS ! IF "%~1" == "" GOTO USAGE ! SET COMPORT=%~1 SHIFT /1 ! IF "%~1" == "" GOTO USAGE ! SET TCP=%~1 SHIFT /1 ! IF "%~1" == "" GOTO END_PARSE_ARGS ! SET TCP=%TCP%:%~1 SHIFT /1 *************** *** 47,51 **** :END_SET_LC_CLIENT_MODE ! IF NOT "%1"=="" GOTO USAGE :END_PARSE_ARGS --- 47,51 ---- :END_SET_LC_CLIENT_MODE ! IF NOT "%~1" == "" GOTO USAGE :END_PARSE_ARGS Index: com2tcp-rfc2217.bat =================================================================== RCS file: /cvsroot/com0com/hub4com/examples/com2tcp-rfc2217.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** com2tcp-rfc2217.bat 2 Dec 2008 11:27:10 -0000 1.3 --- com2tcp-rfc2217.bat 5 Dec 2008 14:31:05 -0000 1.4 *************** *** 12,20 **** :BEGIN_PARSE_OPTIONS ! SET OPTION=%1 ! IF NOT "%OPTION:~0,2%"=="--" GOTO END_PARSE_OPTIONS SHIFT /1 ! IF /I "%OPTION%"=="--help" GOTO USAGE IF /I "%OPTION%" NEQ "--trace" GOTO END_OPTION_TRACE --- 12,20 ---- :BEGIN_PARSE_OPTIONS ! SET OPTION=%~1 ! IF NOT "%OPTION:~0,2%" == "--" GOTO END_PARSE_OPTIONS SHIFT /1 ! IF /I "%OPTION%" == "--help" GOTO USAGE IF /I "%OPTION%" NEQ "--trace" GOTO END_OPTION_TRACE *************** *** 24,28 **** IF /I "%OPTION%" NEQ "--interface" GOTO END_OPTION_INTERFACE ! SET OPTIONS=%OPTIONS% --interface=%1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS --- 24,28 ---- IF /I "%OPTION%" NEQ "--interface" GOTO END_OPTION_INTERFACE ! SET OPTIONS=%OPTIONS% --interface=%~1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS *************** *** 30,34 **** IF /I "%OPTION%" NEQ "--rfc2217-mode" GOTO END_OPTION_RFC2217_MODE ! SET ARG=%1 SHIFT /1 --- 30,34 ---- IF /I "%OPTION%" NEQ "--rfc2217-mode" GOTO END_OPTION_RFC2217_MODE ! SET ARG=%~1 SHIFT /1 *************** *** 45,49 **** IF /I "%OPTION%" NEQ "--connect" GOTO END_OPTION_CONNECT ! SET COM_PIN2CON=--create-filter=pin2con,com,connect:%1 SET PERMANENT= SHIFT /1 --- 45,49 ---- IF /I "%OPTION%" NEQ "--connect" GOTO END_OPTION_CONNECT ! SET COM_PIN2CON=--create-filter=pin2con,com,connect:%~1 SET PERMANENT= SHIFT /1 *************** *** 55,68 **** :BEGIN_PARSE_ARGS ! IF "%1"=="" GOTO USAGE ! SET COMPORT=%1 SHIFT /1 ! IF "%1"=="" GOTO USAGE ! SET TCP=%1 SHIFT /1 ! IF "%1"=="" GOTO END_PARSE_ARGS ! SET TCP=%TCP%:%1 SHIFT /1 --- 55,68 ---- :BEGIN_PARSE_ARGS ! IF "%~1" == "" GOTO USAGE ! SET COMPORT=%~1 SHIFT /1 ! IF "%~1" == "" GOTO USAGE ! SET TCP=%~1 SHIFT /1 ! IF "%~1" == "" GOTO END_PARSE_ARGS ! SET TCP=%TCP%:%~1 SHIFT /1 *************** *** 71,75 **** :END_SET_LC_CLIENT_MODE ! IF NOT "%1"=="" GOTO USAGE :END_PARSE_ARGS --- 71,75 ---- :END_SET_LC_CLIENT_MODE ! IF NOT "%~1" == "" GOTO USAGE :END_PARSE_ARGS Index: com2tcp.bat =================================================================== RCS file: /cvsroot/com0com/hub4com/examples/com2tcp.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** com2tcp.bat 6 Oct 2008 12:16:40 -0000 1.2 --- com2tcp.bat 5 Dec 2008 14:31:05 -0000 1.3 *************** *** 15,23 **** :BEGIN_PARSE_OPTIONS ! SET OPTION=%1 ! IF NOT "%OPTION:~0,2%"=="--" GOTO END_PARSE_OPTIONS SHIFT /1 ! IF /I "%OPTION%"=="--help" GOTO USAGE IF /I "%OPTION%" NEQ "--telnet" GOTO END_OPTION_TELNET --- 15,23 ---- :BEGIN_PARSE_OPTIONS ! SET OPTION=%~1 ! IF NOT "%OPTION:~0,2%" == "--" GOTO END_PARSE_OPTIONS SHIFT /1 ! IF /I "%OPTION%" == "--help" GOTO USAGE IF /I "%OPTION%" NEQ "--telnet" GOTO END_OPTION_TELNET *************** *** 28,32 **** IF /I "%OPTION%" NEQ "--terminal" GOTO END_OPTION_TERMINAL ! SET CF_TELNET_OPTIONS=--terminal=\"%1\" SHIFT /1 GOTO BEGIN_PARSE_OPTIONS --- 28,32 ---- IF /I "%OPTION%" NEQ "--terminal" GOTO END_OPTION_TERMINAL ! SET CF_TELNET_OPTIONS="--terminal=\"%~1\"" SHIFT /1 GOTO BEGIN_PARSE_OPTIONS *************** *** 34,38 **** IF /I "%OPTION%" NEQ "--awak-seq" GOTO END_OPTION_AWAK_SEQ ! SET CF_AWAK_SEQ=--create-filter=awakseq:--awak-seq=\"%1\" SET AF_AWAK_SEQ=--add-filters=0:awakseq SET RECONNECT=d --- 34,38 ---- IF /I "%OPTION%" NEQ "--awak-seq" GOTO END_OPTION_AWAK_SEQ ! SET CF_AWAK_SEQ="--create-filter=awakseq:--awak-seq=\"%~1\"" SET AF_AWAK_SEQ=--add-filters=0:awakseq SET RECONNECT=d *************** *** 56,73 **** IF /I "%OPTION%" NEQ "--interface" GOTO END_OPTION_INTERFACE ! SET OPTIONS=%OPTIONS% --interface=%1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS :END_OPTION_INTERFACE ! IF /I "%OPTION%"=="--baud" GOTO BEGIN_OPTION_LC ! IF /I "%OPTION%"=="--data" GOTO BEGIN_OPTION_LC ! IF /I "%OPTION%"=="--parity" GOTO BEGIN_OPTION_LC ! IF /I "%OPTION%"=="--stop" GOTO BEGIN_OPTION_LC GOTO END_OPTION_LC :BEGIN_OPTION_LC ! SET VAL=%1 SHIFT /1 ! IF /I "%VAL:~0,1%"=="d" SET VAL=c SET OPTIONS=%OPTIONS% %OPTION%=%VAL% GOTO BEGIN_PARSE_OPTIONS --- 56,73 ---- IF /I "%OPTION%" NEQ "--interface" GOTO END_OPTION_INTERFACE ! SET OPTIONS=%OPTIONS% --interface=%~1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS :END_OPTION_INTERFACE ! IF /I "%OPTION%" == "--baud" GOTO BEGIN_OPTION_LC ! IF /I "%OPTION%" == "--data" GOTO BEGIN_OPTION_LC ! IF /I "%OPTION%" == "--parity" GOTO BEGIN_OPTION_LC ! IF /I "%OPTION%" == "--stop" GOTO BEGIN_OPTION_LC GOTO END_OPTION_LC :BEGIN_OPTION_LC ! SET VAL=%~1 SHIFT /1 ! IF /I "%VAL:~0,1%" == "d" SET VAL=c SET OPTIONS=%OPTIONS% %OPTION%=%VAL% GOTO BEGIN_PARSE_OPTIONS *************** *** 78,98 **** :BEGIN_PARSE_ARGS ! IF "%1"=="" GOTO USAGE ! SET COMPORT=%1 SHIFT /1 ! IF "%1"=="" GOTO USAGE ! SET TCP=%PERMANENT%%1 SHIFT /1 ! IF "%1"=="" GOTO END_PARSE_ARGS ! SET TCP=%TCP%:%1 SHIFT /1 ! IF NOT "%1"=="" GOTO USAGE :END_PARSE_ARGS ! IF "%CF_TELNET_OPTIONS%"=="" GOTO END_ADD_CF_TELNET_OPTIONS ! IF "%CF_TELNET%"=="" GOTO END_ADD_CF_TELNET_OPTIONS SET CF_TELNET=%CF_TELNET%:%CF_TELNET_OPTIONS% :END_ADD_CF_TELNET_OPTIONS --- 78,98 ---- :BEGIN_PARSE_ARGS ! IF "%~1" == "" GOTO USAGE ! SET COMPORT=%~1 SHIFT /1 ! IF "%~1" == "" GOTO USAGE ! SET TCP=%PERMANENT%%~1 SHIFT /1 ! IF "%~1" == "" GOTO END_PARSE_ARGS ! SET TCP=%TCP%:%~1 SHIFT /1 ! IF NOT "%~1" == "" GOTO USAGE :END_PARSE_ARGS ! IF "%CF_TELNET_OPTIONS%" == "" GOTO END_ADD_CF_TELNET_OPTIONS ! IF "%CF_TELNET%" == "" GOTO END_ADD_CF_TELNET_OPTIONS SET CF_TELNET=%CF_TELNET%:%CF_TELNET_OPTIONS% :END_ADD_CF_TELNET_OPTIONS |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 14:28:58
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9634 Modified Files: hub4com.sln Log Message: Added filter-crypt Index: hub4com.sln =================================================================== RCS file: /cvsroot/com0com/hub4com/hub4com.sln,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** hub4com.sln 27 Nov 2008 16:40:41 -0000 1.12 --- hub4com.sln 5 Dec 2008 14:28:50 -0000 1.13 *************** *** 32,35 **** --- 32,37 ---- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filter-tag", "plugins\tag\tag.vcproj", "{523E524B-786C-45AB-A393-5135706449BC}" EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filter-crypt", "plugins\crypt\crypt.vcproj", "{FEB9BD18-B0EA-460F-8404-C97BD2623227}" + EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution *************** *** 98,101 **** --- 100,107 ---- {523E524B-786C-45AB-A393-5135706449BC}.Release|Win32.ActiveCfg = Release|Win32 {523E524B-786C-45AB-A393-5135706449BC}.Release|Win32.Build.0 = Release|Win32 + {FEB9BD18-B0EA-460F-8404-C97BD2623227}.Debug|Win32.ActiveCfg = Debug|Win32 + {FEB9BD18-B0EA-460F-8404-C97BD2623227}.Debug|Win32.Build.0 = Debug|Win32 + {FEB9BD18-B0EA-460F-8404-C97BD2623227}.Release|Win32.ActiveCfg = Release|Win32 + {FEB9BD18-B0EA-460F-8404-C97BD2623227}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 14:27:07
|
Update of /cvsroot/com0com/hub4com/plugins/crypt In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9319 Added Files: .cvsignore filter.cpp precomp.cpp crypt.vcproj precomp.h Log Message: Initial revision --- NEW FILE: precomp.cpp --- /* * $Id: precomp.cpp,v 1.1 2008/12/05 14:27:02 vfrolov Exp $ * * Copyright (c) 2007 Vyacheslav Frolov * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /////////////////////////////////////////////////////////////// #include "precomp.h" /////////////////////////////////////////////////////////////// --- NEW FILE: precomp.h --- /* * $Id: precomp.h,v 1.1 2008/12/05 14:27:02 vfrolov Exp $ * * Copyright (c) 2008 Vyacheslav Frolov * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: precomp.h,v $ * Revision 1.1 2008/12/05 14:27:02 vfrolov * Initial revision * */ #ifndef _PRECOMP_H_ #define _PRECOMP_H_ #include <windows.h> #include <wincrypt.h> #include <crtdbg.h> #include <map> #include <iostream> using namespace std; #pragma warning(disable:4512) // assignment operator could not be generated #endif /* _PRECOMP_H_ */ --- NEW FILE: crypt.vcproj --- <?xml version="1.0" encoding="windows-1251"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="filter-crypt" ProjectGUID="{FEB9BD18-B0EA-460F-8404-C97BD2623227}" RootNamespace="hub4com" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="2" UseOfMFC="0" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="2" PrecompiledHeaderThrough="precomp.h" PrecompiledHeaderFile="$(IntDir)\precomp.pch" WarningLevel="4" Detect64BitPortabilityProblems="true" DebugInformationFormat="4" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" OutputFile="..\..\$(OutDir)\plugins\$(ProjectName).dll" LinkIncremental="2" ModuleDefinitionFile="..\plugins.def" GenerateDebugInformation="true" SubSystem="1" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="2" UseOfMFC="0" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE" RuntimeLibrary="0" UsePrecompiledHeader="2" PrecompiledHeaderThrough="precomp.h" PrecompiledHeaderFile="$(IntDir)\precomp.pch" WarningLevel="4" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" OutputFile="..\..\$(OutDir)\plugins\$(ProjectName).dll" LinkIncremental="2" ModuleDefinitionFile="..\plugins.def" GenerateDebugInformation="true" SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > <File RelativePath="..\plugins_api.h" > </File> <File RelativePath=".\precomp.h" > </File> </Filter> <Filter Name="Source Files" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > <File RelativePath=".\filter.cpp" > </File> <File RelativePath="..\plugins.def" > </File> <File RelativePath=".\precomp.cpp" > <FileConfiguration Name="Debug|Win32" > <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" > <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1" /> </FileConfiguration> </File> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: filter.cpp --- /* * $Id: filter.cpp,v 1.1 2008/12/05 14:27:02 vfrolov Exp $ * * Copyright (c) 2008 Vyacheslav Frolov * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: filter.cpp,v $ * Revision 1.1 2008/12/05 14:27:02 vfrolov * Initial revision * */ #include "precomp.h" #include "../plugins_api.h" /////////////////////////////////////////////////////////////// namespace FilterCrypt { /////////////////////////////////////////////////////////////// static ROUTINE_BUF_APPEND *pBufAppend; static ROUTINE_MSG_REPLACE_BUF *pmsgreplacebuf; /////////////////////////////////////////////////////////////// #ifndef _DEBUG #define DEBUG_PARAM(par) #else /* _DEBUG */ #define DEBUG_PARAM(par) par #endif /* _DEBUG */ /////////////////////////////////////////////////////////////// static const char *GetParam(const char *pArg, const char *pPattern) { size_t lenPattern = strlen(pPattern); if (_strnicmp(pArg, pPattern, lenPattern) != 0) return NULL; return pArg + lenPattern; } /////////////////////////////////////////////////////////////// class Valid { public: Valid() : isValid(TRUE) {} void Invalidate() { isValid = FALSE; } void Validate() { isValid = TRUE; } BOOL IsValid() const { return isValid; } private: BOOL isValid; }; /////////////////////////////////////////////////////////////// class State : public Valid { public: State() { Invalidate(); } HCRYPTKEY hKeyIn; HCRYPTKEY hKeyOut; }; /////////////////////////////////////////////////////////////// class Filter : public Valid { public: Filter(int argc, const char *const argv[]); State *GetState(HMASTERPORT hPort); void Open(State *pState); void Close(State *pState); private: HCRYPTPROV hProv; HCRYPTHASH hHash; typedef map<HMASTERPORT, State*> PortsMap; typedef pair<HMASTERPORT, State*> PortPair; PortsMap portsMap; }; Filter::Filter(int argc, const char *const argv[]) { BOOL noSecret = TRUE; for (const char *const *pArgs = &argv[1] ; argc > 1 ; pArgs++, argc--) { const char *pArg = GetParam(*pArgs, "--"); if (!pArg) { cerr << "Unknown option " << *pArgs << endl; Invalidate(); continue; } const char *pParam; if ((pParam = GetParam(pArg, "secret=")) != NULL) { if (!*pParam) cerr << "WARNING: The secret is empty" << endl; if (!CryptAcquireContext(&hProv, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, 0)) { DWORD err = GetLastError(); cerr << "CryptAcquireContext() - error=" << err << endl; Invalidate(); continue; } if (!CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash)) { DWORD err = GetLastError(); cerr << "CryptCreateHash() - error=" << err << endl; Invalidate(); continue; } if (!CryptHashData(hHash, (const BYTE *)pParam, (DWORD)strlen(pParam), 0)) { DWORD err = GetLastError(); cerr << "CryptHashData() - error=" << err << endl; Invalidate(); continue; } //if (!CryptDestroyHash(hHash)) { // DWORD err = GetLastError(); // cerr << "CryptDestroyHash() - error=" << err << endl; //} //if (CryptReleaseContext(hProv, 0)) { // DWORD err = GetLastError(); // cerr << "CryptReleaseContext() - error=" << err << endl; //} noSecret = FALSE; } else { cerr << "Unknown option " << pArg << endl; Invalidate(); } } if (noSecret) { cerr << "The secret was not set" << endl; Invalidate(); } } State *Filter::GetState(HMASTERPORT hPort) { PortsMap::iterator iPair = portsMap.find(hPort); if (iPair == portsMap.end()) { portsMap.insert(PortPair(hPort, NULL)); iPair = portsMap.find(hPort); if (iPair == portsMap.end()) return NULL; } if (!iPair->second) iPair->second = new State(); return iPair->second; } void Filter::Open(State *pState) { _ASSERTE(!pState->IsValid()); static const DWORD flags = (((DWORD)128) << 16); if (!CryptDeriveKey(hProv, CALG_RC4, hHash, flags, &pState->hKeyIn)) { DWORD err = GetLastError(); cerr << "CryptDeriveKey() - error=" << err << endl; return; } if (!CryptDeriveKey(hProv, CALG_RC4, hHash, flags, &pState->hKeyOut)) { DWORD err = GetLastError(); cerr << "CryptDeriveKey() - error=" << err << endl; if (!CryptDestroyKey(pState->hKeyIn)) { DWORD err = GetLastError(); cerr << "CryptDestroyKey() - error=" << err << endl; } return; } pState->Validate(); } void Filter::Close(State *pState) { if (!pState->IsValid()) return; pState->Invalidate(); if (!CryptDestroyKey(pState->hKeyIn) || !CryptDestroyKey(pState->hKeyOut)) { DWORD err = GetLastError(); cerr << "CryptDestroyKey() - error=" << err << endl; } } /////////////////////////////////////////////////////////////// static PLUGIN_TYPE CALLBACK GetPluginType() { return PLUGIN_TYPE_FILTER; } /////////////////////////////////////////////////////////////// static const PLUGIN_ABOUT_A about = { sizeof(PLUGIN_ABOUT_A), "crypt", "Copyright (c) 2008 Vyacheslav Frolov", "GNU General Public License", "Encrypting/decrypting filter", }; static const PLUGIN_ABOUT_A * CALLBACK GetPluginAbout() { return &about; } /////////////////////////////////////////////////////////////// static void CALLBACK Help(const char *pProgPath) { cerr << "Usage:" << endl << " " << pProgPath << " ... --create-filter=" << GetPluginAbout()->pName << "[,<FID>][:<options>] ... --add-filters=<ports>:[...,]<FID>[,...] ..." << endl << endl << "Options:" << endl << " --secret=<secret> - set secret (mandatory)." << endl << endl << "IN method input data stream description:" << endl << " LINE_DATA - encrypted data." << endl << endl << "IN method output data stream description:" << endl << " LINE_DATA - decrypted data." << endl << endl << "OUT method input data stream description:" << endl << " LINE_DATA - raw (not encrypted) data." << endl << endl << "OUT method output data stream description:" << endl << " LINE_DATA - encrypted data." << endl << endl << "Examples:" << endl ; } /////////////////////////////////////////////////////////////// static HFILTER CALLBACK Create( HCONFIG /*hConfig*/, int argc, const char *const argv[]) { Filter *pFilter = new Filter(argc, argv); if (!pFilter) return NULL; if (!pFilter->IsValid()) { delete pFilter; return NULL; } return (HFILTER)pFilter; } /////////////////////////////////////////////////////////////// static BOOL CALLBACK InMethod( HFILTER hFilter, HMASTERPORT DEBUG_PARAM(hFromPort), HUB_MSG *pInMsg, HUB_MSG **DEBUG_PARAM(ppEchoMsg)) { _ASSERTE(hFilter != NULL); _ASSERTE(hFromPort != NULL); _ASSERTE(pInMsg != NULL); _ASSERTE(ppEchoMsg != NULL); _ASSERTE(*ppEchoMsg == NULL); switch (pInMsg->type) { case HUB_MSG_TYPE_LINE_DATA: { _ASSERTE(pInMsg->u.buf.pBuf != NULL || pInMsg->u.buf.size == 0); DWORD len = pInMsg->u.buf.size; if (len == 0) break; State *pState = ((Filter *)hFilter)->GetState(hFromPort); if (!pState) return FALSE; if (!CryptDecrypt(pState->hKeyIn, 0, FALSE, 0, pInMsg->u.buf.pBuf, &pInMsg->u.buf.size)) { DWORD err = GetLastError(); cerr << "CryptDecrypt() - error=" << err << endl; return FALSE; } _ASSERTE(pInMsg->u.buf.size == len); break; } case HUB_MSG_TYPE_CONNECT: { State *pState = ((Filter *)hFilter)->GetState(hFromPort); if (!pState) return FALSE; if (pInMsg->u.val) ((Filter *)hFilter)->Open(pState); else ((Filter *)hFilter)->Close(pState); break; } } return TRUE; } /////////////////////////////////////////////////////////////// static BOOL CALLBACK OutMethod( HFILTER hFilter, HMASTERPORT DEBUG_PARAM(hFromPort), HMASTERPORT DEBUG_PARAM(hToPort), HUB_MSG *pOutMsg) { _ASSERTE(hFilter != NULL); _ASSERTE(hFromPort != NULL); _ASSERTE(hToPort != NULL); _ASSERTE(pOutMsg != NULL); switch (pOutMsg->type) { case HUB_MSG_TYPE_LINE_DATA: { _ASSERTE(pOutMsg->u.buf.pBuf != NULL || pOutMsg->u.buf.size == 0); DWORD len = pOutMsg->u.buf.size; if (len == 0) break; State *pState = ((Filter *)hFilter)->GetState(hToPort); if (!pState) return FALSE; if (!CryptEncrypt(pState->hKeyOut, 0, FALSE, 0, pOutMsg->u.buf.pBuf, &pOutMsg->u.buf.size, len)) { DWORD err = GetLastError(); cerr << "CryptEncrypt() - error=" << err << endl; return FALSE; } _ASSERTE(pOutMsg->u.buf.size == len); break; } } return pOutMsg != NULL; } /////////////////////////////////////////////////////////////// static const FILTER_ROUTINES_A routines = { sizeof(FILTER_ROUTINES_A), GetPluginType, GetPluginAbout, Help, NULL, // ConfigStart NULL, // Config NULL, // ConfigStop Create, NULL, // Init InMethod, OutMethod, }; static const PLUGIN_ROUTINES_A *const plugins[] = { (const PLUGIN_ROUTINES_A *)&routines, NULL }; /////////////////////////////////////////////////////////////// PLUGIN_INIT_A InitA; const PLUGIN_ROUTINES_A *const * CALLBACK InitA( const HUB_ROUTINES_A * pHubRoutines) { if (!ROUTINE_IS_VALID(pHubRoutines, pBufAppend)) return NULL; pBufAppend = pHubRoutines->pBufAppend; return plugins; } /////////////////////////////////////////////////////////////// } // end namespace /////////////////////////////////////////////////////////////// --- NEW FILE: .cvsignore --- *.user Release Debug |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 14:25:46
|
Update of /cvsroot/com0com/hub4com/plugins/crypt In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9125/crypt Log Message: Directory /cvsroot/com0com/hub4com/plugins/crypt added to the repository |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 14:23:25
|
Update of /cvsroot/com0com/hub4com/plugins/trace In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8910 Modified Files: filter.cpp Log Message: Output config in loadable format Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/trace/filter.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** filter.cpp 25 Nov 2008 16:40:40 -0000 1.11 --- filter.cpp 5 Dec 2008 14:23:19 -0000 1.12 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.12 2008/12/05 14:23:19 vfrolov + * Output config in loadable format + * * Revision 1.11 2008/11/25 16:40:40 vfrolov * Added assert for port handle *************** *** 262,266 **** PrintTime(pConfig->buf); ! pConfig->buf << "Config: {"; return (HCONFIG)pConfig; --- 265,270 ---- PrintTime(pConfig->buf); ! pConfig->buf << "Config:"; ! pConfig->buf << endl << "_BEGIN_"; return (HCONFIG)pConfig; *************** *** 273,277 **** _ASSERTE(hConfig != NULL); ! ((TraceConfig *)hConfig)->buf << endl << " {" << pArg << "}"; const char *pParam; --- 277,281 ---- _ASSERTE(hConfig != NULL); ! ((TraceConfig *)hConfig)->buf << endl << " " << pArg; const char *pParam; *************** *** 291,295 **** _ASSERTE(hConfig != NULL); ! ((TraceConfig *)hConfig)->buf << endl << "}" << endl; ((TraceConfig *)hConfig)->PrintToAllTraceStreams(((TraceConfig *)hConfig)->buf.str().c_str()); --- 295,299 ---- _ASSERTE(hConfig != NULL); ! ((TraceConfig *)hConfig)->buf << endl << "_END_" << endl; ((TraceConfig *)hConfig)->PrintToAllTraceStreams(((TraceConfig *)hConfig)->buf.str().c_str()); |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 14:21:00
|
Update of /cvsroot/com0com/hub4com/plugins/tcp In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8657 Modified Files: comio.cpp Log Message: Fixed race conditions Index: comio.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comio.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** comio.cpp 1 Dec 2008 17:09:34 -0000 1.7 --- comio.cpp 5 Dec 2008 14:20:55 -0000 1.8 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.8 2008/12/05 14:20:55 vfrolov + * Fixed race conditions + * * Revision 1.7 2008/12/01 17:09:34 vfrolov * Improved write buffering *************** *** 401,406 **** BOOLEAN /*timerOrWaitFired*/) { ! if (::QueueUserAPC(OnEvent, hThread, (ULONG_PTR)pOverlapped)) ! ((WaitEventOverlapped *)pOverlapped)->LockDelete(); } --- 404,410 ---- BOOLEAN /*timerOrWaitFired*/) { ! ((WaitEventOverlapped *)pOverlapped)->LockDelete(); ! if (!::QueueUserAPC(OnEvent, hThread, (ULONG_PTR)pOverlapped)) ! ((WaitEventOverlapped *)pOverlapped)->UnockDelete(); } *************** *** 528,533 **** BOOLEAN /*timerOrWaitFired*/) { ! if (::QueueUserAPC(OnEvent, hThread, (ULONG_PTR)pOverlapped)) ! ((ListenOverlapped *)pOverlapped)->LockDelete(); } --- 532,538 ---- BOOLEAN /*timerOrWaitFired*/) { ! ((ListenOverlapped *)pOverlapped)->LockDelete(); ! if (!::QueueUserAPC(OnEvent, hThread, (ULONG_PTR)pOverlapped)) ! ((ListenOverlapped *)pOverlapped)->UnockDelete(); } |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 14:12:11
|
Update of /cvsroot/com0com/hub4com/plugins/telnet In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7869 Modified Files: filter.cpp Log Message: Fixed return values Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/telnet/filter.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** filter.cpp 25 Nov 2008 16:40:40 -0000 1.9 --- filter.cpp 5 Dec 2008 14:12:04 -0000 1.10 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.10 2008/12/05 14:12:04 vfrolov + * Fixed return values + * * Revision 1.9 2008/11/25 16:40:40 vfrolov * Added assert for port handle *************** *** 124,128 **** State *GetState(HMASTERPORT hPort); TelnetProtocol *CreateProtocol(State *pState, const char *pName); ! void DelProtocol(State *pState); void SetFilterName(const char *_pName) { pName = _pName; } --- 127,131 ---- State *GetState(HMASTERPORT hPort); TelnetProtocol *CreateProtocol(State *pState, const char *pName); ! BOOL DelProtocol(State *pState); void SetFilterName(const char *_pName) { pName = _pName; } *************** *** 321,329 **** } ! void Filter::DelProtocol(State *pState) { _ASSERTE(pState->pTelnetProtocol != NULL); pState->SetProtocol(NULL); } /////////////////////////////////////////////////////////////// --- 324,337 ---- } ! BOOL Filter::DelProtocol(State *pState) { _ASSERTE(pState->pTelnetProtocol != NULL); + if (!pState->pTelnetProtocol) + return FALSE; + pState->SetProtocol(NULL); + + return TRUE; } /////////////////////////////////////////////////////////////// *************** *** 362,366 **** << endl << "IN method input data stream description:" << endl ! << " LINE_DATA - telnet protocol data." << endl << " CONNECT(TRUE) - start telnet protocol engine." << endl << " CONNECT(FALSE) - stop telnet protocol engine." << endl --- 370,374 ---- << endl << "IN method input data stream description:" << endl ! << " LINE_DATA - telnet protocol data (will be discarded if engine not started)." << endl << " CONNECT(TRUE) - start telnet protocol engine." << endl << " CONNECT(FALSE) - stop telnet protocol engine." << endl *************** *** 388,392 **** << endl << "OUT method input data stream description:" << endl ! << " LINE_DATA - raw data." << endl << " ADD_XOFF_XON - flow control." << endl << " " << endl --- 396,400 ---- << endl << "OUT method input data stream description:" << endl ! << " LINE_DATA - raw data (will be discarded if engine not started)." << endl << " ADD_XOFF_XON - flow control." << endl << " " << endl *************** *** 498,502 **** if (!pTelnetProtocol) ! break; if (!pTelnetProtocol->Decode(pInMsg)) --- 506,510 ---- if (!pTelnetProtocol) ! return FALSE; if (!pTelnetProtocol->Decode(pInMsg)) *************** *** 531,535 **** } ! ((Filter *)hFilter)->DelProtocol(pState); break; } --- 539,545 ---- } ! if (!((Filter *)hFilter)->DelProtocol(pState)) ! return FALSE; ! break; } *************** *** 746,750 **** if (!pState) ! return FALSE; if (pState->pComPort) { --- 756,760 ---- if (!pState) ! break; if (pState->pComPort) { *************** *** 765,769 **** if (!pTelnetProtocol) ! break; if (!pTelnetProtocol->Encode(pOutMsg)) --- 775,779 ---- if (!pTelnetProtocol) ! return FALSE; if (!pTelnetProtocol->Encode(pOutMsg)) |
From: Vyacheslav F. <vf...@us...> - 2008-12-05 14:10:39
|
Update of /cvsroot/com0com/hub4com/plugins/telnet In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7729 Modified Files: opt_comport.cpp Log Message: Fixed return values of TelnetOptionComPortClient::OnSubNegotiation() Index: opt_comport.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/telnet/opt_comport.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** opt_comport.cpp 24 Nov 2008 16:39:58 -0000 1.3 --- opt_comport.cpp 5 Dec 2008 14:10:33 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/12/05 14:10:33 vfrolov + * Fixed return values of TelnetOptionComPortClient::OnSubNegotiation() + * * Revision 1.3 2008/11/24 16:39:58 vfrolov * Implemented FLOWCONTROL-SUSPEND and FLOWCONTROL-RESUME commands (RFC 2217) *************** *** 248,252 **** switch (params[0]) { ! case cpcSignature: return FALSE; break; --- 251,255 ---- switch (params[0]) { ! case cpcSignature + cpcServerBase: return FALSE; break; *************** *** 264,268 **** if ((goMask & GO_LBR_STATUS) == 0) ! return FALSE; *ppMsg = FlushDecodedStream(*ppMsg); --- 267,271 ---- if ((goMask & GO_LBR_STATUS) == 0) ! break; *ppMsg = FlushDecodedStream(*ppMsg); *************** *** 285,289 **** if ((goMask & GO_LLC_STATUS) == 0) ! return FALSE; DWORD lcVal = (VAL2LC_BYTESIZE(p2v_dataSize(par))|LC_MASK_BYTESIZE); --- 288,292 ---- if ((goMask & GO_LLC_STATUS) == 0) ! break; DWORD lcVal = (VAL2LC_BYTESIZE(p2v_dataSize(par))|LC_MASK_BYTESIZE); *************** *** 308,312 **** if ((goMask & GO_LLC_STATUS) == 0) ! return FALSE; DWORD lcVal = (VAL2LC_PARITY(p2v_parity(par))|LC_MASK_PARITY); --- 311,315 ---- if ((goMask & GO_LLC_STATUS) == 0) ! break; DWORD lcVal = (VAL2LC_PARITY(p2v_parity(par))|LC_MASK_PARITY); *************** *** 331,335 **** if ((goMask & GO_LLC_STATUS) == 0) ! return FALSE; DWORD lcVal = (VAL2LC_STOPBITS(p2v_stopSize(par))|LC_MASK_STOPBITS); --- 334,338 ---- if ((goMask & GO_LLC_STATUS) == 0) ! break; DWORD lcVal = (VAL2LC_STOPBITS(p2v_stopSize(par))|LC_MASK_STOPBITS); *************** *** 415,418 **** --- 418,427 ---- break; } + case cpcSetLineStateMask + cpcServerBase: + break; + case cpcSetModemStateMask + cpcServerBase: + break; + case cpcPurgeData + cpcServerBase: + break; default: return FALSE; |
From: Vyacheslav F. <vf...@us...> - 2008-12-02 16:21:14
|
Update of /cvsroot/com0com/com0com/sys In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6772 Modified Files: read.c Log Message: Separated tracing and debuging Index: read.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/read.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** read.c 23 Jun 2006 11:44:52 -0000 1.6 --- read.c 2 Dec 2008 16:21:11 -0000 1.7 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2004-2006 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2004-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.7 2008/12/02 16:21:11 vfrolov + * Separated tracing and debuging + * * Revision 1.6 2006/06/23 11:44:52 vfrolov * Mass replacement pDevExt by pIoPort *************** *** 84,90 **** PC0C_COMMON_EXTENSION pDevExt = pDevObj->DeviceExtension; ! #if DBG ULONG code = IoGetCurrentIrpStackLocation(pIrp)->MajorFunction; ! #endif /* DBG */ TraceIrp("c0cRead", pIrp, NULL, TRACE_FLAG_PARAMS); --- 87,93 ---- PC0C_COMMON_EXTENSION pDevExt = pDevObj->DeviceExtension; ! #if ENABLE_TRACING ULONG code = IoGetCurrentIrpStackLocation(pIrp)->MajorFunction; ! #endif /* ENABLE_TRACING */ TraceIrp("c0cRead", pIrp, NULL, TRACE_FLAG_PARAMS); *************** *** 101,106 **** --- 104,111 ---- } + #if ENABLE_TRACING if (!NT_SUCCESS(status)) TraceCode(pDevExt, "IRP_MJ_", codeNameTableIrpMj, code, &status); + #endif /* ENABLE_TRACING */ return status; |
Update of /cvsroot/com0com/com0com/sys In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6017 Modified Files: adddev.c ioctl.c openclos.c precomp.h showport.c trace.c trace.h tracetbl.c wmi.c write.c Log Message: Separated tracing and debuging Index: openclos.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/openclos.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** openclos.c 11 Jul 2008 10:38:00 -0000 1.24 --- openclos.c 2 Dec 2008 16:10:09 -0000 1.25 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.25 2008/12/02 16:10:09 vfrolov + * Separated tracing and debuging + * * Revision 1.24 2008/07/11 10:38:00 vfrolov * Added nonstandard ability to enable LSR insertion on BREAK OFF *************** *** 154,158 **** InitializeListHead(&queueToComplete); ! #if DBG if (pIoPort->amountInWriteQueue) { NTSTATUS status; --- 157,161 ---- InitializeListHead(&queueToComplete); ! #if ENABLE_TRACING if (pIoPort->amountInWriteQueue) { NTSTATUS status; *************** *** 168,172 **** StrFree(&msg); } ! #endif /* DBG */ KeAcquireSpinLock(pIoPort->pIoLock, &oldIrql); --- 171,175 ---- StrFree(&msg); } ! #endif /* ENABLE_TRACING */ KeAcquireSpinLock(pIoPort->pIoLock, &oldIrql); *************** *** 279,286 **** pIrp->IoStatus.Information = 0; ! #if DBG if (!NT_SUCCESS(status)) TraceIrp("c0cOpen", pIrp, &status, TRACE_FLAG_RESULTS); ! #endif /* DBG */ pIrp->IoStatus.Status = status; --- 282,289 ---- pIrp->IoStatus.Information = 0; ! #if ENABLE_TRACING if (!NT_SUCCESS(status)) TraceIrp("c0cOpen", pIrp, &status, TRACE_FLAG_RESULTS); ! #endif /* ENABLE_TRACING */ pIrp->IoStatus.Status = status; *************** *** 295,301 **** PC0C_COMMON_EXTENSION pDevExt = pDevObj->DeviceExtension; ! #if DBG ULONG code = IoGetCurrentIrpStackLocation(pIrp)->MajorFunction; ! #endif /* DBG */ TraceIrp("--- Close ---", pIrp, NULL, TRACE_FLAG_PARAMS); --- 298,304 ---- PC0C_COMMON_EXTENSION pDevExt = pDevObj->DeviceExtension; ! #if ENABLE_TRACING ULONG code = IoGetCurrentIrpStackLocation(pIrp)->MajorFunction; ! #endif /* ENABLE_TRACING */ TraceIrp("--- Close ---", pIrp, NULL, TRACE_FLAG_PARAMS); *************** *** 312,319 **** } ! #if DBG if (status != STATUS_SUCCESS) TraceCode(pDevExt, "IRP_MJ_", codeNameTableIrpMj, code, &status); ! #endif /* DBG */ return status; --- 315,322 ---- } ! #if ENABLE_TRACING if (status != STATUS_SUCCESS) TraceCode(pDevExt, "IRP_MJ_", codeNameTableIrpMj, code, &status); ! #endif /* ENABLE_TRACING */ return status; Index: showport.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/showport.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** showport.c 4 May 2008 09:51:45 -0000 1.2 --- showport.c 2 Dec 2008 16:10:09 -0000 1.3 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.3 2008/12/02 16:10:09 vfrolov + * Separated tracing and debuging + * * Revision 1.2 2008/05/04 09:51:45 vfrolov * Implemented HiddenMode option *************** *** 256,264 **** pDevExt->hide = (UCHAR)hiddenMode; ! #if DBG if (pDevExt->hide) TraceMask((PC0C_COMMON_EXTENSION)pDevExt, "Enabled hidden mode ", codeNameTableShowPort, pDevExt->hide); else Trace0((PC0C_COMMON_EXTENSION)pDevExt, L"Disabled hidden mode"); ! #endif /* DBG */ } --- 259,267 ---- pDevExt->hide = (UCHAR)hiddenMode; ! #if ENABLE_TRACING if (pDevExt->hide) TraceMask((PC0C_COMMON_EXTENSION)pDevExt, "Enabled hidden mode ", codeNameTableShowPort, pDevExt->hide); else Trace0((PC0C_COMMON_EXTENSION)pDevExt, L"Disabled hidden mode"); ! #endif /* ENABLE_TRACING */ } Index: trace.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/trace.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** trace.c 10 Jun 2008 11:24:20 -0000 1.31 --- trace.c 2 Dec 2008 16:10:09 -0000 1.32 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.32 2008/12/02 16:10:09 vfrolov + * Separated tracing and debuging + * * Revision 1.31 2008/06/10 11:24:20 vfrolov * Disabled tracing if traceFileName is empty *************** *** 126,130 **** #include "precomp.h" ! #if DBG #include "version.h" --- 129,133 ---- #include "precomp.h" ! #if ENABLE_TRACING #include "version.h" *************** *** 1719,1723 **** /********************************************************************/ ! #else /* DBG */ #pragma warning(disable:4206) // nonstandard extension used : translation unit is empty ! #endif /* DBG */ --- 1722,1726 ---- /********************************************************************/ ! #else /* ENABLE_TRACING */ #pragma warning(disable:4206) // nonstandard extension used : translation unit is empty ! #endif /* ENABLE_TRACING */ Index: tracetbl.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/tracetbl.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tracetbl.c 4 May 2008 09:51:45 -0000 1.14 --- tracetbl.c 2 Dec 2008 16:10:09 -0000 1.15 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.15 2008/12/02 16:10:09 vfrolov + * Separated tracing and debuging + * * Revision 1.14 2008/05/04 09:51:45 vfrolov * Implemented HiddenMode option *************** *** 67,71 **** #include "precomp.h" ! #if DBG #define TOCODE2NAME1(s) { (ULONG)s, #s } --- 70,74 ---- #include "precomp.h" ! #if ENABLE_TRACING #define TOCODE2NAME1(s) { (ULONG)s, #s } *************** *** 451,455 **** }; ! #else /* DBG */ #pragma warning(disable:4206) // nonstandard extension used : translation unit is empty ! #endif /* DBG */ --- 454,458 ---- }; ! #else /* ENABLE_TRACING */ #pragma warning(disable:4206) // nonstandard extension used : translation unit is empty ! #endif /* ENABLE_TRACING */ Index: adddev.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/adddev.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** adddev.c 17 Sep 2008 07:58:32 -0000 1.35 --- adddev.c 2 Dec 2008 16:10:08 -0000 1.36 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.36 2008/12/02 16:10:08 vfrolov + * Separated tracing and debuging + * * Revision 1.35 2008/09/17 07:58:32 vfrolov * Added AddRTTO and AddRITO parameters *************** *** 436,450 **** pDevExt->pIoPortLocal->addRTTO = addRTTO; ! #if DBG if (addRTTO) Trace0((PC0C_COMMON_EXTENSION)pDevExt, L"Enabled ReadTotalTimeoutConstant increase"); ! #endif /* DBG */ pDevExt->pIoPortLocal->addRITO = addRITO; ! #if DBG if (addRITO) Trace0((PC0C_COMMON_EXTENSION)pDevExt, L"Enabled ReadIntervalTimeout increase"); ! #endif /* DBG */ AllocTimeouts(pDevExt->pIoPortLocal); --- 439,453 ---- pDevExt->pIoPortLocal->addRTTO = addRTTO; ! #if ENABLE_TRACING if (addRTTO) Trace0((PC0C_COMMON_EXTENSION)pDevExt, L"Enabled ReadTotalTimeoutConstant increase"); ! #endif /* ENABLE_TRACING */ pDevExt->pIoPortLocal->addRITO = addRITO; ! #if ENABLE_TRACING if (addRITO) Trace0((PC0C_COMMON_EXTENSION)pDevExt, L"Enabled ReadIntervalTimeout increase"); ! #endif /* ENABLE_TRACING */ AllocTimeouts(pDevExt->pIoPortLocal); *************** *** 473,482 **** pDevExt->pIoPortLocal->brokeCharsProbability = brokeCharsProbability; ! #if DBG if (brokeCharsProbability) Trace0((PC0C_COMMON_EXTENSION)pDevExt, L"Enabled noise emulation"); else Trace0((PC0C_COMMON_EXTENSION)pDevExt, L"Disabled noise emulation"); ! #endif /* DBG */ pDevExt->pLowDevObj = IoAttachDeviceToDeviceStack(pNewDevObj, pPhDevObj); --- 476,485 ---- pDevExt->pIoPortLocal->brokeCharsProbability = brokeCharsProbability; ! #if ENABLE_TRACING if (brokeCharsProbability) Trace0((PC0C_COMMON_EXTENSION)pDevExt, L"Enabled noise emulation"); else Trace0((PC0C_COMMON_EXTENSION)pDevExt, L"Disabled noise emulation"); ! #endif /* ENABLE_TRACING */ pDevExt->pLowDevObj = IoAttachDeviceToDeviceStack(pNewDevObj, pPhDevObj); Index: wmi.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/wmi.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wmi.c 14 Mar 2008 15:28:39 -0000 1.5 --- wmi.c 2 Dec 2008 16:10:09 -0000 1.6 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.6 2008/12/02 16:10:09 vfrolov + * Separated tracing and debuging + * * Revision 1.5 2008/03/14 15:28:39 vfrolov * Implemented ability to get paired port settings with *************** *** 387,393 **** PC0C_COMMON_EXTENSION pDevExt = pDevObj->DeviceExtension; ! #if DBG ULONG code = IoGetCurrentIrpStackLocation(pIrp)->MinorFunction; ! #endif /* DBG */ HALT_UNLESS2(IoGetCurrentIrpStackLocation(pIrp)->MajorFunction == IRP_MJ_SYSTEM_CONTROL, --- 390,396 ---- PC0C_COMMON_EXTENSION pDevExt = pDevObj->DeviceExtension; ! #if ENABLE_TRACING ULONG code = IoGetCurrentIrpStackLocation(pIrp)->MinorFunction; ! #endif /* ENABLE_TRACING */ HALT_UNLESS2(IoGetCurrentIrpStackLocation(pIrp)->MajorFunction == IRP_MJ_SYSTEM_CONTROL, *************** *** 414,421 **** } ! #if DBG if (status != STATUS_SUCCESS) TraceCode(pDevExt, "WMI_", codeNameTableWmi, code, &status); ! #endif /* DBG */ return status; --- 417,424 ---- } ! #if ENABLE_TRACING if (status != STATUS_SUCCESS) TraceCode(pDevExt, "WMI_", codeNameTableWmi, code, &status); ! #endif /* ENABLE_TRACING */ return status; Index: write.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/write.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** write.c 20 Feb 2007 12:05:11 -0000 1.9 --- write.c 2 Dec 2008 16:10:09 -0000 1.10 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2004-2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2004-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.10 2008/12/02 16:10:09 vfrolov + * Separated tracing and debuging + * * Revision 1.9 2007/02/20 12:05:11 vfrolov * Implemented IOCTL_SERIAL_XOFF_COUNTER *************** *** 124,130 **** PC0C_COMMON_EXTENSION pDevExt = pDevObj->DeviceExtension; ! #if DBG ULONG code = IoGetCurrentIrpStackLocation(pIrp)->MajorFunction; ! #endif /* DBG */ TraceIrp("c0cWrite", pIrp, NULL, TRACE_FLAG_PARAMS); --- 127,133 ---- PC0C_COMMON_EXTENSION pDevExt = pDevObj->DeviceExtension; ! #if ENABLE_TRACING ULONG code = IoGetCurrentIrpStackLocation(pIrp)->MajorFunction; ! #endif /* ENABLE_TRACING */ TraceIrp("c0cWrite", pIrp, NULL, TRACE_FLAG_PARAMS); Index: trace.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/trace.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** trace.h 4 May 2008 09:51:45 -0000 1.12 --- trace.h 2 Dec 2008 16:10:09 -0000 1.13 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.13 2008/12/02 16:10:09 vfrolov + * Separated tracing and debuging + * * Revision 1.12 2008/05/04 09:51:45 vfrolov * Implemented HiddenMode option *************** *** 62,74 **** #define _TRACE_H_ ! #if DBG ! ! #define HALT_UNLESS3(exp, p1, p2, p3) \ ! if (!(exp)) \ ! KeBugCheckEx(0xDEADC0CD, (FILE_ID << 16) + __LINE__, p1, p2, p3) ! ! #define HALT_UNLESS2(exp, p1, p2) HALT_UNLESS3(exp, p1, p2, 0) ! #define HALT_UNLESS1(exp, p1) HALT_UNLESS3(exp, p1, 0, 0) ! #define HALT_UNLESS(exp) HALT_UNLESS3(exp, 0, 0, 0) #define TRACE_FLAG_PARAMS 0x0001 --- 65,69 ---- #define _TRACE_H_ ! #if ENABLE_TRACING #define TRACE_FLAG_PARAMS 0x0001 *************** *** 148,157 **** FIELD2NAME codeNameTableFlowReplace[]; ! #else /* DBG */ - #define HALT_UNLESS3(exp, p1, p2, p3) - #define HALT_UNLESS2(exp, p1, p2) - #define HALT_UNLESS1(exp, p1) - #define HALT_UNLESS(exp) #define TraceOpen(a1, a2) #define TraceClose() --- 143,148 ---- FIELD2NAME codeNameTableFlowReplace[]; ! #else /* ENABLE_TRACING */ #define TraceOpen(a1, a2) #define TraceClose() *************** *** 163,167 **** #define TraceIrp(a1, a2, a3, a4) ! #endif /* DBG */ #endif /* _TRACE_H_ */ --- 154,158 ---- #define TraceIrp(a1, a2, a3, a4) ! #endif /* ENABLE_TRACING */ #endif /* _TRACE_H_ */ Index: precomp.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/precomp.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** precomp.h 1 Jul 2005 11:05:41 -0000 1.2 --- precomp.h 2 Dec 2008 16:10:09 -0000 1.3 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2004-2005 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2004-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.3 2008/12/02 16:10:09 vfrolov + * Separated tracing and debuging + * * Revision 1.2 2005/07/01 11:05:41 vfrolov * Removed unused headers *************** *** 26,30 **** * Initial revision * - * */ --- 29,32 ---- *************** *** 40,46 **** --- 42,51 ---- #pragma warning(pop) + #define ENABLE_TRACING 1 + #include "com0com.h" #include "trace.h" #include "syslog.h" + #include "halt.h" #pragma warning(disable:4514) // unreferenced inline function has been removed Index: ioctl.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/ioctl.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** ioctl.c 30 Oct 2008 07:54:37 -0000 1.40 --- ioctl.c 2 Dec 2008 16:10:08 -0000 1.41 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.41 2008/12/02 16:10:08 vfrolov + * Separated tracing and debuging + * * Revision 1.40 2008/10/30 07:54:37 vfrolov * Improved BREAK emulation *************** *** 1025,1031 **** PC0C_COMMON_EXTENSION pDevExt = pDevObj->DeviceExtension; ! #if DBG ULONG code = IoGetCurrentIrpStackLocation(pIrp)->Parameters.DeviceIoControl.IoControlCode; ! #endif /* DBG */ TraceIrp("c0cIoControl", pIrp, NULL, TRACE_FLAG_PARAMS); --- 1028,1034 ---- PC0C_COMMON_EXTENSION pDevExt = pDevObj->DeviceExtension; ! #if ENABLE_TRACING ULONG code = IoGetCurrentIrpStackLocation(pIrp)->Parameters.DeviceIoControl.IoControlCode; ! #endif /* ENABLE_TRACING */ TraceIrp("c0cIoControl", pIrp, NULL, TRACE_FLAG_PARAMS); *************** *** 1042,1049 **** } ! #if DBG if (status != STATUS_SUCCESS) TraceCode(pDevExt, "IOCTL_", codeNameTableIoctl, code, &status); ! #endif /* DBG */ return status; --- 1045,1052 ---- } ! #if ENABLE_TRACING if (status != STATUS_SUCCESS) TraceCode(pDevExt, "IOCTL_", codeNameTableIoctl, code, &status); ! #endif /* ENABLE_TRACING */ return status; |
From: Vyacheslav F. <vf...@us...> - 2008-12-02 16:07:41
|
Update of /cvsroot/com0com/com0com/sys In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5857 Added Files: halt.h Log Message: Initial revision --- NEW FILE: halt.h --- /* * $Id: halt.h,v 1.1 2008/12/02 16:07:37 vfrolov Exp $ * * Copyright (c) 2005-2008 Vyacheslav Frolov * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: halt.h,v $ * Revision 1.1 2008/12/02 16:07:37 vfrolov * Initial revision * */ #ifndef _HALT_H_ #define _HALT_H_ #if DBG #define HALT_UNLESS3(exp, p1, p2, p3) \ if (!(exp)) \ KeBugCheckEx(0xDEADC0CD, (FILE_ID << 16) + __LINE__, p1, p2, p3) #define HALT_UNLESS2(exp, p1, p2) HALT_UNLESS3(exp, p1, p2, 0) #define HALT_UNLESS1(exp, p1) HALT_UNLESS3(exp, p1, 0, 0) #define HALT_UNLESS(exp) HALT_UNLESS3(exp, 0, 0, 0) #else /* DBG */ #define HALT_UNLESS3(exp, p1, p2, p3) #define HALT_UNLESS2(exp, p1, p2) #define HALT_UNLESS1(exp, p1) #define HALT_UNLESS(exp) #endif /* DBG */ #endif /* _HALT_H_ */ |
From: Vyacheslav F. <vf...@us...> - 2008-12-02 15:51:28
|
Update of /cvsroot/com0com/com0com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4271 Modified Files: ReadMe.txt Log Message: Added more FAQs & HOWTOs Index: ReadMe.txt =================================================================== RCS file: /cvsroot/com0com/com0com/ReadMe.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ReadMe.txt 10 Jul 2008 11:16:24 -0000 1.18 --- ReadMe.txt 2 Dec 2008 15:51:17 -0000 1.19 *************** *** 19,23 **** For example, to send/receive faxes over IP you can connect Windows Fax ! application to CNCA0 port and t38modem (part of the OpenH323 project) to CNCB0 port. In this case the t38modem is a fax modem emulation program. --- 19,23 ---- For example, to send/receive faxes over IP you can connect Windows Fax ! application to CNCA0 port and t38modem (http://t38modem.sourceforge.net/) to CNCB0 port. In this case the t38modem is a fax modem emulation program. *************** *** 191,192 **** --- 191,214 ---- com0com.sys file. The version of com0com.sys file is the version that you are running. + + Q. I'm able to use some application to talk to some hardware using com2tcp when + both the com2tcp 'server' and 'client' are running on the same computer. + When I try to move the client to a remote computer the application gives me + a timeout message and has no settings to increase the timeout. How to fix + the problem? + A. Try to ajust AddRTTO and AddRITO params for application's COM port: + + 1. Launch the Setup Command Prompt shortcut. + 2. Enter the change command, for example: + + command> change CNCA0 AddRTTO=100,AddRITO=100 + + Q. I would like to be able to add, remove and rename virtual comm ports from my + own custom application. Is there an API that I can use or some command line + utility that will do the job? + A. The setupc.exe is a command line utility that will do the job. To get more + info enter: + + setupc help + + BTW: The setupg.exe is a GUI wrapper for setupc.exe. |
From: Vyacheslav F. <vf...@us...> - 2008-12-02 11:54:32
|
Update of /cvsroot/com0com/com0com/setup In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12622 Modified Files: params.cpp Log Message: Fixed typo Index: params.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/params.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** params.cpp 17 Sep 2008 07:58:32 -0000 1.13 --- params.cpp 2 Dec 2008 11:54:28 -0000 1.14 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.14 2008/12/02 11:54:28 vfrolov + * Fixed typo + * * Revision 1.13 2008/09/17 07:58:32 vfrolov * Added AddRTTO and AddRITO parameters *************** *** 859,863 **** " AddRTTO=<n> - add <n> milliseconds to the total time-out period\n" " for read operations (0 by default)\n" ! " AddRITO=<n> - add <n> milliseconds to the ìaximum time allowed to\n" " elapse between the arrival of two characters for\n" " read operations (0 by default)\n" --- 862,866 ---- " AddRTTO=<n> - add <n> milliseconds to the total time-out period\n" " for read operations (0 by default)\n" ! " AddRITO=<n> - add <n> milliseconds to the maximum time allowed to\n" " elapse between the arrival of two characters for\n" " read operations (0 by default)\n" |
From: Vyacheslav F. <vf...@us...> - 2008-12-02 11:27:16
|
Update of /cvsroot/com0com/hub4com/examples In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11341 Modified Files: com2tcp-rfc2217.bat multiplexer.bat Log Message: Added --trace option Index: multiplexer.bat =================================================================== RCS file: /cvsroot/com0com/hub4com/examples/multiplexer.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** multiplexer.bat 1 Dec 2008 17:16:29 -0000 1.1 --- multiplexer.bat 2 Dec 2008 11:27:10 -0000 1.2 *************** *** 13,16 **** --- 13,17 ---- SET TAG=0 SET LINK_TYPE=SERIAL + SET TRACE_COMMENT=# :BEGIN_PARSE_OPTIONS *************** *** 22,25 **** --- 23,31 ---- IF /I "%OPTION%" == "--help" GOTO USAGE + IF /I "%OPTION%" NEQ "--trace" GOTO END_OPTION_TRACE + SET TRACE_COMMENT= + GOTO BEGIN_PARSE_OPTIONS + :END_OPTION_TRACE + IF /I "%OPTION%" NEQ "--mode" GOTO END_OPTION_MODE SET ARG=%1 *************** *** 76,85 **** IF "%MODE%" NEQ "C" GOTO END_MODE_CLIENT IF "%CLIENT_OPTIONS%" NEQ "" GOTO END_MODE_CLIENT ! SET CLIENT_OPTIONS=--load=\"%~f0\",BEGIN_CLIENT_FILTERS,END_CLIENT_FILTERS :END_MODE_CLIENT IF "%MODE%" NEQ "S" GOTO END_MODE_SERVER IF "%SERVER_OPTIONS%" NEQ "" GOTO END_MODE_SERVER ! SET SERVER_OPTIONS=--load=\"%~f0\",BEGIN_SERVER_FILTERS,END_SERVER_FILTERS :END_MODE_SERVER --- 82,91 ---- IF "%MODE%" NEQ "C" GOTO END_MODE_CLIENT IF "%CLIENT_OPTIONS%" NEQ "" GOTO END_MODE_CLIENT ! SET CLIENT_OPTIONS=--load=\"%~f0\",BEGIN_CLIENT_FILTERS,END_CLIENT_FILTERS:%TRACE_COMMENT% :END_MODE_CLIENT IF "%MODE%" NEQ "S" GOTO END_MODE_SERVER IF "%SERVER_OPTIONS%" NEQ "" GOTO END_MODE_SERVER ! SET SERVER_OPTIONS=--load=\"%~f0\",BEGIN_SERVER_FILTERS,END_SERVER_FILTERS:%TRACE_COMMENT% :END_MODE_SERVER *************** *** 88,92 **** SET /A SUBPORT_NUM=%PORT_NUM%+2 ! SET OPTIONS=%OPTIONS% --load=\"%~f0\",BEGIN_ADD_SUBPORT,END_ADD_SUBPORT:%OPTION%,%MODE%,%TAG%,%MUXA_PORT_NUM%,%MUXB_PORT_NUM%,%SUBPORT_NUM% SET /A PORT_NUM=%PORT_NUM%+3 --- 94,98 ---- SET /A SUBPORT_NUM=%PORT_NUM%+2 ! SET OPTIONS=%OPTIONS% --load=\"%~f0\",BEGIN_ADD_SUBPORT,END_ADD_SUBPORT:%OPTION%,%MODE%,%TAG%,%MUXA_PORT_NUM%,%MUXB_PORT_NUM%,%SUBPORT_NUM%,%TRACE_COMMENT% SET /A PORT_NUM=%PORT_NUM%+3 *************** *** 115,118 **** --- 121,125 ---- ECHO. ECHO Options: + ECHO --trace - enable trace output. ECHO --help - show this help. ECHO. *************** *** 145,153 **** --- 152,165 ---- ################################################################ BEGIN_CLIENT_FILTERS + %%1%% --create-filter=trace,serialC,COM --create-filter=escparse,serialC,parse + %%1%% --create-filter=trace,serialC,ExM --create-filter=pinmap,serialC,pinmap:--rts=cts --dtr=dsr --create-filter=linectl,serialC,lc:--br=local --lc=local + %%1%% --create-filter=trace,serialC,CxB + %%1%% --create-filter=trace,telnetC,muxB --create-filter=telnet,telnetC,telnet:--comport=client + %%1%% --create-filter=trace,telnetC,TxM --create-filter=pinmap,telnetC,pinmap:--rts=cts --dtr=dsr --break=break --create-filter=linectl,telnetC,lc:--br=remote --lc=remote *************** *** 155,163 **** --- 167,180 ---- ################################################################ BEGIN_SERVER_FILTERS + %%1%% --create-filter=trace,serialC,COM --create-filter=escparse,serialS,parse + %%1%% --create-filter=trace,serialC,ExM --create-filter=pinmap,serialS,pinmap:--rts=cts --dtr=dsr --break=break --create-filter=linectl,serialS,lc:--br=remote --lc=remote + %%1%% --create-filter=trace,serialC,CxB + %%1%% --create-filter=trace,telnetC,muxB --create-filter=telnet,telnetS,telnet:--comport=server --suppress-echo=yes + %%1%% --create-filter=trace,telnetC,BxM --create-filter=lsrmap,telnetS,lsrmap --create-filter=pinmap,telnetS,pinmap:--cts=cts --dsr=dsr --dcd=dcd --ring=ring *************** *** 183,187 **** --- 200,206 ---- %%1%%-muxA + %%7%% --create-filter=trace,tag%%3%%,muxA --create-filter=tag,tag%%3%%:--tag=%%3%% + %%7%% --create-filter=trace,tag%%3%%,TxL --add-filters=%%4%%:tag%%3%% --bi-route=0:%%4%% Index: com2tcp-rfc2217.bat =================================================================== RCS file: /cvsroot/com0com/hub4com/examples/com2tcp-rfc2217.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** com2tcp-rfc2217.bat 18 Nov 2008 10:21:13 -0000 1.2 --- com2tcp-rfc2217.bat 2 Dec 2008 11:27:10 -0000 1.3 *************** *** 9,12 **** --- 9,13 ---- SET PERMANENT=* + SET TC=: :BEGIN_PARSE_OPTIONS *************** *** 17,20 **** --- 18,26 ---- IF /I "%OPTION%"=="--help" GOTO USAGE + IF /I "%OPTION%" NEQ "--trace" GOTO END_OPTION_TRACE + SET TC= + GOTO BEGIN_PARSE_OPTIONS + :END_OPTION_TRACE + IF /I "%OPTION%" NEQ "--interface" GOTO END_OPTION_INTERFACE SET OPTIONS=%OPTIONS% --interface=%1 *************** *** 90,95 **** :END_SET_LC_MODE_OPTIONS - SET TC=: - %TC% SET OPTIONS=%OPTIONS% --create-filter=trace,com,COM SET OPTIONS=%OPTIONS% --create-filter=escparse,com,parse --- 96,99 ---- *************** *** 134,137 **** --- 138,142 ---- ECHO action. By default the connection will be permanent ECHO as it's possible. + ECHO --trace - enable trace output. ECHO --help - show this help. ECHO. |
From: Vyacheslav F. <vf...@us...> - 2008-12-01 17:22:59
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11917 Modified Files: ReadMe.txt Log Message: Added Multiplexing example Index: ReadMe.txt =================================================================== RCS file: /cvsroot/com0com/hub4com/ReadMe.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ReadMe.txt 17 Nov 2008 16:46:51 -0000 1.5 --- ReadMe.txt 1 Dec 2008 17:22:53 -0000 1.6 *************** *** 22,26 **** Start Microsoft Visual C++ 2005 with hub4com.sln file. Set Active Configuration to hub4com - Win32 Release. ! Build hub4com.exe. TESTING --- 22,26 ---- Start Microsoft Visual C++ 2005 with hub4com.sln file. Set Active Configuration to hub4com - Win32 Release. ! Build solution (hub4com.exe and plugins\*.dll). TESTING *************** *** 115,119 **** COM port pair (see com0com's ReadMe.txt for more info). For example: ! command> install 0 PortName=COM5 - 2. Start the com2tcp-rfc2217.bat on CNCB0 port. For example: --- 115,119 ---- COM port pair (see com0com's ReadMe.txt for more info). For example: ! command> install 0 PortName=COM5,EmuBR=yes - 2. Start the com2tcp-rfc2217.bat on CNCB0 port. For example: *************** *** 167,168 **** --- 167,205 ---- cvs -d:pserver:ano...@yo...dr:/cvsroot/com0com login cvs -z3 -d:pserver:anonymous@172.16.36.111:/cvsroot/com0com co -P hub4com + + + Multiplexing + ------------ + + You have a client computer that has a serial port COM1 and a server + computer that has four serial ports COM1, COM2, COM3 and COM4. Both + computers linked each other by null-modem cable between their COM1 ports. + There are not any other connections between the computers. You'd like to + use COM2, COM3 and COM4 of the server computer like if they exist on the + client computer: + + -------------------------------------- -------------------- + | Client computer | | Server computer | + | | | | + | app1 -- COM2 (virtual) -- | null-modem | -- COM2 --- + | \ | cable | / | + | app2 -- COM3 (virtual) --->-- COM1 -------------- COM1 --<--- COM3 --- + | / | | \ | + | app3 -- COM4 (virtual) -- | | -- COM4 --- + -------------------------------------- -------------------- + + 1. With the com0com's Setup Command Prompt on both computers create + COM2<->CNCB0, COM3<->CNCB1 and COM4<->CNCB2 virtual serial port + pairs (see com0com's ReadMe.txt for more info). For example: + + command> install 0 PortName=COM2,EmuBR=yes - + command> install 1 PortName=COM3,EmuBR=yes - + command> install 2 PortName=COM4,EmuBR=yes - + + 2. Start the multiplexer.bat on the Server computer: + + multiplexer --baud 115200 COM1 --mode server CNCB1 CNCB2 CNCB3 + + 3. Start the multiplexer.bat on the Client computer: + + multiplexer --baud 115200 COM1 CNCB1 CNCB2 CNCB3 |
From: Vyacheslav F. <vf...@us...> - 2008-12-01 17:21:01
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11833 Modified Files: hub4com.vcproj Log Message: Added multiplexer.bat Index: hub4com.vcproj =================================================================== RCS file: /cvsroot/com0com/hub4com/hub4com.vcproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** hub4com.vcproj 24 Nov 2008 11:47:49 -0000 1.8 --- hub4com.vcproj 1 Dec 2008 17:20:57 -0000 1.9 *************** *** 333,336 **** --- 333,340 ---- > </File> + <File + RelativePath=".\examples\multiplexer.bat" + > + </File> </Filter> </Filter> |
From: Vyacheslav F. <vf...@us...> - 2008-12-01 17:18:51
|
Update of /cvsroot/com0com/hub4com/plugins/connector In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11652 Added Files: .cvsignore Log Message: Initial revision --- NEW FILE: .cvsignore --- *.user Release Debug |
From: Vyacheslav F. <vf...@us...> - 2008-12-01 17:17:47
|
Update of /cvsroot/com0com/hub4com/plugins/tag In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11546 Added Files: .cvsignore Log Message: Initial revision --- NEW FILE: .cvsignore --- *.user Release Debug |
From: Vyacheslav F. <vf...@us...> - 2008-12-01 17:16:35
|
Update of /cvsroot/com0com/hub4com/examples In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11440 Added Files: multiplexer.bat Log Message: Initial revision --- NEW FILE: multiplexer.bat --- @ECHO OFF SETLOCAL IF DEFINED HUB4COM GOTO DEFINED_HUB4COM SET HUB4COM=hub4com :DEFINED_HUB4COM PATH %~dp0;%PATH% SET MODE=C SET LINKPORT_WRITE_LIMIT=0 SET PORT_NUM=0 SET TAG=0 SET LINK_TYPE=SERIAL :BEGIN_PARSE_OPTIONS IF "%1"=="" GOTO END_PARSE_OPTIONS SET OPTION=%1 SHIFT /1 IF /I "%OPTION%" == "--help" GOTO USAGE IF /I "%OPTION%" NEQ "--mode" GOTO END_OPTION_MODE SET ARG=%1 SHIFT /1 IF /I "%ARG:~0,1%" NEQ "c" GOTO END_OPTION_MODE_CLIENT SET MODE=C GOTO BEGIN_PARSE_OPTIONS :END_OPTION_MODE_CLIENT IF /I "%ARG:~0,1%" NEQ "s" GOTO END_OPTION_MODE_SERVER SET MODE=S GOTO BEGIN_PARSE_OPTIONS :END_OPTION_MODE_SERVER GOTO USAGE :END_OPTION_MODE IF /I "%OPTION%" == "--baud" GOTO BEGIN_OPTION_LC IF /I "%OPTION%" == "--data" GOTO BEGIN_OPTION_LC IF /I "%OPTION%" == "--parity" GOTO BEGIN_OPTION_LC IF /I "%OPTION%" == "--stop" GOTO BEGIN_OPTION_LC GOTO END_OPTION_LC :BEGIN_OPTION_LC SET VAL=%1 SHIFT /1 IF /I "%VAL:~0,1%"=="d" SET VAL=c SET OPTIONS=%OPTIONS% %OPTION%=%VAL% GOTO BEGIN_PARSE_OPTIONS :END_OPTION_LC IF /I "%OPTION%" NEQ "--link-type" GOTO END_OPTION_LINK_TYPE SET LINK_TYPE=%1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS :END_OPTION_LINK_TYPE IF "%OPTION:~0,2%" == "--" GOTO USAGE IF %PORT_NUM% GTR 0 GOTO END_LINKPORT SET /A PORT_NUM=%PORT_NUM%+1 IF /I "%LINK_TYPE%" NEQ "serial" GOTO END_LINK_TYPE_SERIAL SET OPTIONS=%OPTIONS% \\.\%OPTION% GOTO BEGIN_PARSE_OPTIONS :END_LINK_TYPE_SERIAL IF /I "%LINK_TYPE%" NEQ "tcp" GOTO END_LINK_TYPE_TCP SET OPTIONS=%OPTIONS% --use-driver=tcp %OPTION% --use-driver=serial GOTO BEGIN_PARSE_OPTIONS :END_LINK_TYPE_TCP GOTO USAGE :END_LINKPORT IF "%MODE%" NEQ "C" GOTO END_MODE_CLIENT IF "%CLIENT_OPTIONS%" NEQ "" GOTO END_MODE_CLIENT SET CLIENT_OPTIONS=--load=\"%~f0\",BEGIN_CLIENT_FILTERS,END_CLIENT_FILTERS :END_MODE_CLIENT IF "%MODE%" NEQ "S" GOTO END_MODE_SERVER IF "%SERVER_OPTIONS%" NEQ "" GOTO END_MODE_SERVER SET SERVER_OPTIONS=--load=\"%~f0\",BEGIN_SERVER_FILTERS,END_SERVER_FILTERS :END_MODE_SERVER SET /A MUXA_PORT_NUM=%PORT_NUM% SET /A MUXB_PORT_NUM=%PORT_NUM%+1 SET /A SUBPORT_NUM=%PORT_NUM%+2 SET OPTIONS=%OPTIONS% --load=\"%~f0\",BEGIN_ADD_SUBPORT,END_ADD_SUBPORT:%OPTION%,%MODE%,%TAG%,%MUXA_PORT_NUM%,%MUXB_PORT_NUM%,%SUBPORT_NUM% SET /A PORT_NUM=%PORT_NUM%+3 SET /A TAG=%TAG%+1 SET /A LINKPORT_WRITE_LIMIT=%LINKPORT_WRITE_LIMIT%+256 GOTO BEGIN_PARSE_OPTIONS :END_PARSE_OPTIONS IF %PORT_NUM% LEQ 1 GOTO USAGE SET TC=: @ECHO ON "%HUB4COM%" %CLIENT_OPTIONS% %SERVER_OPTIONS% --write-limit=%LINKPORT_WRITE_LIMIT% %OPTIONS% @ECHO OFF ENDLOCAL GOTO END :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :USAGE ECHO Usage: ECHO %0 [options] ^<linkport^> [options] ^<subport1^> [[options] ^<subport2^> ...] ECHO. ECHO Options: ECHO --help - show this help. ECHO. ECHO Linkport options: ECHO --link-type ^<t^> - for subsequent port set type ^<t^> (default is ECHO serial), where ^<t^> is serial or tcp. ECHO. ECHO Subports options: ECHO --mode ^<m^> - for subsequent ports set mode to ^<m^> (default is ECHO client), where ^<m^> is c[lient] or s[erver]. ECHO. ECHO Serial options: ECHO --baud ^<b^> - for subsequent ports set baud rate to ^<b^> (default ECHO is 19200), where ^<b^> is positive number or ECHO d[efault]. ECHO --data ^<d^> - for subsequent ports set data bits to ^<d^> (default ECHO is 8), where ^<d^> is positive number or d[efault]. ECHO --parity ^<p^> - for subsequent ports set parity to ^<p^> (default is ECHO no), where ^<p^> is n[o], o[dd], e[ven], m[ark], ECHO s[pace] or d[efault]. ECHO --stop ^<s^> - for subsequent ports set stop bits to ^<s^> (default ECHO is 1), where ^<s^> is 1, 1.5, 2 or d[efault]. ECHO. ECHO The value d[efault] above means to use current port settings. ECHO The values of baud rate, data bits, parity and stop bits for subports are ECHO initial only and will be changed if client side subports created with ECHO com0com driver. GOTO END ################################################################ BEGIN_CLIENT_FILTERS --create-filter=escparse,serialC,parse --create-filter=pinmap,serialC,pinmap:--rts=cts --dtr=dsr --create-filter=linectl,serialC,lc:--br=local --lc=local --create-filter=telnet,telnetC,telnet:--comport=client --create-filter=pinmap,telnetC,pinmap:--rts=cts --dtr=dsr --break=break --create-filter=linectl,telnetC,lc:--br=remote --lc=remote END_CLIENT_FILTERS ################################################################ BEGIN_SERVER_FILTERS --create-filter=escparse,serialS,parse --create-filter=pinmap,serialS,pinmap:--rts=cts --dtr=dsr --break=break --create-filter=linectl,serialS,lc:--br=remote --lc=remote --create-filter=telnet,telnetS,telnet:--comport=server --suppress-echo=yes --create-filter=lsrmap,telnetS,lsrmap --create-filter=pinmap,telnetS,pinmap:--cts=cts --dsr=dsr --dcd=dcd --ring=ring --create-filter=linectl,telnetS,lc:--br=local --lc=local END_SERVER_FILTERS ################################################################ BEGIN_ADD_SUBPORT ##################################################################################################### # # %%1%% - subport # %%2%% - mode (C or S) # %%3%% - tag (0-254) # # [\\.\%%1%%]--(serial%%2%%)--(telnet%%2%%)--[%%1%%-muxB]--[%%1%%-muxA]--(tag%%3%%)-- # \ # [\\.\%%1%%]--(serial%%2%%)--(telnet%%2%%)--[%%1%%-muxB]--[%%1%%-muxA]--(tag%%3%%)--->--[linkport] # / # [\\.\%%1%%]--(serial%%2%%)--(telnet%%2%%)--[%%1%%-muxB]--[%%1%%-muxA]--(tag%%3%%)-- ##################################################################################################### --use-driver=connector %%1%%-muxA --create-filter=tag,tag%%3%%:--tag=%%3%% --add-filters=%%4%%:tag%%3%% --bi-route=0:%%4%% --no-default-fc-route=%%4%%:0 %%1%%-muxB --bi-connect=%%1%%-muxA:%%1%%-muxB --add-filters=%%5%%:telnet%%2%% --use-driver=serial --octs=off --write-limit=256 \\.\%%1%% --bi-route=%%5%%:%%6%% --add-filters=%%6%%:serial%%2%% END_ADD_SUBPORT ################################################################ :END |