Lines Matching defs:wsi
59 rops_handle_POLLIN_netlink(struct lws_context_per_thread *pt, struct lws *wsi,
93 n = (unsigned int)recvmsg(wsi->desc.sockfd, &msg, 0);
319 * This will also take down wsi marked as using it
482 struct lws *wsi;
488 * pt netlink wsi closed + freed as part of pt's destroy
489 * wsi mass close, just need to take down the routing table
510 wsi = __lws_wsi_create_with_role(context, (int)(pt - &context->pt[0]),
513 if (!wsi)
516 wsi->desc.sockfd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
517 if (wsi->desc.sockfd == LWS_SOCK_INVALID) {
522 lws_plat_set_nonblocking(wsi->desc.sockfd);
524 __lws_lc_tag(context, &context->lcg[LWSLCG_VHOST], &wsi->lc,
537 bind(wsi->desc.sockfd, (struct sockaddr*)&sanl, sizeof(sanl)) < 0) {
543 context->netlink = wsi;
544 if (lws_wsi_inject_to_loop(pt, wsi))
547 /* if (lws_change_pollfd(wsi, 0, LWS_POLLIN)) {
580 n = (int)sendmsg(wsi->desc.sockfd, (struct msghdr *)&msg, 0);
598 __lws_lc_untag(wsi->a.context, &wsi->lc);
599 compatible_close(wsi->desc.sockfd);
601 lws_free(wsi);