[En-Nut-Discussion] access ethernut WAN
Ricardo Cuevas
ricue at yahoo.com
Mon May 2 20:16:22 CEST 2005
I need to access to the Ethernut card from internet,
its a web server running in the card, so I want to
visit like the example from Uwe Bastian, how I can
make happened, my gateway is and my IP address are and
both are unique I use the next code to register the
device its right? Or witch mistake Im doing, can
someone help me?
Thanks in advance
#define DNSSERVERIP "192.100.170.1"
#define MYMAC 0x00, 0x06, 0x98, 0x01, 0x04,
0xB7
#define MYIP "192.100.170.62"
#define MYMASK "255.255.255.0"
#define MY_GATE "192.100.170.254"
u_char mac[] = { MYMAC };
u_long ip_addr = inet_addr(MYIP);
u_long ip_mask = inet_addr(MYMASK);
u_long ip_gate = inet_addr(MY_GATE);
NutNetIfConfig("eth0",mac,ip_addr,ip_mask);
NutIpRouteAdd(0,0,ip_gate,&DEV_ETHER);
NutDnsConfig(0, 0, inet_addr(DNSSERVERIP));
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the En-Nut-Discussion
mailing list