From: Ted Lemon Date: Tue, 22 Dec 1998 22:47:41 +0000 (+0000) Subject: Add LPF support. X-Git-Tag: V2-BETA-1-PATCH-7~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3fd1dcad0b07d46270d2762490c6ee06fa79ffc1;p=thirdparty%2Fdhcp.git Add LPF support. --- diff --git a/includes/dhcpd.h b/includes/dhcpd.h index e4513ea37..b78e6e8dd 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h @@ -659,6 +659,8 @@ ssize_t send_packet PROTO ((struct interface_info *, struct packet *, struct dhcp_packet *, size_t, struct in_addr, struct sockaddr_in *, struct hardware *)); +#endif +#if defined (USE_SOCKET_FALLBACK) void fallback_discard PROTO ((struct protocol *)); #endif #ifdef USE_SOCKET_RECEIVE @@ -697,6 +699,30 @@ int can_unicast_without_arp PROTO ((void)); void maybe_setup_fallback PROTO ((void)); #endif +/* lpf.c */ +#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE) +int if_register_lpf PROTO ( (struct interface_info *)); +#endif +#ifdef USE_LPF_SEND +void if_reinitialize_send PROTO ((struct interface_info *)); +void if_register_send PROTO ((struct interface_info *)); +ssize_t send_packet PROTO ((struct interface_info *, + struct packet *, struct dhcp_packet *, size_t, + struct in_addr, + struct sockaddr_in *, struct hardware *)); +#endif +#ifdef USE_LPF_RECEIVE +void if_reinitialize_receive PROTO ((struct interface_info *)); +void if_register_receive PROTO ((struct interface_info *)); +ssize_t receive_packet PROTO ((struct interface_info *, + unsigned char *, size_t, + struct sockaddr_in *, struct hardware *)); +#endif +#if defined (USE_LPF_SEND) +int can_unicast_without_arp PROTO ((void)); +void maybe_setup_fallback PROTO ((void)); +#endif + /* nit.c */ #if defined (USE_NIT_SEND) || defined (USE_NIT_RECEIVE) int if_register_nit PROTO ( (struct interface_info *)); diff --git a/includes/osdep.h b/includes/osdep.h index 4ea4cd863..ca40e8a75 100644 --- a/includes/osdep.h +++ b/includes/osdep.h @@ -51,6 +51,9 @@ !defined (USE_BPF) && \ !defined (USE_BPF_SEND) && \ !defined (USE_BPF_RECEIVE) && \ + !defined (USE_LPF) && \ + !defined (USE_LPF_SEND) && \ + !defined (USE_LPF_RECEIVE) && \ !defined (USE_NIT) && \ !defined (USE_NIT_SEND) && \ !defined (USE_NIT_RECEIVE) && \ @@ -141,6 +144,11 @@ # define USE_BPF_RECEIVE #endif +#ifdef USE_LPF +# define USE_LPF_SEND +# define USE_LPF_RECEIVE +#endif + #ifdef USE_NIT # define USE_NIT_SEND # define USE_NIT_RECEIVE @@ -165,7 +173,7 @@ fallback. */ #if defined (USE_BPF_SEND) || defined (USE_NIT_SEND) || \ - defined (USE_DLPI_SEND) || defined (USE_UPF_SEND) + defined (USE_DLPI_SEND) || defined (USE_UPF_SEND) || defined (USE_LPF_SEND) # define USE_SOCKET_FALLBACK # define USE_FALLBACK #endif @@ -178,7 +186,7 @@ #if defined (USE_RAW_SEND) || defined (USE_BPF_SEND) || \ defined (USE_NIT_SEND) || defined (USE_UPF_SEND) || \ - defined (USE_DLPI_SEND) + defined (USE_DLPI_SEND) || defined (USE_LPF_SEND) # define PACKET_ASSEMBLY #endif @@ -190,7 +198,7 @@ #if defined (USE_RAW_RECEIVE) || defined (USE_BPF_SEND) || \ defined (USE_NIT_RECEIVE) || defined (USE_UPF_RECEIVE) || \ - defined (USE_DLPI_RECEIVE) + defined (USE_DLPI_RECEIVE) || defined (USE_LPF_RECEIVE) # define PACKET_DECODING #endif