ttory hi

I'm sorry to interrupt, but I was wondering if this is possible to do via a
usb port???

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf
Of ttory
Sent: Monday, February 05, 2007 11:17 AM
To: uip-users@sics.se
Subject: RE: [uip-users] ping test


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?



-----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








--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.25/669 - Release Date: 2/4/2007
9:58 PM


Reply via email to