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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc

Issue 99933002: [NaCl SDK] nacl_io: implement getaddrinfo() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
OLDNEW
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 "nacl_io/kernel_intercept.h" 5 #include "nacl_io/kernel_intercept.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "nacl_io/dbgprint.h"
10 #include "nacl_io/kernel_proxy.h" 11 #include "nacl_io/kernel_proxy.h"
11 #include "nacl_io/kernel_wrap.h" 12 #include "nacl_io/kernel_wrap.h"
12 #include "nacl_io/osmman.h" 13 #include "nacl_io/osmman.h"
13 #include "nacl_io/ossocket.h" 14 #include "nacl_io/ossocket.h"
14 #include "nacl_io/pepper_interface.h" 15 #include "nacl_io/pepper_interface.h"
15 #include "nacl_io/pepper_interface.h" 16 #include "nacl_io/pepper_interface.h"
16 #include "nacl_io/real_pepper_interface.h" 17 #include "nacl_io/real_pepper_interface.h"
17 18
18 using namespace nacl_io; 19 using namespace nacl_io;
19 20
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 int ki_connect(int fd, const struct sockaddr* addr, socklen_t len) { 394 int ki_connect(int fd, const struct sockaddr* addr, socklen_t len) {
394 ON_NOSYS_RETURN(-1); 395 ON_NOSYS_RETURN(-1);
395 return s_kp->connect(fd, addr, len); 396 return s_kp->connect(fd, addr, len);
396 } 397 }
397 398
398 struct hostent* ki_gethostbyname(const char* name) { 399 struct hostent* ki_gethostbyname(const char* name) {
399 ON_NOSYS_RETURN(NULL); 400 ON_NOSYS_RETURN(NULL);
400 return s_kp->gethostbyname(name); 401 return s_kp->gethostbyname(name);
401 } 402 }
402 403
404 int ki_getaddrinfo(const char *node, const char *service,
405 const struct addrinfo *hints,
406 struct addrinfo **res) {
407 ON_NOSYS_RETURN(EAI_SYSTEM);
408 return s_kp->getaddrinfo(node, service, hints, res);
409 }
410
411 void ki_freeaddrinfo(struct addrinfo *res) {
412 s_kp->freeaddrinfo(res);
413 }
414
403 int ki_getpeername(int fd, struct sockaddr* addr, socklen_t* len) { 415 int ki_getpeername(int fd, struct sockaddr* addr, socklen_t* len) {
404 ON_NOSYS_RETURN(-1); 416 ON_NOSYS_RETURN(-1);
405 return s_kp->getpeername(fd, addr, len); 417 return s_kp->getpeername(fd, addr, len);
406 } 418 }
407 419
408 int ki_getsockname(int fd, struct sockaddr* addr, socklen_t* len) { 420 int ki_getsockname(int fd, struct sockaddr* addr, socklen_t* len) {
409 ON_NOSYS_RETURN(-1); 421 ON_NOSYS_RETURN(-1);
410 return s_kp->getsockname(fd, addr, len); 422 return s_kp->getsockname(fd, addr, len);
411 } 423 }
412 424
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 int ki_socket(int domain, int type, int protocol) { 478 int ki_socket(int domain, int type, int protocol) {
467 ON_NOSYS_RETURN(-1); 479 ON_NOSYS_RETURN(-1);
468 return s_kp->socket(domain, type, protocol); 480 return s_kp->socket(domain, type, protocol);
469 } 481 }
470 482
471 int ki_socketpair(int domain, int type, int protocol, int* sv) { 483 int ki_socketpair(int domain, int type, int protocol, int* sv) {
472 ON_NOSYS_RETURN(-1); 484 ON_NOSYS_RETURN(-1);
473 return s_kp->socketpair(domain, type, protocol, sv); 485 return s_kp->socketpair(domain, type, protocol, sv);
474 } 486 }
475 #endif // PROVIDES_SOCKET_API 487 #endif // PROVIDES_SOCKET_API
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_intercept.h ('k') | native_client_sdk/src/libraries/nacl_io/kernel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698