139 * 'sizeof(struct sockaddr_in6)'.
140 *
141 * If the type of the InetAddress object is IPv6, the function will fill a
142 * sockaddr_in6 structure. IPv6 must be available in that case, otherwise an
143 * exception is thrown.
144 * In the case of an IPv4 InetAddress, when IPv6 is available and
145 * v4MappedAddress is TRUE, this method will fill a sockaddr_in6 structure
146 * containing an IPv4 mapped IPv6 address. Otherwise a sockaddr_in
147 * structure will be filled.
148 */
149 JNIEXPORT int JNICALL
150 NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port,
151 SOCKETADDRESS *sa, int *len,
152 jboolean v4MappedAddress);
153
154 JNIEXPORT jobject JNICALL
155 NET_SockaddrToInetAddress(JNIEnv *env, SOCKETADDRESS *sa, int *port);
156
157 void platformInit();
158
159 void parseExclusiveBindProperty(JNIEnv *env);
160
161 JNIEXPORT jint JNICALL NET_GetPortFromSockaddr(SOCKETADDRESS *sa);
162
163 JNIEXPORT jboolean JNICALL
164 NET_SockaddrEqualsInetAddress(JNIEnv *env, SOCKETADDRESS *sa, jobject iaObj);
165
166 int NET_IsIPv4Mapped(jbyte* caddr);
167
168 int NET_IPv4MappedToIPv4(jbyte* caddr);
169
170 int NET_IsEqual(jbyte* caddr1, jbyte* caddr2);
171
172 int NET_IsZeroAddr(jbyte* caddr);
173
174 /* Socket operations
175 *
176 * These work just like the system calls, except that they may do some
177 * platform-specific pre/post processing of the arguments and/or results.
178 */
179
180 JNIEXPORT int JNICALL
|
139 * 'sizeof(struct sockaddr_in6)'.
140 *
141 * If the type of the InetAddress object is IPv6, the function will fill a
142 * sockaddr_in6 structure. IPv6 must be available in that case, otherwise an
143 * exception is thrown.
144 * In the case of an IPv4 InetAddress, when IPv6 is available and
145 * v4MappedAddress is TRUE, this method will fill a sockaddr_in6 structure
146 * containing an IPv4 mapped IPv6 address. Otherwise a sockaddr_in
147 * structure will be filled.
148 */
149 JNIEXPORT int JNICALL
150 NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port,
151 SOCKETADDRESS *sa, int *len,
152 jboolean v4MappedAddress);
153
154 JNIEXPORT jobject JNICALL
155 NET_SockaddrToInetAddress(JNIEnv *env, SOCKETADDRESS *sa, int *port);
156
157 void platformInit();
158
159 JNIEXPORT jint JNICALL NET_GetPortFromSockaddr(SOCKETADDRESS *sa);
160
161 JNIEXPORT jboolean JNICALL
162 NET_SockaddrEqualsInetAddress(JNIEnv *env, SOCKETADDRESS *sa, jobject iaObj);
163
164 int NET_IsIPv4Mapped(jbyte* caddr);
165
166 int NET_IPv4MappedToIPv4(jbyte* caddr);
167
168 int NET_IsEqual(jbyte* caddr1, jbyte* caddr2);
169
170 int NET_IsZeroAddr(jbyte* caddr);
171
172 /* Socket operations
173 *
174 * These work just like the system calls, except that they may do some
175 * platform-specific pre/post processing of the arguments and/or results.
176 */
177
178 JNIEXPORT int JNICALL
|