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