This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: ip address acessing in application saved by redboot.
- From: Christoph Csebits <christoph dot csebits at frequentis dot com>
- To: rameshs at danlawinc dot com
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 11 Mar 2003 08:39:41 +0100
- Subject: Re: [ECOS] ip address acessing in application saved by redboot.
- References: <207EE0F3DFEED4119B0100508B441B36A7F9F0@agni.dsil.danlawinc.com>
Hi,
On Tue, Mar 11, 2003 at 12:54:43PM +0530, rameshs at danlawinc dot com wrote:
> Hi,
> I am working in the redboot porting for Adderboard.
> I have one doubt. Redboot saves the ip and ethernet information in the flash
> memory.I want to know how to acess the ipaddress in the application which is
> used by redboot.I know the ethernet address is acessed through the virtual
> vector.Can any one please give how to acess the ip address stored in the
> flash by Redboot.I want to weather any routine is there in the code for
> acessing the ip address.
For me the following is doing this.
struct in_addr addr;
CYGACC_CALL_IF_FLASH_CFG_OP( CYGNUM_CALL_IF_FLASH_CFG_GET
, const_cast<char *>("bootp_my_ip")
, &addr.s_addr
, CYGNUM_FLASH_CFG_OP_CONFIG_IP
);
hth, christoph
--
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss