2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

Add code to read and discard incoming packets on fallback socket

This commit is contained in:
Ted Lemon
1996-06-12 23:52:38 +00:00
parent 3b170e0d32
commit c5568eb50a
6 changed files with 82 additions and 2 deletions

View File

@@ -182,3 +182,18 @@ size_t receive_packet (interface, buf, len, from, hfrom)
(struct sockaddr *)from, &flen);
}
#endif /* USE_SOCKET_RECEIVE */
#ifdef USE_SOCKET_FALLBACK
/* This just reads in a packet and silently discards it. */
size_t fallback_discard (interface)
struct interface_info *interface;
{
char buf [1540];
struct sockaddr_in from;
int flen = sizeof from;
return recvfrom (interface -> wfdesc, buf, sizeof buf, 0,
(struct sockaddr *)&from, &flen);
}
#endif /* USE_SOCKET_RECEIVE */