Home | History | Annotate | Download | only in native

Lines Matching refs:ifs

110 static jobject createNetworkInterface(JNIEnv *env, netif *ifs);
115 static netif *addif(JNIEnv *env, int sock, struct ifaddrs *ifa, netif *ifs);
116 static void freeif(netif *ifs);
169 netif *ifs, *curr;
174 ifs = enumInterfaces(env);
175 if (ifs == NULL) {
184 curr = ifs;
199 freeif(ifs);
213 netif *ifs, *curr;
220 ifs = enumInterfaces(env);
221 if (ifs == NULL) {
228 curr = ifs;
241 freeif(ifs);
253 netif *ifs, *curr;
260 ifs = enumInterfaces(env);
261 if (ifs == NULL) {
265 curr = ifs;
323 freeif(ifs);
336 netif *ifs, *curr;
340 ifs = enumInterfaces(env);
341 if (ifs == NULL) {
347 curr = ifs;
356 freeif(ifs);
364 curr = ifs;
371 freeif(ifs);
381 freeif(ifs);
491 jobject createNetworkInterface(JNIEnv *env, netif *ifs) {
508 name = (*env)->NewStringUTF(env, ifs->name);
514 (*env)->SetIntField(env, netifObj, ni_indexID, ifs->index);
515 (*env)->SetBooleanField(env, netifObj, ni_virutalID, ifs->virtual ? JNI_TRUE : JNI_FALSE);
520 if (ifs->hwAddrLen > 0 && ifs->hwAddr != NULL) {
521 jbyteArray hardwareAddr = (*env)->NewByteArray(env, ifs->hwAddrLen);
525 (*env)->SetByteArrayRegion(env, hardwareAddr, 0, ifs->hwAddrLen, (jbyte *)ifs->hwAddr);
533 addrP = ifs->addr;
551 addrP = ifs->addr;
619 childP = ifs->childs;
635 childP = ifs->childs;
675 netif *ifs = NULL;
695 ifs = addif(env, sock, ifa, ifs);
705 return ifs;
713 return ifs; /* return untouched list */ \
721 void freeif(netif *ifs) {
722 netif *currif = ifs;
747 ifs = currif->next;
749 currif = ifs;
753 netif *addif(JNIEnv *env, int sock, struct ifaddrs *ifa, netif *ifs)
755 netif *currif = ifs, *parent;
880 currif->next = ifs;
881 ifs = currif;
963 return ifs;