Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1144)

Side by Side Diff: net/socket/socks_client_socket.cc

Issue 199105: Continue with the FreeBSD port - this version builds and links, though... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/socks5_client_socket.cc ('k') | printing/native_metafile.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/socket/socks_client_socket.h" 5 #include "net/socket/socks_client_socket.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <ws2tcpip.h> 10 #include <ws2tcpip.h>
11 #elif defined(OS_POSIX) 11 #elif defined(OS_POSIX)
12 #include <netdb.h> 12 #include <netdb.h>
13 #endif 13 #endif
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/trace_event.h" 15 #include "base/trace_event.h"
16 #include "net/base/io_buffer.h" 16 #include "net/base/io_buffer.h"
17 #include "net/base/net_util.h" 17 #include "net/base/net_util.h"
18 18
19 #if defined(OS_FREEBSD)
20 #include <netinet/in.h>
21 #include <sys/socket.h>
22 #endif
23
19 namespace net { 24 namespace net {
20 25
21 // Every SOCKS server requests a user-id from the client. It is optional 26 // Every SOCKS server requests a user-id from the client. It is optional
22 // and we send an empty string. 27 // and we send an empty string.
23 static const char kEmptyUserId[] = ""; 28 static const char kEmptyUserId[] = "";
24 29
25 // The SOCKS4a implementation suggests to use an invalid IP in case the DNS 30 // The SOCKS4a implementation suggests to use an invalid IP in case the DNS
26 // resolution at client fails. 31 // resolution at client fails.
27 static const uint8 kInvalidIp[] = { 0, 0, 0, 127 }; 32 static const uint8 kInvalidIp[] = { 0, 0, 0, 127 };
28 33
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 389 }
385 390
386 #if defined(OS_LINUX) 391 #if defined(OS_LINUX)
387 int SOCKSClientSocket::GetPeerName(struct sockaddr* name, 392 int SOCKSClientSocket::GetPeerName(struct sockaddr* name,
388 socklen_t* namelen) { 393 socklen_t* namelen) {
389 return transport_->GetPeerName(name, namelen); 394 return transport_->GetPeerName(name, namelen);
390 } 395 }
391 #endif 396 #endif
392 397
393 } // namespace net 398 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks5_client_socket.cc ('k') | printing/native_metafile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698