Navigation


Changeset 706:4ffbc9f1e922 in freeDiameter for libfdcore/fdcore-internal.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/fdcore-internal.h

    r662 r706  
    138138        char            *p_dbgorig;
    139139       
     140        /* State of the peer, and its lock */
     141        enum peer_state  p_state;
     142        pthread_mutex_t  p_state_mtx;
     143       
    140144        /* Chaining in peers sublists */
    141145        struct fd_list   p_actives;     /* list of peers in the STATE_OPEN state -- used by routing */
     
    147151                unsigned pf_responder   : 1;    /* The peer has been created to handle incoming connection */
    148152                unsigned pf_delete      : 1;    /* Destroy the peer when the connection is terminated */
     153                unsigned pf_localterm   : 1;    /* If the latest DPR/DPA was initiated from this side */
    149154               
    150155                unsigned pf_dw_pending  : 1;    /* A DWR message was sent and not answered yet */
     
    192197#define CHECK_PEER( _p ) \
    193198        (((_p) != NULL) && (((struct fd_peer *)(_p))->p_eyec == EYEC_PEER))
     199
     200#define fd_peer_getstate(peer)  fd_peer_get_state((struct peer_hdr *)(peer))
     201
    194202
    195203/* Events codespace for struct fd_peer->p_events */
     
    308316int fd_p_dp_handle(struct msg ** msg, int req, struct fd_peer * peer);
    309317int fd_p_dp_initiate(struct fd_peer * peer, char * reason);
     318int fd_p_dp_newdelay(struct fd_peer * peer);
    310319
    311320/* Active peers -- routing process should only ever take the read lock, the write lock is managed by PSMs */
     
    327336struct cnxctx * fd_cnx_cli_connect_sctp(int no_ip6, uint16_t port, struct fd_list * list);
    328337int             fd_cnx_start_clear(struct cnxctx * conn, int loop);
    329 void            fd_cnx_sethostname(struct cnxctx * conn, char * hn);
     338void            fd_cnx_sethostname(struct cnxctx * conn, DiamId_t hn);
    330339int             fd_cnx_handshake(struct cnxctx * conn, int mode, char * priority, void * alt_creds);
    331340char *          fd_cnx_getid(struct cnxctx * conn);
    332341int             fd_cnx_getproto(struct cnxctx * conn);
    333342int             fd_cnx_getTLS(struct cnxctx * conn);
     343int             fd_cnx_isMultichan(struct cnxctx * conn);
    334344int             fd_cnx_getcred(struct cnxctx * conn, const gnutls_datum_t **cert_list, unsigned int *cert_list_size);
    335345int             fd_cnx_get_local_eps(struct fd_list * list);
     
    343353/* Flags for the fd_cnx_send function : */
    344354#define FD_CNX_ORDERED          (1 << 0)        /* All messages sent with this flag set will be delivered in the same order. No guarantee on other messages */
    345 #define FD_CNX_BROADCAST        (1 << 1)        /* The message is sent over all stream pairs, in case of SCTP. No effect on TCP */
    346355
    347356#endif /* _FDCORE_INTERNAL_H */
Note: See TracChangeset for help on using the changeset viewer.