SIP Witch 1.9.15
Data Structures | Macros | Typedefs | Enumerations | Functions
osip.h File Reference

oSIP fsm Routines More...

#include <osipparser2/osip_const.h>
#include <osip2/osip_time.h>
#include <osipparser2/osip_parser.h>
#include <osip2/osip_fifo.h>
Include dependency graph for osip.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct   osip_ict
  Structure for INVITE CLIENT TRANSACTION. More...
 
struct   osip_nict
  Structure for NON-INVITE CLIENT TRANSACTION. More...
 
struct   osip_ist
  Structure for INVITE SERVER TRANSACTION. More...
 
struct   osip_nist
  Structure for NON-INVITE SERVER TRANSACTION. More...
 
struct   osip_srv_entry
  Structure for SRV record entry. More...
 
struct   osip_srv_record
  Structure for SRV record entry. More...
 
struct   osip_naptr
  Structure for NAPTR record entry. More...
 
struct   osip_transaction
  Structure for transaction handling. More...
 
struct   ixt
  Structure for 2XX retransmission management. More...
 
struct   osip
  Structure for osip handling. More...
 
struct   osip_event
  Structure for osip event handling. More...
 

Macros

#define  DEFAULT_T1   500 /* 500 ms */
  You can re-define the default value for T1. More...
 
#define  DEFAULT_T1_TCP_PROGRESS   50 /* 50ms */
  You can re-define the default value for T1_TCP_PROGRESS. More...
 
#define  DEFAULT_T2   4000 /* 4s */
  You can re-define the default value for T2. More...
 
#define  DEFAULT_T4   5000 /* 5s */
  You can re-define the default value for T4. More...
 
#define  OSIP_SRV_STATE_UNKNOWN   0
  unknown More...
 
#define  OSIP_SRV_STATE_RETRYLATER   2
  retry later More...
 
#define  OSIP_SRV_STATE_COMPLETED   3
  completed More...
 
#define  OSIP_SRV_STATE_NOTSUPPORTED   4
  not supported More...
 
#define  OSIP_NAPTR_STATE_UNKNOWN   0
  unknown More...
 
#define  OSIP_NAPTR_STATE_INPROGRESS   1
  in progress More...
 
#define  OSIP_NAPTR_STATE_NAPTRDONE   2
  naptr done More...
 
  srv in progress More...
 
#define  OSIP_NAPTR_STATE_SRVDONE   4
  srv done More...
 
#define  OSIP_NAPTR_STATE_RETRYLATER   5
  retry later More...
 
  not supported More...
 
#define  EVT_IS_RCV_INVITE(event)   (event->type==RCV_REQINVITE)
  Check if the sipevent is of type RCV_REQINVITE. More...
 
#define  EVT_IS_RCV_ACK(event)   (event->type==RCV_REQACK)
  Check if the sipevent is of type RCV_REQACK. More...
 
#define  EVT_IS_RCV_REQUEST(event)   (event->type==RCV_REQUEST)
  Check if the sipevent is of type RCV_REQUEST. More...
 
#define  EVT_IS_RCV_STATUS_1XX(event)   (event->type==RCV_STATUS_1XX)
  Check if the sipevent is of type RCV_STATUS_1XX. More...
 
#define  EVT_IS_RCV_STATUS_2XX(event)   (event->type==RCV_STATUS_2XX)
  Check if the sipevent is of type RCV_STATUS_2XX. More...
 
#define  EVT_IS_RCV_STATUS_3456XX(event)   (event->type==RCV_STATUS_3456XX)
  Check if the sipevent is of type RCV_STATUS_3456XX. More...
 
#define  EVT_IS_SND_INVITE(event)   (event->type==SND_REQINVITE)
  Check if the sipevent is of type SND_REQINVITE. More...
 
#define  EVT_IS_SND_ACK(event)   (event->type==SND_REQACK)
  Check if the sipevent is of type SND_REQACK. More...
 
#define  EVT_IS_SND_REQUEST(event)   (event->type==SND_REQUEST)
  Check if the sipevent is of type SND_REQUEST. More...
 
#define  EVT_IS_SND_STATUS_1XX(event)   (event->type==SND_STATUS_1XX)
  Check if the sipevent is of type SND_STATUS_1XX. More...
 
#define  EVT_IS_SND_STATUS_2XX(event)   (event->type==SND_STATUS_2XX)
  Check if the sipevent is of type SND_STATUS_2XX. More...
 
