diff options
author | Ted Lemon <source@isc.org> | 1997-03-06 06:58:37 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 1997-03-06 06:58:37 +0000 |
commit | 84228fed1f1f5509e727bc2702324d2b7ecccfa2 (patch) | |
tree | a07d4e9da4ddf53a0d3b70a90af0d48c806108ce /relay/dhcrelay.c | |
parent | 6e5ed8bfa8d9463942286d64e9e49a857726d51c (diff) | |
download | isc-dhcp-84228fed1f1f5509e727bc2702324d2b7ecccfa2.tar.gz |
Declare relay() same as do_packet(). Set bootp_handler to relay(). Change dispatch() calling conventions.
Diffstat (limited to 'relay/dhcrelay.c')
-rw-r--r-- | relay/dhcrelay.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c index c72191fe..25483eeb 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -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; |