Home | History | Annotate | Download | only in drivers

Lines Matching refs:sock

120 static void handle_read(int sock, void *eloop_ctx, void *sock_ctx)
125 len = recv(sock, buf, sizeof(buf), 0);
135 static void handle_dhcp(int sock, void *eloop_ctx, void *sock_ctx)
143 len = recv(sock, buf, sizeof(buf), 0);
176 drv->common.sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_PAE));
177 if (drv->common.sock < 0) {
183 if (eloop_register_read_sock(drv->common.sock, handle_read,
191 if (ioctl(drv->common.sock, SIOCGIFINDEX, &ifr) != 0) {
203 if (bind(drv->common.sock, (struct sockaddr *) &addr, sizeof(addr)) < 0)
210 if (wired_multicast_membership(drv->common.sock, ifr.ifr_ifindex,
219 if (ioctl(drv->common.sock, SIOCGIFHWADDR, &ifr) != 0) {
313 res = send(drv->common.sock, (u8 *) hdr, len, 0);
356 if (drv->common.sock >= 0) {
357 eloop_unregister_read_sock(drv->common.sock);
358 close(drv->common.sock);