Lines Matching defs:sock
45 int sock;
75 int sock;
78 sock = socket (AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
79 if (sock < 0)
88 ret = fcntl (sock, F_SETFL, O_NONBLOCK);
95 close (sock);
104 ret = bind (sock, (struct sockaddr *) &snl, sizeof snl);
111 close (sock);
117 ret = getsockname (sock, (struct sockaddr *) &snl, &namelen);
124 close (sock);
129 nl->sock = sock;
148 if (nl->sock < 0)
166 ret = sendto (nl->sock, (void*) &req, sizeof req, 0,
196 status = recvmsg (nl->sock, &msg, 0);
1064 status = sendmsg (nl->sock, &msg, 0);
1078 if((flags = fcntl(nl->sock, F_GETFL, 0)) < 0)
1086 if(fcntl(nl->sock, F_SETFL, flags) < 0)
1102 if(fcntl(nl->sock, F_SETFL, flags) < 0)
1521 int sock;
1523 sock = THREAD_FD (thread);
1525 thread_add_read (master, kernel_read, NULL, netlink.sock);
1545 if (netlink.sock > 0)
1546 thread_add_read (master, kernel_read, NULL, netlink.sock);