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