From mboxrd@z Thu Jan 1 00:00:00 1970 From: "senthil kumar" Subject: SCTP Notification Date: Fri, 14 Dec 2007 10:07:19 +0900 Message-ID: <9b936a040712131707p4aba0d51w6c5f3fdd9f6e9543@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0622162890==" Cc: linux-net@vger.kernel.org, netdev@vger.kernel.org To: bidulock@openss7.org, sigtran@ietf.org Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: sigtran-bounces@ietf.org List-Id: netdev.vger.kernel.org --===============0622162890== Content-Type: multipart/alternative; boundary="----=_Part_32877_8146781.1197594439229" ------=_Part_32877_8146781.1197594439229 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_32877_8146781.1197594439229 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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

------=_Part_32877_8146781.1197594439229-- --===============0622162890== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sigtran mailing list Sigtran@ietf.org https://www1.ietf.org/mailman/listinfo/sigtran --===============0622162890==--