Navigation


source: freeDiameter/include/freeDiameter/freeDiameter.h @ 25:67ca08d5bc48

Last change on this file since 25:67ca08d5bc48 was 25:67ca08d5bc48, checked in by Sebastien Decugis <sdecugis@nict.go.jp>, 11 years ago

Completed connection context files

File size: 21.9 KB
Line 
1/*********************************************************************************************************
2* Software License Agreement (BSD License)                                                               *
3* Author: Sebastien Decugis <sdecugis@nict.go.jp>                                                        *
4*                                                                                                        *
5* Copyright (c) 2009, WIDE Project and NICT                                                              *
6* All rights reserved.                                                                                   *
7*                                                                                                        *
8* Redistribution and use of this software in source and binary forms, with or without modification, are  *
9* permitted provided that the following conditions are met:                                              *
10*                                                                                                        *
11* * Redistributions of source code must retain the above                                                 *
12*   copyright notice, this list of conditions and the                                                    *
13*   following disclaimer.                                                                                *
14*                                                                                                        *
15* * Redistributions in binary form must reproduce the above                                              *
16*   copyright notice, this list of conditions and the                                                    *
17*   following disclaimer in the documentation and/or other                                               *
18*   materials provided with the distribution.                                                            *
19*                                                                                                        *
20* * Neither the name of the WIDE Project or NICT nor the                                                 *
21*   names of its contributors may be used to endorse or                                                  *
22*   promote products derived from this software without                                                  *
23*   specific prior written permission of WIDE Project and                                                *
24*   NICT.                                                                                                *
25*                                                                                                        *
26* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
27* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
28* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
29* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT     *
30* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS    *
31* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
32* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF   *
33* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                                                             *
34*********************************************************************************************************/
35
36#ifndef _FREEDIAMETER_H
37#define _FREEDIAMETER_H
38
39
40#include <freeDiameter/libfreeDiameter.h>
41#include <gnutls/gnutls.h>
42#include <gnutls/x509.h>
43
44/* GNUTLS version */
45#ifndef GNUTLS_VERSION
46#define GNUTLS_VERSION LIBGNUTLS_VERSION
47#endif /* GNUTLS_VERSION */
48
49/* Check the return value of a GNUTLS function, log and propagate */
50#define CHECK_GNUTLS_DO( __call__, __fallback__ ) {                                             \
51        int __ret__;                                                                            \
52        TRACE_DEBUG_ALL( "Check FCT: " #__call__ );                                             \
53        __ret__ = (__call__);                                                                   \
54        if (__ret__ < 0) {                                                                      \
55                TRACE_DEBUG(INFO, "Error in '" #__call__ "':\t%s", gnutls_strerror(__ret__));   \
56                __fallback__;                                                                   \
57        }                                                                                       \
58}
59
60
61/* Structure to hold the configuration of the freeDiameter daemon */
62struct fd_config {
63        int              cnf_eyec;      /* Eye catcher: EYEC_CONFIG */
64                        #define EYEC_CONFIG     0xC011F16
65       
66        char            *cnf_file;      /* Configuration file to parse, default is DEFAULT_CONF_FILE */
67       
68        char            *cnf_diamid;    /* Diameter Identity of the local peer (FQDN -- UTF-8) */
69        size_t           cnf_diamid_len;        /* length of the previous string */
70        char            *cnf_diamrlm;   /* Diameter realm of the local peer, default to realm part of diam_id */
71        size_t           cnf_diamrlm_len;/* length of the previous string */
72       
73        unsigned int     cnf_timer_tc;  /* The value in seconds of the default Tc timer */
74        unsigned int     cnf_timer_tw;  /* The value in seconds of the default Tw timer */
75       
76        uint16_t         cnf_port;      /* the local port for legacy Diameter (default: 3868) in host byte order */
77        uint16_t         cnf_port_tls;  /* the local port for Diameter/TLS (default: 3869) in host byte order */
78        uint16_t         cnf_sctp_str;  /* default max number of streams for SCTP associations (def: 30) */
79        struct fd_list   cnf_endpoints; /* the local endpoints to bind the server to. list of struct fd_endpoint. default is empty (bind all) */
80        struct fd_list   cnf_apps;      /* Applications locally supported (except relay, see flags). Use fd_disp_app_support to add one. list of struct fd_app. */
81        struct {
82                unsigned no_fwd : 1;    /* the peer does not relay messages (0xffffff app id) */
83                unsigned no_ip4 : 1;    /* disable IP */
84                unsigned no_ip6 : 1;    /* disable IPv6 */
85                unsigned no_tcp : 1;    /* disable use of TCP */
86                unsigned no_sctp: 1;    /* disable the use of SCTP */
87                unsigned pr_tcp : 1;    /* prefer TCP over SCTP */
88                unsigned tls_alg: 1;    /* TLS algorithm for initiated cnx. 0: separate port. 1: inband-security (old) */
89        }                cnf_flags;
90       
91        struct {
92                /* Credentials parameters (backup) */
93                char *                           cert_file;
94                char *                           key_file;
95               
96                char *                           ca_file;
97                char *                           crl_file;
98               
99                char *                           prio_string;
100                unsigned int                     dh_bits;
101               
102                /* GNUTLS parameters */
103                gnutls_priority_t                prio_cache;
104                gnutls_dh_params_t               dh_cache;
105               
106                /* GNUTLS server credential(s) */
107                gnutls_certificate_credentials_t credentials;
108               
109        }                cnf_sec_data;
110       
111        uint32_t         cnf_orstateid; /* The value to use in Origin-State-Id, default to random value */
112        struct dictionary *cnf_dict;    /* pointer to the global dictionary */
113        struct fifo       *cnf_main_ev; /* events for the daemon's main (struct fd_event items) */
114};
115extern struct fd_config *fd_g_config; /* The pointer to access the global configuration, initalized in main */
116
117/* Endpoints */
118struct fd_endpoint {
119        struct fd_list  chain;  /* link in cnf_endpoints list */
120       
121        union {
122                sSS             ss;     /* the socket information. List is always ordered by ss value (memcmp) -- see fd_ep_add_merge */
123                sSA4            sin;
124                sSA6            sin6;
125                sSA             sa;
126        };
127       
128#define EP_FL_CONF      (1 << 0)        /* This endpoint is statically configured in a configuration file */
129#define EP_FL_DISC      (1 << 1)        /* This endpoint was resolved from the Diameter Identity or other DNS query */
130#define EP_FL_ADV       (1 << 2)        /* This endpoint was advertized in Diameter CER/CEA exchange */
131#define EP_FL_LL        (1 << 3)        /* Lower layer mechanism provided this endpoint */
132#define EP_FL_PRIMARY   (1 << 4)        /* This endpoint is primary in a multihomed SCTP association */
133        uint32_t        flags;          /* Additional information about the endpoint */
134               
135        /* To add: a validity timestamp for DNS records ? How do we retrieve this lifetime from DNS ? */
136};
137
138/* Applications */
139struct fd_app {
140        struct fd_list   chain; /* link in cnf_apps list. List ordered by appid. */
141        struct {
142                unsigned auth   : 1;
143                unsigned acct   : 1;
144                unsigned common : 1;
145        }                flags;
146        vendor_id_t      vndid; /* if not 0, Vendor-Specific-App-Id AVP will be used */
147        application_id_t appid; /* The identifier of the application */
148};
149       
150
151/* Events */
152struct fd_event {
153        int      code; /* codespace depends on the queue */
154        size_t   size;
155        void    *data;
156};
157
158/* Daemon's codespace: 1000->1999 */
159enum {
160         FDEV_TERMINATE = 1000  /* request to terminate */
161        ,FDEV_DUMP_DICT         /* Dump the content of the dictionary */
162        ,FDEV_DUMP_EXT          /* Dump state of extensions */
163        ,FDEV_DUMP_SERV         /* Dump the server socket status */
164        ,FDEV_DUMP_QUEUES       /* Dump the message queues */
165        ,FDEV_DUMP_CONFIG       /* Dump the configuration */
166        ,FDEV_DUMP_PEERS        /* Dump the list of peers */
167};
168
169static __inline__ int fd_event_send(struct fifo *queue, int code, size_t datasz, void * data)
170{
171        struct fd_event * ev;
172        CHECK_MALLOC( ev = malloc(sizeof(struct fd_event)) );
173        ev->code = code;
174        ev->size = datasz;
175        ev->data = data;
176        CHECK_FCT( fd_fifo_post(queue, &ev) );
177        return 0;
178}
179static __inline__ int fd_event_get(struct fifo *queue, int *code, size_t *datasz, void ** data)
180{
181        struct fd_event * ev;
182        CHECK_FCT( fd_fifo_get(queue, &ev) );
183        if (code)
184                *code = ev->code;
185        if (datasz)
186                *datasz = ev->size;
187        if (data)
188                *data = ev->data;
189        free(ev);
190        return 0;
191}
192static __inline__ int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int *code, size_t *datasz, void ** data)
193{
194        struct fd_event * ev;
195        int ret = 0;
196        ret = fd_fifo_timedget(queue, &ev, timeout);
197        if (ret == ETIMEDOUT) {
198                if (code)
199                        *code = timeoutcode;
200                if (datasz)
201                        *datasz = 0;
202                if (data)
203                        *data = NULL;
204        } else {
205                CHECK_FCT( ret );
206                if (code)
207                        *code = ev->code;
208                if (datasz)
209                        *datasz = ev->size;
210                if (data)
211                        *data = ev->data;
212                free(ev);
213        }
214        return 0;
215}
216static __inline__ void fd_event_destroy(struct fifo **queue, void (*free_cb)(void * data))
217{
218        struct fd_event * ev;
219        /* Purge all events, and free the associated data if any */
220        while (fd_fifo_tryget( *queue, &ev ) == 0) {
221                (*free_cb)(ev->data);
222                free(ev);
223        }
224        CHECK_FCT_DO( fd_fifo_del(queue), /* continue */ );
225        return ;
226} 
227const char * fd_ev_str(int event); /* defined in freeDiameter/main.c */
228
229
230/***************************************/
231/*   Peers information                 */
232/***************************************/
233
234/* States of a peer */
235enum peer_state {
236        /* Stable states */
237        STATE_NEW = 0,          /* The peer has been just been created, PSM thread not started yet */
238        STATE_OPEN,             /* Connexion established */
239       
240        /* Peer state machine */
241        STATE_CLOSED,           /* No connection established, will re-attempt after TcTimer. */
242        STATE_CLOSING,          /* the connection is being shutdown (DPR/DPA in progress) */
243        STATE_WAITCNXACK,       /* Attempting to establish transport-level connection */
244        STATE_WAITCNXACK_ELEC,  /* Received a CER from this same peer on an incoming connection (other peer object), while we were waiting for cnx ack */
245        STATE_WAITCEA,          /* Connection established, CER sent, waiting for CEA */
246        /* STATE_WAITRETURNS_ELEC, */   /* This state is not stable and therefore deprecated:
247                                   We have sent a CER on our initiated connection, and received a CER from the remote peer on another connection. Election.
248                                   If we win the election, we must disconnect the initiated connection and send a CEA on the other => we go to OPEN state.
249                                   If we lose, we disconnect the other connection (receiver) and fallback to WAITCEA state. */
250        STATE_OPEN_HANDSHAKE,   /* TLS Handshake and validation are in progress in open state */
251       
252        /* Failover state machine */
253        STATE_SUSPECT,          /* A DWR was sent and not answered within TwTime. Failover in progress. */
254        STATE_REOPEN,           /* Connection has been re-established, waiting for 3 DWR/DWA exchanges before putting back to service */
255       
256        /* Error state */
257        STATE_ZOMBIE            /* The PSM thread is not running anymore; it must be re-started or peer should be deleted. */
258#define STATE_MAX STATE_ZOMBIE
259};
260extern const char *peer_state_str[]; /* defined in freeDiameter/p_psm.c */
261#define STATE_STR(state) \
262        (((unsigned)(state)) <= STATE_MAX ? peer_state_str[((unsigned)(state)) ] : "<Invalid>")
263
264/* Information about a remote peer. Same structure is used for creating a new entry, but not all fields are meaningful in that case */
265struct peer_info {
266       
267        char *          pi_diamid;      /* UTF-8, \0 terminated. The Diameter Identity of the remote peer */
268        char *          pi_realm;       /* Its realm, as received in CER/CEA exchange. */
269       
270        struct {
271                #define PI_P3_DEFAULT   0       /* Use the default L3 protocol configured for the host */
272                #define PI_P3_IP        1       /* Use only IP to connect to this peer */
273                #define PI_P3_IPv6      2       /* resp, IPv6 */
274                unsigned        pro3 :2;
275               
276                #define PI_P4_DEFAULT   0       /* Use the default L4 proto configured for the host */
277                #define PI_P4_TCP       1       /* Only use TCP */
278                #define PI_P4_SCTP      2       /* Only use SCTP */
279                unsigned        pro4 :2;
280               
281                #define PI_ALGPREF_SCTP 0       /* SCTP is initially attempted */
282                #define PI_ALGPREF_TCP  1       /* TCP is initially attempted */
283                unsigned        alg :1;
284               
285                #define PI_SEC_DEFAULT  0       /* New TLS security (dedicated port protecting also CER/CEA) */
286                #define PI_SEC_NONE     1       /* Transparent security with this peer (IPsec) */
287                #define PI_SEC_TLS_OLD  2       /* Old TLS security (inband on default port) */
288                unsigned        sec :2;
289               
290                #define PI_EXP_NONE     0       /* the peer entry does not expire */
291                #define PI_EXP_INACTIVE 1       /* the peer entry expires (i.e. is deleted) after pi_lft seconds without activity */
292                unsigned        exp :1;
293               
294                unsigned        inband_none :1; /* This is only meaningful with pi_flags.sec == 3 */
295                unsigned        inband_tls  :1; /* This is only meaningful with pi_flags.sec == 3 */
296               
297                unsigned        relay :1;       /* The remote peer advertized the relay application */
298
299        }               pi_flags;       /* Some flags */
300       
301        /* Additional parameters */
302        uint32_t        pi_lft;         /* lifetime of this peer when inactive (see pi_flags.exp definition) */
303        uint16_t        pi_port;        /* port to connect to. 0: default. */
304        int             pi_tctimer;     /* use this value for TcTimer instead of global, if != 0 */
305        int             pi_twtimer;     /* use this value for TwTimer instead of global, if != 0 */
306       
307        struct fd_list  pi_endpoints;   /* Endpoint(s) of the remote peer (configured, discovered, or advertized). list of struct fd_endpoint. DNS resolved if empty. */
308       
309        /* The remaining information must not be modified, and is not used for peer creation */
310        enum peer_state pi_state;
311        uint32_t        pi_vendorid;    /* Content of the Vendor-Id AVP, or 0 by default */
312        uint32_t        pi_orstate;     /* Origin-State-Id value */
313        char *          pi_prodname;    /* copy of UTF-8 Product-Name AVP (\0 terminated) */
314        uint32_t        pi_firmrev;     /* Content of the Firmware-Revision AVP */
315        struct fd_list  pi_apps;        /* applications advertised by the remote peer, except relay (pi_flags.relay) */
316        struct {
317                char                    *priority;      /* In case the default priority is not appropriate */
318                /* This is inspired from http://www.gnu.org/software/gnutls/manual/gnutls.html#ex_003ax509_002dinfo */
319                const gnutls_datum_t    *cert_list;     /* The (valid) credentials that the peer has presented */
320                unsigned int             cert_list_size;/* Number of certificates in the list */
321        }               pi_sec_data;
322};
323
324struct peer_hdr {
325        struct fd_list   chain; /* List of all the peers, ordered by their Diameter Id */
326        struct peer_info info;  /* The public data */
327       
328        /* This header is followed by more data in the private peer structure definition */
329};
330
331/* the global list of peers.
332  Since we are not expecting so many connections, we don't use a hash, but it might be changed.
333  The list items are peer_hdr structures (actually, fd_peer, but the cast is OK) */
334extern struct fd_list fd_g_peers;
335extern pthread_rwlock_t fd_g_peers_rw; /* protect the list */
336
337/*
338 * FUNCTION:    fd_peer_add
339 *
340 * PARAMETERS:
341 *  info        : Information to create the peer.
342 *  orig_dbg    : A string indicating the origin of the peer information, for debug (ex: conf, redirect, ...)
343 *  cb          : optional, a callback to call (once) when the peer connection is established or failed
344 *  cb_data     : opaque data to pass to the callback.
345 *
346 * DESCRIPTION:
347 *  Add a peer to the list of peers to which the daemon must maintain a connexion.
348 *
349 *  The content of info parameter is copied, except for the list of endpoints if
350 * not empty, which is simply moved into the created object. It means that the list
351 * items must have been malloc'd, so that they can be freed.
352 *
353 *  If cb is not null, the callback is called when the connection is in OPEN state or
354 * when an error has occurred. The callback should use the pi_state information to
355 * determine which one it is. If the first parameter of the called callback is NULL, it
356 * means that the peer is being destroyed before attempt success / failure.
357 * cb is called to allow freeing cb_data in  * this case.
358 *
359 *  The orig_dbg string is only useful for easing debug, and can be left to NULL.
360 *
361 * RETURN VALUE:
362 *  0           : The peer is added.
363 *  EINVAL      : A parameter is invalid.
364 *  EEXIST      : A peer with the same Diameter-Id is already in the list.
365 *  (other standard errors may be returned, too, with their standard meaning. Example:
366 *    ENOMEM    : Memory allocation for the new object element failed.)
367 */
368int fd_peer_add ( struct peer_info * info, char * orig_dbg, void (*cb)(struct peer_info *, void *), void * cb_data );
369
370/*
371 * FUNCTION:    peer_validate_register
372 *
373 * PARAMETERS:
374 *  peer_validate       : Callback as defined bellow.
375 *
376 * DESCRIPTION:
377 *  Add a callback to authorize / reject incoming peer connections.
378 * All registered callbacks are called until a callback sets auth = -1 or auth = 1.
379 * If no callback returns a clear decision, the default behavior is applied (reject unknown connections)
380 *
381 * RETURN VALUE:
382 *  0   : The callback is added.
383 * !0   : An error occurred.
384 */
385int fd_peer_validate_register ( int (*peer_validate)(struct peer_info * /* info */, int * /* auth */, int (**cb2)(struct peer_info *)) );
386/*
387 * CALLBACK:    peer_validate
388 *
389 * PARAMETERS:
390 *   info     : Structure containing information about the peer attempting the connection.
391 *   auth     : Store there the result if the peer is accepted (1), rejected (-1), or unknown (0).
392 *   cb2      : If != NULL and in case of PI_SEC_TLS_OLD, another callback to call after handshake (if auth = 1).
393 *
394 * DESCRIPTION:
395 *   This callback is called when a new connection is being established from an unknown peer,
396 * after the CER is received. An extension must register such callback with peer_validate_register.
397 *
398 *   If (info->pi_flags.sec == PI_SEC_TLS_OLD) the extension may instruct the daemon explicitely
399 * to not use TLS by clearing info->pi_flags.inband_tls -- only if inband_none is set.
400 *
401 *   If (info->pi_flags.sec == PI_SEC_TLS_OLD) and info->pi_flags.inband_tls is set,
402 * the extension may also need to check the credentials provided during the TLS
403 * exchange (remote certificate). For this purpose, it may set the address of a new callback
404 * to be called once the handshake is completed. This new callback receives the information
405 * structure as parameter (with pi_sec_data set) and returns 0 if the credentials are correct,
406 * or an error code otherwise. If the error code is received, the connection is closed and the
407 * peer is destroyed.
408 *
409 * RETURN VALUE:
410 *  0           : The authorization decision has been written in the location pointed by auth.
411 *  !0          : An error occurred.
412 */
413
414/***************************************/
415/*   Sending a message on the network  */
416/***************************************/
417
418/*
419 * FUNCTION:    fd_msg_send
420 *
421 * PARAMETERS:
422 *  pmsg        : Location of the message to be sent on the network (set to NULL on function return to avoid double deletion).
423 *  anscb       : A callback to be called when answer is received, if msg is a request (optional)
424 *  anscb_data  : opaque data to be passed back to the anscb when it is called.
425 *
426 * DESCRIPTION:
427 *   Sends a message on the network. (actually simply queues it in a global queue, to be picked by a daemon's thread)
428 * For requests, the end-to-end id must be set (see fd_msg_get_eteid / MSGFL_ALLOC_ETEID).
429 * For answers, the message must be created with function fd_msg_new_answ.
430 *
431 * The routing module will handle sending to the correct peer, usually based on the Destination-Realm / Destination-Host AVP.
432 *
433 * If the msg is a request, there are two ways of receiving the answer:
434 *  - either having registered a callback in the dispatch module (see disp_register)
435 *  - or provide a callback as parameter here. If such callback is provided, it is called before the dispatch callbacks.
436 *    The prototype for this callback function is:
437 *     void anscb(void * data, struct msg ** answer)
438 *      where:
439 *              data   : opaque data that was registered along with the callback.
440 *              answer : location of the pointer to the answer.
441 *      note1: on function return, if *answer is not NULL, the message is passed to the dispatch module for regular callbacks.
442 *             otherwise, the callback must take care of freeing the message (msg_free).
443 *      note2: the opaque data is not freed by the daemon in any case, extensions should ensure clean handling in waaad_ext_fini.
444 *
445 * If no callback is registered to handle an answer, the message is discarded and an error is logged.
446 *
447 * RETURN VALUE:
448 *  0           : The message has been queued for sending (sending may fail asynchronously).
449 *  EINVAL      : A parameter is invalid (ex: anscb provided but message is not a request).
450 *  ...
451 */
452int fd_msg_send ( struct msg ** pmsg, void (*anscb)(void *, struct msg **), void * data );
453
454/*
455 * FUNCTION:    fd_msg_rescode_set
456 *
457 * PARAMETERS:
458 *  msg         : A msg object -- it must be an answer.
459 *  rescode     : The name of the returned error code (ex: "DIAMETER_INVALID_AVP")
460 *  errormsg    : (optional) human-readable error message to put in Error-Message AVP
461 *  optavp      : (optional) If provided, the content will be put inside a Failed-AVP
462 *  type_id     : 0 => nothing; 1 => adds Origin-Host and Origin-Realm with local info. 2=> adds Error-Reporting-Host.
463 *
464 * DESCRIPTION:
465 *   This function adds a Result-Code AVP to a message, and optionally
466 *  - sets the 'E' error flag in the header,
467 *  - adds Error-Message, Error-Reporting-Host and Failed-AVP AVPs.
468 *
469 * RETURN VALUE:
470 *  0           : Operation complete.
471 *  !0          : an error occurred.
472 */
473int fd_msg_rescode_set( struct msg * msg, char * rescode, char * errormsg, struct avp * optavp, int type_id );
474
475/* Add Origin-Host, Origin-Realm, (if osi) Origin-State-Id AVPS at the end of the message */
476int fd_msg_add_origin ( struct msg * msg, int osi ); 
477
478
479
480/***************************************/
481/*   Dispatch module, daemon's part    */
482/***************************************/
483
484/*
485 * FUNCTION:    fd_disp_app_support
486 *
487 * PARAMETERS:
488 *  app         : The dictionary object corresponding to the Application.
489 *  vendor      : (Optional) the dictionary object of a Vendor to claim support in Vendor-Specific-Application-Id
490 *  auth        : Support auth app part.
491 *  acct        : Support acct app part.
492 *
493 * DESCRIPTION:
494 *   Registers an application to be advertized in CER/CEA exchanges.
495 *  Messages with an application-id matching a registered value are passed to the dispatch module,
496 * while other messages are simply relayed or an error is returned (if local node does not relay)
497 *
498 * RETURN VALUE:
499 *  0           : The application support is registered.
500 *  EINVAL      : A parameter is invalid.
501 */
502int fd_disp_app_support ( struct dict_object * app, struct dict_object * vendor, int auth, int acct );
503
504/* Note: if we want to support capabilities updates, we'll have to add possibility to remove an app as well... */
505
506
507/***************************************/
508/*   Endpoints lists helpers           */
509/***************************************/
510
511int fd_ep_add_merge( struct fd_list * list, sSA * sa, socklen_t sl, uint32_t flags );
512int fd_ep_filter( struct fd_list * list, uint32_t flags );
513int fd_ep_clearflags( struct fd_list * list, uint32_t flags );
514
515
516
517#endif /* _FREEDIAMETER_H */
Note: See TracBrowser for help on using the repository browser.