Can I use OPTION field of IP head in QNX?

Hi,

I am trying to add some real-time data in the OPTION field of each IP
packet head by using setsockopt() function. However, I always get the error
information of “:Invalid argument.”, althought the same code works fine in
Linux. I am wondering if this function is supported by QNX or not.
Thanks!

Wang

Realted code is here:
typedef struct {
uint8_t type;
uint8_t size;
uint8_t pointer;
uint8_t flag;
uint8_t tm_stamp[8];
uint8_t relative_DL[4];
uint8_t abs_DL[8];
uint8_t endchar;
} dl_opt;

#ifdef IP_OPTIONS
mydlopt.type=233;
mydlopt.size=sizeof(dl_opt)-1;
mydlopt.pointer=5;
mydlopt.flag=0x70;
retval=gettimeofday(&tm_stamp,NULL);
if(retval==-1){
fprintf(stderr,“gettimeofday() failed. errno:d\n”,errno);
perror(“Gettimeofday error”);
exit(42);
}

mmcpy(mydlopt.tm_stamp,&tm_stamp,8);
emcpy(mydlopt.relative_DL,&relative_DL,4);
abs_DL.tv_sec=tm_stamp.tv_sec+(tm_stamp.tv_usec+relative_DL)/1000000;
abs_DL.tv_usec=(tm_stamp.tv_usec+relative_DL)%1000000;
memcpy(mydlopt.abs_DL,&abs_DL,8);
mydlopt.endchar=IPOPT_EOL;

if( setsockopt(sock, IPPROTO_IP, IP_OPTIONS, (u_char *)&mydlopt,
sizeof(mydlopt)) < 0 ) {
perror( “Set deadline in IP_OPTION setsockopt() failed\n” );
exit( 42 );
}