Searched refs:linux_netlink_socket (Results 1 – 1 of 1) sorted by relevance
/external/libusb/libusb/os/ |
D | linux_netlink.c | 48 static int linux_netlink_socket = -1; variable 103 linux_netlink_socket = socket(PF_NETLINK, socktype, NETLINK_KOBJECT_UEVENT); in linux_netlink_start_event_monitor() 104 if (linux_netlink_socket == -1 && errno == EINVAL) { in linux_netlink_start_event_monitor() 106 linux_netlink_socket = socket(PF_NETLINK, SOCK_RAW, NETLINK_KOBJECT_UEVENT); in linux_netlink_start_event_monitor() 109 if (linux_netlink_socket == -1) { in linux_netlink_start_event_monitor() 114 ret = set_fd_cloexec_nb(linux_netlink_socket); in linux_netlink_start_event_monitor() 118 ret = bind(linux_netlink_socket, (struct sockaddr *)&sa_nl, sizeof(sa_nl)); in linux_netlink_start_event_monitor() 124 ret = setsockopt(linux_netlink_socket, SOL_SOCKET, SO_PASSCRED, &opt, sizeof(opt)); in linux_netlink_start_event_monitor() 150 close(linux_netlink_socket); in linux_netlink_start_event_monitor() 151 linux_netlink_socket = -1; in linux_netlink_start_event_monitor() [all …]
|