Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unable to set IP_TOS using setsockopt, returns errno=0x5016 - Invalid Argument

38 views
Skip to first unread message

Subbu

unread,
Jun 12, 2009, 5:21:36 AM6/12/09
to
Hi,
I try to set the TOS field in an outgoing socket, so I set the
following code:
#define IP_TOS 3

int fd
unsigned long tos;

fd = socket(AF_INET,SOCK_DGRAM, UDP);

tos=0x28;
if (setsockopt(fd,IPPROTO_IP,IP_TOS,&tos,sizeof(tos)))
printf("errno =0x%x\r\n",errno);

It returns 0x5016 error. What could be wrong here?

Target processor is MPC 750, Host is Windows and pSOS version is
pSOS+/PPC V2.1.1

pROBE+/PPC PS V3.1.1
pROBE+/PPC CE V3.1.1
pROBE+/PPC QS V3.1.1
pROBE+/PPC DI V3.1.1

pREPC+/PPC V2.2.2

pNA+/PPC V3.2.9

--
Thanks & Regards
Subbu

0 new messages