Changeset 12:418d2ce80dc8 in freeDiameter for include/freeDiameter/freeDiameter.h
- Timestamp:
- Sep 28, 2009, 5:29:25 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/freeDiameter.h
r11 r12 125 125 /* Events codespace for fd_g_config->cnf_main_ev */ 126 126 enum { 127 FDEV_TERMINATE = 1000,/* request to terminate */128 FDEV_DUMP_DICT,/* Dump the content of the dictionary */129 FDEV_DUMP_EXT,/* Dump state of extensions */130 FDEV_DUMP_QUEUES,/* Dump the message queues */131 FDEV_DUMP_CONFIG,/* Dump the configuration */132 FDEV_DUMP_PEERS/* Dump the list of peers */127 FDEV_TERMINATE = 1000 /* request to terminate */ 128 ,FDEV_DUMP_DICT /* Dump the content of the dictionary */ 129 ,FDEV_DUMP_EXT /* Dump state of extensions */ 130 ,FDEV_DUMP_QUEUES /* Dump the message queues */ 131 ,FDEV_DUMP_CONFIG /* Dump the configuration */ 132 ,FDEV_DUMP_PEERS /* Dump the list of peers */ 133 133 }; 134 134 … … 161 161 }; 162 162 extern const char *peer_state_str[]; 163 #define STATE_STR(state) \ 164 peer_state_str[ ((unsigned)(state)) <= STATE_REOPEN ? ((unsigned)(state)) : 0 ] 163 165 164 166 /* Information about a remote peer, used both for query and for creating a new entry */ 165 167 struct peer_info { 166 168 167 /* This information is always there */168 169 char * pi_diamid; /* UTF-8, \0 terminated. The Diameter Identity of the remote peer */ 169 170 char * pi_realm; /* idem, its realm. */ 170 171 171 /* Flags */172 172 struct { 173 #define PI_PROT_DEFAULT 0 /* Use the default algorithm configured for the host */ 174 #define PI_PROT_TCP 1 175 #define PI_PROT_SCTP 2 176 unsigned proto :2; 177 178 #define PI_SEC_DEFAULT 0 /* The default behavior configured for the host */ 173 #define PI_P3_DEFAULT 0 /* Use the default L3 protocol configured for the host */ 174 #define PI_P3_IP 1 /* Use only IP to connect to this peer */ 175 #define PI_P3_IPv6 2 /* resp, IPv6 */ 176 unsigned pro3 :2; 177 178 #define PI_P4_DEFAULT 0 /* Use the default L4 proto configured for the host */ 179 #define PI_P4_TCP 1 /* Only use TCP */ 180 #define PI_P4_SCTP 2 /* Only use SCTP */ 181 unsigned pro4 :2; 182 183 #define PI_ALGPREF_SCTP 0 /* SCTP is initially attempted */ 184 #define PI_ALGPREF_TCP 1 /* TCP is initially attempted */ 185 unsigned alg :1; 186 187 #define PI_SEC_DEFAULT 0 /* New TLS security (dedicated port protecting also CER/CEA) */ 179 188 #define PI_SEC_NONE 1 /* Transparent security with this peer (IPsec) */ 180 #define PI_SEC_TLS_NEW 2 /* New TLS security (dedicated port protecting also CER/CEA) */ 181 #define PI_SEC_TLS_OLD 3 /* Old TLS security (inband on default port) */ 189 #define PI_SEC_TLS_OLD 2 /* Old TLS security (inband on default port) */ 182 190 unsigned sec :2; 183 191 184 #define PI_EXP_DEFAULT 0 185 #define PI_EXP_NONE 1 /* the peer entry does not expire */ 186 #define PI_EXP_INACTIVE 2 /* the peer entry expires after pi_lft seconds without activity */ 187 #define PI_EXP_LIFETIME 3 /* the peer SA information is destroyed after lft seconds (example: DNS timeout) */ 188 unsigned exp :2; 192 #define PI_EXP_NONE 0 /* the peer entry does not expire */ 193 #define PI_EXP_INACTIVE 1 /* the peer entry expires after pi_lft seconds without activity */ 194 unsigned exp :1; 189 195 190 196 /* Following flags are read-only and received from remote peer */ … … 232 238 * PARAMETERS: 233 239 * info : Information to create the peer. 240 * orig_dbg : A string indicating the origin of the peer information, for debug (ex: conf, redirect, ...) 234 241 * cb : optional, a callback to call (once) when the peer connection is established or failed 235 242 * cb_data : opaque data to pass to the callback. … … 248 255 * ENOMEM : Memory allocation for the new object element failed.) 249 256 */ 250 int fd_peer_add ( struct peer_info * info, void (*cb)(struct peer_info *, void *), void * cb_data );257 int fd_peer_add ( struct peer_info * info, char * orig_dbg, void (*cb)(struct peer_info *, void *), void * cb_data ); 251 258 252 259 /*
Note: See TracChangeset
for help on using the changeset viewer.