Re: SCTP Notification

"Brian F. G. Bidulock" <[email protected]>
Newsgroups gmane.ietf.sigtran
Organization http://www.openss7.org/
Message-ID <[email protected]>
senthil,

Why are you sending this to me and the SIGTRAN mailing list???

--brian

senthil kumar wrote:                             (Fri, 14 Dec 2007 10:07:19)
> 
>    Hi,
>         I  am  using  SCTP(libsctp) in linux 2.6.9. I have subscribed for
>    Notifications.  However,  i  am not getting any notification when sctp
>    association   is  established  or  peer  is  shutdown.  Is  there  any
>    correction  in  my  method  of subscription? setsockopt system call is
>    returning success. i used getsockopt to verify the same.
>          struct sockaddr_in stSrcIPAddress;
>          socklen_t  Addlen=sizeof(sockaddr_in);
>          int  iFlags=-1,iRet=-1;
> 
>          struct sctp_sndrcvinfo sndrcvinfo;
>          struct sctp_event_subscribe events;
>      memset( (void *)&events, 0, sizeof(events) );
>      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;
> 
>       ret  = setsockopt( iconnSock, IPPROTO_SCTP, SCTP_EVENTS,(const void
>    *)&events, sizeof(events) );
>      while(1)
>      {
>         iRet  =  sctp_recvmsg(iconnSock,  (void  *)pacbuffer,600, (struct
>    sockaddr *)&stSrcIPAddress, &Addlen, &sndrcvinfo, &iFlags );
>        if ( iRet < 0)
>        {
>        }
>        if(iFlags & MSG_NOTIFICATION )//Notification/event is received.
>        {
>        }
>        if (iRet> 0)
>        {
>        }
>    }
>    with regards,
>       senthil

-- 
Brian F. G. Bidulock
[email protected]
http://www.openss7.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.