00001
00002 #if defined(TARGET_MIPS)
00003
00004
00005
00006
00007
00008
00009
00010 #define TARGET_SOL_SOCKET 0xffff
00011
00012 #define TARGET_SO_DEBUG 0x0001
00013 #define TARGET_SO_REUSEADDR 0x0004
00014 #define TARGET_SO_KEEPALIVE 0x0008
00015
00016 #define TARGET_SO_DONTROUTE 0x0010
00017 #define TARGET_SO_BROADCAST 0x0020
00018
00019 #define TARGET_SO_LINGER 0x0080
00020
00021 #define TARGET_SO_OOBINLINE 0x0100
00022 #if 0
00023 To add: #define TARGET_SO_REUSEPORT 0x0200
00024 #endif
00025
00026 #define TARGET_SO_TYPE 0x1008
00027 #define TARGET_SO_STYLE SO_TYPE
00028 #define TARGET_SO_ERROR 0x1007
00029 #define TARGET_SO_SNDBUF 0x1001
00030 #define TARGET_SO_RCVBUF 0x1002
00031 #define TARGET_SO_SNDLOWAT 0x1003
00032 #define TARGET_SO_RCVLOWAT 0x1004
00033 #define TARGET_SO_SNDTIMEO 0x1005
00034 #define TARGET_SO_RCVTIMEO 0x1006
00035 #define TARGET_SO_ACCEPTCONN 0x1009
00036
00037
00038 #define TARGET_SO_NO_CHECK 11
00039 #define TARGET_SO_PRIORITY 12
00040 #define TARGET_SO_BSDCOMPAT 14
00041
00042 #define TARGET_SO_PASSCRED 17
00043 #define TARGET_SO_PEERCRED 18
00044
00045
00046 #define TARGET_SO_SECURITY_AUTHENTICATION 22
00047 #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT 23
00048 #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK 24
00049
00050 #define TARGET_SO_BINDTODEVICE 25
00051
00052
00053 #define TARGET_SO_ATTACH_FILTER 26
00054 #define TARGET_SO_DETACH_FILTER 27
00055
00056 #define TARGET_SO_PEERNAME 28
00057 #define TARGET_SO_TIMESTAMP 29
00058 #define SCM_TIMESTAMP SO_TIMESTAMP
00059
00060 #define TARGET_SO_PEERSEC 30
00061 #define TARGET_SO_SNDBUFFORCE 31
00062 #define TARGET_SO_RCVBUFFORCE 33
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 enum sock_type {
00079 TARGET_SOCK_DGRAM = 1,
00080 TARGET_SOCK_STREAM = 2,
00081 TARGET_SOCK_RAW = 3,
00082 TARGET_SOCK_RDM = 4,
00083 TARGET_SOCK_SEQPACKET = 5,
00084 TARGET_SOCK_DCCP = 6,
00085 TARGET_SOCK_PACKET = 10,
00086 };
00087
00088 #define TARGET_SOCK_MAX (SOCK_PACKET + 1)
00089
00090 #else
00091
00092
00093 #define TARGET_SOL_SOCKET 1
00094
00095 #define TARGET_SO_DEBUG 1
00096 #define TARGET_SO_REUSEADDR 2
00097 #define TARGET_SO_TYPE 3
00098 #define TARGET_SO_ERROR 4
00099 #define TARGET_SO_DONTROUTE 5
00100 #define TARGET_SO_BROADCAST 6
00101 #define TARGET_SO_SNDBUF 7
00102 #define TARGET_SO_RCVBUF 8
00103 #define TARGET_SO_SNDBUFFORCE 32
00104 #define TARGET_SO_RCVBUFFORCE 33
00105 #define TARGET_SO_KEEPALIVE 9
00106 #define TARGET_SO_OOBINLINE 10
00107 #define TARGET_SO_NO_CHECK 11
00108 #define TARGET_SO_PRIORITY 12
00109 #define TARGET_SO_LINGER 13
00110 #define TARGET_SO_BSDCOMPAT 14
00111
00112 #if defined(TARGET_PPC)
00113 #define TARGET_SO_RCVLOWAT 16
00114 #define TARGET_SO_SNDLOWAT 17
00115 #define TARGET_SO_RCVTIMEO 18
00116 #define TARGET_SO_SNDTIMEO 19
00117 #define TARGET_SO_PASSCRED 20
00118 #define TARGET_SO_PEERCRED 21
00119 #else
00120 #define TARGET_SO_PASSCRED 16
00121 #define TARGET_SO_PEERCRED 17
00122 #define TARGET_SO_RCVLOWAT 18
00123 #define TARGET_SO_SNDLOWAT 19
00124 #define TARGET_SO_RCVTIMEO 20
00125 #define TARGET_SO_SNDTIMEO 21
00126 #endif
00127
00128
00129 #define TARGET_SO_SECURITY_AUTHENTICATION 22
00130 #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT 23
00131 #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK 24
00132
00133 #define TARGET_SO_BINDTODEVICE 25
00134
00135
00136 #define TARGET_SO_ATTACH_FILTER 26
00137 #define TARGET_SO_DETACH_FILTER 27
00138
00139 #define TARGET_SO_PEERNAME 28
00140 #define TARGET_SO_TIMESTAMP 29
00141 #define TARGET_SCM_TIMESTAMP TARGET_SO_TIMESTAMP
00142
00143 #define TARGET_SO_ACCEPTCONN 30
00144
00145 #define TARGET_SO_PEERSEC 31
00146
00147 #endif