--- trunk/mkinitrd-magellan/busybox/networking/udhcp/clientsocket.c 2010/04/29 20:38:48 983 +++ trunk/mkinitrd-magellan/busybox/networking/udhcp/clientsocket.c 2010/05/30 11:32:42 984 @@ -20,8 +20,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "common.h" +#include "dhcpd.h" +#include "dhcpc.h" + -#include +//#include #include #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) #include @@ -32,10 +36,6 @@ #endif #include -#include "common.h" -#include "dhcpd.h" -#include "dhcpc.h" - int FAST_FUNC udhcp_raw_socket(int ifindex) { int fd; @@ -85,24 +85,24 @@ .filter = (struct sock_filter *) filter_instr, }; - DEBUG("opening raw socket on ifindex %d", ifindex); + log1("Opening raw socket on ifindex %d", ifindex); //log2? fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); - DEBUG("got raw socket fd %d", fd); + log1("Got raw socket fd %d", fd); //log2? if (SERVER_PORT == 67 && CLIENT_PORT == 68) { /* Use only if standard ports are in use */ /* Ignoring error (kernel may lack support for this) */ if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter_prog, sizeof(filter_prog)) >= 0) - DEBUG("attached filter to raw socket fd %d", fd); + log1("Attached filter to raw socket fd %d", fd); // log? } sock.sll_family = AF_PACKET; sock.sll_protocol = htons(ETH_P_IP); sock.sll_ifindex = ifindex; xbind(fd, (struct sockaddr *) &sock, sizeof(sock)); - DEBUG("bound to raw socket fd %d", fd); + log1("Created raw socket"); return fd; }