#define  EVT_IS_SND_STATUS_3456XX(event)   (event->type==SND_STATUS_3456XX)
  Check if the sipevent is of type SND_STATUS_3456XX. More...
 
#define  EVT_IS_INCOMINGMSG(event)
  Check if the sipevent is of an incoming SIP MESSAGE. More...
 
#define  EVT_IS_INCOMINGREQ(event)
  Check if the sipevent is of an incoming SIP REQUEST. More...
 
#define  EVT_IS_INCOMINGRESP(event)
  Check if the sipevent is of an incoming SIP RESPONSE. More...
 
#define  EVT_IS_OUTGOINGMSG(event)
  Check if the sipevent is of an outgoing SIP MESSAGE. More...
 
#define  EVT_IS_OUTGOINGREQ(event)
  Check if the sipevent is of an outgoing SIP REQUEST. More...
 
#define  EVT_IS_OUTGOINGRESP(event)
  Check if the sipevent is of an outgoing SIP RESPONSE. More...
 
#define  EVT_IS_MSG(event)
  Check if the sipevent is a SIP MESSAGE. More...
 
#define  EVT_IS_KILL_TRANSACTION(event)   (event->type==KILL_TRANSACTION)
  Check if the sipevent is of type KILL_TRANSACTION. More...
 

Typedefs

typedef enum _state_t  state_t
  Enumeration for transaction state. More...
 
typedef enum type_t  type_t
  Enumeration for event type. More...
 
  Enumeration for transaction type. More...
 
typedef struct osip_ict  osip_ict_t
  Structure for INVITE CLIENT TRANSACTION (outgoing INVITE transaction). More...
 
typedef struct osip_nict  osip_nict_t
  Structure for NON-INVITE CLIENT TRANSACTION (outgoing NON-INVITE transaction). More...
 
typedef struct osip_ist  osip_ist_t
  Structure for INVITE SERVER TRANSACTION (incoming INVITE transaction). More...
 
typedef struct osip_nist  osip_nist_t
  Structure for NON-INVITE SERVER TRANSACTION (incoming SERVER transaction). More...
 
typedef struct osip_srv_entry  osip_srv_entry_t
  Structure for SRV record entry. More...
 
  Structure for SRV record. More...
 
typedef struct osip_naptr  osip_naptr_t
  Structure for NAPTR record. More...
 
  Structure for transaction handling. More...
 
  Enumeration for callback type. More...
 
  Enumeration for callback type used when transaction is over. More...
 
  Enumeration for callback type used when a transport error is detected. More...
 
typedef void(*  osip_message_cb_t )(int type, osip_transaction_t *, osip_message_t *)
  Callback definition for message announcements. More...
 
typedef void(*  osip_kill_transaction_cb_t )(int type, osip_transaction_t *)
  Callback definition for end of transaction announcements. More...
 
typedef void(*  osip_transport_error_cb_t )(int type, osip_transaction_t *, int error)
  Callback definition for transport error announcements. More...
 
typedef struct ixt  ixt_t
  Structure for 2XX retransmission management. More...
 
typedef struct osip  osip_t
  Structure for osip handling. More...
 
typedef struct osip_event  osip_event_t
  Structure for osip event handling. More...
 

Enumerations

  Enumeration for transaction state. More...
 
  Enumeration for event type. More...
 
enum   osip_fsm_type_t { ICT, IST, NICT, NIST }
  Enumeration for transaction type. More...
 
