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