Navigation


Changeset 22:0b3b46da2c12 in freeDiameter for freeDiameter/fD.h


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

Progress on server code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/fD.h

    r21 r22  
    157157        ,FDEVP_TERMINATE
    158158       
     159        /* A connection object has received a message -- stored in event->data */
     160        ,FDEVP_CNX_MSG_RECV
     161       
    159162        /* A message was received in the peer */
    160163        ,FDEVP_MSG_INCOMING
     
    162165        /* The PSM state is expired */
    163166        ,FDEVP_PSM_TIMEOUT
     167       
    164168};
    165169const char * fd_pev_str(int event);
     
    196200void fd_servers_dump();
    197201int fd_servers_start();
    198 void fd_servers_stop();
     202int fd_servers_stop();
    199203
    200204/* Connection contexts */
    201 struct cnxctx * fd_cnx_init(int sock, int proto);
     205struct cnxctx * fd_cnx_serv_tcp(uint16_t port, int family, struct fd_endpoint * ep);
     206struct cnxctx * fd_cnx_serv_sctp(uint16_t port, struct fd_list * ep_list);
     207int fd_cnx_serv_listen(struct cnxctx * conn);
     208struct cnxctx * fd_cnx_serv_accept(struct cnxctx * serv);
     209struct cnxctx * fd_cnx_cli_connect(int proto, const sSA * sa,  socklen_t addrlen);
     210char * fd_cnx_getid(struct cnxctx * conn);
    202211int fd_cnx_start_clear(struct cnxctx * conn);
    203 int fd_cnx_handshake(struct cnxctx * conn, int mode);
     212int fd_cnx_handshake(struct cnxctx * conn, int mode, char * priority);
    204213int fd_cnx_getcred(struct cnxctx * conn, const gnutls_datum_t **cert_list, unsigned int *cert_list_size);
    205 int fd_cnx_getendpoints(struct cnxctx * conn, struct fd_list * senti);
     214int fd_cnx_getendpoints(struct cnxctx * conn, struct fd_list * local, struct fd_list * remote);
    206215char * fd_cnx_getremoteid(struct cnxctx * conn);
    207216int fd_cnx_receive(struct cnxctx * conn, struct timespec * timeout, unsigned char **buf, size_t * len);
     217int fd_cnx_recv_setaltfifo(struct cnxctx * conn, struct fifo * alt_fifo); /* send FDEVP_CNX_MSG_RECV event to the fifo list */
    208218int fd_cnx_send(struct cnxctx * conn, unsigned char * buf, size_t len);
    209219void fd_cnx_destroy(struct cnxctx * conn);
    210220
     221/* TCP */
     222int fd_tcp_create_bind_server( int * sock, sSA * sa, socklen_t salen );
     223int fd_tcp_listen( int sock );
     224
    211225/* SCTP */
    212226#ifndef DISABLE_SCTP
    213 int fd_sctp_create_bind_server( int * socket, uint16_t port );
     227int fd_sctp_create_bind_server( int * sock, struct fd_list * list, uint16_t port );
     228int fd_sctp_listen( int sock );
     229
    214230int fd_sctp_get_str_info( int socket, int *in, int *out );
    215231
Note: See TracChangeset for help on using the changeset viewer.