enum   osip_message_callback_type {
  OSIP_ICT_INVITE_SENT = 0, OSIP_ICT_INVITE_SENT_AGAIN, OSIP_ICT_ACK_SENT, OSIP_ICT_ACK_SENT_AGAIN,
  OSIP_ICT_STATUS_1XX_RECEIVED, OSIP_ICT_STATUS_2XX_RECEIVED, OSIP_ICT_STATUS_2XX_RECEIVED_AGAIN, OSIP_ICT_STATUS_3XX_RECEIVED,
  OSIP_ICT_STATUS_4XX_RECEIVED, OSIP_ICT_STATUS_5XX_RECEIVED, OSIP_ICT_STATUS_6XX_RECEIVED, OSIP_ICT_STATUS_3456XX_RECEIVED_AGAIN,
  OSIP_IST_INVITE_RECEIVED, OSIP_IST_INVITE_RECEIVED_AGAIN, OSIP_IST_ACK_RECEIVED, OSIP_IST_ACK_RECEIVED_AGAIN,
  OSIP_IST_STATUS_1XX_SENT, OSIP_IST_STATUS_2XX_SENT, OSIP_IST_STATUS_2XX_SENT_AGAIN, OSIP_IST_STATUS_3XX_SENT,
  OSIP_IST_STATUS_4XX_SENT, OSIP_IST_STATUS_5XX_SENT, OSIP_IST_STATUS_6XX_SENT, OSIP_IST_STATUS_3456XX_SENT_AGAIN,
  OSIP_NICT_REGISTER_SENT, OSIP_NICT_BYE_SENT, OSIP_NICT_OPTIONS_SENT, OSIP_NICT_INFO_SENT,
  OSIP_NICT_CANCEL_SENT, OSIP_NICT_NOTIFY_SENT, OSIP_NICT_SUBSCRIBE_SENT, OSIP_NICT_UNKNOWN_REQUEST_SENT,
  OSIP_NICT_REQUEST_SENT_AGAIN, OSIP_NICT_STATUS_1XX_RECEIVED, OSIP_NICT_STATUS_2XX_RECEIVED, OSIP_NICT_STATUS_2XX_RECEIVED_AGAIN,
  OSIP_NICT_STATUS_3XX_RECEIVED, OSIP_NICT_STATUS_4XX_RECEIVED, OSIP_NICT_STATUS_5XX_RECEIVED, OSIP_NICT_STATUS_6XX_RECEIVED,
  OSIP_NICT_STATUS_3456XX_RECEIVED_AGAIN, OSIP_NIST_REGISTER_RECEIVED, OSIP_NIST_BYE_RECEIVED, OSIP_NIST_OPTIONS_RECEIVED,
  OSIP_NIST_INFO_RECEIVED, OSIP_NIST_CANCEL_RECEIVED, OSIP_NIST_NOTIFY_RECEIVED, OSIP_NIST_SUBSCRIBE_RECEIVED,
  OSIP_NIST_UNKNOWN_REQUEST_RECEIVED, OSIP_NIST_REQUEST_RECEIVED_AGAIN, OSIP_NIST_STATUS_1XX_SENT, OSIP_NIST_STATUS_2XX_SENT,
  OSIP_NIST_STATUS_2XX_SENT_AGAIN, OSIP_NIST_STATUS_3XX_SENT, OSIP_NIST_STATUS_4XX_SENT, OSIP_NIST_STATUS_5XX_SENT,
  OSIP_NIST_STATUS_6XX_SENT, OSIP_NIST_STATUS_3456XX_SENT_AGAIN, OSIP_ICT_STATUS_TIMEOUT, OSIP_NICT_STATUS_TIMEOUT,
  OSIP_MESSAGE_CALLBACK_COUNT
}
  Enumeration for callback type. More...
 
  Enumeration for callback type used when transaction is over. More...
 
  Enumeration for callback type used when a transport error is detected. More...
 

Functions

  Set a callback for each transaction operation. More...
 
  Set a callback for transaction operation related to the end of transactions. More...
 
  Set a callback for each transaction operation related to network error. More...
 
  Allocate an osip_transaction_t element. More...
 
  Free all resource in a osip_transaction_t element. More...
 
  Free all resource in a osip_transaction_t element. More...
 
void  osip_response_get_destination (osip_message_t *response, char **address, int *portnum)
  Search in a SIP response the destination where the message should be sent. More...
 
int  osip_ict_set_destination (osip_ict_t *ict, char *destination, int port)
  Set the host and port destination used for sending the SIP message. More...
 
int  osip_nict_set_destination (osip_nict_t *nict, char *destination, int port)
  Set the host and port destination used for sending the SIP message. More...
 
  Add a SIP event in the fifo of a osip_transaction_t element. More...
 
  Consume one osip_event_t element previously added in the fifo. More...
 
  Set a pointer to your personal context associated with this transaction. More...
 
int  osip_transaction_set_reserved1 (osip_transaction_t *transaction, void *ptr)
  Set a pointer to your personal context associated with this transaction. More...
 
int  osip_transaction_set_reserved2 (osip_transaction_t *transaction, void *ptr)
  Set a pointer to your personal context associated with this transaction. More...
 
