Navigation


Changeset 717:571b3abaa5df in freeDiameter for include


Ignore:
Timestamp:
Feb 18, 2011, 2:50:37 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Support for Diameter Redirects through rt_redirect.fdx extension (EXPERIMENTAL)

Location:
include/freeDiameter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/libfdcore.h

    r706 r717  
    658658enum fd_rt_out_score {
    659659        FD_SCORE_NO_DELIVERY     = -70, /* We should not send this message to this candidate */
     660        FD_SCORE_SENT_REDIRECT   = -60, /* If this peer previously sent a Redirect indication that applies to this message */
    660661        FD_SCORE_INI             =  -2, /* All candidates are initialized with this value */
    661662        FD_SCORE_LOAD_BALANCE    =   1, /* Use this to differentiate between several peers with the same score */
     
    669670        FD_SCORE_REDIR_USER      =  45, /* If there is a redirect rule with ALL_USER for these message and peer */
    670671        FD_SCORE_REDIR_SESSION   =  50, /* If there is a redirect rule with ALL_SESSION for these message and peer */
     672        FD_SCORE_REDIR_ONCE      =  55, /* If there is a redirect rule with DONT_CACHE for these message and peer */
    671673        FD_SCORE_FINALDEST       = 100  /* If the peer is the final recipient of the message (i.e. matching Destination-Host), it receives a big score. */
    672674};
  • include/freeDiameter/libfdproto.h

    r706 r717  
    607607int fd_os_is_valid_DiameterIdentity(uint8_t * os, size_t ossz);
    608608
    609 /* This checks a string is a valid DiameterIdentity and applies IDNA transformations otherwise (xn--...) */
    610 int fd_os_validate_DiameterIdentity(char ** id, size_t * outsz, int memory /* 0: *id can be realloc'd. 1: *id must be malloc'd on output (was static) */ );
     609/* The following function validates a string as a Diameter Identity or applies the IDNA transformation on it
     610 if *inoutsz is != 0 on entry, *id may not be \0-terminated.
     611 memory has the following meaning: 0: *id can be realloc'd. 1: *id must be malloc'd on output (was static)
     612*/
     613int fd_os_validate_DiameterIdentity(char ** id, size_t * inoutsz, int memory);
    611614
    612615/* Create an order relationship for binary strings (not needed to be \0 terminated).
     
    627630#define fd_os_almostcasecmp(_o1, _l1, _o2, _l2)  fd_os_almostcasecmp_int((os0_t)(_o1), _l1, (os0_t)(_o2), _l2)
    628631
     632/* Analyze a DiameterURI and return its components.
     633  Return EINVAL if the URI is not valid.
     634  *diamid is malloc'd on function return and must be freed (it is processed by fd_os_validate_DiameterIdentity).
     635  *secure is 0 (no security) or 1 (security enabled) on return.
     636  *port is 0 (default) or a value in host byte order on return.
     637  *transport is 0 (default) or IPPROTO_* on return.
     638  *proto is 0 (default) or 'd' (diameter), 'r' (radius), or 't' (tacacs+) on return.
     639  */
     640int fd_os_parse_DiameterURI(uint8_t * uri, size_t urisz, DiamId_t * diamid, size_t * diamidlen, int * secure, uint16_t * port, int * transport, char *proto);
    629641
    630642/*============================================================*/
Note: See TracChangeset for help on using the changeset viewer.