]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Declare relay() same as do_packet(). Set bootp_handler to relay(). Change dispatc...
authorTed Lemon <source@isc.org>
Thu, 6 Mar 1997 06:58:37 +0000 (06:58 +0000)
committerTed Lemon <source@isc.org>
Thu, 6 Mar 1997 06:58:37 +0000 (06:58 +0000)
relay/dhcrelay.c

index c72191fea7e81f5529707f69c182a80fe6057512..25483eeb51a9806a62335498da278b806fa4394b 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dhcrelay.c,v 1.4 1997/03/05 06:16:44 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhcrelay.c,v 1.5 1997/03/06 06:58:37 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -162,17 +162,25 @@ int main (argc, argv, envp)
        /* Discover all the network interfaces. */
        discover_interfaces (DISCOVER_RELAY);
 
+       /* Set up the bootp packet handler... */
+       bootp_packet_handler = relay;
+
        /* Start dispatching packets and timeouts... */
-       dispatch (0);
+       dispatch ();
+
        /*NOTREACHED*/
        return 0;
 }
 
-void relay (ip, packet, length)
+void relay (ip, packbuf, length, from_port, from, hfrom)
        struct interface_info *ip;
-       struct dhcp_packet *packet;
+       u_int8_t *packbuf;
        int length;
+       u_int16_t from_port;
+       struct iaddr from;
+       struct hardware *hfrom;
 {
+       struct dhcp_packet *packet = (struct dhcp_packet *)packbuf;
        struct server_list *sp;
        struct sockaddr_in to;
        struct interface_info *out;