Source Code Cross Referenced for Packets.java in  » Net » Ganymed-SSH-2 » ch » ethz » ssh2 » packets » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Ganymed SSH 2 » ch.ethz.ssh2.packets 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package ch.ethz.ssh2.packets;
002:
003:        /**
004:         * Packets.
005:         * 
006:         * @author Christian Plattner, plattner@inf.ethz.ch
007:         * @version $Id: Packets.java,v 1.6 2006/09/20 12:51:37 cplattne Exp $
008:         */
009:        public class Packets {
010:            public static final int SSH_MSG_DISCONNECT = 1;
011:            public static final int SSH_MSG_IGNORE = 2;
012:            public static final int SSH_MSG_UNIMPLEMENTED = 3;
013:            public static final int SSH_MSG_DEBUG = 4;
014:            public static final int SSH_MSG_SERVICE_REQUEST = 5;
015:            public static final int SSH_MSG_SERVICE_ACCEPT = 6;
016:
017:            public static final int SSH_MSG_KEXINIT = 20;
018:            public static final int SSH_MSG_NEWKEYS = 21;
019:
020:            public static final int SSH_MSG_KEXDH_INIT = 30;
021:            public static final int SSH_MSG_KEXDH_REPLY = 31;
022:
023:            public static final int SSH_MSG_KEX_DH_GEX_REQUEST_OLD = 30;
024:            public static final int SSH_MSG_KEX_DH_GEX_REQUEST = 34;
025:            public static final int SSH_MSG_KEX_DH_GEX_GROUP = 31;
026:            public static final int SSH_MSG_KEX_DH_GEX_INIT = 32;
027:            public static final int SSH_MSG_KEX_DH_GEX_REPLY = 33;
028:
029:            public static final int SSH_MSG_USERAUTH_REQUEST = 50;
030:            public static final int SSH_MSG_USERAUTH_FAILURE = 51;
031:            public static final int SSH_MSG_USERAUTH_SUCCESS = 52;
032:            public static final int SSH_MSG_USERAUTH_BANNER = 53;
033:            public static final int SSH_MSG_USERAUTH_INFO_REQUEST = 60;
034:            public static final int SSH_MSG_USERAUTH_INFO_RESPONSE = 61;
035:
036:            public static final int SSH_MSG_GLOBAL_REQUEST = 80;
037:            public static final int SSH_MSG_REQUEST_SUCCESS = 81;
038:            public static final int SSH_MSG_REQUEST_FAILURE = 82;
039:
040:            public static final int SSH_MSG_CHANNEL_OPEN = 90;
041:            public static final int SSH_MSG_CHANNEL_OPEN_CONFIRMATION = 91;
042:            public static final int SSH_MSG_CHANNEL_OPEN_FAILURE = 92;
043:            public static final int SSH_MSG_CHANNEL_WINDOW_ADJUST = 93;
044:            public static final int SSH_MSG_CHANNEL_DATA = 94;
045:            public static final int SSH_MSG_CHANNEL_EXTENDED_DATA = 95;
046:            public static final int SSH_MSG_CHANNEL_EOF = 96;
047:            public static final int SSH_MSG_CHANNEL_CLOSE = 97;
048:            public static final int SSH_MSG_CHANNEL_REQUEST = 98;
049:            public static final int SSH_MSG_CHANNEL_SUCCESS = 99;
050:            public static final int SSH_MSG_CHANNEL_FAILURE = 100;
051:
052:            public static final int SSH_EXTENDED_DATA_STDERR = 1;
053:
054:            public static final int SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT = 1;
055:            public static final int SSH_DISCONNECT_PROTOCOL_ERROR = 2;
056:            public static final int SSH_DISCONNECT_KEY_EXCHANGE_FAILED = 3;
057:            public static final int SSH_DISCONNECT_RESERVED = 4;
058:            public static final int SSH_DISCONNECT_MAC_ERROR = 5;
059:            public static final int SSH_DISCONNECT_COMPRESSION_ERROR = 6;
060:            public static final int SSH_DISCONNECT_SERVICE_NOT_AVAILABLE = 7;
061:            public static final int SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED = 8;
062:            public static final int SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE = 9;
063:            public static final int SSH_DISCONNECT_CONNECTION_LOST = 10;
064:            public static final int SSH_DISCONNECT_BY_APPLICATION = 11;
065:            public static final int SSH_DISCONNECT_TOO_MANY_CONNECTIONS = 12;
066:            public static final int SSH_DISCONNECT_AUTH_CANCELLED_BY_USER = 13;
067:            public static final int SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE = 14;
068:            public static final int SSH_DISCONNECT_ILLEGAL_USER_NAME = 15;
069:
070:            public static final int SSH_OPEN_ADMINISTRATIVELY_PROHIBITED = 1;
071:            public static final int SSH_OPEN_CONNECT_FAILED = 2;
072:            public static final int SSH_OPEN_UNKNOWN_CHANNEL_TYPE = 3;
073:            public static final int SSH_OPEN_RESOURCE_SHORTAGE = 4;
074:
075:            private static final String[] reverseNames = new String[101];
076:
077:            static {
078:                reverseNames[1] = "SSH_MSG_DISCONNECT";
079:                reverseNames[2] = "SSH_MSG_IGNORE";
080:                reverseNames[3] = "SSH_MSG_UNIMPLEMENTED";
081:                reverseNames[4] = "SSH_MSG_DEBUG";
082:                reverseNames[5] = "SSH_MSG_SERVICE_REQUEST";
083:                reverseNames[6] = "SSH_MSG_SERVICE_ACCEPT";
084:
085:                reverseNames[20] = "SSH_MSG_KEXINIT";
086:                reverseNames[21] = "SSH_MSG_NEWKEYS";
087:
088:                reverseNames[30] = "SSH_MSG_KEXDH_INIT";
089:                reverseNames[31] = "SSH_MSG_KEXDH_REPLY/SSH_MSG_KEX_DH_GEX_GROUP";
090:                reverseNames[32] = "SSH_MSG_KEX_DH_GEX_INIT";
091:                reverseNames[33] = "SSH_MSG_KEX_DH_GEX_REPLY";
092:                reverseNames[34] = "SSH_MSG_KEX_DH_GEX_REQUEST";
093:
094:                reverseNames[50] = "SSH_MSG_USERAUTH_REQUEST";
095:                reverseNames[51] = "SSH_MSG_USERAUTH_FAILURE";
096:                reverseNames[52] = "SSH_MSG_USERAUTH_SUCCESS";
097:                reverseNames[53] = "SSH_MSG_USERAUTH_BANNER";
098:
099:                reverseNames[60] = "SSH_MSG_USERAUTH_INFO_REQUEST";
100:                reverseNames[61] = "SSH_MSG_USERAUTH_INFO_RESPONSE";
101:
102:                reverseNames[80] = "SSH_MSG_GLOBAL_REQUEST";
103:                reverseNames[81] = "SSH_MSG_REQUEST_SUCCESS";
104:                reverseNames[82] = "SSH_MSG_REQUEST_FAILURE";
105:
106:                reverseNames[90] = "SSH_MSG_CHANNEL_OPEN";
107:                reverseNames[91] = "SSH_MSG_CHANNEL_OPEN_CONFIRMATION";
108:                reverseNames[92] = "SSH_MSG_CHANNEL_OPEN_FAILURE";
109:                reverseNames[93] = "SSH_MSG_CHANNEL_WINDOW_ADJUST";
110:                reverseNames[94] = "SSH_MSG_CHANNEL_DATA";
111:                reverseNames[95] = "SSH_MSG_CHANNEL_EXTENDED_DATA";
112:                reverseNames[96] = "SSH_MSG_CHANNEL_EOF";
113:                reverseNames[97] = "SSH_MSG_CHANNEL_CLOSE";
114:                reverseNames[98] = "SSH_MSG_CHANNEL_REQUEST";
115:                reverseNames[99] = "SSH_MSG_CHANNEL_SUCCESS";
116:                reverseNames[100] = "SSH_MSG_CHANNEL_FAILURE";
117:            }
118:
119:            public static final String getMessageName(int type) {
120:                String res = null;
121:
122:                if ((type >= 0) && (type < reverseNames.length)) {
123:                    res = reverseNames[type];
124:                }
125:
126:                return (res == null) ? ("UNKNOWN MSG " + type) : res;
127:            }
128:
129:            //	public static final void debug(String tag, byte[] msg)
130:            //	{
131:            //		System.err.println(tag + " Type: " + msg[0] + ", LEN: " + msg.length);
132:            //
133:            //		for (int i = 0; i < msg.length; i++)
134:            //		{
135:            //			if (((msg[i] >= 'a') && (msg[i] <= 'z')) || ((msg[i] >= 'A') && (msg[i] <= 'Z'))
136:            //					|| ((msg[i] >= '0') && (msg[i] <= '9')) || (msg[i] == ' '))
137:            //				System.err.print((char) msg[i]);
138:            //			else
139:            //				System.err.print(".");
140:            //		}
141:            //		System.err.println();
142:            //		System.err.flush();
143:            //	}
144:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.