Subject: [Tsvwg] doubt in receving SCTP notifications using linux 2.6 kernel

From: "Mohammad Arif" <[email-masked]>
Date: Fri, 3 Aug 2007 11:57:54 +0530

Hi ,
I m using linux 2.6 kernel for our SCTP transport requirement.

*i have enabled all the events/notifications for an socket using setsockopt(
) sys call*
  events.sctp_data_io_event = 1;
  events.sctp_association_event = 1;
  events.sctp_send_failure_event = 1;
  events.sctp_shutdown_event = 1;
  events.sctp_peer_error_event = 1;

*And my notification receiving code is*

union sctp_notification *unSCTPNot;
char *pacbuffer;
int iFlags ;
struct sockaddr_in stSrcIPAddress;
socklen_t  Addlen;

iRet= sctp_recvmsg( iAssocID, (void *)pacbuffer,256 ,
                        (struct sockaddr *)&stSrcIPAddress, &Addlen,
&sndrcvinfo, &iFlags );

 if(iFlags & MSG_NOTIFICATION )
 {
      memcpy(&unSCTPNot,pacbuffer,iRet);
      //process the notifications
 }

Is the above procedure correct? please guide me.
because i dont have one more linux server to test the code right now..

Any help would be appreciated.

Thanks
-- 
Regards
Mohammad Arif

-- 
Regards
Mohammad Arif