int  osip_transaction_set_reserved3 (osip_transaction_t *transaction, void *ptr)
  Set a pointer to your personal context associated with this transaction. More...
 
int  osip_transaction_set_reserved4 (osip_transaction_t *transaction, void *ptr)
  Set a pointer to your personal context associated with this transaction. More...
 
int  osip_transaction_set_reserved5 (osip_transaction_t *transaction, void *ptr)
  Set a pointer to your personal context associated with this transaction. More...
 
int  osip_transaction_set_reserved6 (osip_transaction_t *transaction, void *ptr)
  Set a pointer to your personal context associated with this transaction. More...
 
  Get a pointer to your personal context associated with this transaction. More...
 
  Get a pointer to your personal context associated with this transaction. More...
 
  Get a pointer to your personal context associated with this transaction. More...
 
  Get a pointer to your personal context associated with this transaction. More...
 
  Get a pointer to your personal context associated with this transaction. More...
 
  Get a pointer to your personal context associated with this transaction. More...
 
  Get a pointer to your personal context associated with this transaction. More...
 
int  osip_transaction_get_destination (osip_transaction_t *transaction, char **ip, int *port)
  Get target ip and port for this request. More...
 
  Set SRV lookup information to be used by state machine. More...
 
  Set NAPTR lookup information to be used by state machine. More...
 
int  osip_transaction_set_in_socket (osip_transaction_t *transaction, int sock)
  Set the socket for incoming message. More...
 
int  osip_transaction_set_out_socket (osip_transaction_t *transaction, int sock)
  Set the socket for outgoing message. More...
 
int  osip_init (osip_t **osip)
  Allocate an osip_t element. More...
 
  Free all resource in a osip_t element. More...
 
void  osip_set_application_context (osip_t *osip, void *pointer)
  Set a pointer in a osip_t element. More...
 
  Get a pointer in a osip_t element. More...
 
  Remove a transaction from the osip stack. More...
 
  Consume ALL pending osip_event_t previously added in the fifos of ict transactions. More...
 
  Consume ALL pending osip_event_t previously added in the fifos of ist transactions. More...
 
  Consume ALL pending osip_event_t previously added in the fifos of nict transactions. More...
 
  Consume ALL pending osip_event_t previously added in the fifos of nist transactions. More...
 
void  osip_timers_gettimeout (osip_t *osip, struct timeval *lower_tv)
  Retreive the minimum timer value to be used by an application so that the osip_timer_*_execute method don't have to be called often. More...
 
  Check if an ict transactions needs a timer event. More...
 
  Check if an ist transactions needs a timer event. More...
 
  Check if a nict transactions needs a timer event. More...
 
  Check if a nist transactions needs a timer event. More...
 
  Search for a transaction that match this event (MUST be a MESSAGE event). More...
 
  Some race conditions can happen in multi threaded applications. More...
 
  Search for a transaction that match this event (MUST be a MESSAGE event) and add this event if a transaction is found. More...
 
  Create a transaction for this event (MUST be a SIP REQUEST event). More...
 
osip_event_tosip_parse (const char *buf, size_t length)
  Create a sipevent from a SIP message string. More...
 
  Send required retransmissions. More...
 
void  osip_start_200ok_retransmissions (osip_t *osip, struct osip_dialog *dialog, osip_message_t *msg200ok, int sock)
  Start out of fsm 200 Ok retransmissions. More...
 
void  osip_start_ack_retransmissions (osip_t *osip, struct osip_dialog *dialog, osip_message_t *ack, char *dest, int port, int sock)
  Start out of fsm ACK retransmissions. More...
 
  Stop the out of fsm 200 Ok retransmissions matching an incoming ACK. More...
 
  Stop out of fsm retransmissions (ACK or 200 Ok) associated to a given dialog. More...
 
  Allocate a sipevent (we know this message is an OUTGOING SIP message). More...
 
void  osip_event_free (osip_event_t *event)
  Free all resource in a sipevent. More...
 
void  osip_set_cb_send_message (osip_t *cf, int(*cb)(osip_transaction_t *, osip_message_t *, char *, int, int))
  Register the callback used to send SIP message. More...
 

Detailed Description

oSIP fsm Routines

Definition in file osip.h.


Generated on Dec 21, 2017 for sipwitch-1.9.15 (*.h and *.cpp), libosip2-5.0.0 (*.h) and libeXosip2-4.0.0 (*.h), by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /