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 "nacl_io/kernel_intercept.h" | 5 #include "nacl_io/kernel_intercept.h" |
6 | 6 |
7 #include <assert.h> | 7 #include <assert.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <string.h> | 9 #include <string.h> |
10 | 10 |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 int ki_connect(int fd, const struct sockaddr* addr, socklen_t len) { | 475 int ki_connect(int fd, const struct sockaddr* addr, socklen_t len) { |
476 ON_NOSYS_RETURN(-1); | 476 ON_NOSYS_RETURN(-1); |
477 return s_state.kp->connect(fd, addr, len); | 477 return s_state.kp->connect(fd, addr, len); |
478 } | 478 } |
479 | 479 |
480 struct hostent* ki_gethostbyname(const char* name) { | 480 struct hostent* ki_gethostbyname(const char* name) { |
481 ON_NOSYS_RETURN(NULL); | 481 ON_NOSYS_RETURN(NULL); |
482 return s_state.kp->gethostbyname(name); | 482 return s_state.kp->gethostbyname(name); |
483 } | 483 } |
484 | 484 |
| 485 int ki_getnameinfo(const struct sockaddr *sa, |
| 486 socklen_t salen, |
| 487 char *host, |
| 488 size_t hostlen, |
| 489 char *serv, |
| 490 size_t servlen, |
| 491 unsigned int flags) { |
| 492 ON_NOSYS_RETURN(EAI_SYSTEM); |
| 493 return s_state.kp->getnameinfo(sa, salen, host, hostlen, serv, servlen, |
| 494 flags); |
| 495 } |
| 496 |
485 int ki_getaddrinfo(const char* node, | 497 int ki_getaddrinfo(const char* node, |
486 const char* service, | 498 const char* service, |
487 const struct addrinfo* hints, | 499 const struct addrinfo* hints, |
488 struct addrinfo** res) { | 500 struct addrinfo** res) { |
489 ON_NOSYS_RETURN(EAI_SYSTEM); | 501 ON_NOSYS_RETURN(EAI_SYSTEM); |
490 return s_state.kp->getaddrinfo(node, service, hints, res); | 502 return s_state.kp->getaddrinfo(node, service, hints, res); |
491 } | 503 } |
492 | 504 |
493 void ki_freeaddrinfo(struct addrinfo* res) { | 505 void ki_freeaddrinfo(struct addrinfo* res) { |
494 s_state.kp->freeaddrinfo(res); | 506 s_state.kp->freeaddrinfo(res); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 int ki_socket(int domain, int type, int protocol) { | 583 int ki_socket(int domain, int type, int protocol) { |
572 ON_NOSYS_RETURN(-1); | 584 ON_NOSYS_RETURN(-1); |
573 return s_state.kp->socket(domain, type, protocol); | 585 return s_state.kp->socket(domain, type, protocol); |
574 } | 586 } |
575 | 587 |
576 int ki_socketpair(int domain, int type, int protocol, int* sv) { | 588 int ki_socketpair(int domain, int type, int protocol, int* sv) { |
577 ON_NOSYS_RETURN(-1); | 589 ON_NOSYS_RETURN(-1); |
578 return s_state.kp->socketpair(domain, type, protocol, sv); | 590 return s_state.kp->socketpair(domain, type, protocol, sv); |
579 } | 591 } |
580 #endif // PROVIDES_SOCKET_API | 592 #endif // PROVIDES_SOCKET_API |
OLD | NEW |