Searched refs:listensock (Results 1 – 1 of 1) sorted by relevance
/external/toybox/toys/pending/ |
D | dhcpd.c | 161 int listensock; member 616 if (gstate.listensock > 0) close(gstate.listensock); in open_listensock() 619 gstate.listensock = xsocket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); in open_listensock() 620 setsockopt(gstate.listensock, SOL_SOCKET, SO_REUSEADDR, &constone, sizeof(constone)); in open_listensock() 621 if (setsockopt(gstate.listensock, SOL_SOCKET, SO_BROADCAST, &constone, sizeof(constone)) == -1) { in open_listensock() 623 close(gstate.listensock); in open_listensock() 628 setsockopt(gstate.listensock, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)); in open_listensock() 635 if (bind(gstate.listensock, (struct sockaddr *) &addr, sizeof(addr))) { in open_listensock() 636 close(gstate.listensock); in open_listensock() 701 ret = read(gstate.listensock, &gstate.rcvd_pkt, sizeof(dhcp_msg_t)); in read_packet() [all …]
|