Yes, it should; are you able to be sure your eth0 interface buffer is really
loaded? ========================================================================== I can't understand that buffer is really loaded... Are you sure that your ethernet interface is able to send out byte over the wire? ====================================================================== Yes, I already test example src(tcp, icmp reply ) by using wireshark. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fabio Giovagnini Sent: Tuesday, February 06, 2007 4:29 AM To: uip-users@sics.se Subject: Re: [uip-users] ping test Alle 20:17, lunedì 5 febbraio 2007, ttory ha scritto: > I modified src code like this > > =================================================================\ > /* Set ICMP header */ > ICMPBUF->type = ICMP_ECHO; > ICMPBUF->icode = 0; > > if(ICMPBUF->icmpchksum >= HTONS(0xffff - (ICMP_ECHO << 8))) { > ICMPBUF->icmpchksum += HTONS(ICMP_ECHO << 8) + 1; > } else { > ICMPBUF->icmpchksum += HTONS(ICMP_ECHO << 8); > } > ICMPBUF->id = 0x842f; > ICMPBUF->seqno = 1; > > > /* Set IP header */ > ICMPBUF->vhl = 0x45; > ICMPBUF->tos = 0; > ICMPBUF->len[0] = 0; > ICMPBUF->len[1] = 0x54; > ICMPBUF->ipid[0] = 0xf2; > ICMPBUF->ipid[1] = 0x9c; > ICMPBUF->ipoffset[0] = BUF->ipoffset[1] = 0; > ICMPBUF->ttl = 128; > ICMPBUF->proto = UIP_PROTO_ICMP; > ICMPBUF->ipchksum = 0; > uip_ipaddr(ICMPBUF->destipaddr, 128, 134, 64, 123); > uip_ipaddr(ICMPBUF->srcipaddr, 128, 134, 64, 132); > > //uip_process(UIP_TIMER); > > uip_len = 98; > nic_send(); > =================================================================\ > > > > But I can't see my packet be sent from target board. > > The rule what I know > 1. set data in uip_buf > 2. calc uip_len > 3. nic_send() > Is this incorrect way? Yes, it should; are you able to be sure your eth0 interface buffer is really loaded? Are you sure that your ethernet interface is able to send out byte over the wire? > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of > Fabio Giovagnini > Sent: Tuesday, February 06, 2007 3:22 AM > To: uip-users@sics.se > Subject: Re: [uip-users] ping test > > Can you see your packet with wireshark? > If yes, are all the packets (ETH, IP, ICMP) correct? > Where does your test fail? > > Regards > > Alle 18:28, lunedì 5 febbraio 2007, ttory ha scritto: > > Hello guys > > > > > > > > I'm trying to ping from target board to my pc. > > > > And I'll confirm ICMP packet by using wireshark. > > > > > > > > I called this function when main function start > > > > This function make ICMP packet and send it. > > > > > > > > void > > > > pingtest(void) > > > > { > > > > /* Set ICMP header */ > > > > ICMPBUF->type = ICMP_ECHO; > > > > ICMPBUF->icode = 0; > > > > > > > > if(ICMPBUF->icmpchksum >= HTONS(0xffff - (ICMP_ECHO << 8))) { > > > > ICMPBUF->icmpchksum += HTONS(ICMP_ECHO << 8) + 1; > > > > } else { > > > > ICMPBUF->icmpchksum += HTONS(ICMP_ECHO << 8); > > > > } > > > > ICMPBUF->id = 0x842f; > > > > ICMPBUF->seqno = 1; > > > > > > > > > > > > /* Set IP header */ > > > > BUF->vhl = 0x45; > > > > BUF->tos = 0; > > > > BUF->len[0] = 0; > > > > BUF->len[1] = 0x54; > > > > BUF->ipid[0] = 0xf2; > > > > BUF->ipid[1] = 0x9c; > > > > BUF->ipoffset[0] = BUF->ipoffset[1] = 0; > > > > BUF->ttl = 128; > > > > BUF->proto = UIP_PROTO_ICMP; > > > > BUF->ipchksum = 0; > > > > uip_ipaddr(BUF->destipaddr, 128, 134, 64, 123); > > > > uip_ipaddr(BUF->srcipaddr, 128, 134, 64, 132); > > > > > > > > UIP_STAT(++uip_stat.icmp.sent); > > > > uip_process(1); > > > > } > > > > > > > > this test is failed. > > > > I think making ICMP header has no problem . > > > > if there is some data to send in uip_buf.. uIP send it automatically. > > right? -- Fabio Giovagnini Aurion s.r.l. via degli orti 11, 40050 Funo di Argelato (BO) Tel. +39.335.8350919 Fax +39.051.8659009 www.aurion-tech.com account telefono VoIP skype (www.skype.com): aurion.giovagnini