SIOCGETLG
if (ioctl(xfd, SIOCGETLG, &logopt))
if (ioctl(state_fd, SIOCGETLG, &state_logging) == -1) {
case SIOCGETLG :