1032
1032
int good_interface(const struct dirent *if_entry){
1038
1035
int ret = asprintf(&flagname, "%s/%s/flags", sys_class_net,
1044
1044
int flags_fd = (int)TEMP_FAILURE_RETRY(open(flagname, O_RDONLY));
1051
1049
typedef short ifreq_flags; /* ifreq.ifr_flags in netdevice(7) */
1052
1050
/* read line from flags_fd */
1053
1051
ssize_t to_read = (sizeof(ifreq_flags)*2)+3; /* "0x1003\n" */