Lines Matching refs:socket
10 #include <sys/socket.h>
493 len = recv(ys->socket, ys->rx_buf, YNL_SOCKET_BUFFER_SIZE, flags);
638 err = send(ys->socket, nlh, nlh->nlmsg_len, 0);
640 perr(ys, "failed to request socket family info");
647 perr(ys, "failed to receive the socket family info - no such family?");
678 ys->socket = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC);
679 if (ys->socket < 0) {
680 __perr(yse, "failed to create a netlink socket");
684 if (setsockopt(ys->socket, SOL_NETLINK, NETLINK_CAP_ACK,
689 if (setsockopt(ys->socket, SOL_NETLINK, NETLINK_EXT_ACK,
697 if (bind(ys->socket, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
698 __perr(yse, "unable to bind to a socket address");
704 if (getsockname(ys->socket, (struct sockaddr *)&addr, &addrlen) < 0) {
705 __perr(yse, "unable to read socket address");
721 close(ys->socket);
731 close(ys->socket);
758 err = setsockopt(ys->socket, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP,
771 return ys->socket;
903 err = send(ys->socket, req_nlh, req_nlh->nlmsg_len, 0);
960 err = send(ys->socket, req_nlh, req_nlh->nlmsg_len, 0);