From ff7d0af585edbd2b4e65e409523e246f08ff7ffd Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 22 Mar 2007 16:18:07 +0000 Subject: [PATCH] Provide a buffer in base memory for code to fill with generated DHCP data. --- src/arch/i386/core/dhcp_basemem.c | 29 ++++++++++++++++++++++++++++ src/arch/i386/include/dhcp_basemem.h | 13 +++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/arch/i386/core/dhcp_basemem.c create mode 100644 src/arch/i386/include/dhcp_basemem.h diff --git a/src/arch/i386/core/dhcp_basemem.c b/src/arch/i386/core/dhcp_basemem.c new file mode 100644 index 00000000..de40c30d --- /dev/null +++ b/src/arch/i386/core/dhcp_basemem.c @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2007 Michael Brown . + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/** + * @file + * + * DHCP parameter block provided to external programs in base memory + * + */ + +#include + +#undef dhcp_basemem +char __data16_array ( dhcp_basemem, [DHCP_BASEMEM_LEN] ); diff --git a/src/arch/i386/include/dhcp_basemem.h b/src/arch/i386/include/dhcp_basemem.h new file mode 100644 index 00000000..82d5ccb9 --- /dev/null +++ b/src/arch/i386/include/dhcp_basemem.h @@ -0,0 +1,13 @@ +#ifndef DHCP_BASEMEM_H +#define DHCP_BASEMEM_H + +#include + +/** Maximum length of a DHCP data buffer */ +#define DHCP_BASEMEM_LEN 1514 + +/** DHCP data buffer */ +extern char __data16_array ( dhcp_basemem, [DHCP_BASEMEM_LEN] ); +#define dhcp_basemem __use_data16 ( dhcp_basemem ) + +#endif /* DHCP_BASEMEM_H */