Navigation



Ignore:
Timestamp:
Dec 2, 2009, 6:28:28 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Started support for routing module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/libfreeDiameter.h

    r43 r83  
    16131613
    16141614/*============================================================*/
     1615/*                         ROUTING                            */
     1616/*============================================================*/
     1617
     1618/* The following functions are helpers for the routing module.
     1619  The routing data is stored in the message it-self. */
     1620
     1621/* Structure that contains the routing data for a message */
     1622struct rt_data;
     1623
     1624/* Following functions are helpers to create the routing data of a message */
     1625int  fd_rtd_init(struct rt_data ** rtd);
     1626void fd_rtd_free(struct rt_data ** rtd);
     1627
     1628/* Add a peer to the candidates list */
     1629int  fd_rtd_candidate_add(struct rt_data * rtd, char * peerid);
     1630
     1631/* Remove a peer from the candidates (if it is found) */
     1632void fd_rtd_candidate_del(struct rt_data * rtd, char * peerid, size_t sz /* if !0, peerid does not need to be \0 terminated */);
     1633
     1634/* If a peer returned a protocol error for this message, save it so that we don't try to send it there again */
     1635int  fd_rtd_error_add(struct rt_data * rtd, char * sentto, uint8_t * origin, size_t originsz, uint32_t rcode);
     1636
     1637/* Extract the list of valid candidates, and initialize their scores to 0 */
     1638void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** candidates);
     1639
     1640/* The extracted list items have the following structure: */
     1641struct rtd_candidate {
     1642        struct fd_list  chain;  /* link in the list returned by the previous fct */
     1643        char *          diamid; /* the diameter Id of the peer */
     1644        int             score;  /* the current routing score for this peer, see fd_rt_out_register definition for details */
     1645};
     1646
     1647/* Reorder the list of peers */
     1648int  fd_rtd_candidate_reorder(struct fd_list * candidates);
     1649
     1650
     1651/*============================================================*/
    16151652/*                         MESSAGES                           */
    16161653/*============================================================*/
     
    19591996 *  EINVAL: a parameter is invalid
    19601997 */
    1961 int fd_msg_rt_associate( struct msg * msg, struct fd_list ** list );
    1962 int fd_msg_rt_get      ( struct msg * msg, struct fd_list ** list );
     1998int fd_msg_rt_associate( struct msg * msg, struct rt_data ** rtd );
     1999int fd_msg_rt_get      ( struct msg * msg, struct rt_data ** rtd );
    19632000
    19642001/*
Note: See TracChangeset for help on using the changeset viewer.