uip_ipaddr_t changes fixed thanks to Marcelo Barros

This commit is contained in:
adamdunkels 2006-09-20 19:06:41 +00:00
parent 3e92f843ba
commit cf57e00d60
2 changed files with 18 additions and 18 deletions

View file

@ -145,14 +145,14 @@ appcall(void *state)
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(cmdd_process, ev, data)
{
u16_t ipaddr[2];
uip_ipaddr_t ipaddr;
PROCESS_BEGIN();
tcp_listen(HTONS(6581));
memb_init(&conns);
uip_ipaddr(ipaddr, 255,255,255,255);
udpconn = udp_new(ipaddr, HTONS(6712), NULL);
uip_ipaddr(&ipaddr, 255,255,255,255);
udpconn = udp_new(&ipaddr, HTONS(6712), NULL);
while(1) {
PROCESS_WAIT_EVENT();

View file

@ -29,7 +29,7 @@
*
* This file is part of the Contiki desktop environment
*
* $Id: contiki-main.c,v 1.1 2006/06/17 22:41:29 adamdunkels Exp $
* $Id: contiki-main.c,v 1.2 2006/09/20 19:06:41 adamdunkels Exp $
*
*/
@ -77,18 +77,18 @@ PROCESS(init_process, "Init");
PROCESS_THREAD(init_process, ev, data)
{
u16_t addr[2];
uip_ipaddr_t addr;
PROCESS_BEGIN();
uip_ipaddr(addr, 192,168,2,2);
uip_sethostaddr(addr);
uip_ipaddr(&addr, 192,168,2,2);
uip_sethostaddr(&addr);
uip_ipaddr(addr, 192,168,2,1);
uip_setdraddr(addr);
uip_ipaddr(&addr, 192,168,2,1);
uip_setdraddr(&addr);
uip_ipaddr(addr, 255,255,255,0);
uip_setnetmask(addr);
uip_ipaddr(&addr, 255,255,255,0);
uip_setnetmask(&addr);
printf("init\n");
@ -132,7 +132,7 @@ idle_callback(gpointer data)
int
main(int argc, char **argv)
{
u16_t addr[2];
uip_ipaddr_t addr;
gtk_init(&argc, &argv);
@ -141,14 +141,14 @@ main(int argc, char **argv)
procinit_init();
uip_ipaddr(addr, 192,168,2,2);
uip_sethostaddr(addr);
uip_ipaddr(&addr, 192,168,2,2);
uip_sethostaddr(&addr);
uip_ipaddr(addr, 192,168,2,1);
uip_setdraddr(addr);
uip_ipaddr(&addr, 192,168,2,1);
uip_setdraddr(&addr);
uip_ipaddr(addr, 255,255,255,0);
uip_setnetmask(addr);
uip_ipaddr(&addr, 255,255,255,0);
uip_setnetmask(&addr);
/* program_handler_add(&netconf_dsc, "Network setup", 1);
program_handler_add(&ftp_dsc, "FTP client", 1);