OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ppapi/shared_impl/private/net_address_private_impl.h" | 5 #include "ppapi/shared_impl/private/net_address_private_impl.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <winsock2.h> | 9 #include <winsock2.h> |
10 #include <ws2tcpip.h> | 10 #include <ws2tcpip.h> |
11 #elif defined(OS_POSIX) && !defined(OS_NACL) | 11 #elif defined(OS_POSIX) && !defined(OS_NACL) |
12 #include <arpa/inet.h> | 12 #include <arpa/inet.h> |
13 #include <sys/socket.h> | 13 #include <sys/socket.h> |
14 #include <sys/types.h> | 14 #include <sys/types.h> |
15 #endif | 15 #endif |
16 | 16 |
17 #include <string.h> | 17 #include <string.h> |
18 | 18 |
19 #include <string> | 19 #include <string> |
20 | 20 |
21 #include "base/basictypes.h" | 21 #include "base/basictypes.h" |
22 #include "base/logging.h" | 22 #include "base/logging.h" |
23 #include "base/stringprintf.h" | 23 #include "base/strings/stringprintf.h" |
24 #include "build/build_config.h" | 24 #include "build/build_config.h" |
25 #include "ppapi/c/pp_var.h" | 25 #include "ppapi/c/pp_var.h" |
26 #include "ppapi/c/private/ppb_net_address_private.h" | 26 #include "ppapi/c/private/ppb_net_address_private.h" |
27 #include "ppapi/shared_impl/proxy_lock.h" | 27 #include "ppapi/shared_impl/proxy_lock.h" |
28 #include "ppapi/shared_impl/var.h" | 28 #include "ppapi/shared_impl/var.h" |
29 #include "ppapi/thunk/thunk.h" | 29 #include "ppapi/thunk/thunk.h" |
30 | 30 |
31 #if defined(OS_MACOSX) | 31 #if defined(OS_MACOSX) |
32 // This is a bit evil, but it's standard operating procedure for |s6_addr|.... | 32 // This is a bit evil, but it's standard operating procedure for |s6_addr|.... |
33 #define s6_addr16 __u6_addr.__u6_addr16 | 33 #define s6_addr16 __u6_addr.__u6_addr16 |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 | 579 |
580 COMPILE_ASSERT(sizeof(ipv6_addr->addr) == kIPv6AddressSize, | 580 COMPILE_ASSERT(sizeof(ipv6_addr->addr) == kIPv6AddressSize, |
581 mismatched_IPv6_address_size); | 581 mismatched_IPv6_address_size); |
582 memcpy(ipv6_addr->addr, net_addr->address, kIPv6AddressSize); | 582 memcpy(ipv6_addr->addr, net_addr->address, kIPv6AddressSize); |
583 | 583 |
584 ipv6_addr->unused_padding = 0; | 584 ipv6_addr->unused_padding = 0; |
585 return true; | 585 return true; |
586 } | 586 } |
587 | 587 |
588 } // namespace ppapi | 588 } // namespace ppapi |
OLD | NEW |