< prev index next >

src/java.base/share/native/libnet/net_util.h

Print this page




 138  * The parameter 'sa' must point to valid storage of size
 139  * 'sizeof(SOCKETADDRESS)'.
 140  *
 141  * The parameter 'len' is a pointer to an int and is used for returning
 142  * the actual sockaddr length, e.g. 'sizeof(struct sockaddr_in)' or
 143  * 'sizeof(struct sockaddr_in6)'.
 144  *
 145  * If the type of the InetAddress object is IPv6, the function will fill a
 146  * sockaddr_in6 structure. IPv6 must be available in that case, otherwise an
 147  * exception is thrown.
 148  * In the case of an IPv4 InetAddress, when IPv6 is available and
 149  * v4MappedAddress is TRUE, this method will fill a sockaddr_in6 structure
 150  * containing an IPv4 mapped IPv6 address. Otherwise a sockaddr_in
 151  * structure will be filled.
 152  */
 153 JNIEXPORT int JNICALL
 154 NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port,
 155                           SOCKETADDRESS *sa, int *len,
 156                           jboolean v4MappedAddress);
 157 






 158 JNIEXPORT jobject JNICALL
 159 NET_SockaddrToInetAddress(JNIEnv *env, SOCKETADDRESS *sa, int *port);
 160 
 161 void platformInit();
 162 
 163 void parseExclusiveBindProperty(JNIEnv *env);
 164 
 165 JNIEXPORT jint JNICALL NET_GetPortFromSockaddr(SOCKETADDRESS *sa);
 166 
 167 JNIEXPORT jboolean JNICALL
 168 NET_SockaddrEqualsInetAddress(JNIEnv *env, SOCKETADDRESS *sa, jobject iaObj);
 169 
 170 int NET_IsIPv4Mapped(jbyte* caddr);
 171 
 172 int NET_IPv4MappedToIPv4(jbyte* caddr);
 173 
 174 int NET_IsEqual(jbyte* caddr1, jbyte* caddr2);
 175 
 176 int NET_IsZeroAddr(jbyte* caddr);
 177 




 138  * The parameter 'sa' must point to valid storage of size
 139  * 'sizeof(SOCKETADDRESS)'.
 140  *
 141  * The parameter 'len' is a pointer to an int and is used for returning
 142  * the actual sockaddr length, e.g. 'sizeof(struct sockaddr_in)' or
 143  * 'sizeof(struct sockaddr_in6)'.
 144  *
 145  * If the type of the InetAddress object is IPv6, the function will fill a
 146  * sockaddr_in6 structure. IPv6 must be available in that case, otherwise an
 147  * exception is thrown.
 148  * In the case of an IPv4 InetAddress, when IPv6 is available and
 149  * v4MappedAddress is TRUE, this method will fill a sockaddr_in6 structure
 150  * containing an IPv4 mapped IPv6 address. Otherwise a sockaddr_in
 151  * structure will be filled.
 152  */
 153 JNIEXPORT int JNICALL
 154 NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port,
 155                           SOCKETADDRESS *sa, int *len,
 156                           jboolean v4MappedAddress);
 157 
 158 JNIEXPORT int JNICALL
 159 NET_InetAddressToSockaddr0(JNIEnv *env, jobject iaObj, int port,
 160                            SOCKETADDRESS *sa, int *len,
 161                            jboolean v4MappedAddress,
 162                            jboolean includeScopeId);
 163 
 164 JNIEXPORT jobject JNICALL
 165 NET_SockaddrToInetAddress(JNIEnv *env, SOCKETADDRESS *sa, int *port);
 166 
 167 void platformInit();
 168 
 169 void parseExclusiveBindProperty(JNIEnv *env);
 170 
 171 JNIEXPORT jint JNICALL NET_GetPortFromSockaddr(SOCKETADDRESS *sa);
 172 
 173 JNIEXPORT jboolean JNICALL
 174 NET_SockaddrEqualsInetAddress(JNIEnv *env, SOCKETADDRESS *sa, jobject iaObj);
 175 
 176 int NET_IsIPv4Mapped(jbyte* caddr);
 177 
 178 int NET_IPv4MappedToIPv4(jbyte* caddr);
 179 
 180 int NET_IsEqual(jbyte* caddr1, jbyte* caddr2);
 181 
 182 int NET_IsZeroAddr(jbyte* caddr);
 183 


< prev index next >