1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 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 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 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. 15 */ 16 17 #pragma once 18 19 #include <sys/cdefs.h> 20 #include <sys/socket.h> 21 22 __BEGIN_DECLS 23 24 struct NetdClientDispatch { 25 int (*accept4)(int, struct sockaddr*, socklen_t*, int); 26 int (*connect)(int, const struct sockaddr*, socklen_t); 27 int (*sendmmsg)(int, const struct mmsghdr*, unsigned int, int); 28 ssize_t (*sendmsg)(int, const struct msghdr*, unsigned int); 29 int (*sendto)(int, const void*, size_t, int, const struct sockaddr*, socklen_t); 30 int (*socket)(int, int, int); 31 unsigned (*netIdForResolv)(unsigned); 32 int (*dnsOpenProxy)(); 33 }; 34 35 extern __LIBC_HIDDEN__ struct NetdClientDispatch __netdClientDispatch; 36 37 __END_DECLS 38