• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2012, 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 #ifndef _SOCKET_PORTABLE_H_
18 #define _SOCKET_PORTABLE_H_
19 
20 /* Derived from development/ndk/platforms/android-3/include/sys/socket.h */
21 #define SOCK_STREAM_PORTABLE    1
22 #define SOCK_DGRAM_PORTABLE     2
23 #define SOCK_RAW_PORTABLE       3
24 #define SOCK_RDM_PORTABLE       4
25 #define SOCK_SEQPACKET_PORTABLE 5
26 #define SOCK_PACKET_PORTABLE    10
27 
28 
29 /* Derived from development/ndk/platforms/android-3/arch-arm/include/asm/socket.h */
30 
31 #define SOL_SOCKET_PORTABLE     1
32 
33 #define SO_DEBUG_PORTABLE       1
34 #define SO_REUSEADDR_PORTABLE   2
35 #define SO_TYPE_PORTABLE        3
36 #define SO_ERROR_PORTABLE       4
37 #define SO_DONTROUTE_PORTABLE   5
38 #define SO_BROADCAST_PORTABLE   6
39 #define SO_SNDBUF_PORTABLE      7
40 #define SO_RCVBUF_PORTABLE      8
41 #define SO_SNDBUFFORCE_PORTABLE 32
42 #define SO_RCVBUFFORCE_PORTABLE 33
43 #define SO_KEEPALIVE_PORTABLE   9
44 #define SO_OOBINLINE_PORTABLE   10
45 #define SO_NO_CHECK_PORTABLE    11
46 #define SO_PRIORITY_PORTABLE    12
47 #define SO_LINGER_PORTABLE      13
48 #define SO_BSDCOMPAT_PORTABLE   14
49 
50 #define SO_PASSCRED_PORTABLE    16
51 #define SO_PEERCRED_PORTABLE    17
52 #define SO_RCVLOWAT_PORTABLE    18
53 #define SO_SNDLOWAT_PORTABLE    19
54 #define SO_RCVTIMEO_PORTABLE    20
55 #define SO_SNDTIMEO_PORTABLE    21
56 
57 #define SO_SECURITY_AUTHENTICATION_PORTABLE         22
58 #define SO_SECURITY_ENCRYPTION_TRANSPORT_PORTABLE   23
59 #define SO_SECURITY_ENCRYPTION_NETWORK_PORTABLE     24
60 
61 #define SO_BINDTODEVICE_PORTABLE    25
62 
63 #define SO_ATTACH_FILTER_PORTABLE   26
64 #define SO_DETACH_FILTER_PORTABLE   27
65 
66 #define SO_PEERNAME_PORTABLE        28
67 #define SO_TIMESTAMP_PORTABLE       29
68 #define SCM_TIMESTAMP_PORTABLE SO_TIMESTAMP_PORTABLE
69 
70 #define SO_ACCEPTCONN_PORTABLE      30
71 
72 #define SO_PEERSEC_PORTABLE     31
73 #define SO_PASSSEC_PORTABLE     34
74 
75 #endif /* _SOCKET_PORTABLE_H */
76