Lines Matching defs:ifs

127 static jobject createNetworkInterface(JNIEnv *env, netif *ifs);
131 static netif *enumIPv4Interfaces(JNIEnv *env, int sock, netif *ifs);
134 static netif *enumIPv6Interfaces(JNIEnv *env, int sock, netif *ifs);
137 static netif *addif(JNIEnv *env, int sock, const char * if_name, netif *ifs, struct sockaddr* ifr_addrP, int family, short prefix);
138 static void freeif(netif *ifs);
155 static netif *enumIPvXInterfaces(JNIEnv *env, int sock, netif *ifs, int family);
212 netif *ifs, *curr;
217 ifs = enumInterfaces(env);
218 if (ifs == NULL) {
227 curr = ifs;
242 freeif(ifs);
256 netif *ifs, *curr;
263 ifs = enumInterfaces(env);
264 if (ifs == NULL) {
271 curr = ifs;
284 freeif(ifs);
296 netif *ifs, *curr;
307 ifs = enumInterfaces(env);
308 if (ifs == NULL) {
312 curr = ifs;
373 freeif(ifs);
386 netif *ifs, *curr;
390 ifs = enumInterfaces(env);
391 if (ifs == NULL) {
397 curr = ifs;
406 freeif(ifs);
414 curr = ifs;
421 freeif(ifs);
431 freeif(ifs);
592 jobject createNetworkInterface(JNIEnv *env, netif *ifs) {
609 name = (*env)->NewStringUTF(env, ifs->name);
615 (*env)->SetIntField(env, netifObj, ni_indexID, ifs->index);
616 (*env)->SetBooleanField(env, netifObj, ni_virutalID, ifs->virtual ? JNI_TRUE : JNI_FALSE);
622 addrP = ifs->addr;
640 addrP = ifs->addr;
710 childP = ifs->childs;
726 childP = ifs->childs;
748 netif *ifs;
760 ifs = enumIPv4Interfaces(env, sock, NULL);
763 if (ifs == NULL && (*env)->ExceptionOccurred(env)) {
781 freeif(ifs);
785 ifs = enumIPv6Interfaces(env, sock, ifs);
789 freeif(ifs);
796 return ifs;
804 return ifs; /* return untouched list */ \
812 void freeif(netif *ifs) {
813 netif *currif = ifs;
831 ifs = currif->next;
833 currif = ifs;
838 netif *ifs, struct sockaddr* ifr_addrP, int family,
841 netif *currif = ifs, *parent;
951 currif->next = ifs;
952 ifs = currif;
1008 return ifs;
1068 static netif *enumIPv4Interfaces(JNIEnv *env, int sock, netif *ifs) {
1082 return ifs;
1091 return ifs;
1102 ifs = addif(env, sock, ifreqP->ifr_name, ifs, (struct sockaddr *) & (ifreqP->ifr_addr), AF_INET, 0);
1109 freeif(ifs);
1118 return ifs;
1127 static netif *enumIPv6Interfaces(JNIEnv *env, int sock, netif *ifs) {
1152 ifs = addif(env, sock, devname, ifs, (struct sockaddr *)&addr, AF_INET6, plen);
1160 return ifs;
1165 return ifs;
1368 static netif *enumIPv4Interfaces(JNIEnv *env, int sock, netif *ifs) {
1369 return enumIPvXInterfaces(env,sock, ifs, AF_INET);
1373 static netif *enumIPv6Interfaces(JNIEnv *env, int sock, netif *ifs) {
1374 return enumIPvXInterfaces(env,sock, ifs, AF_INET6);
1382 static netif *enumIPvXInterfaces(JNIEnv *env, int sock, netif *ifs, int family) {
1397 return ifs;
1413 return ifs;
1439 ifs = addif(env, sock,ifr->lifr_name, ifs, (struct sockaddr *)&(ifr->lifr_addr),family, (short) ifr->lifr_addrlen);
1446 return ifs;
1452 return ifs;
1728 static netif *enumIPv4Interfaces(JNIEnv *env, int sock, netif *ifs) {
1734 return ifs;
1748 ifs = addif(env, sock, ifa->ifa_name, ifs, ifa->ifa_addr, AF_INET, 0);
1755 freeif(ifs);
1764 return ifs;
1802 static netif *enumIPv6Interfaces(JNIEnv *env, int sock, netif *ifs) {
1810 return ifs;
1829 freeif(ifs);
1835 ifs = addif(env, sock, ifa->ifa_name, ifs, ifa->ifa_addr, AF_INET6,
1841 freeif(ifs);
1850 return ifs;