Lines Matching refs:sock
67 struct nl_sock *sock);
98 void wifi_socket_set_local_port(struct nl_sock *sock, uint32_t port) in wifi_socket_set_local_port() argument
103 sock->s_flags &= ~NL_OWN_PORT; in wifi_socket_set_local_port()
105 sock->s_flags |= NL_OWN_PORT; in wifi_socket_set_local_port()
108 sock->s_local.nl_pid = pid + (port << 22); in wifi_socket_set_local_port()
114 struct nl_sock *sock = nl_socket_alloc(); in wifi_create_nl_socket() local
115 if (sock == NULL) { in wifi_create_nl_socket()
120 wifi_socket_set_local_port(sock, port); in wifi_create_nl_socket()
122 struct sockaddr_nl *addr_nl = &(sock->s_local); in wifi_create_nl_socket()
132 if (nl_connect(sock, protocol)) { in wifi_create_nl_socket()
134 nl_socket_free(sock); in wifi_create_nl_socket()
138 return sock; in wifi_create_nl_socket()
676 static int internal_pollin_handler(wifi_handle handle, struct nl_sock *sock) in internal_pollin_handler() argument
678 struct nl_cb *cb = nl_socket_get_cb(sock); in internal_pollin_handler()
680 int res = nl_recvmsgs(sock, cb); in internal_pollin_handler()
688 struct nl_sock *sock) in internal_event_handler() argument
692 internal_pollin_handler(handle, sock); in internal_event_handler()
697 internal_pollin_handler(handle, sock); in internal_event_handler()