[ECOS] synthetic target network support for UDP socket.

Santoshkumar Zalake santoshkumar.zalake@wipro.com
Fri Mar 11 03:01:00 GMT 2005

Hi Andrew,

Thanks for help.
I set the SOL_SOCKET value as 17 which UDP protocol number as per
/etc/protocol in Linux src.
Till I was setting -92 error(according error.h this error is ENOPROTOOPT
which means protocol not available).
Then I set SOL_SOCKET value as 0 which is working and return value function
call is zero.

But the same thing is not working in SETSOCKOPT as Broadcast

 /* To set broadcast */
 memset(sock_info,0x00,10*sizeof(unsigned long));

socket_info[0] = (unsigned long)udp_socket_fd;
socket_info[1] = (unsigned long) SOL_SOCKET;
socket_info[2] = (unsigned long) SO_BROADCAST;
socket_info[3] = (unsigned long)(&a);
socket_info[4] = (unsigned long)(sizeof(int));

socket_error = cyg_hal_sys_socketcall(SYS_SETSOCKOPT,socket_info);

if(socket_error <0)
         printf("ERROR SetSockOpt %d", socket_error);

I tried the SOL_SOCKET value as 0xfff and17 and 0
For 0xfff and 17 ==> I am getting error as -92 i.e. protocol not available.
For 0 ==> I am getting error as -99 i.e. EADDRNOTAVAIL(Cannot assign
requested address)

Thanks in Advance
----- Original Message -----
From: "Andrew Lunn" <andrew@lunn.ch>
To: "Santoshkumar Zalake" <santoshkumar.zalake@wipro.com>
Cc: "Andrew Lunn" <andrew@lunn.ch>; "eCos Disuss"
Sent: Wednesday, March 09, 2005 8:37 PM
Subject: Re: [ECOS] synthetic target network support for UDP socket.

> On Wed, Mar 09, 2005 at 08:14:54PM +0530, Santoshkumar Zalake wrote:
> >
> > Hi Andrew
> >
> > I am using SOL_SOCKET value as 0xffff.
> That explains your problem.
>         Andrew

Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list