/libcore/ojluni/src/main/native/ |
D | net_util.c | 75 void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address) { in setInetAddress_addr() argument 77 holder = (*env)->GetObjectField(env, iaObj, ia_holderID); in setInetAddress_addr() 81 void setInetAddress_family(JNIEnv *env, jobject iaObj, int family) { in setInetAddress_family() argument 83 holder = (*env)->GetObjectField(env, iaObj, ia_holderID); in setInetAddress_family() 87 void setInetAddress_hostName(JNIEnv *env, jobject iaObj, jobject host) { in setInetAddress_hostName() argument 89 holder = (*env)->GetObjectField(env, iaObj, ia_holderID); in setInetAddress_hostName() 93 int getInetAddress_addr(JNIEnv *env, jobject iaObj) { in getInetAddress_addr() argument 95 holder = (*env)->GetObjectField(env, iaObj, ia_holderID); in getInetAddress_addr() 99 int getInetAddress_family(JNIEnv *env, jobject iaObj) { in getInetAddress_family() argument 102 holder = (*env)->GetObjectField(env, iaObj, ia_holderID); in getInetAddress_family() [all …]
|
D | net_util.h | 61 extern void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address); 62 extern void setInetAddress_family(JNIEnv *env, jobject iaObj, int family); 63 extern void setInetAddress_hostName(JNIEnv *env, jobject iaObj, jobject h); 64 extern int getInetAddress_addr(JNIEnv *env, jobject iaObj); 65 extern int getInetAddress_family(JNIEnv *env, jobject iaObj); 66 extern jobject getInetAddress_hostName(JNIEnv *env, jobject iaObj); 120 NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr *him, int *len, jbo… 135 NET_SockaddrEqualsInetAddress(JNIEnv *env,struct sockaddr *him, jobject iaObj);
|
D | NetworkInterface.c | 251 (JNIEnv *env, jclass cls, jobject iaObj) { in NetworkInterface_getByInetAddress0() argument 255 int family = (getInetAddress_family(env, iaObj) == IPv4) ? AF_INET : AF_INET6; in NetworkInterface_getByInetAddress0() 277 int address2 = getInetAddress_addr(env, iaObj); in NetworkInterface_getByInetAddress0() 287 jbyteArray ipaddress = (*env)->GetObjectField(env, iaObj, ni_ia6ipaddressID); in NetworkInterface_getByInetAddress0() 555 jobject iaObj = NULL; in createNetworkInterface() local 559 iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID); in createNetworkInterface() 560 if (iaObj) { in createNetworkInterface() 561 setInetAddress_addr(env, iaObj, htonl(((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr)); in createNetworkInterface() 565 (*env)->SetObjectField(env, ibObj, ni_ibaddressID, iaObj); in createNetworkInterface() 581 iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); in createNetworkInterface() [all …]
|
D | PlainSocketImpl.c | 220 jobject iaObj, jint port, in PlainSocketImpl_socketConnect() argument 248 if (IS_NULL(iaObj)) { in PlainSocketImpl_socketConnect() 254 if (NET_InetAddressToSockaddr(env, iaObj, port, (struct sockaddr *)&him, &len, JNI_TRUE) != 0) { in PlainSocketImpl_socketConnect() 484 (*env)->SetObjectField(env, this, psi_addressID, iaObj); in PlainSocketImpl_socketConnect() 514 jobject iaObj, jint localport) { in PlainSocketImpl_socketBind() argument 530 if (IS_NULL(iaObj)) { in PlainSocketImpl_socketBind() 536 …if (NET_InetAddressToSockaddr(env, iaObj, localport, (struct sockaddr *)&him, &len, JNI_TRUE) != 0… in PlainSocketImpl_socketBind() 554 (*env)->SetObjectField(env, this, psi_addressID, iaObj); in PlainSocketImpl_socketBind() 975 jobject iaObj; in PlainSocketImpl_socketGetOption() local 986 iaObj = NET_SockaddrToInetAddress(env, (struct sockaddr *)&him, &port); in PlainSocketImpl_socketGetOption() [all …]
|
D | PlainDatagramSocketImpl.c | 192 jint localport, jobject iaObj) { in PlainDatagramSocketImpl_bind0() argument 208 if (IS_NULL(iaObj)) { in PlainDatagramSocketImpl_bind0() 214 …if (NET_InetAddressToSockaddr(env, iaObj, localport, (struct sockaddr *)&him, &len, JNI_TRUE) != 0… in PlainDatagramSocketImpl_bind0() 511 jobject iaObj; in PlainDatagramSocketImpl_peek() local 571 iaObj = NET_SockaddrToInetAddress(env, (struct sockaddr *)&remote_addr, &port); in PlainDatagramSocketImpl_peek() 573 family = getInetAddress_family(env, iaObj) == IPv4? AF_INET : AF_INET6; in PlainDatagramSocketImpl_peek() 578 int address = getInetAddress_addr(env, iaObj); in PlainDatagramSocketImpl_peek() 1518 jobject iaObj; in PlainDatagramSocketImpl_socketGetOption() local 1527 iaObj = NET_SockaddrToInetAddress(env, (struct sockaddr *)&him, &port); in PlainDatagramSocketImpl_socketGetOption() 1529 return iaObj; in PlainDatagramSocketImpl_socketGetOption() [all …]
|
D | net_util_md.c | 767 NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr *him, in NET_InetAddressToSockaddr() argument 770 family = getInetAddress_family(env, iaObj); in NET_InetAddressToSockaddr() 782 address = getInetAddress_addr(env, iaObj); in NET_InetAddressToSockaddr() 796 ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); in NET_InetAddressToSockaddr() 815 int scope_id = (int)(*env)->GetIntField(env, iaObj, ia6_scopeidID); in NET_InetAddressToSockaddr() 831 address = getInetAddress_addr(env, iaObj); in NET_InetAddressToSockaddr()
|