Navigation


Changeset 706:4ffbc9f1e922 in freeDiameter for libfdcore/cnxctx.h


Ignore:
Timestamp:
Feb 9, 2011, 3:26:58 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Large UNTESTED commit with the following changes:

  • Improved DiameterIdentity? handling (esp. interationalization issues), and improve efficiency of some string operations in peers, sessions, and dictionary modules (closes #7)
  • Cleanup in the session module to free only unreferenced sessions (#16)
  • Removed fd_cpu_flush_cache(), replaced by more robust alternatives.
  • Improved peer state machine algorithm to counter SCTP multistream race condition.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/cnxctx.h

    r662 r706  
    4848        int             cc_family;      /* AF_INET or AF_INET6 (mixed) */
    4949        int             cc_proto;       /* IPPROTO_TCP or IPPROTO_SCTP */
    50         uint32_t        cc_status;      /* True if the object is being destroyed: we don't send events anymore */
     50       
     51        uint32_t        cc_state;       /* True if the object is being destroyed: we don't send events anymore. access with fd_cnx_getstate() */
    5152        #define         CC_STATUS_CLOSING       1
    5253        #define         CC_STATUS_ERROR         2
     
    5960        struct fifo *   cc_incoming;    /* FIFO queue of events received on the connection, FDEVP_CNX_* */
    6061        struct fifo *   cc_alt;         /* alternate fifo to send FDEVP_CNX_* events to. */
    61         #define Target_Queue(cnx)       ((cnx)->cc_alt ?: (cnx)->cc_incoming)
    6262
    6363        /* If cc_tls == true */
    6464        struct {
    65                 char                            *cn;            /* If not NULL, remote certif will be checked to match this Common Name */
     65                DiamId_t                         cn;            /* If not NULL, remote certif will be checked to match this Common Name */
    6666                int                              mode;          /* GNUTLS_CLIENT / GNUTLS_SERVER */
    6767                gnutls_session_t                 session;       /* Session object (stream #0 in case of SCTP) */
     
    8484
    8585void fd_cnx_markerror(struct cnxctx * conn);
     86uint32_t fd_cnx_getstate(struct cnxctx * conn);
     87int  fd_cnx_teststate(struct cnxctx * conn, uint32_t flag);
     88void fd_cnx_addstate(struct cnxctx * conn, uint32_t orstate);
     89void fd_cnx_setstate(struct cnxctx * conn, uint32_t abstate);
     90struct fifo * fd_cnx_target_queue(struct cnxctx * conn);
     91
    8692
    8793/* Socket */
     
    109115int fd_sctp_get_remote_ep(int sock, struct fd_list * list);
    110116int fd_sctp_get_str_info( int sock, uint16_t *in, uint16_t *out, sSS *primary );
    111 int fd_sctp_sendstr(int sock, uint16_t strid, uint8_t * buf, size_t len, uint32_t * cc_closing);
    112 int fd_sctp_recvmeta(int sock, uint16_t * strid, uint8_t ** buf, size_t * len, int *event, uint32_t * cc_closing);
     117int fd_sctp_sendstr(struct cnxctx * conn, uint16_t strid, uint8_t * buf, size_t len);
     118int fd_sctp_recvmeta(struct cnxctx * conn, uint16_t * strid, uint8_t ** buf, size_t * len, int *event);
    113119
    114120/* TLS over SCTP (multi-stream) */
Note: See TracChangeset for help on using the changeset viewer.