comparison include/freeDiameter/libfreeDiameter.h @ 168:6db078b955e3

Completed rt_default extension
author Sebastien Decugis <sdecugis@nict.go.jp>
date Tue, 02 Feb 2010 10:15:05 +0900
parents e2dc300819b3
children 2b2f78036749
comparison
equal deleted inserted replaced
167:967e579beb64 168:6db078b955e3
1629 /*============================================================*/ 1629 /*============================================================*/
1630 /* ROUTING */ 1630 /* ROUTING */
1631 /*============================================================*/ 1631 /*============================================================*/
1632 1632
1633 /* The following functions are helpers for the routing module. 1633 /* The following functions are helpers for the routing module.
1634 The routing data is stored in the message it-self. */ 1634 The routing data is stored in the message itself. */
1635 1635
1636 /* Structure that contains the routing data for a message */ 1636 /* Structure that contains the routing data for a message */
1637 struct rt_data; 1637 struct rt_data;
1638 1638
1639 /* Following functions are helpers to create the routing data of a message */ 1639 /* Following functions are helpers to create the routing data of a message */
1640 int fd_rtd_init(struct rt_data ** rtd); 1640 int fd_rtd_init(struct rt_data ** rtd);
1641 void fd_rtd_free(struct rt_data ** rtd); 1641 void fd_rtd_free(struct rt_data ** rtd);
1642 1642
1643 /* Add a peer to the candidates list */ 1643 /* Add a peer to the candidates list */
1644 int fd_rtd_candidate_add(struct rt_data * rtd, char * peerid); 1644 int fd_rtd_candidate_add(struct rt_data * rtd, char * peerid, char * realm);
1645 1645
1646 /* Remove a peer from the candidates (if it is found) */ 1646 /* Remove a peer from the candidates (if it is found) */
1647 void fd_rtd_candidate_del(struct rt_data * rtd, char * peerid, size_t sz /* if !0, peerid does not need to be \0 terminated */); 1647 void fd_rtd_candidate_del(struct rt_data * rtd, char * peerid, size_t sz /* if !0, peerid does not need to be \0 terminated */);
1648 1648
1649 /* Extract the list of valid candidates, and initialize their scores to 0 */ 1649 /* Extract the list of valid candidates, and initialize their scores to 0 */
1654 1654
1655 /* The extracted list items have the following structure: */ 1655 /* The extracted list items have the following structure: */
1656 struct rtd_candidate { 1656 struct rtd_candidate {
1657 struct fd_list chain; /* link in the list returned by the previous fct */ 1657 struct fd_list chain; /* link in the list returned by the previous fct */
1658 char * diamid; /* the diameter Id of the peer */ 1658 char * diamid; /* the diameter Id of the peer */
1659 char * realm; /* the diameter realm of the peer (if known) */
1659 int score; /* the current routing score for this peer, see fd_rt_out_register definition for details */ 1660 int score; /* the current routing score for this peer, see fd_rt_out_register definition for details */
1660 }; 1661 };
1661 1662
1662 /* Reorder the list of peers */ 1663 /* Reorder the list of peers */
1663 int fd_rtd_candidate_reorder(struct fd_list * candidates); 1664 int fd_rtd_candidate_reorder(struct fd_list * candidates);
"Welcome to our mercurial repository"