This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Socket UDP
On Thu, Dec 01, 2005 at 12:52:10PM +0100, Michele Da Meda wrote:
>
> ----- Original Message -----
> From: "Andrew Lunn" <andrew@lunn.ch>
> To: "Michele Da Meda" <dm_mic@libero.it>
> Cc: "ecos-discuss" <ecos-discuss@ecos.sourceware.org>
> Sent: Thursday, December 01, 2005 12:28 PM
> Subject: Re: [ECOS] Socket UDP
>
>
> > On Thu, Dec 01, 2005 at 11:02:47AM +0100, Michele Da Meda wrote:
> > > Hi all,
> > >
> > > my application uses UDP socket, i have a problem with SOCK_DGRAM and
> > > SOCK_STREAM.
> > > I make a BIND with these paramethers :
> > >
> > > sin_family = AF_INET
> > > sin_addr = inet_addr("192.168.0.253")
> > > sin_port = (unsigned short)htons(1900)
> > >
> > > with a socket like this : socket(AF_INET, SOCK_DGRAM, 0);
> > >
> > > I read that UDP socket not work properly, and is better use
> "socketcall" ,
> > > but i don't know how.
> >
> > The eCos TCP/IP stack does work. Sockets work as normal.
> >
> > Where have you read that they don't?
> >
> > socketcall().... Are you using the linux synthetic target?
> >
> > Andrew
>
> No, i'm not.
> Well, do you know why i receive always a RST packet after a SYN, instead
> receive an ACK ?
> I' ve created a socket : sock = socket(AF_INET, SOCK_STREAM, 0) , this
> has been set in readset and i have been call the Listen function :
> Listen(sock,4);
Did you call bind?
> My SELECT return always 0 .
>
> 192.168.0.87 : browser in my intranet
> 192.168.0.253 : NEC MIPS where run my ecos application
>
> >From 192.168.0.87 i make this call from browser :
> http://192.168.0.253:57005
>
> Packet SNIFFING :
> Source Destination
> 192.168.0.87 192.168.0.253 TCP 4134 > 57005 [SYN]
> Seq=0 Ack=0 Win=64240 Len=0 MSS=1460
> 192.168.0.253 192.168.0.87 TCP 57005 > 4134 [RST,ACK]
> Seq=0 Ack=0 Win=1024 Len=0
This shows there is nothing listening on port 57005.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss