tfUseSctp

Jump to: navigation, search

Table of Contents >> Optional Protocols >> SCTP


#include <trsocket.h>


int tfUseSctp (ttUserSctpNotifyFuncPtr sctpNotifyFuncPtr);


Function Description

This function is used to initialize SCTP before usage. Currently, the SCTP event notification callback, sctpNotifyFuncPtr, is unused and should be set to NULL.


Function prototype for the user supplied notify function:


void sctpNotifyFunc (
int socketDescriptor,
union sctp_notification * eventUnionPtr
);


This function is intended to be called when a SCTP socketDescriptor receives an event (eventUnionPtr) of interest. Currently, there are no such events.


Parameters

  • socketDescriptor
    The SCTP socket descriptor, as returned by socket() when IPPROTO_SCTP is used.
  • eventUnionPtr
    The SCTP event (data type shown below).
  • sctpNotifyFuncPtr
    A pointer to a function that will be called for selected SCTP events occurring on socketDescriptor. Currently, there are no such events.


 
#include <trsocket.h>
 
/* Union of all SCTP notification types */
union sctp_notification
{
    struct
    {
        ttUser16Bit     sn_type;   /* Notification type */
        ttUser16Bit     sn_flags;
        ttUser32Bit     sn_length;
    } sn_header;
    struct sctp_assoc_change        sn_assoc_change;
    struct sctp_paddr_change        sn_paddr_change;
    struct sctp_remote_error        sn_remote_error;
    struct sctp_send_failed         sn_send_failed;
    struct sctp_shutdown_event      sn_shutdown_event;
    struct sctp_adaptation_event    sn_adaptation_event;
    struct sctp_pdapi_event         sn_pdapi_event;
    struct sctp_authkey_event       sn_auth_event;
    struct sctp_sender_dry_event    sn_sender_dry_event;
};
 


sctp_notification Parameters

  • sn_type
    Type of SCTP notification (see below).
  • sn_flags
    Notification flags. Not used at this time.
  • sn_length
    Length of the notification.
  • sn_assoc_change
    Change in the association.
    Type: SCTP_ASSOC_CHANGE
  • sn_paddr_change
    Peer address change.
    Type: SCTP_PEER_ADDR_CHANGE
  • sn_remote_error
    Remote error.
    Type: SCTP_REMOTE_ERROR
  • sn_send_failed
    Send failed.
    Type: SCTP_SEND_FAILED
  • sn_shutdown_event
    Association shutdown.
    Type: SCTP_SHUTDOWN_EVENT
  • sn_adaptation_event
    Adaptation indication.
    Type: SCTP_ADAPTATION_INDICATION
  • sn_pdapi_event
    Partial delivery.
    Type: SCTP_PARTIAL_DELIVERY_EVENT
  • sn_auth_event
    Authentication event.
    Type: SCTP_AUTHENTICATION_EVENT
  • sn_sender_dry_event
    Send completed.
    Type: SCTP_SENDER_DRY_EVENT


Returns

  • TM_ENOERROR
    Success.


Table of Contents >> Optional Protocols >> SCTP