Changeset 83:c662d3eb6ff6 in freeDiameter for include/freeDiameter/libfreeDiameter.h
- Timestamp:
- Dec 2, 2009, 6:28:28 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/libfreeDiameter.h
r43 r83 1613 1613 1614 1614 /*============================================================*/ 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 */ 1622 struct rt_data; 1623 1624 /* Following functions are helpers to create the routing data of a message */ 1625 int fd_rtd_init(struct rt_data ** rtd); 1626 void fd_rtd_free(struct rt_data ** rtd); 1627 1628 /* Add a peer to the candidates list */ 1629 int fd_rtd_candidate_add(struct rt_data * rtd, char * peerid); 1630 1631 /* Remove a peer from the candidates (if it is found) */ 1632 void 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 */ 1635 int 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 */ 1638 void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** candidates); 1639 1640 /* The extracted list items have the following structure: */ 1641 struct 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 */ 1648 int fd_rtd_candidate_reorder(struct fd_list * candidates); 1649 1650 1651 /*============================================================*/ 1615 1652 /* MESSAGES */ 1616 1653 /*============================================================*/ … … 1959 1996 * EINVAL: a parameter is invalid 1960 1997 */ 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);1998 int fd_msg_rt_associate( struct msg * msg, struct rt_data ** rtd ); 1999 int fd_msg_rt_get ( struct msg * msg, struct rt_data ** rtd ); 1963 2000 1964 2001 /*
Note: See TracChangeset
for help on using the changeset viewer.