Navigation


Changeset 20:277ec00d793e in freeDiameter for freeDiameter/fD.h


Ignore:
Timestamp:
Oct 7, 2009, 7:31:39 PM (15 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Backup before typhoon... Progress on server side

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/fD.h

    r16 r20  
    173173};
    174174
     175/* The connection context structure */
     176struct cnxctx {
     177        int             cc_socket;      /* The socket object of the connection -- <=0 if no socket is created */
     178       
     179        struct fifo   **cc_events;      /* Location of the events list to send connection events */
     180       
     181        int             cc_proto;       /* IPPROTO_TCP or IPPROTO_SCTP */
     182        int             cc_tls;         /* Is TLS already started ? */
     183       
     184        uint16_t        cc_port;        /* Remote port of the connection, when we are client */
     185        struct fd_list  cc_ep_remote;   /* The remote address(es) of the connection */
     186        struct fd_list  cc_ep_local;    /* The local address(es) of the connection */
     187       
     188        /* If cc_proto == SCTP */
     189        struct  {
     190                int             str_out;/* Out streams */
     191                int             str_in; /* In streams */
     192                int             pairs;  /* max number of pairs ( = min(in, out)) */
     193                int             next;   /* # of stream the next message will be sent to */
     194        }               cc_sctp_para;
     195       
     196        /* If cc_tls == true */
     197        struct {
     198                int                              mode;          /* GNUTLS_CLIENT / GNUTLS_SERVER */
     199                gnutls_session_t                 session;       /* Session object (stream #0 in case of SCTP) */
     200        }               cc_tls_para;
     201       
     202        /* If both conditions */
     203        struct {
     204                gnutls_session_t                *res_sessions;  /* Sessions of other pairs of streams, resumed from the first */
     205                /* Buffers, threads, ... */
     206        }               cc_sctp_tls_para;
     207};
     208
    175209/* Functions */
    176210int fd_peer_fini();
     
    192226void fd_psm_abord(struct fd_peer * peer );
    193227
     228/* Server sockets */
     229void fd_servers_dump();
     230int fd_servers_start();
     231void fd_servers_stop();
     232
     233/* Connection contexts */
     234struct cnxctx * fd_cnx_init(int sock, int proto);
     235int fd_cnx_handshake(struct cnxctx * conn, int mode);
     236
     237/* SCTP */
     238#ifndef DISABLE_SCTP
     239int fd_sctp_create_bind_server( int * socket, uint16_t port );
     240int fd_sctp_get_str_info( int socket, int *in, int *out );
     241
     242#endif /* DISABLE_SCTP */
     243
     244
     245
    194246#endif /* _FD_H */
Note: See TracChangeset for help on using the changeset viewer.