/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* LINTLIBRARY */ /* PROTOLIB1 */ #include #include #include #include #include #include #include #include #include #include #include #include /* * usr/src/lib/libsocket/inet routines not prototyped in the above * header files. */ /* bindresvport.c */ int bindresvport(int sd, struct sockaddr_in *sin); /* bootparams_getbyname.c */ int bootparams_getbyname(char *name, char *linebuf, int linelen); /* inet6_rthdr.c */ int __inet6_rthdr_add(void *, const struct in6_addr *); struct in6_addr *__inet6_rthdr_getaddr(void *, int); /* netmasks.c */ int getnetmaskbynet(const struct in_addr net, struct in_addr *mask); /* ruserpass.c */ void _ruserpass(const char *host, char **aname, char **apass); /* * usr/src/lib/libsocket/socket routines */ /* _soutil.c */ /* socket.c */ int socket(int domain, int type, int protocol); int _socket(int domain, int type, int protocol); int _socket_bsd(int family, int type, int protocol); int __xnet_socket(int family, int type, int protocol); /* socketpair.c */ int socketpair(int domain, int type, int protocol, int sv[]); int _socketpair(int domain, int type, int protocol, int *sv); int _socketpair_bsd(int domain, int type, int protocol, int *sv); int __xnet_socketpair(int domain, int type, int protocol, int *sv); /* weaks.c */ int bind(int s, const struct sockaddr *name, socklen_t namelen); int listen(int s, int backlog); int accept(int s, struct sockaddr *addr, Psocklen_t addrlen); int connect(int s, const struct sockaddr *name, socklen_t namelen); int shutdown(int s, int how); ssize_t recv(int s, void *buf, size_t len, int flags); ssize_t recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, Psocklen_t fromlen); ssize_t recvmsg(int s, struct msghdr *msg, int flags); ssize_t send(int s, const void *msg, size_t len, int flags); ssize_t sendmsg(int s, const struct msghdr *msg, int flags); ssize_t sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); int getpeername(int s, struct sockaddr *name, Psocklen_t namelen); int getsockname(int s, struct sockaddr *name, Psocklen_t namelen); int getsockopt(int s, int level, int optname, void *optval, Psocklen_t optlen); int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen); int _bind(int s, const struct sockaddr *name, int namelen); int _listen(int s, int backlog); int _accept(int s, struct sockaddr *addr, int *addrlen); int _connect(int s, struct sockaddr *name, int namelen); int _shutdown(int s, int how); int _recv(int s, char *buf, int len, int flags); int _recvfrom(int s, char *buf, int len, int flags, struct sockaddr *from, int *fromlen); int _recvmsg(int s, struct msghdr *msg, int flags); int _send(int s, const char *msg, int len, int flags); int _sendmsg(int s, const struct msghdr *msg, int flags); int _sendto(int s, const char *msg, int len, int flags, const struct sockaddr *to, int tolen); int _getpeername(int s, struct sockaddr *name, int *namelen); int _getsockname(int s, struct sockaddr *name, int *namelen); int _getsockopt(int s, int level, int optname, char *optval, int *optlen); int _setsockopt(int s, int level, int optname, const char *optval, int optlen); int __xnet_bind(int sock, const struct sockaddr *addr, socklen_t addrlen); int __xnet_listen(int sock, int backlog); int __xnet_connect(int sock, const struct sockaddr *addr, socklen_t addrlen); int __xnet_recvmsg(int sock, struct msghdr *msg, int flags); int __xnet_sendmsg(int sock, const struct msghdr *msg, int flags); int __xnet_sendto(int sock, const void *buf, size_t len, int flags, const struct sockaddr *addr, socklen_t addrlen); int __xnet_getsockopt(int sock, int level, int option_name, void *option_value, socklen_t *option_lenp);