bootp.c revision a39ab93d71daee43e60b32f614c426492d5cf2d2
0N/A * Copyright (c) 2004 Fabrice Bellard 0N/A * Permission is hereby granted, free of charge, to any person obtaining a copy 2362N/A * of this software and associated documentation files (the "Software"), to deal 0N/A * in the Software without restriction, including without limitation the rights 2362N/A * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 0N/A * copies of the Software, and to permit persons to whom the Software is 0N/A * furnished to do so, subject to the following conditions: 0N/A * The above copyright notice and this permission notice shall be included in 0N/A * all copies or substantial portions of the Software. 0N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 0N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 0N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 0N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 0N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 2362N/A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 0N/A/* XXX: only DHCP is supported */ 0N/A /* extract exact DHCP msg type */ 0N/A LogRel((
"NAT: DHCP released IP address %u.%u.%u.%u\n",
0N/A /* This message is not to be answered in any way. */ 0N/A /* XXX: this is a hack to get the client mac address */ /* Do not allocate a new lease for clients that forgot that they had a lease. */ LogRel((
"NAT: DHCP no IP address left\n"));
/* if never assigned, behaves as if it was already assigned (windows fix because it remembers its address) */ LogRel((
"NAT: DHCP offered IP address %u.%u.%u.%u\n",
sizeof(
struct ip) -
sizeof(
struct udphdr);
/* Reply to the broadcast address, as some clients perform paranoid checks. */