2 * Copyright (c) 2011 Nicira Networks.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #error "Use this header only with sparse. It is not a correct implementation."
21 #ifndef __SYS_SOCKET_SPARSE
22 #define __SYS_SOCKET_SPARSE 1
24 #include "openvswitch/types.h"
27 typedef unsigned short int sa_family_t;
28 typedef __socklen_t socklen_t;
31 sa_family_t sa_family;
35 struct sockaddr_storage {
36 sa_family_t ss_family;
42 socklen_t msg_namelen;
43 struct iovec *msg_iov;
46 socklen_t msg_controllen;
94 PF_UNSPEC = AF_UNSPEC,
102 PF_NETLINK = AF_NETLINK,
104 PF_PACKET = AF_PACKET
113 int accept(int, struct sockaddr *, socklen_t *);
114 int bind(int, const struct sockaddr *, socklen_t);
115 int connect(int, const struct sockaddr *, socklen_t);
116 int getpeername(int, struct sockaddr *, socklen_t *);
117 int getsockname(int, struct sockaddr *, socklen_t *);
118 int getsockopt(int, int, int, void *, socklen_t *);
119 int listen(int, int);
120 ssize_t recv(int, void *, size_t, int);
121 ssize_t recvfrom(int, void *, size_t, int, struct sockaddr *, socklen_t *);
122 ssize_t recvmsg(int, struct msghdr *, int);
123 ssize_t send(int, const void *, size_t, int);
124 ssize_t sendmsg(int, const struct msghdr *, int);
125 ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
127 int setsockopt(int, int, int, const void *, socklen_t);
128 int shutdown(int, int);
130 int socket(int, int, int);
131 int socketpair(int, int, int, int[2]);
133 #endif /* <sys/socket.h> for sparse */