This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: Eth0/Eth1 Access Problem
- From: "Rick Davis" <rickdavisjr at comcast dot net>
- To: 'Alperen Coþkun' <a_a_coskunoc at hotmail dot com>, <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 26 Sep 2007 05:31:24 -0400
- Subject: [ECOS] RE: Eth0/Eth1 Access Problem
- References: <BAY121-F3665BC95FF276B784EA876CCB70@phx.gbl>
You will have to modify httpd.c in packages/net/httpd
Right now it binds to ANY interface.
server_address.sin_family = AF_INET;
server_address.sin_len = sizeof(server_address);
* server_address.sin_addr.s_addr = INADDR_ANY;
server_address.sin_port = htons(http_port);
To bind to a specific interface you need to do this
server_address.sin_family = AF_INET;
server_address.sin_len = sizeof(server_address);
server_address.sin_addr.s_addr = htonl (0x0a0a0a0a);
or
server_address.sin_addr.s_addr = htonl (inet_addr ("10.10.10.10"));
server_address.sin_port = htons(http_port);
Hope this helps,
Rick Davis
-----Original Message-----
From: Alperen Coþkun [mailto:a_a_coskunoc@hotmail.com]
Sent: Tuesday, September 25, 2007 3:23 AM
To: ecos-discuss@ecos.sourceware.org
Subject: Eth0/Eth1 Access Problem
Hi all,
I have a board using 2 ethernet ports, Eth0 and Eth1. I want to use one of
them for web user interface and other one for another purpose.
But, I couldn't make this difference. Unfortunately, both of the ports are
accessed by user interface.
How can I avoid Eth1 being accessed by web user interface? What decides
which port to be accessed by user interface?
Alperen
_________________________________________________________________
Sohbet ve eglence, web kamera ve sesli sohbet Messenger'de.
http://messenger.msn.com/?mkt=tr&DI=3490&XAPID=2584
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss