ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/vendor/pxys2-2.0.0/pxyscand/src/socks4.h
Revision: 3252
Committed: Wed Apr 2 20:41:43 2014 UTC (10 years ago) by michael
Content type: text/x-chdr
File size: 2127 byte(s)
Log Message:
- Imported pxys2-2.0.0

File Contents

# Content
1 // Copyright (C) 2003 Stephane Thiell
2 //
3 // This file is part of pxyscand (from pxys)
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 //
19 // SOCKS Protocol Version 4 constants.
20 // http://www.socks.nec.com/protocol/socks4.protocol
21 //
22 // $Id: socks4.h,v 1.1.1.1 2003/12/30 17:09:02 mbuna Exp $
23 //
24 #ifndef INCLUDED_SOCKS4_H_
25 #define INCLUDED_SOCKS4_H_
26
27 #define S4_VN 04 /* Socks version 4 */
28
29 /* SOCKS request */
30 #define S4_CMD_CONNECT 0x01 /* CONNECT */
31 #define S4_CMD_BIND 0x02 /* BIND */
32
33 /* Reply field */
34 #define S4_R_VNCODE 0x00 /* Reply VN */
35 #define S4_REQ_GRANTED 0x5a /* Request granted */
36 #define S4_REQ_REJECTED 0x5b /* Request rejected or failed */
37 #define S4_REQ_CANNOTIDENT 0x5c /* Request rejected because SOCKS server
38 * cannot connect to identd on the client
39 */
40 #define S4_REQ_NOTSAMEIDENT 0x5d /* Request rejected because the client
41 * program and identd report different
42 * user-ids
43 */
44
45 struct socks4
46 {
47 unsigned char vn;
48 unsigned char cd;
49 unsigned char dstport[2];
50 unsigned char dstip[4];
51 /* char userid[256]; */
52 unsigned char nullfield;
53 };
54
55 struct socks4_response
56 {
57 unsigned char vn;
58 unsigned char cd;
59 unsigned char dstport[2];
60 unsigned char dstip[4];
61 };
62
63 #endif // INCLUDED_SOCKS4_H_