Changeset 21:bef197f6826f in freeDiameter for freeDiameter/fD.h
- Timestamp:
- Oct 8, 2009, 8:05:16 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameter/fD.h
r20 r21 173 173 }; 174 174 175 /* The connection context structure */176 struct 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 175 209 176 /* Functions */ … … 233 200 /* Connection contexts */ 234 201 struct cnxctx * fd_cnx_init(int sock, int proto); 202 int fd_cnx_start_clear(struct cnxctx * conn); 235 203 int fd_cnx_handshake(struct cnxctx * conn, int mode); 204 int 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); 206 char * fd_cnx_getremoteid(struct cnxctx * conn); 207 int fd_cnx_receive(struct cnxctx * conn, struct timespec * timeout, unsigned char **buf, size_t * len); 208 int fd_cnx_send(struct cnxctx * conn, unsigned char * buf, size_t len); 209 void fd_cnx_destroy(struct cnxctx * conn); 236 210 237 211 /* SCTP */
Note: See TracChangeset
for help on using the changeset viewer.