Lines Matching refs:dhcp

69 #include <netinet/dhcp.h>
146 static __inline__ struct dhcp *
149 return ((struct dhcp *)(void *)context->reply);
206 make_dhcp_request(struct dhcp * request, int request_size,
215 printf("dhcp: hwlen is %d (> %d), truncating\n", hwlen,
226 request_size - sizeof(struct dhcp) - RFC_MAGIC_SIZE);
227 /* make the request a dhcp packet */
256 printf("dhcp: ip_pkt_to_mbuf: m_devget failed\n");
349 dprintf(("dhcp: timeout\n"));
361 * Return an integer point rating value for the given dhcp packet.
402 struct dhcp * reply;
417 if (n < (int)sizeof(struct dhcp)) {
418 dprintf(("dhcp: packet is too short %d < %d\n",
419 n, (int)sizeof(struct dhcp)));
451 printf("dhcp: received ACK: server " IP_FORMAT
507 make_dhcp_request(&request->dhcp, DHCP_PAYLOAD_MIN,
530 printf("dhcp: sending REQUEST: server " IP_FORMAT
535 request->dhcp.dp_secs
538 request->dhcp.dp_xid = htonl(context->xid);
542 printf("dhcp: send_packet failed with %d\n", error);
547 dprintf(("dhcp: waiting %d ticks\n", wait_ticks));
554 printf("dhcp: server " IP_FORMAT " send us a NAK\n",
560 dprintf(("dhcp: failed to receive packets: %d\n", error));
588 struct dhcp * reply;
602 if (n < (int)sizeof(struct dhcp)) {
603 dprintf(("dhcp: packet is too short %d < %d\n",
604 n, (int)sizeof(struct dhcp)));
628 printf("dhcp: received OFFER: server " IP_FORMAT
670 dprintf(("dhcp: gathering time has expired\n"));
711 make_dhcp_request(&request->dhcp, DHCP_PAYLOAD_MIN,
731 printf("dhcp: sending DISCOVER\n");
732 request->dhcp.dp_secs
735 request->dhcp.dp_xid = htonl(context->xid);
739 printf("dhcp: send_packet failed with %d\n", error);
743 dprintf(("dhcp: waiting %d ticks\n", wait_ticks));
754 dprintf(("dhcp: dhcp_select failed %d\n", error));
758 printf("dhcp: trying again in 10 seconds\n");
764 dprintf(("dhcp: failed to receive packets: %d\n", error));
796 printf("dhcp: SIOCAUTOADDR failed: %d\n", error);
818 printf("dhcp: can't get link address\n");
823 printf("dhcp: h/w addr ");
826 printf("dhcp: hardware type %d not supported\n",
834 printf("dhcp: failed to allocate context\n");
843 printf("dhcp: socreate failed %d\n", error);
852 printf("dhcp: assigning loopback address failed %d\n", error);
862 printf("dhcp: SIOCAUTOADDR failed: %d\n", error);
865 dprintf(("dhcp: SIOCAUTOADDR done\n"));
870 printf("dhcp: SIOCPROTOATTACH failed: %d\n", error);
873 dprintf(("dhcp: SIOCPROTOATTACH done\n"));
882 printf("dhcp: sobind failed, %d\n", error);
908 * Routine: dhcp
914 dhcp(struct ifnet * ifp, struct in_addr * iaddr_p, int max_try,